Codota Logo
JCheckBoxMenuItem.setToolTipText
Code IndexAdd Codota to your IDE (free)

How to use
setToolTipText
method
in
javax.swing.JCheckBoxMenuItem

Best Java code snippets using javax.swing.JCheckBoxMenuItem.setToolTipText (Showing top 20 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: magefree/mage

holdPriorityMenuItem.setToolTipText("<html>Hold priority after casting a spell or activating an ability, instead of automatically passing priority.");
popupMenu.add(holdPriorityMenuItem);
holdPriorityMenuItem.addActionListener(e -> {
manaPoolMenuItem1.setToolTipText("<html>If not active, produced mana goes only to the mana pool<br>"
    + "and you have to click the type of mana you want to use <br>"
    + "in the player mana pool panel for payment.");
manaPoolMenuItem2.setToolTipText("<html>Mana that is already in the mana pool as you start casting a spell or activating an ability<br>"
    + " needs to be payed manually. So you use the mana in the pool only by clicking on the related<br>"
    + " mana symbols of mana pool area.");
useFirstManaAbilityItem.setToolTipText("<html>Use the first mana ability when<br>"
    + " tapping lands for mana<br>"
    + "You can hold Alt+1 whilst tapping lands to use this feature");
  allowViewHandCardsMenuItem = new JCheckBoxMenuItem("Allow requests to show from other users", allowRequestToShowHandCards);
  allowViewHandCardsMenuItem.setMnemonic(KeyEvent.VK_A);
  allowViewHandCardsMenuItem.setToolTipText("If activated watchers or other players can request to see your hand cards. If you grant this to a user, it's valid for the complete match.");
  handCardsMenu.add(allowViewHandCardsMenuItem);
origin: com.fifesoft.rtext/fife.common

/**
 * Returns a check box menu item configured from an action.
 *
 * @param action The action associated with the menu item.
 * @return The menu item.
 */
protected JCheckBoxMenuItem createCheckBoxMenuItem(Action action) {
  JCheckBoxMenuItem item = new JCheckBoxMenuItem(action);
  item.setToolTipText(null);
  return item;
}
origin: icza/scelight

/**
 * Overrides {@link XAction#addToMenu(JPopupMenu)} to add a {@link JCheckBoxMenuItem} instead of a {@link JMenuItem}.
 */
@Override
public JMenuItem addToMenu( final JPopupMenu menu ) {
  final JCheckBoxMenuItem mi = new JCheckBoxMenuItem();
  
  menu.add( mi );
  mi.setAction( this );
  mi.setToolTipText( null ); // We don't want tool tip on menu items...
  
  return mi;
}
 
origin: icza/scelight

/**
 * Overrides {@link XAction#addToMenu(JMenu)} to add a {@link JCheckBoxMenuItem} instead of a {@link JMenuItem}.
 */
@Override
public JMenuItem addToMenu( final JMenu menu ) {
  final JCheckBoxMenuItem mi = new JCheckBoxMenuItem();
  
  menu.add( mi );
  mi.setAction( this );
  mi.setToolTipText( null ); // We don't want tool tip on menu items...
  
  return mi;
}
 
origin: igvteam/igv

  static public JCheckBoxMenuItem createMenuItem(MenuAction menuItemAction, boolean isSelected) {

    JCheckBoxMenuItem menuItem = new JCheckBoxMenuItem();
    menuItem.setSelected(isSelected);
    menuItem.setAction(menuItemAction);

    String text = menuItemAction.getToolTipText();
    if (text != null) {
      menuItem.setToolTipText(text);
    }

    return menuItem;
  }
}
origin: org.biojava.thirdparty/forester

void buildTypeMenu() {
  _type_menu = createMenu( TYPE_MENU_HEADER, getConfiguration() );
  _type_menu.add( _rectangular_type_cbmi = new JCheckBoxMenuItem( MainFrame.RECTANGULAR_TYPE_CBMI_LABEL ) );
  _type_menu.add( _euro_type_cbmi = new JCheckBoxMenuItem( MainFrame.EURO_TYPE_CBMI_LABEL ) );
  _type_menu.add( _rounded_type_cbmi = new JCheckBoxMenuItem( MainFrame.ROUNDED_TYPE_CBMI_LABEL ) );
  _type_menu.add( _curved_type_cbmi = new JCheckBoxMenuItem( MainFrame.CURVED_TYPE_CBMI_LABEL ) );
  _type_menu.add( _triangular_type_cbmi = new JCheckBoxMenuItem( MainFrame.TRIANGULAR_TYPE_CBMI_LABEL ) );
  _type_menu.add( _convex_type_cbmi = new JCheckBoxMenuItem( MainFrame.CONVEX_TYPE_CBMI_LABEL ) );
  _type_menu.add( _unrooted_type_cbmi = new JCheckBoxMenuItem( MainFrame.UNROOTED_TYPE_CBMI_LABEL ) );
  _type_menu.add( _circular_type_cbmi = new JCheckBoxMenuItem( MainFrame.CIRCULAR_TYPE_CBMI_LABEL ) );
  customizeCheckBoxMenuItem( _rectangular_type_cbmi, false );
  customizeCheckBoxMenuItem( _triangular_type_cbmi, false );
  customizeCheckBoxMenuItem( _euro_type_cbmi, false );
  customizeCheckBoxMenuItem( _rounded_type_cbmi, false );
  customizeCheckBoxMenuItem( _curved_type_cbmi, false );
  customizeCheckBoxMenuItem( _convex_type_cbmi, false );
  customizeCheckBoxMenuItem( _unrooted_type_cbmi, false );
  customizeCheckBoxMenuItem( _circular_type_cbmi, false );
  _unrooted_type_cbmi.setToolTipText( MainFrame.USE_MOUSEWHEEL_SHIFT_TO_ROTATE );
  _circular_type_cbmi.setToolTipText( MainFrame.USE_MOUSEWHEEL_SHIFT_TO_ROTATE );
  initializeTypeMenu( getOptions() );
  _jmenubar.add( _type_menu );
}
origin: org.biojava.thirdparty/forester

void buildTypeMenu() {
  _type_menu = MainFrame.createMenu( MainFrame.TYPE_MENU_HEADER, getConfiguration() );
  _type_menu.add( _rectangular_type_cbmi = new JCheckBoxMenuItem( MainFrame.RECTANGULAR_TYPE_CBMI_LABEL ) );
  _type_menu.add( _euro_type_cbmi = new JCheckBoxMenuItem( MainFrame.EURO_TYPE_CBMI_LABEL ) );
  _type_menu.add( _rounded_type_cbmi = new JCheckBoxMenuItem( MainFrame.ROUNDED_TYPE_CBMI_LABEL ) );
  _type_menu.add( _curved_type_cbmi = new JCheckBoxMenuItem( MainFrame.CURVED_TYPE_CBMI_LABEL ) );
  _type_menu.add( _triangular_type_cbmi = new JCheckBoxMenuItem( MainFrame.TRIANGULAR_TYPE_CBMI_LABEL ) );
  _type_menu.add( _convex_type_cbmi = new JCheckBoxMenuItem( MainFrame.CONVEX_TYPE_CBMI_LABEL ) );
  _type_menu.add( _unrooted_type_cbmi = new JCheckBoxMenuItem( MainFrame.UNROOTED_TYPE_CBMI_LABEL ) );
  _type_menu.add( _circular_type_cbmi = new JCheckBoxMenuItem( MainFrame.CIRCULAR_TYPE_CBMI_LABEL ) );
  customizeCheckBoxMenuItem( _rectangular_type_cbmi, false );
  customizeCheckBoxMenuItem( _triangular_type_cbmi, false );
  customizeCheckBoxMenuItem( _euro_type_cbmi, false );
  customizeCheckBoxMenuItem( _rounded_type_cbmi, false );
  customizeCheckBoxMenuItem( _curved_type_cbmi, false );
  customizeCheckBoxMenuItem( _convex_type_cbmi, false );
  customizeCheckBoxMenuItem( _unrooted_type_cbmi, false );
  customizeCheckBoxMenuItem( _circular_type_cbmi, false );
  _unrooted_type_cbmi.setToolTipText( MainFrame.USE_MOUSEWHEEL_SHIFT_TO_ROTATE );
  _circular_type_cbmi.setToolTipText( MainFrame.USE_MOUSEWHEEL_SHIFT_TO_ROTATE );
  initializeTypeMenu( getOptions() );
  _jmenubar.add( _type_menu );
}
origin: org.zaproxy/zap

private void updateForcedUserModeToggleButtonEnabledState() {
  if (getView() != null) {
    forcedUserModeButton.setSelected(forcedUserModeEnabled);
    forcedUserModeMenuItem.setSelected(forcedUserModeEnabled);
    forcedUserModeMenuItem.setToolTipText(forcedUserModeEnabled ? BUTTON_LABEL_ON : BUTTON_LABEL_OFF );
  }
}
origin: org.zaproxy/zap

private JCheckBoxMenuItem getForcedUserModeMenuItem() {
  if (forcedUserModeMenuItem == null) {
    forcedUserModeMenuItem = new JCheckBoxMenuItem(MENU_ITEM_LABEL);
    forcedUserModeMenuItem.setToolTipText(BUTTON_LABEL_DISABLED);
    forcedUserModeMenuItem.setEnabled(false);
    forcedUserModeMenuItem.addActionListener(e -> setForcedUserModeEnabled(forcedUserModeMenuItem.isSelected()));
  }
  return forcedUserModeMenuItem;
}
origin: gwlucastrig/Tinfour

scaleEnabled.setToolTipText("Select scale for inclusion in view");
scaleEnabled.addActionListener(new ActionListener() {
legendEnabled.setToolTipText("Select legend for inclusion in view");
legendEnabled.addActionListener(new ActionListener() {
origin: edu.toronto.cs.savant/savant-core

  @Override
  public void menuSelected(MenuEvent me) {
    Track seqTrack = (Track)GenomeController.getInstance().getGenome().getSequenceTrack();
    if (seqTrack == mainTrack) {
      setAsGenomeButton.setSelected(true);
      setAsGenomeButton.setEnabled(false);
      setAsGenomeButton.setToolTipText("This track is already the reference sequence");
    } else {
      setAsGenomeButton.setSelected(false);
      setAsGenomeButton.setEnabled(true);
      setAsGenomeButton.setToolTipText("Use this track as the reference sequence");
    }
  }
});
origin: net.sf.mmax2/mmax2

item.setToolTipText(comment);
origin: com.bbossgroups/bboss-htmlparser

mStatusVisible.setSelected (getThumbelina ().getStatusBarVisible ());
mStatusVisible.setText ("Status Bar");
mStatusVisible.setToolTipText ("Show/Hide the status bar.");
mView.add (mStatusVisible);
mHistoryVisible.setMnemonic ('H');
mHistoryVisible.setSelected (getThumbelina ().getHistoryListVisible ());
mHistoryVisible.setText ("History List");
mHistoryVisible.setToolTipText ("Show/Hide the history list.");
mView.add (mHistoryVisible);
mMenu.add (mView);
origin: cpesch/RouteConverter

  private void populateMenu() {
    menu.removeAll();

    List<TileServer> tileServers = availableOverlaysModel.getItems();
    for(TileServer tileServer : tileServers) {
      JCheckBoxMenuItem item = new JCheckBoxMenuItem();
      item.setAction(new ToggleOverlayAction(appliedOverlaysModel, tileServer));
      item.setState(appliedOverlaysModel.contains(tileServer));
      item.setText(tileServer.getId());
      item.setToolTipText(tileServer.getDescription());
      menu.add(item);
    }
    menu.setEnabled(tileServers.size() > 0);
  }
}
origin: igvteam/igv

private JCheckBoxMenuItem getCodonTableMenuItem(AminoAcidManager.CodonTable codonTable) {
  JCheckBoxMenuItem item = new JCheckBoxMenuItem();
  String fullName = codonTable.getDisplayName();
  String shortName = fullName;
  if (fullName.length() > 40) {
    shortName = fullName.substring(0, 37) + "...";
    item.setToolTipText(fullName);
  }
  item.setText(shortName);
  final AminoAcidManager.CodonTableKey curKey = codonTable.getKey();
  item.setSelected(curKey.equals(AminoAcidManager.getInstance().getCodonTable().getKey()));
  item.addActionListener(new ActionListener() {
    @Override
    public void actionPerformed(ActionEvent e) {
      AminoAcidManager.getInstance().setCodonTable(curKey);
      repaint();
    }
  });
  return item;
}
origin: com.bbossgroups/bboss-htmlparser

mLinks.setMnemonic('L');
mLinks.setText("Links");
mLinks.setToolTipText("show/hide links in text");
mLinks.setName("Links");
mLinks.addActionListener (this);
mCollapse.setToolTipText("collapse/retain whitespace sequences");
mCollapse.setName("Collapse");
mCollapse.addActionListener (this);
mNobreak.setToolTipText("replace/retain non-breaking spaces");
mNobreak.setName("Nobreak");
mNobreak.addActionListener (this);
origin: otros-systems/otroslogviewer

private void addMessageFormatterOrColorizerToMenu(final JPopupMenu menu, final PluginableElement pluginable,
                         final PluginableElementsContainer selectedPluginableContainer) {
 {
  final JCheckBoxMenuItem boxMenuItem = new JCheckBoxMenuItem(pluginable.getName(), selectedPluginableContainer.contains(pluginable));
  boxMenuItem.setToolTipText(pluginable.getDescription());
  menu.add(boxMenuItem);
  boxMenuItem.addChangeListener(e -> {
   if (boxMenuItem.isSelected() && !selectedPluginableContainer.contains(pluginable)) {
    selectedPluginableContainer.addElement(pluginable);
   } else if (!boxMenuItem.isSelected() && selectedPluginableContainer.contains(pluginable)) {
    selectedPluginableContainer.removeElement(pluginable);
   }
  });
 }
}
origin: hneemann/Digital

treeCheckBox.setToolTipText(Lang.get("menu_treeSelect_tt"));
treeCheckBox.addActionListener(actionEvent -> {
  getContentPane().remove(componentOnPane);
origin: sdedit/sdedit

public void addToggleAction(String category, String name,
    String description, String tooltip, Icon icon,
    final Predicate predicate, boolean initialValue) {
  final JCheckBoxMenuItem checkBox = MenuBar.makeMenuItem(name,
      JCheckBoxMenuItem.class);
  checkBox.setIcon(icon);
  checkBox.setText(description);
  checkBox.setToolTipText(tooltip);
  checkBox.setSelected(initialValue);
  checkBox.addActionListener(new ActionListener() {
    public void actionPerformed(ActionEvent e) {
      predicate.set(checkBox.isSelected());
    }
  });
  addItem(category, checkBox);
}
origin: org.zaproxy/zap

private void setForcedUserModeToggleButtonState(boolean enabled) {
  if (enabled) {
    updateForcedUserModeToggleButtonEnabledState();
    this.getForcedUserModeToggleButton().setEnabled(true);
    this.getForcedUserModeMenuItem().setEnabled(true);
  } else {
    this.forcedUserModeEnabled = false;
    this.getForcedUserModeToggleButton().setSelected(false);
    this.getForcedUserModeToggleButton().setEnabled(false);
    this.getForcedUserModeMenuItem().setSelected(false);
    this.getForcedUserModeMenuItem().setEnabled(false);
    this.getForcedUserModeMenuItem().setToolTipText(BUTTON_LABEL_DISABLED);
  }
}
javax.swingJCheckBoxMenuItemsetToolTipText

Popular methods of JCheckBoxMenuItem

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

Popular in Java

  • Running tasks concurrently on multiple threads
  • scheduleAtFixedRate (ScheduledExecutorService)
  • getSystemService (Context)
  • scheduleAtFixedRate (Timer)
    Schedules the specified task for repeated fixed-rate execution, beginning after the specified delay.
  • Runnable (java.lang)
    Represents a command that can be executed. Often used to run code in a different Thread.
  • ByteBuffer (java.nio)
    A buffer for bytes. A byte buffer can be created in either one of the following ways: * #allocate(i
  • Arrays (java.util)
    This class contains various methods for manipulating arrays (such as sorting and searching). This cl
  • TimerTask (java.util)
    A task that can be scheduled for one-time or repeated execution by a Timer.
  • ExecutorService (java.util.concurrent)
    An Executor that provides methods to manage termination and methods that can produce a Future for tr
  • Annotation (javassist.bytecode.annotation)
    The annotation structure.An instance of this class is returned bygetAnnotations() in AnnotationsAttr
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