Java Code Examples for java.awt.CheckboxMenuItem

The following are top voted examples for showing how to use java.awt.CheckboxMenuItem. These examples are extracted from open source projects. You can vote up the examples you like and your votes will be used in our system to generate more good examples.
Example 1
Project: litiengine   File: Program.java   View source code 6 votes vote down vote up
private static Menu initProjectMenu() {
  Menu mnProject = new Menu(Resources.get("menu_project"));

  CheckboxMenuItem compress = new CheckboxMenuItem(Resources.get("menu_compressProjectFile"));
  compress.setState(userPreferences.isCompressFile());
  compress.addItemListener(e -> userPreferences.setCompressFile(compress.getState()));

  CheckboxMenuItem sync = new CheckboxMenuItem(Resources.get("menu_syncMaps"));
  sync.setState(userPreferences.isSyncMaps());
  sync.addItemListener(e -> userPreferences.setSyncMaps(sync.getState()));

  MenuItem importSpriteFile = new MenuItem(Resources.get("menu_assets_importSpriteFile"));
  importSpriteFile.addActionListener(a -> EditorScreen.instance().importSpriteFile());

  MenuItem importSprite = new MenuItem(Resources.get("menu_assets_importSprite"));
  importSprite.addActionListener(a -> EditorScreen.instance().importSprites());

  mnProject.add(importSprite);
  mnProject.add(importSpriteFile);
  mnProject.addSeparator();
  mnProject.add(compress);
  mnProject.add(sync);

  return mnProject;
}
 
Example 2
Project: javafx-demos   File: TrayLeftClick.java   View source code 6 votes vote down vote up
protected static PopupMenu createPopupMenu() {
    final PopupMenu popup = new PopupMenu();
    MenuItem aboutItem = new MenuItem("About");
    CheckboxMenuItem cb1 = new CheckboxMenuItem("Set auto size");
    CheckboxMenuItem cb2 = new CheckboxMenuItem("Set tooltip");
    Menu displayMenu = new Menu("Display");
    MenuItem errorItem = new MenuItem("Error");
    MenuItem warningItem = new MenuItem("Warning");
    MenuItem infoItem = new MenuItem("Info");
    MenuItem noneItem = new MenuItem("None");
    MenuItem exitItem = new MenuItem("Exit");
    // Add components to pop-up menu
    popup.add(aboutItem);
    popup.addSeparator();
    popup.add(cb1);
    popup.add(cb2);
    popup.addSeparator();
    popup.add(displayMenu);
    displayMenu.add(errorItem);
    displayMenu.add(warningItem);
    displayMenu.add(infoItem);
    displayMenu.add(noneItem);
    popup.add(exitItem);
    return popup;
}
 
Example 3
Project: dev   File: RemoteControlServer.java   View source code 6 votes vote down vote up
protected void updateKeyboardLanguage(String language) {
	debug("RemoteControlServer.updateKeyboardLanguage()");
	if (mniKeyboardLanguage != null) {
		for (int i = 0; i < mniKeyboardLanguage.getItemCount(); i++) {
			MenuItem item = mniKeyboardLanguage.getItem(i);
			if (item instanceof CheckboxMenuItem) {
				((CheckboxMenuItem) item).setState(false);
			}
		}
	}
	CheckboxMenuItem checkbox = keyboardCheckBoxes.get(language);
	if (checkbox != null) {
		debug("keyboardCheckBox for language [" + language + "] found");
		checkbox.setState(true);
	}
	setKeyboardLanguage(language);
}
 
Example 4
Project: languagetool   File: Main.java   View source code 6 votes vote down vote up
private PopupMenu makePopupMenu() {
  PopupMenu popup = new PopupMenu();
  ActionListener rmbListener = new TrayActionRMBListener();
  // Enable or disable embedded HTTP server:
  enableHttpServerItem = new CheckboxMenuItem(Tools.getLabel(messages.getString("tray_menu_enable_server")));
  enableHttpServerItem.setState(httpServer != null && httpServer.isRunning());
  enableHttpServerItem.addItemListener(new TrayActionItemListener());
  popup.add(enableHttpServerItem);
  // Check clipboard text:
  MenuItem checkClipboardItem =
          new MenuItem(Tools.getLabel(messages.getString("guiMenuCheckClipboard")));
  checkClipboardItem.addActionListener(rmbListener);
  popup.add(checkClipboardItem);
  // Open main window:
  MenuItem restoreItem = new MenuItem(Tools.getLabel(messages.getString("guiMenuShowMainWindow")));
  restoreItem.addActionListener(rmbListener);
  popup.add(restoreItem);
  // Exit:
  MenuItem exitItem = new MenuItem(Tools.getLabel(messages.getString("guiMenuQuit")));
  exitItem.addActionListener(rmbListener);
  popup.add(exitItem);
  return popup;
}
 
Example 5
Project: OpenJSharp   File: CCheckboxMenuItem.java   View source code 5 votes vote down vote up
public void handleAction(final boolean state) {
    final CheckboxMenuItem target = (CheckboxMenuItem)getTarget();
    SunToolkit.executeOnEventHandlerThread(target, new Runnable() {
        public void run() {
            target.setState(state);
        }
    });
    ItemEvent event = new ItemEvent(target, ItemEvent.ITEM_STATE_CHANGED, target.getLabel(), state ? ItemEvent.SELECTED : ItemEvent.DESELECTED);
    SunToolkit.postEvent(SunToolkit.targetToAppContext(getTarget()), event);
}
 
Example 6
Project: OpenJSharp   File: WCheckboxMenuItemPeer.java   View source code 5 votes vote down vote up
public void handleAction(final boolean state) {
    final CheckboxMenuItem target = (CheckboxMenuItem)this.target;
    WToolkit.executeOnEventHandlerThread(target, new Runnable() {
        @Override
        public void run() {
            target.setState(state);
            postEvent(new ItemEvent(target, ItemEvent.ITEM_STATE_CHANGED,
                                    target.getLabel(), (state)
                                      ? ItemEvent.SELECTED
                                      : ItemEvent.DESELECTED));
        }
    });
}
 
Example 7
Project: jdk8u-jdk   File: CCheckboxMenuItem.java   View source code 5 votes vote down vote up
public void handleAction(final boolean state) {
    final CheckboxMenuItem target = (CheckboxMenuItem)getTarget();
    SunToolkit.executeOnEventHandlerThread(target, new Runnable() {
        public void run() {
            target.setState(state);
        }
    });
    ItemEvent event = new ItemEvent(target, ItemEvent.ITEM_STATE_CHANGED, target.getLabel(), state ? ItemEvent.SELECTED : ItemEvent.DESELECTED);
    SunToolkit.postEvent(SunToolkit.targetToAppContext(getTarget()), event);
}
 
Example 8
Project: jdk8u-jdk   File: WCheckboxMenuItemPeer.java   View source code 5 votes vote down vote up
public void handleAction(final boolean state) {
    final CheckboxMenuItem target = (CheckboxMenuItem)this.target;
    WToolkit.executeOnEventHandlerThread(target, new Runnable() {
        @Override
        public void run() {
            target.setState(state);
            postEvent(new ItemEvent(target, ItemEvent.ITEM_STATE_CHANGED,
                                    target.getLabel(), (state)
                                      ? ItemEvent.SELECTED
                                      : ItemEvent.DESELECTED));
        }
    });
}
 
Example 9
Project: openjdk-jdk10   File: CCheckboxMenuItem.java   View source code 5 votes vote down vote up
public void handleAction(final boolean state) {
    final CheckboxMenuItem target = (CheckboxMenuItem)getTarget();
    SunToolkit.executeOnEventHandlerThread(target, new Runnable() {
        public void run() {
            target.setState(state);
        }
    });
    ItemEvent event = new ItemEvent(target, ItemEvent.ITEM_STATE_CHANGED, target.getLabel(), state ? ItemEvent.SELECTED : ItemEvent.DESELECTED);
    SunToolkit.postEvent(SunToolkit.targetToAppContext(getTarget()), event);
}
 
Example 10
Project: openjdk-jdk10   File: WCheckboxMenuItemPeer.java   View source code 5 votes vote down vote up
public void handleAction(final boolean state) {
    final CheckboxMenuItem target = (CheckboxMenuItem)this.target;
    WToolkit.executeOnEventHandlerThread(target, new Runnable() {
        @Override
        public void run() {
            target.setState(state);
            postEvent(new ItemEvent(target, ItemEvent.ITEM_STATE_CHANGED,
                                    target.getLabel(), (state)
                                      ? ItemEvent.SELECTED
                                      : ItemEvent.DESELECTED));
        }
    });
}
 
Example 11
Project: openjdk9   File: CCheckboxMenuItem.java   View source code 5 votes vote down vote up
public void handleAction(final boolean state) {
    final CheckboxMenuItem target = (CheckboxMenuItem)getTarget();
    SunToolkit.executeOnEventHandlerThread(target, new Runnable() {
        public void run() {
            target.setState(state);
        }
    });
    ItemEvent event = new ItemEvent(target, ItemEvent.ITEM_STATE_CHANGED, target.getLabel(), state ? ItemEvent.SELECTED : ItemEvent.DESELECTED);
    SunToolkit.postEvent(SunToolkit.targetToAppContext(getTarget()), event);
}
 
Example 12
Project: openjdk9   File: WCheckboxMenuItemPeer.java   View source code 5 votes vote down vote up
public void handleAction(final boolean state) {
    final CheckboxMenuItem target = (CheckboxMenuItem)this.target;
    WToolkit.executeOnEventHandlerThread(target, new Runnable() {
        @Override
        public void run() {
            target.setState(state);
            postEvent(new ItemEvent(target, ItemEvent.ITEM_STATE_CHANGED,
                                    target.getLabel(), (state)
                                      ? ItemEvent.SELECTED
                                      : ItemEvent.DESELECTED));
        }
    });
}
 
Example 13
Project: jdk8u_jdk   File: CCheckboxMenuItem.java   View source code 5 votes vote down vote up
public void handleAction(final boolean state) {
    final CheckboxMenuItem target = (CheckboxMenuItem)getTarget();
    SunToolkit.executeOnEventHandlerThread(target, new Runnable() {
        public void run() {
            target.setState(state);
        }
    });
    ItemEvent event = new ItemEvent(target, ItemEvent.ITEM_STATE_CHANGED, target.getLabel(), state ? ItemEvent.SELECTED : ItemEvent.DESELECTED);
    SunToolkit.postEvent(SunToolkit.targetToAppContext(getTarget()), event);
}
 
Example 14
Project: jdk8u_jdk   File: WCheckboxMenuItemPeer.java   View source code 5 votes vote down vote up
public void handleAction(final boolean state) {
    final CheckboxMenuItem target = (CheckboxMenuItem)this.target;
    WToolkit.executeOnEventHandlerThread(target, new Runnable() {
        @Override
        public void run() {
            target.setState(state);
            postEvent(new ItemEvent(target, ItemEvent.ITEM_STATE_CHANGED,
                                    target.getLabel(), (state)
                                      ? ItemEvent.SELECTED
                                      : ItemEvent.DESELECTED));
        }
    });
}
 
Example 15
Project: lookaside_java-1.8.0-openjdk   File: CCheckboxMenuItem.java   View source code 5 votes vote down vote up
public void handleAction(final boolean state) {
    final CheckboxMenuItem target = (CheckboxMenuItem)getTarget();
    SunToolkit.executeOnEventHandlerThread(target, new Runnable() {
        public void run() {
            target.setState(state);
        }
    });
    ItemEvent event = new ItemEvent(target, ItemEvent.ITEM_STATE_CHANGED, target.getLabel(), state ? ItemEvent.SELECTED : ItemEvent.DESELECTED);
    SunToolkit.postEvent(SunToolkit.targetToAppContext(getTarget()), event);
}
 
Example 16
Project: lookaside_java-1.8.0-openjdk   File: WCheckboxMenuItemPeer.java   View source code 5 votes vote down vote up
public void handleAction(final boolean state) {
    final CheckboxMenuItem target = (CheckboxMenuItem)this.target;
    WToolkit.executeOnEventHandlerThread(target, new Runnable() {
        @Override
        public void run() {
            target.setState(state);
            postEvent(new ItemEvent(target, ItemEvent.ITEM_STATE_CHANGED,
                                    target.getLabel(), (state)
                                      ? ItemEvent.SELECTED
                                      : ItemEvent.DESELECTED));
        }
    });
}
 
Example 17
Project: javify   File: GtkCheckboxMenuItemPeer.java   View source code 5 votes vote down vote up
/**
 * Called from the signal handler of the gtk widget.  Posts a
 * ItemEvent to indicate a state changed, then calls super to post
 * an ActionEvent.
 */
protected void postMenuActionEvent ()
{
  CheckboxMenuItem item = (CheckboxMenuItem)awtWidget;
  q().postEvent (new ItemEvent ((ItemSelectable)awtWidget,
    ItemEvent.ITEM_STATE_CHANGED,
    item.getActionCommand(),
    item.getState() ? ItemEvent.DESELECTED : ItemEvent.SELECTED));

  super.postMenuActionEvent();
}
 
Example 18
Project: jvm-stm   File: GtkCheckboxMenuItemPeer.java   View source code 5 votes vote down vote up
/**
 * Called from the signal handler of the gtk widget.  Posts a
 * ItemEvent to indicate a state changed, then calls super to post
 * an ActionEvent.
 */
protected void postMenuActionEvent ()
{
  CheckboxMenuItem item = (CheckboxMenuItem)awtWidget;
  q().postEvent (new ItemEvent ((ItemSelectable)awtWidget,
    ItemEvent.ITEM_STATE_CHANGED,
    item.getActionCommand(),
    item.getState() ? ItemEvent.DESELECTED : ItemEvent.SELECTED));

  super.postMenuActionEvent();
}
 
Example 19
Project: infobip-open-jdk-8   File: CCheckboxMenuItem.java   View source code 5 votes vote down vote up
public void handleAction(final boolean state) {
    final CheckboxMenuItem target = (CheckboxMenuItem)getTarget();
    SunToolkit.executeOnEventHandlerThread(target, new Runnable() {
        public void run() {
            target.setState(state);
        }
    });
    ItemEvent event = new ItemEvent(target, ItemEvent.ITEM_STATE_CHANGED, target.getLabel(), state ? ItemEvent.SELECTED : ItemEvent.DESELECTED);
    SunToolkit.postEvent(SunToolkit.targetToAppContext(getTarget()), event);
}
 
Example 20
Project: infobip-open-jdk-8   File: WCheckboxMenuItemPeer.java   View source code 5 votes vote down vote up
public void handleAction(final boolean state) {
    final CheckboxMenuItem target = (CheckboxMenuItem)this.target;
    WToolkit.executeOnEventHandlerThread(target, new Runnable() {
        @Override
        public void run() {
            target.setState(state);
            postEvent(new ItemEvent(target, ItemEvent.ITEM_STATE_CHANGED,
                                    target.getLabel(), (state)
                                      ? ItemEvent.SELECTED
                                      : ItemEvent.DESELECTED));
        }
    });
}
 
Example 21
Project: jdk8u-dev-jdk   File: CCheckboxMenuItem.java   View source code 5 votes vote down vote up
public void handleAction(final boolean state) {
    final CheckboxMenuItem target = (CheckboxMenuItem)getTarget();
    SunToolkit.executeOnEventHandlerThread(target, new Runnable() {
        public void run() {
            target.setState(state);
        }
    });
    ItemEvent event = new ItemEvent(target, ItemEvent.ITEM_STATE_CHANGED, target.getLabel(), state ? ItemEvent.SELECTED : ItemEvent.DESELECTED);
    SunToolkit.postEvent(SunToolkit.targetToAppContext(getTarget()), event);
}
 
Example 22
Project: jdk8u-dev-jdk   File: WCheckboxMenuItemPeer.java   View source code 5 votes vote down vote up
public void handleAction(final boolean state) {
    final CheckboxMenuItem target = (CheckboxMenuItem)this.target;
    WToolkit.executeOnEventHandlerThread(target, new Runnable() {
        @Override
        public void run() {
            target.setState(state);
            postEvent(new ItemEvent(target, ItemEvent.ITEM_STATE_CHANGED,
                                    target.getLabel(), (state)
                                      ? ItemEvent.SELECTED
                                      : ItemEvent.DESELECTED));
        }
    });
}
 
Example 23
Project: OLD-OpenJDK8   File: CCheckboxMenuItem.java   View source code 5 votes vote down vote up
public void handleAction(final boolean state) {
    final CheckboxMenuItem target = (CheckboxMenuItem)getTarget();
    SunToolkit.executeOnEventHandlerThread(target, new Runnable() {
        public void run() {
            target.setState(state);
        }
    });
    ItemEvent event = new ItemEvent(target, ItemEvent.ITEM_STATE_CHANGED, target.getLabel(), state ? ItemEvent.SELECTED : ItemEvent.DESELECTED);
    SunToolkit.postEvent(SunToolkit.targetToAppContext(getTarget()), event);
}
 
Example 24
Project: JamVM-PH   File: GtkCheckboxMenuItemPeer.java   View source code 5 votes vote down vote up
/**
 * Called from the signal handler of the gtk widget.  Posts a
 * ItemEvent to indicate a state changed, then calls super to post
 * an ActionEvent.
 */
protected void postMenuActionEvent ()
{
  CheckboxMenuItem item = (CheckboxMenuItem)awtWidget;
  q().postEvent (new ItemEvent ((ItemSelectable)awtWidget,
    ItemEvent.ITEM_STATE_CHANGED,
    item.getActionCommand(),
    item.getState() ? ItemEvent.DESELECTED : ItemEvent.SELECTED));

  super.postMenuActionEvent();
}
 
Example 25
Project: openjdk-jdk7u-jdk   File: CCheckboxMenuItem.java   View source code 5 votes vote down vote up
public void handleAction(final boolean state) {
    final CheckboxMenuItem target = (CheckboxMenuItem)getTarget();
    SunToolkit.executeOnEventHandlerThread(target, new Runnable() {
        public void run() {
            target.setState(state);
        }
    });
    ItemEvent event = new ItemEvent(target, ItemEvent.ITEM_STATE_CHANGED, target.getLabel(), state ? ItemEvent.SELECTED : ItemEvent.DESELECTED);
    SunToolkit.postEvent(SunToolkit.targetToAppContext(getTarget()), event);
}
 
Example 26
Project: classpath   File: GtkCheckboxMenuItemPeer.java   View source code 5 votes vote down vote up
/**
 * Called from the signal handler of the gtk widget.  Posts a
 * ItemEvent to indicate a state changed, then calls super to post
 * an ActionEvent.
 */
protected void postMenuActionEvent ()
{
  CheckboxMenuItem item = (CheckboxMenuItem)awtWidget;
  q().postEvent (new ItemEvent ((ItemSelectable)awtWidget,
    ItemEvent.ITEM_STATE_CHANGED,
    item.getActionCommand(),
    item.getState() ? ItemEvent.DESELECTED : ItemEvent.SELECTED));

  super.postMenuActionEvent();
}
 
Example 27
Project: openjdk-icedtea7   File: CCheckboxMenuItem.java   View source code 5 votes vote down vote up
public void handleAction(final boolean state) {
    final CheckboxMenuItem target = (CheckboxMenuItem)getTarget();
    SunToolkit.executeOnEventHandlerThread(target, new Runnable() {
        public void run() {
            target.setState(state);
        }
    });
    ItemEvent event = new ItemEvent(target, ItemEvent.ITEM_STATE_CHANGED, target.getLabel(), state ? ItemEvent.SELECTED : ItemEvent.DESELECTED);
    SunToolkit.postEvent(SunToolkit.targetToAppContext(getTarget()), event);
}
 
Example 28
Project: litiengine   File: Program.java   View source code 4 votes vote down vote up
private static Menu initViewMenu() {
  Menu mnView = new Menu(Resources.get("menu_view"));

  CheckboxMenuItem snapToGrid = new CheckboxMenuItem(Resources.get("menu_snapGrid"));
  snapToGrid.setState(userPreferences.isSnapGrid());
  EditorScreen.instance().getMapComponent().snapToGrid = snapToGrid.getState();
  snapToGrid.addItemListener(e -> {
    EditorScreen.instance().getMapComponent().snapToGrid = snapToGrid.getState();
    userPreferences.setSnapGrid(snapToGrid.getState());
  });

  CheckboxMenuItem renderGrid = new CheckboxMenuItem(Resources.get("menu_renderGrid"));
  renderGrid.setState(userPreferences.isShowGrid());
  EditorScreen.instance().getMapComponent().renderGrid = renderGrid.getState();
  renderGrid.setShortcut(new MenuShortcut(KeyEvent.VK_G));
  renderGrid.addItemListener(e -> {
    EditorScreen.instance().getMapComponent().renderGrid = renderGrid.getState();
    userPreferences.setShowGrid(renderGrid.getState());
  });

  CheckboxMenuItem renderCollision = new CheckboxMenuItem(Resources.get("menu_renderCollisionBoxes"));
  renderCollision.setState(userPreferences.isRenderBoundingBoxes());
  EditorScreen.instance().getMapComponent().renderCollisionBoxes = renderCollision.getState();
  renderCollision.setShortcut(new MenuShortcut(KeyEvent.VK_H));
  renderCollision.addItemListener(e -> {
    EditorScreen.instance().getMapComponent().renderCollisionBoxes = renderCollision.getState();
    userPreferences.setRenderBoundingBoxes(renderCollision.getState());
  });

  MenuItem setGrid = new MenuItem(Resources.get("menu_gridSize"));
  setGrid.addActionListener(a -> {
    GridEditPanel panel = new GridEditPanel(EditorScreen.instance().getMapComponent().getGridSize());
    int option = JOptionPane.showConfirmDialog(null, panel, Resources.get("menu_gridSettings"), JOptionPane.DEFAULT_OPTION);
    if (option == JOptionPane.OK_OPTION) {
      EditorScreen.instance().getMapComponent().setGridSize(panel.getGridSize());
    }
  });

  MenuItem zoomIn = new MenuItem(Resources.get("menu_zoomIn"));
  zoomIn.setShortcut(new MenuShortcut(KeyEvent.VK_PLUS));
  zoomIn.addActionListener(a -> EditorScreen.instance().getMapComponent().zoomIn());

  MenuItem zoomOut = new MenuItem(Resources.get("menu_zoomOut"));
  zoomOut.setShortcut(new MenuShortcut(KeyEvent.VK_MINUS));
  zoomOut.addActionListener(a -> EditorScreen.instance().getMapComponent().zoomOut());

  mnView.add(snapToGrid);
  mnView.add(renderGrid);
  mnView.add(renderCollision);
  mnView.add(setGrid);
  mnView.addSeparator();
  mnView.add(zoomIn);
  mnView.add(zoomOut);

  return mnView;
}
 
Example 29
Project: incubator-netbeans   File: UtilitiesTest.java   View source code 4 votes vote down vote up
protected CheckboxMenuItemPeer createCheckboxMenuItem(CheckboxMenuItem target) throws HeadlessException {
    throw new IllegalStateException("Method not implemented");
}
 
Example 30
Project: OpenJSharp   File: CCheckboxMenuItem.java   View source code 4 votes vote down vote up
CCheckboxMenuItem(CheckboxMenuItem target) {
    super(target);
    nativeSetIsCheckbox(getModel());
    setState(target.getState());
}
 
Example 31
Project: OpenJSharp   File: WCheckboxMenuItemPeer.java   View source code 4 votes vote down vote up
WCheckboxMenuItemPeer(CheckboxMenuItem target) {
    super(target, true);
    setState(target.getState());
}
 
Example 32
Project: jdk8u-jdk   File: CCheckboxMenuItem.java   View source code 4 votes vote down vote up
CCheckboxMenuItem(final CheckboxMenuItem target) {
    super(target);
    execute(this::nativeSetIsCheckbox);
    setState(target.getState());
}
 
Example 33
Project: jdk8u-jdk   File: WCheckboxMenuItemPeer.java   View source code 4 votes vote down vote up
WCheckboxMenuItemPeer(CheckboxMenuItem target) {
    super(target, true);
    setState(target.getState());
}
 
Example 34
Project: openjdk-jdk10   File: CCheckboxMenuItem.java   View source code 4 votes vote down vote up
CCheckboxMenuItem(final CheckboxMenuItem target) {
    super(target);
    execute(this::nativeSetIsCheckbox);
    setState(target.getState());
}
 
Example 35
Project: openjdk-jdk10   File: WCheckboxMenuItemPeer.java   View source code 4 votes vote down vote up
WCheckboxMenuItemPeer(CheckboxMenuItem target) {
    super(target, true);
    setState(target.getState());
}
 
Example 36
Project: openjdk9   File: CCheckboxMenuItem.java   View source code 4 votes vote down vote up
CCheckboxMenuItem(CheckboxMenuItem target) {
    super(target);
    nativeSetIsCheckbox(getModel());
    setState(target.getState());
}
 
Example 37
Project: openjdk9   File: WCheckboxMenuItemPeer.java   View source code 4 votes vote down vote up
WCheckboxMenuItemPeer(CheckboxMenuItem target) {
    super(target, true);
    setState(target.getState());
}
 
Example 38
Project: jdk8u_jdk   File: CCheckboxMenuItem.java   View source code 4 votes vote down vote up
CCheckboxMenuItem(final CheckboxMenuItem target) {
    super(target);
    execute(this::nativeSetIsCheckbox);
    setState(target.getState());
}
 
Example 39
Project: jdk8u_jdk   File: WCheckboxMenuItemPeer.java   View source code 4 votes vote down vote up
WCheckboxMenuItemPeer(CheckboxMenuItem target) {
    super(target, true);
    setState(target.getState());
}
 
Example 40
Project: lookaside_java-1.8.0-openjdk   File: CCheckboxMenuItem.java   View source code 4 votes vote down vote up
CCheckboxMenuItem(final CheckboxMenuItem target) {
    super(target);
    execute(this::nativeSetIsCheckbox);
    setState(target.getState());
}