Adding custom icon to JscrollPane

Hi,
I want to be able to add an icon to the lower left corner of a JScrollPane. I am aware of the method setCorner() however this will only work if there is already a row header present as well.
In my case, I want the left end of the viewport to be right against the left side of the scroll pane.
Is there anyway to do this?
A.F.

Hi,
I was able to get it to work.
Override ScrollPaneLayout.
     public class MyScrollPaneLayout extends ScrollPaneLayout
          public void layoutContainer(Container parent)
               super.layoutContainer(parent);
               if (lowerLeft != null)
                    JScrollPane scrollPane = (JScrollPane) parent;
                    Dimension componentDimension = lowerLeft.getPreferredSize();
                    Rectangle viewportBounds = scrollPane.getViewport().getBounds();
                    int componentWidth = Math.min(viewportBounds.width, componentDimension.width);
                    JScrollBar scrollBar = scrollPane.getHorizontalScrollBar();
                    Rectangle scrollBarBounds = scrollBar.getBounds();
                    lowerLeft.setBounds(viewportBounds.x, scrollBarBounds.y,
                              componentWidth, scrollBarBounds.height);
                    scrollBarBounds.width -= componentWidth;
                    scrollBarBounds.x += componentWidth;
                    scrollBar.setBounds(scrollBarBounds);
     }Set it on a scrollpane using setLayout().
e.g.
scrollpane.setLayout(new MyScrollPaneLayout());Then, use the setCorner method to set the lower left corner.
jsp.setCorner(JScrollPane.LOWER_LEFT_CORNER, myComponent);
Note:
This code is not internationalized, i.e. I made the assumption that the lower left corner is, in fact, in the lower left. For versions of Java where the component orientation is right to left (e.g. Hebrew), this code will have to be modified. See the superclass' code for details.
A.F.

Similar Messages

  • Adding customized Icons

    I was wondering if anyone knows how to add customized icons. I downloaded the Logicconizer, and I added the icons to the empty slots, and opened logic, but I didn't see the new icons, when I clicked on the channel strip where the icon selection is....
    TIA (Thx in advance)

    I don't know about Logicconizer but here's a thread which has the locations for icons.
    http://discussions.apple.com/thread.jspa?messageID=4307778&#4307778

  • Custom icon settings ignored in taskbar

    I added custom icons for Chromium and Gimp to my custom icon theme, but even if the custom icons are correctly shown in menus and short links, after I launch one of these programs the default icon is shown instead of the custom one into the taskbar.
    Any idea what the cause of this may be?
    Dunno if it is relevant, but it seems that this affect only non-kde applications
    I'm a Kde 4.3 user.
    Last edited by Wu (2010-05-21 18:52:19)

    Hi,
    If I understood, you have a KM navigation iview, where some folders apperar. You want to change the icon for each of them differently.
    For this do the following:
    First have a look into the KM.navigation iview and get the layout set property. Go to System config->KM->Content management->User interface->Settings->LayoutSet and find the layout set you are using. Go to appropriate resource renderer and check the "<b>Icon setting</b>". Change it to: <b>iconreplace</b>.
    Now get the KM details for your folders and change the <b>IconSource</b> property to your image Example:
    /etc/public/mimes/images/add.gif
    Voila...the icons for these folders are changed!
    Hope this is your case.
    Romano

  • Custom icon reverts to standard Pages document icon...

    I'm having trouble with permanently assigning custom icons to Pages '08 documents.
    Say I've got a document, I'll create an icon, set the icon via the info panel, everything is fine. The next time I click on the document with the new icon, the document opens and the custom icon disappears, reverting to the stock Pages icon.
    This doesn't seem to be a problem with any other documents or folders from other programs, just Pages '08.
    But I'm thinking this is more likely an OS issue than a Pages issue.
    Thanks

    For some reason, the custom icon is deleted. (Bet that comes as a shock.) I have an old version but it is apparently no different. Essentially a Pages document is a folder that Finder treats like a single file:
    ls -a test.pages/
    ./ .typeAttributes.dict index.xml.gz
    ../ Contents/ thumbs/
    When you add a custom icon, a file is added to the folder:
    ./ .typeAttributes.dict Icon? thumbs/
    ../ Contents/ index.xml.gz
    When Pages backs up the document it includes the custom icon in the document:
    ls -a Backup\ of\ test.pages/
    ./ .typeAttributes.dict Icon? thumbs/
    ../ Contents/ index.xml.gz
    But it disappears from the original:
    ls -a test.pages/
    ./ .typeAttributes.dict index.xml.gz
    ../ Contents/ thumbs/
    (So next time, it disappears from the backup, too.)
    It almost looks as though Pages renames the original document to create the backup and then creates a new "original" but this isn't correct because the filenode numbers stay the same on the original. So I don't know what causes it but it seems to be something peculiar to Pages so I'm not sure how it could be avoided except by not using Pages or not giving Pages documents custom icons.
    - cfr

  • Custom Icon goes with usb peripheral from Mac to different Mac

    Okay, so I can change the icon on my usb flash drive to show a custom icon each time I plug it into the same Mac day after day, but what if I want to change to a different computer, say my Mac at home, the icon comes up as the default icon. Can I lock the icon so that it will appear the way I want on any Mac I plug it into?

    I took a look at the Adobe PS CS CD, and it did the same thing I do with some of my internal drives, namely, it has a custom icon on the CD ".VolumeIcon.icns" which displays when the CD mounts, just as my own ".VolumeIcon.icns" custom icons do for internal drives. However, when I added a custom .VolumeIcon.icns to my firewire drive the custom icon did NOT display. I tried quitting the Finder and relaunching it, no custom icon. Shutdown the computer and the firewire drive, next time I restarted the firewire drive and it mounted it was still displaying the regular firewire drive icon. Don't know if USB drives would behave like my firewire drive or like a CD, but I expect they will behave like the firewire drive.
    Francine
    Francine
    Schwieder

  • Create a Custom Icon to Replace the Standard URL Icon in Dock

    I would like to change the "springy thing"/URL icon in my dock to a custom picture showing the logo for the webpage for that particular "springy thing." Is it possible to change the spring to a custom icon? If so, how can I do this? Your help is greatly appreciated! Thanks.
    iBook G4   Mac OS X (10.4.8)  

    Generic urls dragged directly to the "Dock" will use that default icon (or whatever icon is substituted), but every url will use that same icon.
    If the goal is to have separate urls in the "Dock", each with its own custom icon, try dragging a url to the "Desktop" first, which should result in the creation of a ".webloc" file. The file can be given a custom icon the usual way via "Get Info", and added to the "Dock", but note that this requires that the ".webloc" file be stored somewhere for that "Dock" shortcut to remain valid.

  • Embedded Tab Custom Icon (Picture Problem)

    Hello,
    I'm having an issue getting my custom icon url picture to show up correctly. I resized using paint 20x20, even tried 19x19 and saved in png format. Jabber downloads the picture but it's tall and narrow. I can barely make out the picture. I read something about adding padding but have no clue what that means. Any help is appreciated. Thanks!

    something similar was discussed in the following link;
    https://supportforums.cisco.com/discussion/11590996/icons-custom-embedded-tabs-jabber-windows
    look at the last reply where the following was mentioned;
    Any image editor can be used to create icon. Foe example use online editor pixlr (http://pixlr.com/editor/).
    Create 20x20 image for every state (Normal, Pressed, Hover e.t.c) of your icon.
    Create a new 200x20 image
    Add the different state images to this image as layers
    Save the image as .png
    i hope this helps.

  • Help my buddies custom icons dont show up only the aim guy does

    idk y but my buddies custom icons dont show up anymore only the aim guy does eomoen plzzz help me

    If you have more than one iChat account, like a mac and an AIM screen name, each of them only displays the buddies and their details that you have added whilst logged in with that account. You can check quickly if your other account displays the list as you were expecting by selecting the iChat drop down menu>accounts and check if you have more than one.
    If not, please post again.
    This is always handy to trouble shoot:
    http://a1408.g.akamai.net/7/1408/7780/20060628/www.mac.com/st/1/learningcenter20 060607/print/Tiger/UsingiChat_to_Communicate_Over_theInternet.pdf

  • Custom Icons

    I was wondering if there is a way that I can change the
    current commands Icons which display a gray rectangular box to use
    a custom Icon for each command? I'm a clicker not a command
    shortcut user and I have a bunch of Icons that I would like you use
    instead of the Text buttons.
    If this is currently not possible could this be added ?
    Larry

    Configurator 1.0 can't support a command as an icon.
    But Configurator 2.0 may support this feature.

  • Disk First Aid - Problem: Custom icon missing

    Hi
    Wonder if anyone can help me - my mac kept quitting out of printing photos to my Epson R300 and then froze. I didn't let it self repair once restarted but left it to do it today manually. I set Disk First Aid going and it came up with about 30 "Custom icon missing" alerts and when I asked it to repair it couldn't repair them.
    Anyone know what's happened there and how to fix it?
    I've noticed that the mac has been quitting out of programmes a lot lately but without the 'this spllication has unexpectedly quit' alert. I haven't added any new software or hardware lately either.
    Many thanks!
    iMac Flat Screen   Mac OS 9.2.x   Mac OS 9/Mac OS X Panther Dual Boot

    Vicky,
    Welcome to Discussions.
    Fortunately, the Custom Icon issue will have no impact on the general reliability of your mac.
    As a bit of background, one of the special attributes that can be applied to a file or folder (like modification date, or label, or comments, or the FileType and Creator - so a document knows which app it is associated with when you double click it) is this "Custom Icon" setting.
    So you have 30 files / folders that have been marked as having a custom icon. But when it goes to get the custom icon to display the file / folder in the Finder, it can't find it. You usually just end up with a generic icon for the file / folder. It offers no extra functionality other than displaying a pretty icon in the Finder. Similarly, when it doesn't work, you lose no functionality, other than that.
    The applications quiting unexpectedly could be an issue, but issues with printing colour photos to a printer may be memory issues. Colour photos, perhaps .jpg, are compressed. As your printer doesn't have built-in decompression software, the pictures must be decompressed on the Mac before sending to the printer. And there is the issue, if this requires too much memory, your mac can do strange things.
    Is printing from OSX any better ? I would have thought a G4 iMac with Panther would be a dream to work on.

  • Custom icon per entry in the AS2 Tree Component (using CS3)

    I have a tree component that loads its data from an XML file and I wonder if I can customize every entry to have its own icon by adding an icon attribute to every entry in the XML and giving the tree an action to read that icon (which would exist in the library of the Flash file). My goal is to reproduce a tree within an application that my company is developing (it's for a training tool related to that application).
    My XML says something like <node label = 'Label' heading = 'LABEL' desc = 'Description' icon = 'icon1' />
    My label is what the tree displays, the heading is what the information dialog in the training tool displays as a title bar, the desc is what the training tool displays within the body of the text for the function description and the icon is what I want to be a reference to the graphic in the library to place as an icon in front of the item rather than use setStyle with the properties for disclosure, leaf, and folder icons.
    Is that possible? I haven't found a solution for it yet.

    I've never used the Tree component, so I'm just guessing here....
    There is a slight delay before the xml file loads and your tree has its data provider.
    Perhaps during that time there is no node at mTree.getTreeNodeAt(0) to open? Try adding this just before the last line of your code:
    trace("the node is: "+mTree.getTreeNodeAt(0));
    What do you get?
    You might need to move that code inside the xml's load event handler.
    Another thing is that the Flash components tend to work on an invalidate-then-wait-one-frame-to-redraw kind of model. So it is possible you will need to wait one frame after the xml has loaded and then tell it to open that node.
    The doLater method might help with that.
    var home:MovieClip=this;
    var xmlTreeData:XML = new XML();
    xmlTreeData.onLoad = function() {
    mTree.dataProvider = this.firstChild;
    mTree.doLater(home,"delay");
    xmlTreeData.ignoreWhite = true;
    xmlTreeData.load("xml/treeValues1.xml");
    mTree.setStyle("fontSize","11");
    mTree.setStyle("selectionColor","0xE0E0E0");
    mTree.setStyle("useRollOver",false);
    function delay(){ 

  • Custom icons 'unclickable' in icon view & not shown in coverflow

    Hi,
    I just got off the line with Apple support, who couldn't solve my problem and then just told me that Leopard didn't support what I was doeing and thus that it was not there problem. Very un-apple if you ask me...
    Here's the problem:
    I create custom icons for my movies by pasting images (Jpeg's or what have you) onto the icon in the 'Get info' window of a file. This works fine, however when I view the files in icon view I can't select the file by clicking on the icon, only by clicking on the text below. Strangly enough this problem dissapears when I edit the icon size in the 'View options' to a size equal too or smaller then 116x116. At this point I can select the file without any problem.
    The same sort of happens in coverflow. Here I can't see the icon in coverflow if the icons are fairly large. Once I reduce the size of the coverflow bar too the point where the icons are very small the custom icons reappear.
    The make the matter even more strange this problem only occurs with files where I created a custom icon for since I had Leopard installed. All custon icons created under 10.4 work fine.
    This indicates too me that Leopard has problem with handeling the resolution of icons.
    Note also that Leopard stores icon images in different sizes. Try copying an icon image from the 'Get info' window, then launch Preview, then select 'File' and 'New from Clipboard'. You will see that there are multiple images here.
    Anybody know how to solve this?

    Getting the same stupid behavior here!
    I had a lot of customized Tiger folder icons but now i've got no good tools for customizing these new huge Leopard ones.
    I began using *Icon Composer* from the developer tools after doing the graphics in Photoshop, then using IconDroplet to get them into a form where i can copy and paste them between *Get Info* windows. What a pain.
    Now i discover this bit where they're not clickable once i replace them! I didn't know about the behaviors when making them big in *Cover Flow* and small in Icon view until i read this.
    I've been snooping around but i haven't found what needs to be tweaked where to allow them to behave properly.
    !http://img228.imageshack.us/img228/5186/scottdartve1.png!

  • Adding custom fields to Embedded Search

    Hi All,
    I have read the post [here|How to add custom fields to Embedded Search; about adding custom fields to Embedded Search. I am looking to add Employee Subgroup for use in Talent Management (specifically the STVN SuccessionPlanning component) and wanted to know if anyone can expand on the instructions in the link to add this field.
    It appears to be part of the HRTMC_PERSON search object connector already and while I've done some IMG configuration the field is showing in SuccessionPlanning, but not displaying any data.
    Additionally, I'd be interested in any tips to add information that is not from PA0002 should it be required in the future.
    Many thanks,
    Luke

    Hi Luke,
    I am assuming here that your search request fields are based on HRTCM_CENTRALPERSON search template. To enable your search to work on employee subgroup please do the following
    1) Check if the HRTMC_PERSON Template extracts the data from Infotype 0001 via SPRO node 'Define Search Models and Change Pointer' Extraction Class is 'CL_HRTMC_SEARCH_READ_PA_INFTY'.
    2) Via ESH_COCKPIT, goto Template Modeler and select your custom Software Component and press Edit. Goto roadmap step 5 - Define Requests - where all search request fields are defined. Its using these fields Talent search works.
    3) Select the search request e.g. 'SAP_TALENT_NAKISA', it would then show list searchable attributes in below table. Using 'Add' button select path for PERSK so that it can searched.
    It would look like this once selected
    OBJID(REL_CP_P)->HRTMC_REL_CP_P_209.REL_CP_P(REL_CP)->HRTMC_PERSON.OBJID->HRTMC_PERSON.ORG_ASSIGNMENT
    4) In step SPRO 'Define Search Requests and Search Field Names' , define Employee subgroup field with AliasSearchField = PERSK since thats what is defined in roadmap step 5.
    Hope it helps!
    Regards,
    Ricky Shah

  • Adding custom fields  through SE51

    Hi All!
    This is with regards to adding custom fields through Se51 to standard screens.I had added custom field KNVV-ZZKVGR6 to the screen.
    After drawing the text and I/O buttons.When I activate I am getting an syntax error saying Field KNVV-ZZKVGR6 is defined differently in screen (ABAP/4 field,Dictionary field).
    What does this mean.
    Also if i activate with a SAP standard field instead of the custom it is getting activated.
    But for both the ways I could not able to see the output on the actual transaction.Also the new drawings which i am drawing are in brown color(different form the existing one)
    Please advise.
    regards
    Praneeth

    hi Praneeth,
    what is the program name,screen number you are trying to modify..,and after appending the field <b>ZZKVGR6 to KNVV</b> , now go to table and choose menu <b>Utilities->Data base Utility-></b> now click on  <b>Activate and Adjust the Data base</b>, then try to add the field.
    and are you adding the field from Dictionary (i.e you have option Get From Dictionary in that give KNVV table name it will list the fields, choose zzkvgr6 from it, and place it in your screen.)
    the exit which you are adding should be appropriate one
    or else you won't get the desired results. what is the exit..
    Regards
    vijay

  • "500 internal server error" after adding custom fields to Address page

    I need to display custom fields on the "Addresses" and the "Personal Data" pages. For that, we added custom CI_INCLUDE fields in both PA0006 and PA0002 tables as per instructions below
    https://www.sdn.sap.com/irj/scn/wiki?path=/display/profile/essPersonalInformationUIenhancementwithoutmodification&focusedCommentId=28278867
    we also extended the Badi HRPAD00INFTYUI
    custom fields show up OK in page "Personal Data". However when trying to browse to page "Addresses"
    we get the following error:
    "500 internal server error - com.sap.tc.webdynpro.progmodel.context.ContextException: MappedNodeInfo(DetailView.SelectedInfotype): unknown child node Area8 ".
    "Area8" is one of the custom fields we added in PA0006 (Address infotype).
    any idea what is wrong?  maybe Badi HRPAD00INFTYUI cannot handle 2 infotypes in the same time?
    T.

    Hi Sasu,
    Its clearly saying contect binding error. Have you mapped  correctly from FcComponent to VcComponents.
    FcCompoenets for Model logic.
    Check the mappings correctly.
    If it is complete custom or new field then there will be could of steps.
    1) Reimport the model
    2) map new field to FcComponent
    3) Bind new Fields from Fc to Vc
    Rgds
    -SS

Maybe you are looking for