Codota Logo
JCheckBoxMenuItem.setModel
Code IndexAdd Codota 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)

  • Common ways to obtain JCheckBoxMenuItem
private void myMethod () {
JCheckBoxMenuItem j =
  • Codota Iconnew JCheckBoxMenuItem()
  • Codota IconString str;new JCheckBoxMenuItem(str)
  • Codota IconAction action;new JCheckBoxMenuItem(action)
  • Smart code suggestions by Codota
}
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

  • Running tasks concurrently on multiple threads
  • requestLocationUpdates (LocationManager)
  • notifyDataSetChanged (ArrayAdapter)
  • compareTo (BigDecimal)
    Compares this BigDecimal with the specified BigDecimal. Two BigDecimal objects that are equal in val
  • Table (com.google.common.collect)
    A collection that associates an ordered pair of keys, called a row key and a column key, with a sing
  • VirtualMachine (com.sun.tools.attach)
    A Java virtual machine. A VirtualMachine represents a Java virtual machine to which this Java vir
  • Deque (java.util)
    A linear collection that supports element insertion and removal at both ends. The name deque is shor
  • JComboBox (javax.swing)
  • Reflections (org.reflections)
    Reflections one-stop-shop objectReflections scans your classpath, indexes the metadata, allows you t
  • Logger (org.slf4j)
    The main user interface to logging. It is expected that logging takes place through concrete impleme
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now