Java 类javax.swing.plaf.ToolBarUI 实例源码

项目:incubator-netbeans    文件:ToolbarTest.java   
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();
}
项目:incubator-netbeans    文件:ToolbarWithOverflowTest.java   
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();
}
项目:j2se_for_android    文件:JToolBar.java   
/**
 * 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();
}
项目:incubator-netbeans    文件:NbEditorToolBar.java   
public @Override void setUI(ToolBarUI ui){
    addListener = false;
    super.setUI(ui);
    addListener = true;
}
项目:javify    文件:JToolBar.java   
/**
 * This method resets the UI used to the Look and Feel defaults.
 */
public void updateUI()
{
  setUI((ToolBarUI) UIManager.getUI(this));
}
项目:jvm-stm    文件:JToolBar.java   
/**
 * This method resets the UI used to the Look and Feel defaults.
 */
public void updateUI()
{
  setUI((ToolBarUI) UIManager.getUI(this));
}
项目:oStorybook    文件:SwingUtil.java   
public static void unfloatToolBar(JToolBar tb) {
    ToolBarUI tbUI = tb.getUI();
    if (tbUI instanceof BasicToolBarUI)
        ((BasicToolBarUI) tbUI).setFloating(false, null);
}
项目:oStorybook    文件:SwingUtil.java   
public static void floatToolBar(JToolBar tb, Point p) {
    ToolBarUI tbUI = tb.getUI();
    if (tbUI instanceof BasicToolBarUI)
        ((BasicToolBarUI) tbUI).setFloating(false, p);
}
项目:SE-410-Project    文件:SwingUtil.java   
public static void unfloatToolBar(JToolBar tb) {
    ToolBarUI tbUI = tb.getUI();
    if (tbUI instanceof BasicToolBarUI)
        ((BasicToolBarUI) tbUI).setFloating(false, null);
}
项目:SE-410-Project    文件:SwingUtil.java   
public static void floatToolBar(JToolBar tb, Point p) {
    ToolBarUI tbUI = tb.getUI();
    if (tbUI instanceof BasicToolBarUI)
        ((BasicToolBarUI) tbUI).setFloating(false, p);
}
项目:cn1    文件:JToolBar.java   
public void setUI(final ToolBarUI ui) {
    super.setUI(ui);
}
项目:cn1    文件:JToolBar.java   
public ToolBarUI getUI() {
    return (ToolBarUI)ui;
}
项目:cn1    文件:JToolBar.java   
public void updateUI() {
    setUI((ToolBarUI)UIManager.getUI(this));
}
项目:JamVM-PH    文件:JToolBar.java   
/**
 * This method resets the UI used to the Look and Feel defaults.
 */
public void updateUI()
{
  setUI((ToolBarUI) UIManager.getUI(this));
}
项目:classpath    文件:JToolBar.java   
/**
 * This method resets the UI used to the Look and Feel defaults.
 */
public void updateUI()
{
  setUI((ToolBarUI) UIManager.getUI(this));
}
项目:freeVM    文件:JToolBar.java   
public void setUI(final ToolBarUI ui) {
    super.setUI(ui);
}
项目:freeVM    文件:JToolBar.java   
public ToolBarUI getUI() {
    return (ToolBarUI)ui;
}
项目:freeVM    文件:JToolBar.java   
public void updateUI() {
    setUI((ToolBarUI)UIManager.getUI(this));
}
项目:freeVM    文件:JToolBar.java   
public void setUI(final ToolBarUI ui) {
    super.setUI(ui);
}
项目:freeVM    文件:JToolBar.java   
public ToolBarUI getUI() {
    return (ToolBarUI)ui;
}
项目:freeVM    文件:JToolBar.java   
public void updateUI() {
    setUI((ToolBarUI)UIManager.getUI(this));
}
项目:j2se_for_android    文件:JToolBar.java   
/**
 * Returns the tool bar's current UI.
 * 
 * @see #setUI
 */
public ToolBarUI getUI() {
    return (ToolBarUI) null;
}
项目:j2se_for_android    文件:JToolBar.java   
/**
 * 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);
}
项目:javify    文件:JToolBar.java   
/**
 * This method returns the UI class used to paint this JToolBar.
 *
 * @return The UI class for this JToolBar.
 */
public ToolBarUI getUI()
{
  return (ToolBarUI) ui;
}
项目:javify    文件:JToolBar.java   
/**
 * 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);
}
项目:jvm-stm    文件:JToolBar.java   
/**
 * This method returns the UI class used to paint this JToolBar.
 *
 * @return The UI class for this JToolBar.
 */
public ToolBarUI getUI()
{
  return (ToolBarUI) ui;
}
项目:jvm-stm    文件:JToolBar.java   
/**
 * 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);
}
项目:JamVM-PH    文件:JToolBar.java   
/**
 * This method returns the UI class used to paint this JToolBar.
 *
 * @return The UI class for this JToolBar.
 */
public ToolBarUI getUI()
{
  return (ToolBarUI) ui;
}
项目:JamVM-PH    文件:JToolBar.java   
/**
 * 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);
}
项目:classpath    文件:JToolBar.java   
/**
 * This method returns the UI class used to paint this JToolBar.
 *
 * @return The UI class for this JToolBar.
 */
public ToolBarUI getUI()
{
  return (ToolBarUI) ui;
}
项目:classpath    文件:JToolBar.java   
/**
 * 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);
}