TitledPane in a VBox ... TitledPane ignores maxSize

Hi,
I want to use a VBox instead of an Accordion, so i can have more TitledPanes expanded than one.
<?xml version="1.0" encoding="UTF-8"?>
<?import javafx.scene.layout.*?>
<?import javafx.scene.control.*?>
<VBox xmlns:fx="http://javafx.com/fxml">
     <children>
          <TitledPane VBox.vgrow="ALWAYS">
               <text>Navigation</text>
               <content>
                    <TreeView showRoot="false" >
                         <root>
                              <TreeItem value="Documents">
                                   <children>
                                        <TreeItem value="Item1" />
                                   </children>
                              </TreeItem>
                         </root>
                    </TreeView>
               </content>
          </TitledPane>
          <TitledPane  VBox.vgrow="ALWAYS">
               <text>Navigation</text>
               <content>
                    <TabPane tabClosingPolicy="UNAVAILABLE">
                         <tabs>
                              <Tab>
                                   <content>
                                        <ListView/>
                                   </content>
                                   <text>tab1</text>
                              </Tab>
                              <Tab>
                                   <content>
                                        <ListView/>
                                   </content>
                                   <text>tab2</text>
                              </Tab>
                         </tabs>
                    </TabPane>
               </content>
          </TitledPane>
     </children>
</VBox>The strange thing is, that the TitledPanes wont resize correctly ... Its just working if I remove the VBox.vgrow ... but than the TitledPanes wont resize over a maximum Height, even if I set Double.Max_Value as maxHeight.
Anyone has a Idea how to manage these TitledPanes in a VBox?

In before: thanks for the JIRA-Entry, I will watch it! :)
In build 10 you are not allowed to set maxWidth and prefWidth in the content-node of the TitledPane anymore.
Like that:
<VBox fx:id="sidebar" fx:controller="de.ibees.erp.offline.gui.main.SidebarController" xmlns:fx="http://javafx.com/fxml">
     <children>
          <TitledPane fx:id="navigation">
               <text>Navigation</text>
               <content prefHeight="1000">
                    <fx:include source="navigation.fxml"/>
               </content>
          </TitledPane>
     </children>
</VBox>So the little "fix" above wont work anymore.
Now it seems like, the TitledPane will resize with the needed space of its content. So my components should try to get as much height as possible.
So I tryed to set the minHeight property of my TitledPane-content-root-node (what a word ^^) to a high Value like Double.MAX_VALUE.
<VBox fx:id="sidebar" fx:controller="de.ibees.erp.offline.gui.main.SidebarController" xmlns:fx="http://javafx.com/fxml">
     <children>
          <TitledPane fx:id="navigation">
               <text>Navigation</text>
               <content>
                    <StackPane  minHeight="$MAX_DOUBLE">
                         <children>
                              <fx:include source="navigation.fxml"/>
                         </children>
                    </StackPane>
               </content>
          </TitledPane>
     </children>
</VBox>But this will result in a Freeze or a not starting application ... so I tryed a lower value like 2000 and I got the same behavior like with the older "fix".
And again the scrollbars wont appear ... apparently because of the minHeight-value, since a "normal" TitledPane has build-in scrollbars (as I discovered :) )
Anyone have some other ideas how to "strech" the content in the height?
@swpalmer:
I think its exactly the same problem you have ... currently we just found the shown solutions.
For a real world application its maybe currently the best solution to use the Accordion and disclaim the use of multiple expanded TitledPanes, because it seems like there is "something going on" with the TitledPanes :).
Maybe you should also try the build 10, because its seems to use the min- and maxSize-properties.

Similar Messages

  • Limit width of TitledPane in a ScrollBox

    Hi
    This is probably a beginnersquestion but i wasn't able to solve that by myself (and the Help of Google).
    I have several TitledPanes in a VBox in a ScrollPane. The ScrollBox should only scroll in vertical direction. If the TitledPanes have a title which is longer than the width they increase the width of the ScrollPane/VBox. How can i limit the width of these so that no horizontal scrolling is possible?
    Thanks
    Fabian
        <?xml version="1.0" encoding="UTF-8"?>
        <?import java.lang.*?>
        <?import java.util.*?>
        <?import javafx.geometry.*?>
        <?import javafx.scene.control.*?>
        <?import javafx.scene.layout.*?>
        <?import javafx.scene.paint.*?>
        <AnchorPane id="AnchorPane" maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="454.0" prefWidth="260.0" xmlns:fx="http://javafx.com/fxml">
          <children>
            <ScrollPane fitToWidth="true" hbarPolicy="AS_NEEDED" hmax="1.0" pannable="false" prefHeight="200.0" prefViewportWidth="100.0" prefWidth="200.0" vbarPolicy="AS_NEEDED" AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="0.0">
              <content>
                <VBox maxWidth="200.0" prefHeight="500.0" prefWidth="480.0" spacing="5.0">
                  <children>
                    <TitledPane animated="false" maxWidth="200.0" text="Very long title, should be clipped. Very long title, should be clipped. " textOverrun="CLIP" wrapText="true">
                      <content>
                        <AnchorPane id="Content" minHeight="0.0" minWidth="0.0" prefHeight="500.0" prefWidth="200.0">
                          <children>
                            <ListView prefHeight="500.0" prefWidth="200.0" AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="0.0" />
                          </children>
                        </AnchorPane>
                      </content>
                    </TitledPane>
                  </children>
                  <padding>
                    <Insets bottom="5.0" left="5.0" right="5.0" top="5.0" />
                  </padding>
                </VBox>
              </content>
            </ScrollPane>
          </children>
        </AnchorPane>

    Leaving aside the fact that one of my program always has Font as
    "ControlFont" on the 1st call of GetCtrlAttribute/ATTR_TEXT_FONT,
    consider the complete code below. Why does the value of font changes ?
    When I create a meta font, I'm not asking it to assign it to some control!
    #include <userint.h>
    int main (int argc, char *argv[]) {
    char font[255]="", Typeface[255];
    int fontSize, bold, italics, underline, strikeout;
    char Str[]="Some long string of text";
    int Pnl, Ctrl, TextWidth=0, r;
    Pnl = NewPanel (0, "Test", 20, 20, 200, 200);
    Ctrl = NewCtrl (Pnl, CTRL_RING_LS, "Test", 0, 0);
    InsertListItem (Pnl, Ctrl, -1, Str, 0);
    GetCtrlAttribute (Pnl, Ctrl, ATTR_TEXT_POINT_SIZE, &fontSize);
    GetCtrlAttribute (Pnl, Ctrl, ATTR_TEXT_BOLD, &bold);
    GetCtrlAttribute (Pnl, Ctrl, ATTR_TEXT_ITALIC, &italics);
    GetCtrlAttribute (Pnl, Ctrl, ATTR_TEXT_UNDERLINE, &underline);
    GetCtrlAttribute (Pnl, Ctrl, ATTR_TEXT_STRIKEOUT, &strikeout);
    GetFontTypefaceName (font, Typeface);
    GetCtrlAttribute (Pnl, Ctrl, ATTR_TEXT_FONT, font);
    r=CreateMetaFont ("Something", font, fontSize, bold, italics,
    underline, strikeout);
    r=GetTextDisplaySize(Str, "Something", 0, &TextWidth);
    // font is now NIDialogMetaFont
    GetCtrlAttribute (Pnl, Ctrl, ATTR_TEXT_FONT, font);
    r=CreateMetaFont ("SomethingElse", font, fontSize, bold,
    italics, underline, strikeout);
    r=GetTextDisplaySize(Str, "SomethingElse", 0, &TextWidth);
    // font is now Something
    GetCtrlAttribute (Pnl, Ctrl, ATTR_TEXT_FONT, font);
    r=CreateMetaFont ("YetAnotherThing", font, fontSize, bold,
    italics, underline, strikeout);
    r=GetTextDisplaySize(Str, "YetAnotherThing", 0, &TextWidth);
    // font is now SomethingElse
    return 0;
    Guillaume Dargaud
    http://www.gdargaud.net/

  • TitledPane grows above its maxWidth

    I am trying to restrict the max width of a TitledPane, but I am unable to do so.
    The TitledPane always takes the width of its content and if I resize the parent, it also resizes above its maxWidth, although I set maxWidth to 10.
    The first may be understandable to me, if the minWidth always takes precedence over the maxWidth of a parent. But the second issue?!
    import javafx.application.Application;
    import javafx.scene.Scene;
    import javafx.scene.control.TextField;
    import javafx.scene.control.TitledPane;
    import javafx.stage.Stage;
    public class TestApp5 extends Application {
        public static void main(String args[]) {
            launch();
        @Override
        public void start(Stage stage) throws Exception {
            TitledPane titledPane = new TitledPane();
            titledPane.setText("Test");
            titledPane.setCollapsible(false);
            TextField textField = new TextField();
            textField.setMinWidth(500);
            titledPane.setContent(textField);
            titledPane.setMaxWidth(10);
            Scene scene = new Scene(titledPane);
            stage.setScene(scene);
            stage.show();

    Ok, I tried it with another Root (VBox). But it still grows over its maxWidth.
    In this case, I put a TextField in the TitledPane. It has NOT specified a minWidth.
    Nonetheless the TitledPane is wider than 10px.
    It becomes even worse, if I put a PieChart in the TitledPane (which is my actual problem). Then it is like 300px wide.
    import javafx.application.Application;
    import javafx.scene.Scene;
    import javafx.scene.chart.PieChart;
    import javafx.scene.control.TextField;
    import javafx.scene.control.TitledPane;
    import javafx.scene.layout.VBox;
    import javafx.stage.Stage;
    public class TestApp5 extends Application {
        public static void main(String args[]) {
            launch();
        @Override
        public void start(Stage stage) throws Exception {
            VBox vBox = new VBox();
            TitledPane titledPane = new TitledPane();
            titledPane.setText("Test");
            titledPane.setCollapsible(false);
            titledPane.setContent(new TextField());
            titledPane.setMaxWidth(10);
            vBox.getChildren().add(titledPane);
            Scene scene = new Scene(vBox);
            stage.setScene(scene);
            stage.show();

  • How to replace the arrow with a custom graphic on a TitledPane?

    The TitledPane has an arrow that changes state (rotates) to show whether the pane is collapsed or expanded. Is there a way to replace this arrow with a custom graphic for each state?

    Most definitely. Everything in the controls is style-able from CSS. The region you are attempting to style can be addressed via:
    .titled-pane > .title > .arrow-buttonSo you could specify images here for example, or you can just change the arrow path by adding another > .arrow on the end. Below I've posted the entire CSS style that is built in for TitledPane so you can see how the whole thing is styled. You can create your own stylesheet, copy/paste this in there, and then start tweaking things and see how it affects the look of the TitledPane.
    Cheers
    Richard
    * TitledPane                                                                  *
    .titled-pane {
        -fx-skin: "com.sun.javafx.scene.control.skin.TitledPaneSkin";
    .titled-pane > .title {
        -fx-background-color: -fx-box-border, -fx-inner-border, -fx-body-color;
        -fx-background-insets: 0, 1, 2;
        -fx-background-radius: 5 5 0 0, 4 4 0 0, 3 3 0 0;
        -fx-padding: 0.166667em 0.833333em 0.25em 0.833333em; /* 2 10 3 10 */
    .titled-pane > .title > .arrow-button {
        -fx-background-color: null;
        -fx-background-insets: 0;
        -fx-background-radius: 0;
        -fx-padding: 0.0em 0.25em 0.0em 0.0em; /* 0 3 0 0 */
    .titled-pane > .title > .arrow-button .arrow {
        -fx-background-color: -fx-mark-highlight-color, -fx-mark-color;
        -fx-background-insets: 1 0 -1 0, 0;
        -fx-padding: 0.25em 0.3125em 0.25em 0.3125em; /* 3 3.75 3 3.75 */
        -fx-shape: "M 0 0 h 7 l -3.5 4 z";
    .titled-pane:collapsed > .title > .arrow-button .arrow {
        -fx-rotate: -90;
    .titled-pane > *.content {
        -fx-background-color:
            -fx-box-border,
            linear-gradient(to bottom, derive(-fx-color,-02%), derive(-fx-color,65%) 12%, derive(-fx-color,23%) 88%, derive(-fx-color,50%) 99%, -fx-box-border);
        -fx-background-insets: 0, 0 1 1 1;
        -fx-padding: 0.167em;
    .titled-pane:focused > .title {
        -fx-color: -fx-focus-color;
    .titled-pane:focused > .title > .text {
        -fx-text-fill: white;
    .titled-pane:focused > .title > .arrow-button .arrow {
        -fx-background-color: white;
    }

  • How can the opacity for a TitledPane header label be set?

    A TitledPane is like a compound component that consists of a collapsible title control and a content component. Is it possible to set the background opacity of the title control and to set the background opacity of the content area itself? What I'm trying to achieve is the ability to make the background of both pars of the component transparent while keeping the foreground (text and content) completely opaque.
    Any suggestions?
    Cheers,
    Jeff

    Use css?
    import javafx.application.Application;
    import javafx.geometry.Pos;
    import javafx.scene.Node;
    import javafx.scene.Scene;
    import javafx.scene.control.TitledPane;
    import javafx.scene.image.Image;
    import javafx.scene.image.ImageView;
    import javafx.scene.layout.StackPane;
    import javafx.scene.paint.Color;
    import javafx.scene.shape.Circle;
    import javafx.stage.Stage;
    import queryfx.Dump;
    public class TitledPaneDump extends Application {
      public static void main(String[] args) { launch(args); }
      @Override public void start(Stage stage) throws Exception {
        final TitledPane titledPane = new TitledPane();
        titledPane.setText("Hide and Show");
        titledPane.setContent(new Circle(100, 100, 75, Color.GOLD));
        StackPane stack = new StackPane();
        ImageView hiddenSmurf = new ImageView(new Image("http://ewpopwatch.files.wordpress.com/2005/06/84822__smurfette_l.jpg"));
        stack.getChildren().addAll(hiddenSmurf, titledPane);
        final Scene scene = new Scene(stack, 200, 200);
        StackPane.setAlignment(titledPane, Pos.TOP_CENTER);
        stage.setScene(scene);
        stage.show();
        Node title = titledPane.lookup(".title");
        title.setStyle("-fx-background-color: rgb(0, 100, 0, 0.5)");
        Node content = titledPane.lookup(".content");
        content.setStyle("-fx-background-color: rgb(0, 100, 100, 0.5)");
    }

  • Title Bar hieght of TitledPane

    How can I increase the height of the Title bar in a TitledPane? It seems to increase when I increase the font size, but what if I just want to make it taller?

    Try this snippet:
    .titled-pane .title {
    -fx-padding: 40px;
    It will put a 40px padding around the title label, you'll probably want to tweak this before you ship!

  • How to create TitledPane that opens up?

    Hi Forum,
    can u help me to create TitledPane that opens up?
    Thanks in advanced.

    http://docs.oracle.com/javafx/2.0/ui_controls/accordion-titledpane.htm#CACGBAHI

  • Add 'window' button to TitledPane?

    Can anyone see a way to add a 'window' button or buttons (similar to the Windows maximise button) to the title bar of a TitledPane in an accordion? I assume it could be done visually with a StackPane but then only the topmost layer would be active. At the moment, I have an expand link in the TitledPane content. The purpose is to temporarily remove the TitledPane from its accordion and to display it in a larger size as a modal dialog. Thanks in advance ...

    What version of ID are you using? Live Preflight (Introduced in Version CS4) has links to all errors in the preflight panel itself.

  • TitledPane layout

    I have developed a dialog intended to provide the user with search options.  There are a number of search criteria they may select from that are visually grouped together into various categories. I wanted to place each category into its own well-defined group with an appropriate label. TitledPane seemed the best choice, but I'm having a hard time getting it to layout nicely.  If I could attach or copy/paste a screen shot this would be much easier to illustrate.
    The current layout has sub-panels representing search criteria categories laid out as follows:
    It uses a grid pane with 3 rows and 5 columns
    Time category panel takes up row 1, spanning columns 1-4
    Routing category panel takes up row 2, spanning columns 1-4
    Type category panel takes up column 5 and spans all 3 rows
    Direction category panel takes up row 3, column 1
    Classification category panel takes up row 3, column 2
    Precedence category panel takes up row 3, column 3
    Status category panel takes up row 3, column 4
    Type, Direction, Classification, Precedence and Status panels contain checkboxes for various criteria
    Time and Routing panels are more complex with text fields, checkboxes and combo-boxes
    The overall layout is a BorderPane with the UI described placed in the center section.
    If I use the TitledPane for each of the panels (with collapsible set to false), I end up with a nice group complete with title and border - but I can't get it to "fill" the space it occupies. You end up with a ragged looking screen. Nothing I tried seemed to make them fit.  I finally ended up extending the BorderPane and adding the "title" as the top section and the "content" in the center section.  This fills the available space and make the screen look good.  It's a workable solution, but it seems as though there ought to be a way to use what already exists and have it render nicely.

    If I could attach or copy/paste a screen shot this would be much easier to illustrate.
    Any way you could upload a screenshot elsewhere and provide a link to it?

  • Multi-line Label inside VBox gets overlapped

    I don't know if it's a bug or a "feature", but I have something like the following:
    VBox {
            content: bind [Label,
            Hyperlink]
    }The text inside the label has a line break in it. Now the problem is that the layout manager ignores the fact that a multiline-text increases the label size and places the hyperlink at the place it would normally be if the label would only have one line of text.
    Any ideas for a clean workaround? Is this a bug?

    I didn't try his example and didn't clearly see if the text gets cut or not.
    Well, fact is that my Label shows the whole text (I didn't mentioned this before, did I?)
    Well, I have uploaded it here: [http://79.170.44.105/lyrion.ch/concept.htm|http://79.170.44.105/lyrion.ch/concept.htm]

  • Pacman update conflicts with vbox ~~

    after i upgrade the system,i see this :
    sudo pacman -Su
    :: Starting full system upgrade...
    :: Replace gspcav1 with core/kernel26? [Y/n]
    warning: fluxbox: ignoring package upgrade (1.0.0-1 => 1.1.1-1)
    resolving dependencies...
    looking for inter-conflicts...
    error: failed to prepare transaction (could not satisfy dependencies)
    :: ipw3945: requires kernel26<2.6.27
    :: virtualbox-modules: requires kernel26<2.6.27
    :: virtualbox-ose-additions-modules: requires kernel26<2.6.27
    the kernel conflicts with vbox ~~~
    may fixed soon ~~
    i need to use quartus on windows , do i need to use vbox to run M$ XP,   i only got quartus on .exe

    from http://www.archlinux.org/news/414/
    The ipw3945 driver doesn't compile anymore. It's probably easy to patch, but we'll stop maintaining it anyway. Please use iwl3945 or compile the driver yourself (the latest PKGBUILD and patches can be found at http://repos.archlinux.org/viewvc.cgi/ipw3945/trunk/)
    you can download packages before updating using pacman -Swd packages_that_you_need
    where -d skip dependency, -w download only
    Last edited by wonder (2008-10-14 22:15:06)

  • Mouse events ignored in custom skin

    I created a custom skin for my spinner. While I managed to get the layout this time, it seems that all mouse click events are ignored.
    package ch.sahits.game.javafx.control.skin;
    import java.io.InputStream;
    import javafx.beans.value.ChangeListener;
    import javafx.beans.value.ObservableValue;
    import javafx.collections.ObservableList;
    import javafx.event.EventHandler;
    import javafx.geometry.Dimension2D;
    import javafx.scene.Group;
    import javafx.scene.control.TextField;
    import javafx.scene.image.Image;
    import javafx.scene.image.ImageView;
    import javafx.scene.input.MouseEvent;
    import javafx.scene.layout.HBox;
    import javafx.scene.layout.VBox;
    import ch.sahits.game.javafx.control.OpenPatricianSpinner;
    import ch.sahits.game.javafx.control.TextSizingUtility;
    import com.sun.javafx.scene.control.skin.SkinBase;
    public class OpenPatricianSpinnerSkin extends
            SkinBase<OpenPatricianSpinner, OpenPatricianSpinnerBehavior> {
        private TextSizingUtility sizing = new TextSizingUtility();
        public OpenPatricianSpinnerSkin(final OpenPatricianSpinner spinner) {
            super(spinner, new OpenPatricianSpinnerBehavior(spinner));
            Dimension2D dim4heigth = sizing.calculate(1, spinner.getFont());
            double width = 0;
            for (String word : spinner.getOptions()) {
                Dimension2D dim4width = sizing.calculate(word, spinner.getFont());
                if (dim4width.getWidth() > width) {
                    width = dim4width.getWidth();
            Dimension2D dim = new Dimension2D(width, dim4heigth.getHeight());
            String firstValue = "";
            if (!spinner.getOptions().isEmpty()) {
                firstValue = spinner.getOptions().get(0);
                spinner.selectedIndexProperty().set(0);
            HBox hbox = new HBox();
            final TextField textField = new TextField(firstValue);
            textField.getStyleClass().add("openPatricianSpinner");
            textField.setMaxSize(dim.getWidth(), dim.getHeight());
            textField.setEditable(false);
            InputStream is = getClass().getResourceAsStream("SlabUp.png");
            Image img = new Image(is);
            double imgWidth = img.getWidth();
            final ImageView imgViewUp = new ImageView(img);
            is = getClass().getResourceAsStream("SlabDown.png");
            img = new Image(is);
            final ImageView imgViewDown = new ImageView(img);
            double additionalWidth = Math.max(img.getWidth(), imgWidth);
            is = getClass().getResourceAsStream("InputPlank.jpg");
            img = new Image(is,dim.getWidth()+additionalWidth, dim.getHeight(), false, true);
            final ImageView imgViewPlank = new ImageView(img);
            imgViewPlank.onMouseReleasedProperty().addListener(new ChangeListener<EventHandler<? super MouseEvent>>(){
                @Override
                public void changed(ObservableValue<? extends EventHandler<? super MouseEvent>> ov,
                        EventHandler<? super MouseEvent> oldValue,
                        EventHandler<? super MouseEvent> newValue) {
                    System.out.println("Clicked on plank");
            Group textGroup = new Group(textField);
            VBox vbox = new VBox();
            vbox.getChildren().addAll(imgViewUp, imgViewDown);
            hbox.getChildren().addAll(textGroup, vbox);
            Group background = new Group(imgViewPlank,hbox);
            imgViewUp.onMouseReleasedProperty().addListener(new ChangeListener<EventHandler<? super MouseEvent>>(){
                @Override
                public void changed(ObservableValue<? extends EventHandler<? super MouseEvent>> ov,
                        EventHandler<? super MouseEvent> oldValue,
                        EventHandler<? super MouseEvent> newValue) {
                    ObservableList<String> options = spinner.getOptions();
    System.out.println("Clicked on slabUp");
                    if (!options.isEmpty()) {
                        if (spinner.getSelectedIndex() > 0) {
                            spinner.selectedIndexProperty().subtract(1);
                            String newDisplayValue = options.get(spinner.getSelectedIndex());
                            textField.setText(newDisplayValue);
                        } else {
                            System.out.println("Selected index <= 0");
                    } else {
                        System.out.println("Empty options list");
            }); // end up change listener
            imgViewDown.onMouseReleasedProperty().addListener(new ChangeListener<EventHandler<? super MouseEvent>>(){
                @Override
                public void changed(ObservableValue<? extends EventHandler<? super MouseEvent>> ov,
                        EventHandler<? super MouseEvent> oldValue,
                        EventHandler<? super MouseEvent> newValue) {
                    ObservableList<String> options = spinner.getOptions();
    System.out.println("Clicked on slabDown");
                    if (!options.isEmpty()) {
                        if (spinner.getSelectedIndex() < options.size()) {
                            spinner.selectedIndexProperty().add(1);
                            String newDisplayValue = options.get(spinner.getSelectedIndex());
                            textField.setText(newDisplayValue);
                        } else {
                            System.out.println("Selected index >= options.length");
                    } else {
                        System.out.println("Empty options list");
            }); // end up change listener
            onMouseReleasedProperty().addListener(new ChangeListener<EventHandler<? super MouseEvent>>(){
                @Override
                public void changed(ObservableValue<? extends EventHandler<? super MouseEvent>> ov,
                        EventHandler<? super MouseEvent> oldValue,
                        EventHandler<? super MouseEvent> newValue) {
                    System.out.println("Clicked on Skin");
            getChildren().add(background);
    I would at least expect to see the line 134 printed out. I call this spinner from a simple test application, without any event listeners added there.
    Has anyone an idea what might happen here?

    Hello, you don't register an event handler, you register a listener on the event handler property. So you don't listen for clicks, you listen for changing the registered click handler. You need to register the handler like this:
    imgViewDown.setOnMouseReleased(new EventHandler<MouseEvent>() {
         @Override public void handle(MouseEvent event) {
              // your handler
    This way you set the mouse release event handler which will be called on click. This code, by the way, would fire your listeners (the onMouseReleased property has changed).

  • RFC: PersistenceService maxsize enhancement

    Hello fellow JWS users,
    <Please speak up if you think my proposal is good or bad>
    I would like to propose what I believe to be a very useful enhancement to the PersistenceService (for unsigned applications): I would like to be able to ask the user to change the maximum amount of disk space allocated to an entire application (without a securitymanager window poping up).
    Currently this is (undocumented) roughly hard-coded at 256KB. Any amount above that causes a SecurityManager window to pop up and ask permission every time PersistenceService.create(url,maxsize) is called.
    Let's say an application wants to cache a thousand separate files. I don't want the securitymanager window to pop up a thousand times, and creating my own filesystem within a BLOB has memory and performance problems that are unscalable.
    As more serious applications are written to run in the secure sandbox (unsigned) this problem is going to be a major stumbling block. It's a major problem for some applications right now.
    I can not foresee any problems with asking the user to allow the allocation of 50MB of hard disk space the first time an application is run.
    From a space perspective, this is roughly the same (ignoring filesystem block size) as asking for a single 50MB file using the PersistenceService.
    The only possible problem I can see is that someone may try to create tens of thousands of files and performance will suffer on some older filesystems that do not use hashes/trees for directory indexing.
    Since the user is in control of when, and how much space is allocated to which application it is not possible to automatically DoS the user's machine.

    Hi,
    I think it's a good idea for reasons you explain.
    I resolve the problem by calling create() method only one time so the "security advisor" happens once. I think no application needs to create a muffin every time it's launched.
    For me, the priority for Sun should be to document these Security Advisors...

  • Animated GIF ignoring frame timing

    I am trying to create simple animated GIFs with a few layers
    of text that simply fade in and fade out in sequence. My initial
    attempt worked perfectly. Most frames use the default 7/100's of a
    second delay as they fade. A few frames were manually set to much
    longer delays so that the text pauses, before fading out to be
    replaced by the next text.
    When I reopened the file, to adjust the background color, and
    then re-saved it, the GIF now plays straight through, ignoring the
    timing of each frame. Nothing I do now can get it to pause on the
    appropriate frames. I've tried cutting the symbols out and pasting
    them into a new file, removing the animation from the symbols and
    reapplying it, etc.
    Any ideas, anyone?
    Thanks in advance.

    None, None.

  • How do i use one midi controller and ignore another in Mainstage 2.1?

    I am running Mainstage and Ableton Live in parallel and use two midi controllers. I would like the APC40 to just be recognized by Live, and my MPK49 to be recognized by Mainstage and Live. Right now, I get midi signal from Mainstage on both midi controllers and can't seem to figure out how to assign just Mainstage to just get midi input from the MPK49. Any ideas? Thanks.

    Yes, that worked a the device popups were set to all. Fixed that and moved on. Thanks! However another similar problem has come up...
    The sliders on the APC40 (which I just want to be recognized by Live), are affecting the Mainstage Channel Strips volume sliders. I can't seem to figure how to make Mainstage ignore this as all of the APC40 sliders are effecting Channel Strip 1. Thanks.

Maybe you are looking for

  • NASS Auto Loan Questions

    So I recently got approved for NASA membership and CC. I am also toying with the idea of getting a new car or truck. Currently drive a 07 Accord that has been paid of for a few years now. While I love having 0 car payments I kinda want something more

  • Where is the Best Place to Buy Ram???????

    I'm looking to expand my ram from 2 gig to 4 gig and would like to get some recomendation about where or where not to go. I searched this Discussion and didn't find anything on this subject. Anyone have any good suggestions as far as price and reliab

  • Old Photo Restoration of Skin Colors

    Color print from 1972 with badly faded faces, fuzzy facial features, too. Would like the skin tones to look healthy, tried the wrming filter and got jaundice! I am a beginner with PS, need step by step instructions. You forum angels are the best!

  • Costing run and activity allocation

    hi, as there is a costing run (routing) to get the cost, may i know why still need to do direct or indirect activity allocation ; actual assessment ; actual distribution? thanks rgds

  • Crash Report: Please help

    Hi there all. Not sure how to ask for help, but here goes anyway... I'm running a mid 2009 MBP, Mac OS X version 10.7.5. 2.26 GHz Intel Core 2 Duo. 4 GB 1333 MHz DDR3. My machine has constantly been crashing or freezing, especially if I run it withou