< prev index next >

modules/javafx.controls/src/main/java/javafx/scene/control/ButtonBar.java

Print this page

        

*** 67,79 **** * <p>Because a ButtonBar comes with built-in support for Windows, Mac OS * and Linux, there are three screenshots shown below, with the same buttons * laid out on each of the three operating systems. * * <p> ! * <strong>Windows:</strong><br/><img src="doc-files/buttonBar-windows.png" /><br> ! * <strong>Mac OS:</strong><br/><img src="doc-files/buttonBar-mac.png" /><br> ! * <strong>Linux:</strong><br/><img src="doc-files/buttonBar-linux.png" /><br> * * <h3>Code Samples</h3> * <p>Instantiating and using the ButtonBar is simple, simply do the following: * * <pre> --- 67,79 ---- * <p>Because a ButtonBar comes with built-in support for Windows, Mac OS * and Linux, there are three screenshots shown below, with the same buttons * laid out on each of the three operating systems. * * <p> ! * <strong>Windows:</strong><p><img src="doc-files/buttonBar-windows.png" alt=""></p> ! * <strong>Mac OS:</strong><p><img src="doc-files/buttonBar-mac.png" alt=""></p> ! * <strong>Linux:</strong><p><img src="doc-files/buttonBar-linux.png" alt=""></p> * * <h3>Code Samples</h3> * <p>Instantiating and using the ButtonBar is simple, simply do the following: * * <pre>
*** 100,112 **** * where you want a custom layout, this is achieved be modifying the * {@link #buttonOrderProperty() button order property}. These are cryptic-looking * strings that are shorthand representations for the button order. The built-in * orders for Windows, Mac OS and Linux are: * ! * <table border="0"> * <tr> ! * <td width="75"><strong>Windows:</strong></td> * <td>L_E+U+FBXI_YNOCAH_R</td> * </tr> * <tr> * <td><strong>Mac OS:</strong></td> * <td>L_HE+U+FBIX_NCYOA_R</td> --- 100,112 ---- * where you want a custom layout, this is achieved be modifying the * {@link #buttonOrderProperty() button order property}. These are cryptic-looking * strings that are shorthand representations for the button order. The built-in * orders for Windows, Mac OS and Linux are: * ! * <table border="0" summary=""> * <tr> ! * <td><strong>Windows:</strong></td> * <td>L_E+U+FBXI_YNOCAH_R</td> * </tr> * <tr> * <td><strong>Mac OS:</strong></td> * <td>L_HE+U+FBIX_NCYOA_R</td>
*** 315,324 **** --- 315,326 ---- /** * Returns the single character code used to represent the ButtonData * annotation in the {@link ButtonBar#buttonOrderProperty() button order} * string. + * @return the single character code used to represent the ButtonData + * annotation */ public String getTypeCode() { return typeCode; }
*** 328,337 **** --- 330,340 ---- * means that the button will respond to the escape key press, even if * the button does not have focus. * * <p>ButtonData enumeration values that can be the cancel button have a * comment stating this in their javadoc. + * @return true if this is a 'cancel' button */ public final boolean isCancelButton() { return cancelButton; }
*** 341,350 **** --- 344,354 ---- * means that the button will respond to enter key presses, even if the * button does not have focus. * * <p>ButtonData enumeration values that can be the default button have * a comment stating this in their javadoc. + * @return true if this is a 'default' button */ public final boolean isDefaultButton() { return defaultButton; } }
*** 372,381 **** --- 376,386 ---- /** * Returns the previously set ButtonData property on the given button. If this * was never set, this method will return null. * * @param button The button to return the previously set ButtonData for. + * @return the previously set ButtonData property on the given button */ public static ButtonData getButtonData(Node button) { final Map<Object,Object> properties = button.getProperties(); if (properties.containsKey(Properties.BUTTON_DATA_PROPERTY)) { ObjectProperty<ButtonData> property = (ObjectProperty<ButtonData>) properties.get(Properties.BUTTON_DATA_PROPERTY);
*** 411,420 **** --- 416,427 ---- /** * Returns whether the given node is part of the uniform sizing calculations * or not. By default all nodes that have not opted out (via * {@link #setButtonUniformSize(Node, boolean)}) will return true here. + * @param button the button + * @return true if button is part of the uniform sizing calculations */ public static boolean isButtonUniformSize(Node button) { return (boolean) button.getProperties().getOrDefault(Properties.BUTTON_SIZE_INDEPENDENCE, true); }
*** 517,526 **** --- 524,534 ---- /** * The order for the typical buttons in a standard button bar. It is * one letter per {@link ButtonData} enumeration value. Default button orders * for operating systems are also available: {@link #BUTTON_ORDER_WINDOWS}, * {@link #BUTTON_ORDER_MAC_OS}, and {@link #BUTTON_ORDER_LINUX}. + * @return the button order property */ public final StringProperty buttonOrderProperty() { return buttonOrderProperty; } private final StringProperty buttonOrderProperty =
*** 545,570 **** --- 553,581 ---- // --- button min width /** * Specifies the minimum width of all buttons placed in this button bar. + * @return the minimum width property */ public final DoubleProperty buttonMinWidthProperty() { return buttonMinWidthProperty; } private final DoubleProperty buttonMinWidthProperty = new SimpleDoubleProperty(this, "buttonMinWidthProperty"); //$NON-NLS-1$ /** * Sets the minimum width of all buttons placed in this button bar. + * @param value the minimum width value */ public final void setButtonMinWidth(double value) { buttonMinWidthProperty.set(value); } /** * Returns the minimum width of all buttons placed in this button bar. + * @return the minimum width value */ public final double getButtonMinWidth() { return buttonMinWidthProperty.get(); }
< prev index next >