Tabnine Logo
JCheckBoxMenuItem.setModel
Code IndexAdd Tabnine to your IDE (free)

How to use
setModel
method
in
javax.swing.JCheckBoxMenuItem

Best Java code snippets using javax.swing.JCheckBoxMenuItem.setModel (Showing top 6 results out of 315)

origin: nroduit/Weasis

public JCheckBoxMenuItem createUnregiteredJCheckBoxMenuItem(String text) {
  final JCheckBoxMenuItem checkBoxItem = new JCheckBoxMenuItem(text, null, model.isSelected());
  checkBoxItem.setModel(model);
  return checkBoxItem;
}
origin: com.numdata/numdata-swing

/**
 * Create a menu item for the specified action.
 *
 * @param   action  Action to create menu item for.
 *
 * @return  {@link JMenuItem}.
 */
public static JMenuItem createMenuItem( final Action action )
{
  final JMenuItem result;
  if ( action instanceof ToggleAction )
  {
    final ToggleAction toggleAction = (ToggleAction)action;
    final JCheckBoxMenuItem checkBoxMenuItem = new JCheckBoxMenuItem( action );
    checkBoxMenuItem.setModel( new ToggleButtonModel( toggleAction ) );
    result = checkBoxMenuItem;
  }
  else
  {
    result = new JMenuItem( action );
  }
  return result;
}
origin: triplea-game/triplea

private void addEditMode() {
 final JCheckBoxMenuItem editMode = new JCheckBoxMenuItem("Enable Edit Mode");
 editMode.setModel(frame.getEditModeButtonModel());
 final JMenuItem editMenuItem = add(editMode);
 editMenuItem.setMnemonic(KeyEvent.VK_E);
 editMenuItem.setAccelerator(
   KeyStroke.getKeyStroke(KeyEvent.VK_E, Toolkit.getDefaultToolkit().getMenuShortcutKeyMask()));
}
origin: triplea-game/triplea

private void addShowCommentLog() {
 final JCheckBoxMenuItem showCommentLog = new JCheckBoxMenuItem("Show Comment Log");
 showCommentLog.setModel(frame.getShowCommentLogButtonModel());
 add(showCommentLog).setMnemonic(KeyEvent.VK_L);
}
origin: cpesch/RouteConverter

protected void initializeShowColumn(JMenu showColumnMenu) {
  VisibleListener visibleListener = new VisibleListener();
  for (PositionTableColumn column : columnModel.getPreparedColumns()) {
    column.addPropertyChangeListener(visibleListener);
    String menuItemText = RouteConverter.getBundle().getString(column.getName());
    ToggleColumnVisibilityAction action = new ToggleColumnVisibilityAction(column);
    actionManager.register(createShowKey(column.getName()), action);
    JCheckBoxMenuItem popupItem = new JCheckBoxMenuItem(menuItemText);
    popupItem.setModel(new PositionTableColumnButtonModel(column, action));
    popupMenu.add(popupItem);
    if (showColumnMenu != null) {
      JCheckBoxMenuItem menuBarItem = new JCheckBoxMenuItem(menuItemText);
      menuBarItem.setModel(new PositionTableColumnButtonModel(column, action));
      setMnemonic(menuBarItem, column.getName() + MNEMONIC_SUFFIX);
      showColumnMenu.add(menuBarItem);
    }
  }
}
origin: uk.org.mygrid.taverna.scufl.scufl-ui-components/scufl-interactive-diagram

menuItem.setModel(new ShowBoringModel());
javax.swingJCheckBoxMenuItemsetModel

Popular methods of JCheckBoxMenuItem

  • <init>
  • setSelected
  • addActionListener
  • isSelected
  • setEnabled
  • setState
  • setText
  • getState
  • addItemListener
  • setMnemonic
  • setToolTipText
  • setActionCommand
  • setToolTipText,
  • setActionCommand,
  • setAccelerator,
  • setAction,
  • getText,
  • setIcon,
  • setName,
  • getModel,
  • addChangeListener,
  • getActionCommand

Popular in Java

  • Start an intent from android
  • setScale (BigDecimal)
  • putExtra (Intent)
  • getSharedPreferences (Context)
  • FileReader (java.io)
    A specialized Reader that reads from a file in the file system. All read requests made by calling me
  • ConcurrentHashMap (java.util.concurrent)
    A plug-in replacement for JDK1.5 java.util.concurrent.ConcurrentHashMap. This version is based on or
  • JComboBox (javax.swing)
  • JLabel (javax.swing)
  • IOUtils (org.apache.commons.io)
    General IO stream manipulation utilities. This class provides static utility methods for input/outpu
  • Runner (org.openjdk.jmh.runner)
  • Github Copilot alternatives
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now