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

Print this page
rev 9240 : 8076423: JEP 253: Prepare JavaFX UI Controls & CSS APIs for Modularization


  12  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  13  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  14  * version 2 for more details (a copy is included in the LICENSE file that
  15  * accompanied this code).
  16  *
  17  * You should have received a copy of the GNU General Public License version
  18  * 2 along with this work; if not, write to the Free Software Foundation,
  19  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  20  *
  21  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  22  * or visit www.oracle.com if you need additional information or have any
  23  * questions.
  24  */
  25 
  26 package javafx.scene.control;
  27 
  28 import javafx.event.ActionEvent;
  29 import javafx.scene.AccessibleAction;
  30 import javafx.scene.AccessibleAttribute;
  31 import javafx.scene.AccessibleRole;
  32 import com.sun.javafx.scene.control.skin.SplitMenuButtonSkin;
  33 
  34 /**
  35  * The SplitMenuButton, like the {@link MenuButton} is closely associated with
  36  * the concept of selecting a {@link MenuItem} from a menu. Unlike {@link MenuButton},
  37  * the SplitMenuButton is broken into two pieces, the "action" area and the
  38  * "menu open" area.
  39  * <p>
  40  * If the user clicks in the action area, the SplitMenuButton will act similarly
  41  * to a {@link javafx.scene.control.Button Button}, firing whatever is
  42  * associated with the {@link #onAction} property.
  43  * <p>
  44  * The menu open area of the control will show a menu if clicked. When the user
  45  * selects an item from the menu, it is executed.
  46  * <p>
  47  * Note that the SplitMenuButton does not automatically assign whatever was last
  48  * selected in the menu to be the action should the action region be clicked.
  49  *
  50  * <p>Example:</p>
  51  * <pre>
  52  * SplitMenuButton m = new SplitMenuButton();




  12  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  13  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  14  * version 2 for more details (a copy is included in the LICENSE file that
  15  * accompanied this code).
  16  *
  17  * You should have received a copy of the GNU General Public License version
  18  * 2 along with this work; if not, write to the Free Software Foundation,
  19  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  20  *
  21  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  22  * or visit www.oracle.com if you need additional information or have any
  23  * questions.
  24  */
  25 
  26 package javafx.scene.control;
  27 
  28 import javafx.event.ActionEvent;
  29 import javafx.scene.AccessibleAction;
  30 import javafx.scene.AccessibleAttribute;
  31 import javafx.scene.AccessibleRole;
  32 import javafx.scene.control.skin.SplitMenuButtonSkin;
  33 
  34 /**
  35  * The SplitMenuButton, like the {@link MenuButton} is closely associated with
  36  * the concept of selecting a {@link MenuItem} from a menu. Unlike {@link MenuButton},
  37  * the SplitMenuButton is broken into two pieces, the "action" area and the
  38  * "menu open" area.
  39  * <p>
  40  * If the user clicks in the action area, the SplitMenuButton will act similarly
  41  * to a {@link javafx.scene.control.Button Button}, firing whatever is
  42  * associated with the {@link #onAction} property.
  43  * <p>
  44  * The menu open area of the control will show a menu if clicked. When the user
  45  * selects an item from the menu, it is executed.
  46  * <p>
  47  * Note that the SplitMenuButton does not automatically assign whatever was last
  48  * selected in the menu to be the action should the action region be clicked.
  49  *
  50  * <p>Example:</p>
  51  * <pre>
  52  * SplitMenuButton m = new SplitMenuButton();