本文整理汇总了Java中javax.swing.plaf.ToolBarUI类的典型用法代码示例。如果您正苦于以下问题:Java ToolBarUI类的具体用法?Java ToolBarUI怎么用?Java ToolBarUI使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
ToolBarUI类属于javax.swing.plaf包,在下文中一共展示了ToolBarUI类的14个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: testInitOutsideOfEDT
import javax.swing.plaf.ToolBarUI; //导入依赖的package包/类
public void testInitOutsideOfEDT() throws Exception {
class MyToolbar extends Toolbar implements Runnable {
@Override
protected void setUI(ComponentUI newUI) {
assertTrue("Can only be called in EDT", EventQueue.isDispatchThread());
super.setUI(newUI);
}
@Override
public void setUI(ToolBarUI ui) {
assertTrue("Can only be called in EDT", EventQueue.isDispatchThread());
super.setUI(ui);
}
private void assertUI() throws Exception {
EventQueue.invokeAndWait(this);
}
@Override
public void run() {
assertNotNull("UI delegate is specified", getUI());
}
}
assertFalse("We are not in EDT", EventQueue.isDispatchThread());
MyToolbar mt = new MyToolbar();
assertNotNull("Instance created", mt);
mt.assertUI();
}
开发者ID:apache,项目名称:incubator-netbeans,代码行数:32,代码来源:ToolbarTest.java
示例2: testInitOutsideOfEDT
import javax.swing.plaf.ToolBarUI; //导入依赖的package包/类
public void testInitOutsideOfEDT() throws Exception {
class MyToolbar extends ToolbarWithOverflow implements Runnable {
@Override
protected void setUI(ComponentUI newUI) {
assertTrue("Can only be called in EDT", EventQueue.isDispatchThread());
super.setUI(newUI);
}
@Override
public void setUI(ToolBarUI ui) {
assertTrue("Can only be called in EDT", EventQueue.isDispatchThread());
super.setUI(ui);
}
private void assertUI() throws Exception {
EventQueue.invokeAndWait(this);
}
@Override
public void run() {
assertNotNull("UI delegate is specified", getUI());
}
}
assertFalse("We are not in EDT", EventQueue.isDispatchThread());
MyToolbar mt = new MyToolbar();
assertNotNull("Instance created", mt);
mt.assertUI();
}
开发者ID:apache,项目名称:incubator-netbeans,代码行数:32,代码来源:ToolbarWithOverflowTest.java
示例3: updateUI
import javax.swing.plaf.ToolBarUI; //导入依赖的package包/类
/**
* Notification from the <code>UIFactory</code> that the L&F has changed.
* Called to replace the UI with the latest version from the
* <code>UIFactory</code>.
*
* @see JComponent#updateUI
*/
public void updateUI() {
setUI((ToolBarUI) UIManager.getUI(this));
// GTKLookAndFeel installs a different LayoutManager, and sets it
// to null after changing the look and feel, so, install the default
// if the LayoutManager is null.
if (getLayout() == null) {
setLayout(new DefaultToolBarLayout(getOrientation()));
}
invalidate();
}
开发者ID:javalovercn,项目名称:j2se_for_android,代码行数:18,代码来源:JToolBar.java
示例4: setUI
import javax.swing.plaf.ToolBarUI; //导入依赖的package包/类
public @Override void setUI(ToolBarUI ui){
addListener = false;
super.setUI(ui);
addListener = true;
}
开发者ID:apache,项目名称:incubator-netbeans,代码行数:6,代码来源:NbEditorToolBar.java
示例5: updateUI
import javax.swing.plaf.ToolBarUI; //导入依赖的package包/类
/**
* This method resets the UI used to the Look and Feel defaults.
*/
public void updateUI()
{
setUI((ToolBarUI) UIManager.getUI(this));
}
开发者ID:vilie,项目名称:javify,代码行数:8,代码来源:JToolBar.java
示例6: unfloatToolBar
import javax.swing.plaf.ToolBarUI; //导入依赖的package包/类
public static void unfloatToolBar(JToolBar tb) {
ToolBarUI tbUI = tb.getUI();
if (tbUI instanceof BasicToolBarUI)
((BasicToolBarUI) tbUI).setFloating(false, null);
}
开发者ID:markkohdev,项目名称:oStorybook,代码行数:6,代码来源:SwingUtil.java
示例7: floatToolBar
import javax.swing.plaf.ToolBarUI; //导入依赖的package包/类
public static void floatToolBar(JToolBar tb, Point p) {
ToolBarUI tbUI = tb.getUI();
if (tbUI instanceof BasicToolBarUI)
((BasicToolBarUI) tbUI).setFloating(false, p);
}
开发者ID:markkohdev,项目名称:oStorybook,代码行数:6,代码来源:SwingUtil.java
示例8: setUI
import javax.swing.plaf.ToolBarUI; //导入依赖的package包/类
public void setUI(final ToolBarUI ui) {
super.setUI(ui);
}
开发者ID:shannah,项目名称:cn1,代码行数:4,代码来源:JToolBar.java
示例9: getUI
import javax.swing.plaf.ToolBarUI; //导入依赖的package包/类
public ToolBarUI getUI() {
return (ToolBarUI)ui;
}
开发者ID:shannah,项目名称:cn1,代码行数:4,代码来源:JToolBar.java
示例10: updateUI
import javax.swing.plaf.ToolBarUI; //导入依赖的package包/类
public void updateUI() {
setUI((ToolBarUI)UIManager.getUI(this));
}
开发者ID:shannah,项目名称:cn1,代码行数:4,代码来源:JToolBar.java
示例11: getUI
import javax.swing.plaf.ToolBarUI; //导入依赖的package包/类
/**
* Returns the tool bar's current UI.
*
* @see #setUI
*/
public ToolBarUI getUI() {
return (ToolBarUI) null;
}
开发者ID:javalovercn,项目名称:j2se_for_android,代码行数:9,代码来源:JToolBar.java
示例12: setUI
import javax.swing.plaf.ToolBarUI; //导入依赖的package包/类
/**
* Sets the L&F object that renders this component.
*
* @param ui
* the <code>ToolBarUI</code> L&F object
* @see UIDefaults#getUI
* @beaninfo bound: true hidden: true attribute: visualUpdate true
* description: The UI object that implements the Component's
* LookAndFeel.
*/
public void setUI(ToolBarUI ui) {
super.setUI(ui);
}
开发者ID:javalovercn,项目名称:j2se_for_android,代码行数:14,代码来源:JToolBar.java
示例13: getUI
import javax.swing.plaf.ToolBarUI; //导入依赖的package包/类
/**
* This method returns the UI class used to paint this JToolBar.
*
* @return The UI class for this JToolBar.
*/
public ToolBarUI getUI()
{
return (ToolBarUI) ui;
}
开发者ID:vilie,项目名称:javify,代码行数:10,代码来源:JToolBar.java
示例14: setUI
import javax.swing.plaf.ToolBarUI; //导入依赖的package包/类
/**
* This method sets the UI used with the JToolBar.
*
* @param ui The UI used with the JToolBar.
*/
public void setUI(ToolBarUI ui)
{
super.setUI(ui);
}
开发者ID:vilie,项目名称:javify,代码行数:10,代码来源:JToolBar.java
注:本文中的javax.swing.plaf.ToolBarUI类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论