Example usage for com.jgoodies.looks.plastic PlasticLookAndFeel IS_3D_KEY

List of usage examples for com.jgoodies.looks.plastic PlasticLookAndFeel IS_3D_KEY

Introduction

In this page you can find the example usage for com.jgoodies.looks.plastic PlasticLookAndFeel IS_3D_KEY.

Prototype

String IS_3D_KEY

To view the source code for com.jgoodies.looks.plastic PlasticLookAndFeel IS_3D_KEY.

Click Source Link

Document

Client property key to disable the pseudo 3D effect.

Usage

From source file:ambit2.ui.AbstractPanel.java

License:Open Source License

public AbstractPanel(T object) {
    super();// w  ww . j  a  v a 2s .co  m
    setFloatable(false);
    setRollover(false);
    putClientProperty("JToolBar.isRollover", Boolean.FALSE);
    putClientProperty(PlasticLookAndFeel.BORDER_STYLE_KEY, null);
    putClientProperty(WindowsLookAndFeel.BORDER_STYLE_KEY, null);
    putClientProperty(PlasticLookAndFeel.IS_3D_KEY, null);
    addSeparator();
    add(buildPanel(object));
}

From source file:com.floreantpos.swing.ButtonUI.java

License:Open Source License

/**
 * Checks and returns whether we have a custom hint that forces the 3D mode.
 * //from ww w.java 2  s  . c  om
  * @param c   the component to inspect
  * @return true if the given component has a 3D hint set
 * @see #forceFlat(JComponent)
 */
static boolean force3D(JComponent c) {
    Object value = c.getClientProperty(PlasticLookAndFeel.IS_3D_KEY);
    return Boolean.TRUE.equals(value);
}

From source file:com.floreantpos.swing.ButtonUI.java

License:Open Source License

/**
 * Checks and returns whether we have a custom hint that prevents the 3D mode.
 * /*from w  w  w. j av a2 s.com*/
  * @param c   the component to inspect
  * @return true if the given component has a flat hint set
 * @see #force3D(JComponent)
 */
static boolean forceFlat(JComponent c) {
    Object value = c.getClientProperty(PlasticLookAndFeel.IS_3D_KEY);
    return Boolean.FALSE.equals(value);
}

From source file:com.jfreestock.ui.toolbar.MinimalJToolBar.java

License:Apache License

/**
 * Initialize the toolbar/*from w  w w.ja  v  a 2  s . c  o  m*/
 */
protected void init() {
    setOpaque(false);
    setBorder(BorderFactory.createEmptyBorder());
    setFloatable(false);
    setMargin(new Insets(0, 0, 0, 0));
    putClientProperty("JToolBar.isRollover", Boolean.TRUE);
    putClientProperty(PlasticLookAndFeel.IS_3D_KEY, Boolean.FALSE);
}

From source file:com.salas.bb.views.mainframe.BBToolBarBuilder.java

License:Open Source License

/**
 * JGoodies specific setup./*from w  w w  .j  a v  a  2  s  .  c  om*/
 *
 * @param bldr builder.
 */
private void setToolBarJGoodiesSettings(ToolBarBuilder bldr) {
    JToolBar toolBar = bldr.getToolBar();

    toolBar.putClientProperty("JToolBar.isRollover", Boolean.TRUE);
    toolBar.putClientProperty(PlasticLookAndFeel.IS_3D_KEY, Boolean.TRUE);
    toolBar.putClientProperty(Options.HEADER_STYLE_KEY, HeaderStyle.SINGLE);

    // Set a hint so that JGoodies Looks will detect it as being in the header.
    //        toolBar.putClientProperty(Options.HEADER_STYLE_KEY, HeaderStyle.BOTH);

    // Unlike the default, use a separator border.
    toolBar.putClientProperty(WindowsLookAndFeel.BORDER_STYLE_KEY, BorderStyle.EMPTY);
    toolBar.putClientProperty(PlasticLookAndFeel.BORDER_STYLE_KEY, BorderStyle.EMPTY);
}

From source file:de.dfki.dmas.owls2wsdl.gui.MenuBarView.java

License:Open Source License

/**
 * Builds, configures, and returns the menubar. Requests HeaderStyle,
 * look-specific BorderStyles, and Plastic 3D hint from Launcher.
 *//*from  ww  w  . j  a  va2s  .  co m*/
JMenuBar buildMenuBar(Settings settings, GUIActionListener actionListener) {
    this.actionListener = actionListener;

    JMenuBar bar = new JMenuBar();
    bar.putClientProperty(Options.HEADER_STYLE_KEY, settings.getMenuBarHeaderStyle());
    bar.putClientProperty(PlasticLookAndFeel.BORDER_STYLE_KEY, settings.getMenuBarPlasticBorderStyle());
    bar.putClientProperty(WindowsLookAndFeel.BORDER_STYLE_KEY, settings.getMenuBarWindowsBorderStyle());
    bar.putClientProperty(PlasticLookAndFeel.IS_3D_KEY, settings.getMenuBar3DHint());

    bar.add(buildFileMenu());
    bar.add(buildEditMenu());
    bar.add(buildViewMenu());
    bar.add(buildExtrasMenu());
    bar.add(buildHelpMenu());
    return bar;
}

From source file:de.xplib.xdbm.ui.ApplicationMenuBar.java

License:Open Source License

/**
 * @param appIn The main frame.// w ww.  ja  va  2 s  .c o m
 */
public ApplicationMenuBar(final Application appIn) {
    this.app = appIn;

    this.putClientProperty(Options.HEADER_STYLE_KEY, HeaderStyle.SINGLE);
    this.putClientProperty(PlasticLookAndFeel.IS_3D_KEY, Boolean.TRUE);

    this.app.setJMenuBar(this);

    this.add(this.jmFile);
    this.jmFile.add(this.jmFileNew);
    this.jmFileNew.setIcon(Application.createIcon("icon/menu.new.png"));
    this.jmFileNew.add(new JMenuItem(NewCollectionAction.INSTANCE));
    this.jmFileNew.add(new JMenuItem(NewVirtualCollectionAction.INSTANCE));
    this.jmFileNew.add(new JMenuItem(NewXMLResourceAction.INSTANCE));

    this.jmFile.addSeparator();
    this.jmFile.add(this.jmiFileConnect);
    this.jmFile.add(this.jmiFileDisconnect);
    this.jmFile.addSeparator();
    this.jmFile.addSeparator();
    this.jmFile.add(this.jmiExit);

    this.add(this.jmEdit);
    this.jmEdit.add(new JMenuItem(CutResourceAction.INSTANCE));
    this.jmEdit.add(new JMenuItem(CopyResourceAction.INSTANCE));
    this.jmEdit.add(new JMenuItem(PasteResourceAction.INSTANCE));
    this.jmEdit.add(new JMenuItem(new FlippingAction(
            new Action[] { DeleteResourceAction.INSTANCE, DeleteCollectionAction.INSTANCE })));

    this.add(this.jmView);
    this.jmView.add(this.jmViewPlugins);

    this.initPlugins();
    /*
    Map map  = this.app.getConfig().getPluginFiles();
    Iterator it = map.keySet().iterator();
    while (it.hasNext()) {
    try {
        Plugin p = ((PluginFile) map.get(it.next())).createPlugin();
        this.jmViewPlugins.add(new JMenuItem(p.getTitle()));
    } catch (Exception e) {
        e.printStackTrace();
    }
    }
    */
    this.jmView.addSeparator();

    this.jmView.add(new JMenuItem(ShowXMLAction.INSTANCE));
    this.jmView.add(new JMenuItem(ShowPCVResourceAction.INSTANCE));

    this.add(this.jmQuery);
    this.jmQuery.add(new JMenuItem(QueryCollectionAction.INSTANCE));
    this.jmQuery.add(new JMenuItem(QueryXMLResourceAction.INSTANCE));

    // we have build the system menu, now we setup the plugin menus.
    for (int i = 0; i < this.plugins.length; i++) {
        this.plugins[i].setUpMenu(this);
    }

    I18N i18n = I18N.getInstance();
    i18n.addObserver(this);
    this.updateI18N(i18n);

    Config cfg = this.app.getConfig();
    cfg.addObserver(this);
    this.update(cfg);
}

From source file:de.xplib.xdbm.ui.ApplicationToolBars.java

License:Open Source License

private JToolBar createToolBar(JButton[] buttons) {
    JToolBar bar = ToolBarFactory.createToolBar(false, buttons, true);

    bar.putClientProperty("JToolBar.isRollover", Boolean.TRUE);
    bar.putClientProperty(Options.HEADER_STYLE_KEY, settings.getToolBarHeaderStyle());
    bar.putClientProperty(PlasticLookAndFeel.BORDER_STYLE_KEY, settings.getToolBarPlasticBorderStyle());
    bar.putClientProperty(WindowsLookAndFeel.BORDER_STYLE_KEY, settings.getToolBarWindowsBorderStyle());
    bar.putClientProperty(PlasticLookAndFeel.IS_3D_KEY, settings.getToolBar3DHint());
    bar.setFloatable(true);/*from  www .  ja  v a 2 s  .  c  o  m*/

    return bar;
}

From source file:etomica.virial.cluster2.mvc.view.MenuBarView.java

License:Mozilla Public License

/**
 * Builds, configures, and returns the JMenuBar. Requests HeaderStyle,
 * look-specific BorderStyles, and Plastic 3D hint from Launcher.
 *//*from   www .j a v a  2  s.  c o  m*/
JMenuBar buildMenuBar(ApplicationView parent) {

    JGoodiesSettings settings = ApplicationUI.uiSettings;
    JMenuBar bar = new JMenuBar();
    bar.putClientProperty(Options.HEADER_STYLE_KEY, settings.getMenuBarHeaderStyle());
    bar.putClientProperty(PlasticLookAndFeel.BORDER_STYLE_KEY, settings.getMenuBarPlasticBorderStyle());
    bar.putClientProperty(WindowsLookAndFeel.BORDER_STYLE_KEY, settings.getMenuBarWindowsBorderStyle());
    bar.putClientProperty(PlasticLookAndFeel.IS_3D_KEY, settings.getMenuBar3DHint());
    bar.add(buildFileMenu());
    bar.add(buildRadioMenu());
    bar.add(buildCheckMenu());
    bar.add(buildHtmlMenu());
    bar.add(buildAlignmentTestMenu());
    bar.add(buildHelpMenu(parent));
    return bar;
}

From source file:etomica.virial.cluster2.mvc.view.ToolBarView.java

License:Mozilla Public License

public static JToolBar mainToolbar(ApplicationView parent) {

    JGoodiesSettings settings = ApplicationUI.uiSettings;
    JToolBar toolBar = new JToolBar();
    toolBar.setFloatable(false);//from w w  w  . ja v  a  2  s.  c o m
    toolBar.putClientProperty("JToolBar.isRollover", Boolean.TRUE);
    toolBar.putClientProperty(Options.HEADER_STYLE_KEY, settings.getToolBarHeaderStyle());
    toolBar.putClientProperty(PlasticLookAndFeel.BORDER_STYLE_KEY, settings.getToolBarPlasticBorderStyle());
    toolBar.putClientProperty(WindowsLookAndFeel.BORDER_STYLE_KEY, settings.getToolBarWindowsBorderStyle());
    toolBar.putClientProperty(PlasticLookAndFeel.IS_3D_KEY, settings.getToolBar3DHint());
    AbstractButton button;
    toolBar.add(createToolBarButton("backward.gif", "Back"));
    button = createToolBarButton("forward.gif", "Next");
    button.setEnabled(false);
    toolBar.add(button);
    toolBar.add(createToolBarButton("home.gif", "Home"));
    toolBar.addSeparator();
    ActionListener openAction = parent.new OpenFileActionListener();
    button = createToolBarButton("open.gif", "Open", openAction,
            KeyStroke.getKeyStroke(KeyEvent.VK_O, KeyEvent.CTRL_DOWN_MASK));
    button.addActionListener(openAction);
    toolBar.add(button);
    toolBar.add(createToolBarButton("print.gif", "Print"));
    toolBar.add(createToolBarButton("refresh.gif", "Update"));
    toolBar.addSeparator();
    ButtonGroup group = new ButtonGroup();
    button = createToolBarRadioButton("pie_mode.png", "Pie Chart");
    button.setSelectedIcon(ApplicationUI.readImageIcon("pie_mode_selected.gif"));
    group.add(button);
    button.setSelected(true);
    toolBar.add(button);
    button = createToolBarRadioButton("bar_mode.png", "Bar Chart");
    button.setSelectedIcon(ApplicationUI.readImageIcon("bar_mode_selected.gif"));
    group.add(button);
    toolBar.add(button);
    button = createToolBarRadioButton("table_mode.png", "Table");
    button.setSelectedIcon(ApplicationUI.readImageIcon("table_mode_selected.gif"));
    group.add(button);
    toolBar.add(button);
    toolBar.addSeparator();
    button = createToolBarButton("help.gif", "Open Help");
    button.addActionListener(parent.new HelpActionListener());
    toolBar.add(button);
    return toolBar;
}