assist in the creation of java class

New to Java, with a problem to understand why the class I created is not being recognized correctly.  I'll call you in the following way,

Bitmap test = ScaleImg("","",0.0,0.0);

I created the class in the following way,

class ScaleImg extends BitmapField{

    private String _imagename, _direction;
    private double _scaleHeight, _scaleWidth;

    public ScaleImg(String imagename, String direction, double scaleHeight, double scaleWidth )
    {
        _imagename = imagename;
        _direction = direction;
        _scaleHeight = scaleHeight;
        _scaleWidth = scaleWidth;
    }

    private Bitmap resiezeImg(){
        ...
        ...        return image.getBitmap();
    }
}

I get the following error

some path / Screen.java:59: cannot find symbol
symbol: method ScaleImg (java.lang.String, java.lang.String, double, double)
Location: class loginScreen
The test bitmap is ScaleImg ("","", 0.0, 0.0);.
^

You did not use the new operator to create an object of a class.

Give a glance samples to create objects of a class.

Tags: BlackBerry Developers

Similar Questions

  • Call the JavaScript file java class in the native blackberry development.


    What you are looking for is the ScriptableFunction class.

    You can extend the script engine of a JavaScript object name to a ScriptableFunction Java class mapping.  In this example, if you called foo. JavaScript bar(), the BrowserField would facilitate a call to the invoke() method defined in the MyScriptableFunction() class:

    protected BrowserField _browserField   = null;
    _browserField = new BrowserField();
    _browserField.extendScriptEngine("foo.Bar", new MyScriptableFunction());
    

    Then you set your ScriptableFunction class like this and fill it with some Java code, you need.  Note: it only accepts strings as input parameters.

    import net.rim.device.api.script.ScriptableFunction;
    
    /**
     * @description Demonstration of using the ScriptableFunction class added to version 5.0 of the BlackBerry Device
     *              Software
     * @version 1.0
     * @author Adam Stanley, Developer Relations
     * @category BlackBerry BrowserField Development: ScriptableFunction API
     * @see http ://www.blackberry.com/developers/docs/5.0.0api/net/rim/device/api/script/ScriptableFunction .html
     */
    
    /**
     * This class can be used to represent a function in the JavaScript environment.
     */
    public class MyScriptableFunction extends ScriptableFunction
    {
    
        /**
         * User has invoked this ScriptableFunction from the JavaScript engine This example shows how to open the Messages
         * application and create a new message
         */
        public Object invoke(Object obj, Object[] args) throws Exception
        {
            if (args.length == 3)
            {
    
                String param1 = args[0].toString();
                String param2 = args[1].toString();
                String param3 = args[2].toString();
    
                //Do something
            }
            return Boolean.TRUE; //Always
        }
    
    }
    

    Hope that helps.

  • Assistance with the creation of the VM for the automation of laboratory and criticism

    Being a novice at scripting powershellCLI from scratch, I managed to put together a script to automate the creation of virtual machines for my ESXi5.1 training laboratory. Some of my orders have been adapted from Luc - D blog. Many thanks for your great blog.

    I have a list of virtual computers that have different OS, memory, CPU, disk, NetworkPort, ISOPath, FloppyDrive etc.


    Here's the routine I created to go after using the help of VMware PowerCLI and the reference and examples of the VMware community. I would like to help to be able to optimize the code to speed up the processing, because it does not have enough in the process, I tried to use the | Out-Null but it does not seem to turn off the output. I also wanted to know how read a CSV file parameters and phase of each virtual machine created by feeding one after the other time it has been fully configured, as remotely via VMTools looking for the existence of a file or setting on a virtual machine before the next VM is created in order--something like a configuration of vAPP. I tried the CSV file, but only managed to partially run my script is included below:
    Finally, when it's time to clean up a script to check if the virtual machine is turned on then turn off and delete the inventory and drive of the virtual computer. (I think I could manage removing relatively easily). Hope my request is not a big ask.

    Thanks in advance.


    # Connect to vSphere Host with root

    $date = get-Date

    $ESXhost = Read-Host "enter the host ESX or IP name.

    $username = Read-Host "Username".

    $password = Read-Host "Password."

    SE connect-VIServer-Server $ESXhost - User $username - Password $password


    # Create DC

    $VMname = "Lab_DC".

    New-VM - VMHost $ESXhost - CD - name $VMname - MemoryMB 512 - NumCPU 1 - Version v9 - ID windows7Server64Guest-Floppy - Datastore LUN1-DiskGB 15 - DiskStorageFormat thin - Notes '$VMname AutoDeployed on $date.

    Get - VM $VMname | Get-CDDrive. Game-CDDrive - ISOPath "[Host3] VM/Lab_Local\WIN2K8R2SP1_CUST.» "ISO" - StartConnected $true - confirm: $false

    $DelayValue = "5000".

    $vm = get - VM $VMname | Get-View

    $vmConfigSpec = new-Object VMware.Vim.VirtualMachineConfigSpec

    $vmConfigSpec.BootOptions = new-Object VMware.Vim.VirtualMachineBootOptions

    $vmConfigSpec.BootOptions.BootDelay = $DelayValue

    $vmConfigSpec.flags = new-Object VMware.Vim.VirtualMachineFlagInfo

    $vmConfigSpec.flags.enableLogging = $false

    $vm. ReconfigVM_Task ($vmConfigSpec)

    Get - VM $VMname | Get-NetworkAdapter | Together-NetworkAdapter - NetworkName "Lab_Local" - confirm: $False

    FloppyDrive get - VM $VMname | Game-FloppyDrive - FloppyImagePath "Automate/BootFloppies/LAB-DC.flp [build]" - StartConnected $true - confirm: $false

    Most of the time the foregoing successfully created the virtual machine, but I have about 20 MV that I need to build/remove and the only way I can do it is by adding the individual game published for each virtual computer orders - it isn't nice to handle, so I tried to add a loop foreach to read the name of the virtual machine and the settings for each computer virtual to a CSV file.

    The CSV file is formatted as follows:

    VMName MemoryMB NumCpu Version, ID, Datastore, DiskGB, ISOPath, NetworkName, FloppyPath

    Lab_DC, 512, 1, v9, windows7Server64Guest, Lun1, 15, [Host3] VM/Lab_Local\WIN2K8R2SP1_CUST. ISO, Lab_Local, Automate/BootFloppies/LAN-DC.flp [build]

    Lab_VC, 2048, 1, v9, windows7Server64Guest, Lun2, 20, [Host3] VM/Lab_Local\WIN2K8R2SP1_CUST. ISO, Lab_Local, Automate/BootFloppies/LAN-VC.flp [build]

    I tried to add this to "test" as below, but it seems to work partially. It fails to set the path of the ISO, disk path and the Network Port correctly - could not understand how to properly use the BootOptions so I left it.

    $VMs = import-CSV - UseCulture b:\automate\servers.csv

    New-VM - VMhost Host3 - CD-name $VM. VMName - MemoryMB $VM. MemoryMB - NumCPU $VM. NumCPU-Version $VM. Version - ID $VM. ID-floppy - Datastore $VM. Store data-DiskGB $VM. DiskGB - DiskStorageFormat 'thin' - Notes '$name Auto deployed on $date.

    Get - VM $VM | Get-CDDrive. Game-CDDrive - ISOPath $VM. ISOPath - StartConnected $true - confirm: $false

    Get - VM $VM | Get-NetworkAdapter | Together-NetworkAdapter NetworkName - $VM.NetworkName - confirm: $False

    FloppyDrive get - VM | Game-FloppyDrive - FloppyImagePath $VM. FloppyPath - StartConnected $true - confirm: $false

    This is the result I get from the routine above.

    NameUse of the port
    --------  ----
    Host3root of 443

    WARNING: The 'Description' of type VirtualMachine property is deprecated. Use the property "Note".

    WARNING: The 'Hard drives' property type VirtualMachine is discouraged. The "Get-hard drive" cmdlet instead.

    WARNING: The 'NetworkAdapters"type VirtualMachine property is deprecated. The cmdlet "Get-NetworkAdapter" instead.

    WARNING: The 'UsbDevices' of type VritualMachine property is obsolete. Use the "Get-UsbDevice" cmdlet instead.

    WARNING: The 'CDDrives' of type VitrualMachine property is obsolete. Use the "Get-CDDrive" cmdlet instead.

    WARNING: The 'FloppyDrives"type VirtualMachine property is deprecated. Use the "Get-FloppyDrive" cmdlet instead.

    WARNING: The 'Host' of type VirtualMachine property is deprecated. Use the property "$vmhost".

    WARNING: The "HostId" type VirtualMachine property is deprecated. Use the property "VMHostId".

    Get-FloppyDrive: it lacks an argument for the parameter "VM". Specify a parameter of type ' VMware.VimAutomation.ViCore.Type

    s.V1. [Inventory.VirtualMachine] ' and try again.

    To b:\Automate\Various Scripts\CreateVM.ps1:48 tank: 20

    + Get-FloppyDrive - VM < < < < | Game-FloppyDrive - FloppyImagePath $VM. FloppyPath - StartConnected $true - confirm: $false

    + CategoryInfo: InvalidArgument: (:)) [Get-FloppyDrive], ParameterBindingException)
    + FullyQualifiedErrorId: MissingArgument, VMware.VimAutomation.ViCore.Cmdlets.Commands.VirtualDevice.GetFloppyDriv

    e

    Ah, my mistake, I don't check your code.

    Inside the loop, the script must use the variable $_ instead of the variable $VM to the New - VM.

    The variable $_ will have extracted the CSV file line.

    I've updated the code above. Give him another chance.

  • Assist in the creation of a research on the tree apex node

    Hi all

    can someone guide me please in the creation of a research on the shaft of the apex
    Please show me how to do a search on tree apex pleaseee

    Thank you
    Shadab

    Are you sure it works? He shouldn't be :) Except if you make a small typo, then

    searchTree($v(P123_SEARCH));
    

    should be

    searchTree($v("P123_SEARCH"));
    

    It is good to know that it works fine. I wonder what's going wrong then. It is in dynamic action? I would say, try adding a few alerts to see where it fails. For example, in the javascript code for the dynamic action, put an alert before and after the search statement.

    alert("true action: before search");
    searchTree($v("P123_SEARCH"));
    alert("true action: after search");
    

    You may sprinkle the other productions of some alerts to have a notion of what is wrong, for example:

    function searchTree(pWhat){
      alert("searchTree: " + pWhat);
      $.tree.reference(l$Tree).search(pWhat);
      alert("searchTree: search on tree has been performed");
      };
    

    If you're still stuck, see if you can set an example on apex.oracle.com page, and I'll take a look.

  • Advice in the creation of Modules, classes, subjects in Captivate 9 project

    I would ask for a tip on how I classify recorded in captivate simulations.

    For example, I want to create an e-learning on Microsoft Word.  I intend that Microsoft Word is Project Module or the course itself.  Then in the module/course, there will be classes; and in the lessons are specific topics that are actually now saved simulations.  I have no intention to use the first Captivate.

    My plan is that it looks like this below.

    Project / Module / course: Microsoft Word tutorial

    • Lesson 1: formatting
      • Topic : font and change font size (simulation) style
      • Topic: "BOLD", Italicize or underline text (simulation)
      • Subject: align text (simulation)
    • Lesson 2: saving a Document
      • Subject: save the Document as a new file (simulation)
      • Subject : Save as a Document using Save as Type.  (simulation)

    And the list continues... I tried to combine all the simulations in a project and also used Table of contents, but it does not fit well especially if I combine simulations where a subject is recorded in 2 modes.  If I combined the simulations which are in train mode, it looks better in the Table of contents. Well that, when done with all the slides to a folder that I consider 'topic', the player will continue to display the next slide in the following folder, which i do not wish to be... So that means that I need to insert a blank slide with maybe a few texts at the end of each folder?

    Are there some work around?

    I don't really understand the question. If you allow the free navigation with a table of contents, there is no way to prevent the user to go to a slide. Why not create a slide menu, with lessons and different subjects? Create navigation of this slide of the menu and the custom button allows to return to the slide of the last slide in the topic/lesson menu? Of course, you can use a default playback bar in this case, nor free navigation with the table of contents.

  • Assist in the creation of Script Automator

    My mother lives in the United States while I live in the United Kingdom. In the past, I tried to help him through the process of importation of films I send him in iTunes, but sees the confusion between the process (even if it's simple). Although I know that she is able to learn to do this, I would like to make life as easy as possible, so I was wondering if someone could help by helping to create an Automator script that I can configure for sound that would achieve the following:

    1 monitor a shared Dropbox folder

    2. when a movie is added > move to iTunes

    3 consolidate iTunes library

    4. remove the original file from Dropbox.

    My first thought was actually use something like Hazel, but it is not installed, will not let me pay for it and won't pay for it herself. Then, I took a glance to Automator but couldn't quite see how I could achieve the above.

    Any help would be appreciated. Thank you.

    There is a folder in music-> iTunes named: add automatically to iTunes

    I do not use it within a certain time, but see added movie files it will import in iTunes.

    If it works, then you can only use Automator to

    create a folder Action to move the DropBox file that you want to add automatically to iTunes

    For more information and examples of that.

    See: http://www.theinstructional.com/guides/a-more-efficient-way-of-importing-content - to-itunes

  • Assist in the creation of recovery DVDs

    Hey all, if the recovery program closed after having created the first 2 DVD and I got more than 1 to go. Is there a way to keep the third, or do I have to restart the whole process?

    I don't see why it closes automatically after having been there. Have you run it again? I'll probably make their brand new since this isn't a smart program, but once all are completed you will not be able to do it again.

  • Assist in the creation of a unit

    I have a measure of engine emissions, which has a unit of g/kw-h.  Can I set the dimension of this works well with calculations of quantity in function?  So, if I multiply him by kW, I get g?

    Hi Russell,

    I added your symbol "kW" as a symbol of alias to unity "kW h" existing, then I added a physical quantity 'Issue' with a 'kg/J' basic unit and a unit of alias "g/kw-h".  I've combined the factor "0.001" for kg ==> g and the "3600000" for J ==> h kW and got 2.77777777777778E - 10.

    Looks like it works for me.  Here is the new catalog of unit that I got,

    Brad Turpin

    Tiara Product Support Engineer

    National Instruments

  • Is theere one number to call can I get assistance on the creation of a wireless printer HP ENVY 5530.

    HP printer

    Hello

    You want to connect using the USB cable or wireless? Guide during the installation should be no loneger of 10 minutes. Please call the HP technical support: 800-474-6836. If you do not live in the United States / Canada region please click the link below to get help from your region number.

    http://www.HP.com/cgi-bin/hpsupport/index.pl

    and ask for help.
       
    Kind regards.

  • Assist in the creation of imposing script

    Hello! I want to create a javascript script to help me to impose multiple pages of a document on a single page in a new document.

    So far, I read a lot of documentation on javascript and Acrobat, and there are a lot of answers to how to add, delete, move, extract, replace and ordering pages, but none as far as I've seen that answers how to move several pages of a document on a single page in another. Despite this, the merger of two A4:s for an A3 should be a very common task? If someone could help me solve this problem, it would be much appreciated. (My final goal is more complicated, but once I know how to freely move the pages in an expansion of the page, the rest will work itself).

    Jonathan

    JavaScript doesn't have access to the content of the page. That being said, there is only one way, you can put a page on another page, and it's using a button when you use the page as a button face image. You will create the button in place and with the size you want your page imposed, and then you set the button via the function iconField.buttonImportIcon()

    This is not a simple project. If you think it's too much, get a dedicated tax package. Depending on how much your time is worth, it can be cheaper to buy just a solution.

  • Assist in the creation of partition via the CLI

    We have recently improved our environment from 4 to 5

    Since then, I've been frustrated with no success, not creating new warehouses of VMFS 5 CLI data

    I am pulling my hair out trying to use the partedUtil, someone please let me an easier way

    I'm in the VMA because once I'm ready to use vmkfstools I need to be in their same

    From the document VMware KB: using the partedUtil on ESXi and ESX command line utility

    first he says runls /vmfs/devices/disks/

    I try to the VMAS and he telss me no file or directory so I go to the host itself

    to get the names of mpx that I have not I see naa

    Then she said topartedUtil setptbl "/vmfs/devices/disks/mpx.vmhba0:C0:T0:L0"

    I can't because what precedes the name I have seen that the naa

    And what the heck is with the largest number and the end of the

    "1 128 500000 AA31E02A400F11DB9590000C2911D1B8 128" GPT "2 500001 999999.

    AA31E02A400F11DB9590000C2911D1B8 0 "

    This has actually to be there.

    At the end of the day, I want just the steps to prepare the partition so I can format it with vmkfstools.

    Please help, I find very confusing articles

    No matter his C * h * s-1

  • Assist in the creation of HTML report of the PowerShell script

    Hello

    I'm looking for help taking a script work and have it create an HTML report.

    I found a script that LucD post by helping another poster to gather cluster information that I've tweaked to collect information that I'm looking for. The script works and will collect the information necessary for all 3 of our vCenter servers but I'm trying to get this information in a HTML report similar to what Alan was with vCheck5.

    Below is the output of the script and have attached the script, etat_hebdomadaire - VMwareClusterResourceSummary.ps1 and an example of what I'm trying to archive, weekly report - VMware Cluster Resource Summary.htm.

    Thanks for any help you can provide.

    vCenter Server Name: vCenter1
    Name of the data center: Data Center Office 1
    Name of the cluster: Office Group 1
    Number of guests: 8
    Number of data warehouses: 19
    Number of Virtual Machines: 625
    Total of processor (Ghz): 314.98
    Consumed current processor (Ghz): 143.69
    Courses available processor (Ghz): 171.29
    Minimum 7 days CPU usage (%): 13.90
    7 days of use of the processor maximum (%): 53.09
    7 days of CPU usage (%) average: 28.80
    Total memory (GB): 1023.97
    Current consumption memory (GB): 782.86
    Current available memory (GB): 241.12
    Minimum 7 days memory usage (%): 59.43
    Day 7 use of the maximum memory (%): 75,41
    7 days average memory usage (%): 66.38
    Total space (GB): 14395.25
    Current space (GB): 9948.26
    Current available space (GB): 4446.99

    Hello Arnold, creating such a report will involve a lot of HTML and CSS coding, which is not my strong btw

    The best example is of course script vCheck to Alan.

    In the attached script I borrowed / stole the code HTML and CSS of the script from Alan.

    The result is far from what you are considering, but I hope that it will give you at least a framework for more customization.

  • Assist in the creation of 2-column elastic, left sidebar, header and footer page, either on the CS5.5

    Hey guys,.

    So far, you have been a lot of knowledgeable people this fantastic, charming and helpful! (Oh, regarding my previous posts..., of course!).

    Yet, for now I just found out that Adobe Dreamweaver CS5.5 has truncated the amount of layout options, in comparison it is predecessors.

    This came to my attention since I started reading the tutorial from Adrian Senior. Design with CSS - Part 1: understanding the Concepts of Design CSS.

    It seems fantastic, rich in content and information. However, I have not seemed to Excel past that... considering so he asked me

    create a 2 elastic column, left sidebar, header and footer layout.

    I did my own research, lately, even if she has been without success. A tutorial that I read on the website of adobe asked that I should

    Download a Dreamweaver Exchange product. Finally, I downloaded the package Flexi CSS layouts... Yet, I have not really found much use.

    If anyone has answers or suggestions to my problem, it would be fantastic!

    Take care!

    -Joshua.

    (NOTE: if it does something easier, I'm referring to "Figure 2" in the Designing with CSS-Part 1: Understanding CSS Design Concepts Adrian powers.-> http://www.adobe.com/devnet/dreamweaver/articles/css_concepts_cs3.htmltutorial page)

    elastic column 2, sidebar left header and footer... It's right there in the CS5.5 choices.

    Simply select New > blank Page > more and you will find it

  • Assist in the creation of style sheet please

    Hello, I imported my whole site integrated with GoLive 5 DW CS5. I built a spry menu bar and a header and a footer and put everything on a single page. I tried to save this page in style.css but. I get an error message that page's html when I try to link to a new blank page to it. . I can't understand how to make the page I created in a style sheet so that the code is not on all the pages of my site.  The way I now with all this code on every page is not good for search engines.

    What I need to know is the best way to go back and create a style sheet using the header, the footer and the spry menubar I have already created. My head took hours and hours to create, and so made my drop-so really, I don't want to start from scratch. I'm a business person, not a web developer for any guidance in the right direction would be much appreciated.

    My site is here

    www.bountifulspinweave.com/index.htm

    Thank you in advance,

    Sincerely, laws

    If I do the SSI page, can my web pages always end with htm? (My clients took them bookmarked as htm files, so if I change them, then I guess that their bookmarks wouldn't work, right?

    If your server supports SSIs and .htaccess (do most of Linux servers), you can tell the server to analyze the .htm files as if they were .shtm.  The .htaccess file is in the folder root (even under the name index.htm) and contains the following code.

    AddHandler server .htm

    Also, if I do the SSI page, I'd still do a model or would instead be a model?

    You can use SSIs in place and place models of DW.  Or you can use SSIs inside the DW models.  Depends on the project.  See the link below (thanks, Murray).

    http://forums.Adobe.com/message/2032104#2032104

    Nancy O.
    ALT-Web Design & Publishing
    Web | Graphics | Print | Media specialists
    http://ALT-Web.com/
    http://Twitter.com/ALTWEB

  • assist in the creation of a shuffleList function...

    I have the following function, which creates and fills in a vertical column of moveable clips and populates the text boxes dynamic in the clips of the film with data from an xml file, creating an ordered list of clips

    The code works fine, but I'm having some trouble with the shuffleList function. I want to do is randomly sort the data contained in dragClip1.answerText.text to make the ordered list of video clips in an unordered list.

    Any ideas would be greatly appreciated.

    ~ Chipleh

    function createListContent(evt:Number):void{ 
     
      var xmlObjectListLength:Number = xml.sim.bodyText.page[evt].para.q.length();  
      
      for(var i:Number = 0; i<xmlObjectListLength;i++)
      {   
       var listObjectAttributes:XMLList = xml.sim.bodyText.page[evt].para.q;   
       addChild(objectContainer);
       var dragClip1:dragClip = new dragClip();         
       objectContainer.addChild(dragClip1);     
       dragClip1.answerText.text = xml.sim.bodyText.page[evt].para.q[i];     
       dragClip1.x = 0;
       dragClip1.y = (dragClip1.height * i);   
       dragClip1.totalClips = xmlObjectListLength;      
      }    
      shuffleList(dragClip1.totalClips);
     }
    }

    function shuffleList(listCount:Number,dragClipListText:Array):void
    {
     //Not really sure where to start with this function or how to go about shuffling the data
     for(var i:Number = 0; i<listCount+1;i++)
      {
       var aTarget:Object = objectContainer.getChildByName("listObject" + i);
       var theTarget:Object = objectContainer.getChildByName("listObject" + i);   
       theTarget.answerText.text = aTarget.answerText.text;
      }
    }

    This is perhaps off topic, but what the second argument is used (dragClipListText:Array)?

    Back on topic... can you explain what that is to be introduced in the service and what basic steps are underway in the treatment?  I would never claim to be the brightest bulb around here...

    The thing you call theTarget is blocked what is the last object, it is assigned to the loop at the front, so everything what you eventually theTarget summons in your time loop is the latter.  If the intention is to assign something to every object that has played a role of theTarget, then you need to walk through them one by one like you in the first loop.  And if the intention is to divide the tempArr in theTarget (s), without repeating something, you need to assign only the last of them mixed in...

    var listString:String = myArray [myArray.length - 1] m:System.NET.SocketAddress.ToString ();

Maybe you are looking for

  • Import an address book

    I've exported several address books of the various users in the csv format and combined them in a spreadsheet format to sort and remove duplicates. After you have cleaned the file I recorded it in csv. However, TB wil not import the new file of addre

  • System library on the external hard drive at home, macbook pro travel?

    I migrated my library 250 GB + opening of the photos app and designated as a system library. It is located in a 5 d Drobo (without optimization, i.e. contains all original), which I can't take with me when traveling. I activated the iCloud 3 days ago

  • Battery recharges each time connect to the PC

    You just bought the clip over and noticed whenever I connect it via USB to my PC to download files, etc, stack of the clip starts automatically reloaded. The duration of the regular cycles of charging battery will not affect my battery life?  I guess

  • Media Player stops during playback of cd

    This same question has been asked several times.  None have had attached useful voices.  I have hp w / vista.  It happens with any installed cd.  I tried to delete upper and lower filters as well as the link reported to microsoft to check the disk. 

  • The computer is shuttig down with a DRIVER_POWER_STATE_FAILURE I'm under Windows8

    I had the problem of the computer stop randomly with the DRIVER_POWER_STATE_FAILURE problem running windows 8. I guess that the problem is a faulty driver. Here is a link to the minidump files if all goes well, they are useful. https://SkyDrive.live.