< prev index next >

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

Print this page

        

@@ -146,10 +146,11 @@
         setConsumeAutoHidingEvents(false);
     }
 
     /**
      * Create a new ContextMenu initialized with the given items
+     * @param items the list of menu items
      */
     public ContextMenu(MenuItem... items) {
         this();
         this.items.addAll(items);
     }

@@ -215,10 +216,11 @@
      **************************************************************************/
 
     /**
      * The menu items on the context menu. If this ObservableList is modified at
      * runtime, the ContextMenu will update as expected.
+     * @return the menu items on this context menu
      * @see MenuItem
      */
     public final ObservableList<MenuItem> getItems() { return items; }
 
     /**

@@ -236,10 +238,14 @@
      * the {@code ContextMenu} such that its top-left (0,0) position would be attached
      * to the top-right position of the anchor.
      * <p>
      * This function is useful for finely tuning the position of a menu,
      * relative to the parent node to ensure close alignment.
+     * @param anchor the anchor node
+     * @param side the side
+     * @param dx the dx value for the x-axis
+     * @param dy the dy value for the y-axis
      */
     // TODO provide more detail
      public void show(Node anchor, Side side, double dx, double dy) {
         if (anchor == null) return;
         if (getItems().size() == 0) return;

@@ -262,11 +268,15 @@
      * Shows the {@code ContextMenu} at the specified screen coordinates. If there
      * is not enough room at the specified location to show the {@code ContextMenu}
      * given its size requirements, the necessary adjustments are made to bring
      * the {@code ContextMenu} back back on screen. This also means that the
      * {@code ContextMenu} will not span multiple monitors.
+     * @param anchor the anchor node
+     * @param screenX the x position of the anchor in screen coordinates
+     * @param screenY the y position of the anchor in screen coordinates
      */
+    @Override
     public void show(Node anchor, double screenX, double screenY) {
         if (anchor == null) return;
         if (getItems().size() == 0) return;
         getScene().setNodeOrientation(anchor.getEffectiveNodeOrientation());
         doShow(anchor, screenX, screenY);
< prev index next >