How to set mutable cell width and height in a jlist?

Hello,
i wrote a jlist cell renderer object to able to render a jlabel for the unselected items and a wide and high jpanel with images when an item is selected.
The jlist render all items at the same dimension.
How can i change this built-in behavior?
i printed the items preferedsize:
java.awt.Dimension[width=340,height=140]
java.awt.Dimension[width=275,height=75]
java.awt.Dimension[width=275,height=75]
java.awt.Dimension[width=275,height=75]
java.awt.Dimension[width=275,height=75]
java.awt.Dimension[width=275,height=75]
java.awt.Dimension[width=275,height=75]
Message was edited by:
fazekaim
ok, i give for every index pos a fix jpanel object, and it is working.
What i would like is a mouse selection and the selected item/cell should be rendered by a component with different dimension (containing more information). but this doesn't work.
Is it possible, that the JList cashes the cells dimensions???
Message was edited by:
fazekaim
Message was edited by:
fazekaim

i just want to change a cell for another when i click on it.
there are names in the jlist. after having click on one of them, a description panel could be appears in the list instead of the short name. it' a simple ui effect, i think.
is there any other way than write a custom jlist implementation?

Similar Messages

  • How to set a minimum width and height for a stage or scene?

    Hello,
    Does anyone how to set a minimum width and height for a stage or scene?
    I tried listening for width/height property value changes and then adjust the width/height if necessary, but that causes unpleasant flickering of the window.
    In JavaFX 2.1 beta SDK for Mac OS, the Stage class has setMinWidth() and setMinHeight() functions which work very well.
    I'm wondering what's the equivalent way to do that when using the FX SDK for Windows.
    Any help is appreciated!
    Thanks.

    I was wondering how to enforce a minimum stage size with JavaFX 2.0.3.The same flickering way you are currently doing it. See: http://javafx-jira.kenai.com/browse/RT-15200 "Need a way to set the minimum size of a window"

  • How do I save the width and height of a photo for repeated use?

    How do I save the width and height of a picture for repeated use, rather than having to enter it each time in the 'new file' box?
    Thanks,  Ed Jackson.

    It could be that I'm older and have forgotten. I'm now 73 and will admit I have forgotten many things over the years. I have been using Photoshop since Photoshop version 3.  And can not really recall which features or changes were made in ever version of Photoshop I have installed.  Adobe has added many features over the years. The number of bugs introduce has also greatly increased after CS3.  "New Doc Sizes.psp"  in your user id preferences is edited using the two buttons in the new document dialog.
    As for guide lines in new documents Photoshop CS6 or CC seem to add some for video file presets with guide lines.  I do not know how to edit or add guide line to new doc presets. Guide line actions are easy to create. I have also seem some guideline in new documents when I did not expect any perhaps a new bug. Photoshop like most software has bugs. If you do not see Adobe new presets perhaps you copied an old  "New Doc Sizes.psp"  over Adobe's newer default file or Adobe migrared you presets and wand wiped their presets out. There are bugs. Close Photoshop down and rename your current  "New Doc Sizes.psp"  in you user id Photoshop cc preferences folder and start Photoshop it will add a dedault  "New Doc Sizes.psp"  file see if you see Adobe new presets in the new doc pull down when you select video and film...

  • Excel 2007. OLAP pivot. How do you resize dropdown width and height?

    Excel 2007. OLAP pivot. How do you resize dropdown width and height?

    hi,
    I'm afraid we can't modify that property in Excel. Someone had suggested to use a custom combo box to replace the built-in drop-down. However it will lose the features which are only available
    for built-in drop-down.
    Hope this
    thread will give you some ideas. Thank you.

  • How to set Jspx page width and hight programatically ?

    Hi All ;
    i need to browse a jspx page has Different width & hight sizes ;
    Please Can SomeOne tell me ow to set Jspx page width and hight programatically ?
    Regards;

    In that case you need to use JavaScript.
    Resizing the browser window in JavaScript is done by using window.resizeTo(400, 400);
    I
    Thanassis

  • How to set the BARCODE width and length for label printing..

    Hi All,
    How to set the Code 39 barcode label format in the sizxe of 0.20" * 1.4". By default while printing barcode size exceeds my current requirement. Please let me know to customize the size of barcode labels.
    Thanks.

    I don't know what you mean by "Code 39" because my Output Designer software doesn't offer that barcode (or do you mean "code 3 of 9?). In any case, are you trying to control the size of the text (which is what I think of when you refer to "label")? If you are, then just change the font & size. If you are wanting to modify the physical characteristics of the barcode itself (height & length for a certain number of characters) then you are probably out of luck. Or at least in for some trial & error.
    There are a series of "barcode.xxx" files in the 'config' folder where Output Designer was installed to. These are text files that contain the physical characteristics of the various barcodes for various printers. The parameters that you would be interested in is the height and width of the bars (black & white). For example, a barcode might be defined as .400 high with narrow bars 3 "dots" wide, wide bars 9 "dots" wide and white space the same or different. Presumably changing these values would affect the generated barcode. For example, in this example the wide bars are 3 times the width of the narrow bars so I would assume that relationship would have to remain. To make the resulting barcode shorter you would then use 2 for the narrow and 6 for the wide.
    You would have to make the change in the file(s) that would be used for your printer(s).
    There are four width values for each of the parameters. Most of the barcodes only use 2 but some have 4. I'm assuming that when there are 4, like in "4 8 12 16", that the barcode definition has 4 different widths of bars and/or spaces.
    There is no guarantee that the scanning hardware & software will "see" and interpret the resulting barcode correctly.

  • How to get full screen width and height  when using CustomItem not canvas ?

    hi..
    I have to append one Textfield and a CustomItem ( as canvas) for painting on a single form.
    I have to draw a rectangle in CustomItem in full Screen width of mobile .
    So I have to know the screen width of mobile for drawing a rectangle.
    Please Suggest me. how can I do that ?
    Thanks

    Did you check javax.microedition.lcdui.Form.getWidth() and javax.microedition.lcdui.Form.getHeight() methods?
    Atul

  • How to get WIDTH and HEIGHT fields from applet tag?

    I am developing an applet using JDK1.1 (to ensure microsoft jvm compatability).
    A problem I'm facing is that there are no getWidth() or getHeight() method for Applet in 1.1, so I am hoping I can get this info from my html: <APPLET CODE="MyApplet" WIDTH=600 HEIGHT=856></APPLET>
    getParameter didn't work, so does anyone have any ideas how I could get the width and height?
    Cheers,
    James

    Write a jpeg decoder that can figure out how to determine the width/height of a jpeg file? Google it.
    Or if you're really lazy, load each jpeg using the
    Toolkit.loadImage( URL ) function and use getWidth/getHeight from there, but that's slow.

  • Af:popup dialog width and height

    hi all,
    i want to know how to define popup dialog width and height.
    here is my code.
    <af:popup id="popup1" contentDelivery="lazyUncached"
    launcherVar="source" eventContext="launcher" >
    <af:dialog title="General Details - Standard Statement" type="none" id="AddInstDialog"
    inlineStyle="width:600px;height:400px">
    I do something like in above code.
    but it is not working.
    With Regards,
    WP

    add panelWindow
                          <af:popup id="popup5" contentDelivery="lazyUncached">
                            <af:panelWindow id="panelWindow5" title="Stop" modal="true" inlineStyle="width:369px;height:350px;">

  • Obtain width and height in device central?

    I'm using device Central with Flash CS5.
    How do I obtain the width and height of the device being simulated?
    I need to write some special code to handle screen size in device central - as my application is already able to obtain the screen dimensions when run on a real device.

    I need to know if this is possible, too!
    Hopefully this is working somehow.
    Thanks

  • Setting the preferred width or height of a ListView using css ?

    Is it possible to set the preferred width and height of a Node (a ListView) using css ?
    Just in case I tried with:
    .my-list {
         -fx-pref-width: 130;
         -fx-pref-height: 100;
    but it does not seem to work.

    Not that I know of. Searching for "prefWidth" in the CSS documentation yields no results. JavaFX layout is typically not managed by CSS, but by FXML and/or Java. You can set the prefHeight and prefWidth as attributes in the FXML file:
    <ListView fx:id="..." prefWidth="130" prefHeight="100" ... />or in Java:
    ListView<String> listView = new ListView<String>();
    listView.setPrefWidth(130);
    listView.setPrefHeight(100);

  • Width and height of ROI

    How can I change the Width and Height of ROI ? Im attaching the VI it does the edge detection.. please help
    Thankyou
    Attachments:
    edge.vi ‏95 KB
    ROI.png ‏207 KB

    The line camera takes pictures of a single line over and over again as the object moves underneath it.  You can build up an image of the object by stacking the lines in a larger image.  If the line of the camera goes straight across the material being measured, you can measure the width with every line.
    Yes, you can use a 100 meter cable with a GigE camera.
    Red lighting is just the most convenient.  Red is the easiest color to generate, and can easily be filtered to eliminate other light frequencies.  Using colored lighting helps increase the contrast between the lighted areas and the background.
    Your image indicates a max speed of 180 m/min, which would be 3 m/sec.  If the camera acquires each line at 24 kHz, that is 24000 lines/sec.  Divide the two to get 8000 lines/m, or 8 lines/mm.  If your computer can keep up, you could make a measurement every 0.125 mm of your material.  That probably isn't practical, but you should be able to make the measurements at the rate you need.
    Almost forgot, the width is 1900 mm.  With 4096 pixels wide, you get just over two pixels per mm.  That means your measurements should be accurate to the nearest mm.
    Bruce
    Bruce Ammons
    Ammons Engineering

  • Help to edit width and height of menu?

    http://www.ivoog.com/link4
    How can I edit the width and height of this menu so the
    background image fits? Please explain and give code if you can.
    Thanks!
    Here's the pictures for the menu:
    http://www.pics.ivoog.com/boxs1.gif
    http://www.pics.ivoog.com/boxs2.gif

    Your approach simply isn't going to work.
    The background image is a fixed width. It will not shrink or
    grow like the
    text in front of it.
    The background image is wider than the word "pie" but not as
    wide as the
    word "sigh".
    So, if you add padding to the left and right of the link to
    make the whole
    background show behind "pie", the same padding is added to
    "sigh". Now the
    "sigh" link is much wider than the background image. Because
    your
    background image repeats, you see the left edge of the next
    repeating one
    behind sigh.
    If you remove the padding to make it so you see just one
    image behind
    "sigh", now the padding around "pie" is too narrow to see the
    whole
    background.
    You could try giving each link a class and having a separate
    padding for
    each word, but all that is pretty useless because different
    people have
    different text size settings in their browsers.
    In some browsers, the words will be bigger than the
    background image.
    In others, the words will be small and you'll only see part
    of the
    background.
    The free tutorial I sent you is just that, a tutorial.
    You do the work, you have the copyright.
    If you are not interested in that one, here's another idea.
    You can use borders and simple background , like a gradient,
    to make a tab
    that looks just like your tab images and sizes along with
    your text...no
    matter how long the word is and no matter what size the text
    is.
    Here's the free tutorial.
    You don't even have to do the whole thing, just the first
    part where it
    shows you how to make links that look like image buttons.
    http://projectseven.com/tutorials/css/uberlinks/index.htm
    Good luck,
    Tim
    "hahahaadobeman" <[email protected]> wrote
    in message
    news:[email protected]...
    > Thanks for answering and sorry for the confusion. The
    only problem with
    > purchasing and doing this is copyright. I want to make
    my own code for the
    > menus so it is not copyrighted by anyone.
    >
    > Can you help edit the width and height of this menu so
    the background
    > image
    > fits? See how my link4 where it says pie sigh and all
    that the background
    > of
    > that doesn't fit with the image? Can you help with this
    problem? Thats all
    > I
    > really needed but thanks for all the links!
    >

  • How to set field width and height at runtime programatically?

    Hi all,
    I want to set the width and height of a report field by reading its values from the database table.
    Is it possible in Oracle reports?
    How to achieve this in Oracle reports 10g?
    Any help will be highly appreciated.
    Thanks .... Best Regards
    Bilal

    You cannot give it a specific value. During design you can set Horizontal and Vertical Elasticity properties to Variable, so the items are automatically scaled when running the report.

  • Please help me :How to set the width and height for my View page "test.htm"

    Hi,
        I have controller class. When i call the view[test.htm]from this controller class ,i am getting the view with output tableview..it is fine.
    My requirement:
                 the output view window is showing full browser window. I want the view output like showModeldialog. I want to set the width and height for the output view window. How is possible?
                 or
    i want to call the test.view in the window.showModelDialog..
    Please help me .. Urgent requirement.

    Yes you can set the width & Height of the view as follows..
    <div style="width:580px; height:750px; margin-top:15px; overflow:auto;">
    <htmb:form......>
    </htmlb:form>
    </div>
    <i>*Reward each useful answer</i>
    Raja T

Maybe you are looking for

  • Audio cut out and midi miss sync

    Lately I have been getting audio cut out, and the missing, 'error while trying to sync audio and midi'. I thought it was that I had too many instances of virtual instruments. So I mixed the song down. Imported that into a NEW song, with only one audi

  • Creation of Business Layer

    I am trying to create a Business Layer using the wizard. I have selected the user whose tables i want to load. But the list of schema Objects for this user that is seen in the wizard is very few. Is it because the EUL owner user which i have used to

  • How do you fix the problem of USB cable is not compatable, when there is no cable attached?

    how do you fix the problem of USB cable is not compatable, when there is no cable attached?

  • Does dm1z 3000 Laptop have an Mini PCI-Expres​s Solid State Drive add on?

    Trying to figure out if my dm1z 3000 Laptop has an Mini PCI-Express Solid State Drive add on. I opened the back of my laptop and it looks like it has a slot I can place a Mini PCI-Express Solid State Drive.  But my concern is will that slot work for

  • Dashboard component related Query

    Hello, I have a pie chart and 5 column charts and a combo box which drives column charts in my dashboard. I want to add a functionality for column charts where if user clicks on it it reset all column charts. do you know how i can accomplish this? Th