本文整理了Java中javax.swing.JToolBar.validate()
方法的一些代码示例,展示了JToolBar.validate()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。JToolBar.validate()
方法的具体详情如下:
包路径:javax.swing.JToolBar
类名称:JToolBar
方法名:validate
暂无
代码示例来源:origin: org.netbeans.api/org-openide-awt
@Override
public void validate() {
if (!Boolean.TRUE.equals(getClientProperty(PROP_JDEV_DISABLE_OVERFLOW))) {
int visibleButtons = computeVisibleButtons();
if (visibleButtons == -1) {
handleOverflowRemoval();
} else {
handleOverflowAddittion(visibleButtons);
}
}
super.validate();
}
代码示例来源:origin: akquinet/jbosscc-as7-examples
/**
* Injects an available <tt>SimpleShape</tt> into the drawing frame.
*
* @param name
* The name of the injected <tt>SimpleShape</tt>.
* @param icon
* The icon associated with the injected <tt>SimpleShape</tt>.
* @param shape
* The injected <tt>SimpleShape</tt> instance.
**/
public void addShape(SimpleShape shape) {
m_shapes.put(shape.getName(), shape);
JButton button = new JButton(shape.getIcon());
button.setActionCommand(shape.getName());
button.setToolTipText(shape.getName());
button.addActionListener(m_reusableActionListener);
if (m_selected == null) {
button.doClick();
}
m_toolbar.add(button);
m_toolbar.validate();
repaint();
}
代码示例来源:origin: de.sciss/jsyntaxpane
private void jCmbLangsItemStateChanged(java.awt.event.ItemEvent evt) {//GEN-FIRST:event_jCmbLangsItemStateChanged
if (evt.getStateChange() == ItemEvent.SELECTED) {
String lang = jCmbLangs.getSelectedItem().toString();
// save the state of the current JEditorPane, as it's Document is about
// to be replaced.
String oldText = jEdtTest.getText();
// install a new DefaultSyntaxKit on the JEditorPane for the requested language.
jEdtTest.setContentType(lang);
// Recreate the Toolbar
jToolBar1.removeAll();
EditorKit kit = jEdtTest.getEditorKit();
if (kit instanceof DefaultSyntaxKit) {
DefaultSyntaxKit defaultSyntaxKit = (DefaultSyntaxKit) kit;
defaultSyntaxKit.addToolBarActions(jEdtTest, jToolBar1);
}
jToolBar1.validate();
try {
// setText should not be called (read the JavaDocs). Better use the read
// method and create a new document.
jEdtTest.read(new StringReader(oldText), lang);
} catch (IOException ex) {
Logger.getLogger(SyntaxTester.class.getName()).log(Level.SEVERE, null, ex);
}
}
jEdtTest.requestFocusInWindow();
}//GEN-LAST:event_jCmbLangsItemStateChanged
代码示例来源:origin: org.netbeans.api/org-netbeans-modules-vmd-screen
visual.add (loadingPanel, BorderLayout.CENTER);
toolbar.validate ();
visual.validate ();
代码示例来源:origin: org.activecomponents.jadex/jadex-runtimetools-swing
toolbar.validate();
toolbar.repaint();
代码示例来源:origin: net.sourceforge.jadex/jadex-runtimetools-swing
toolbar.add(jlb);
toolbar.validate();
toolbar.repaint();
内容来源于网络,如有侵权,请联系作者删除!