Search in sources :

Example 1 with BlueishButtonUI

use of com.l2fprod.common.swing.plaf.blue.BlueishButtonUI in project CodenameOne by codenameone.

the class PropertySheetPanel method buildUI.

private void buildUI() {
    LookAndFeelTweaks.setBorderLayout(this);
    LookAndFeelTweaks.setBorder(this);
    actionPanel = new JPanel(new FlowLayout(FlowLayout.LEADING, 2, 0));
    actionPanel.setBorder(BorderFactory.createEmptyBorder(2, 0, 2, 0));
    actionPanel.setOpaque(false);
    add("North", actionPanel);
    sortButton = new JToggleButton(new ToggleSortingAction());
    sortButton.setUI(new BlueishButtonUI());
    sortButton.setText(null);
    sortButton.setOpaque(false);
    actionPanel.add(sortButton);
    asCategoryButton = new JToggleButton(new ToggleModeAction());
    asCategoryButton.setUI(new BlueishButtonUI());
    asCategoryButton.setText(null);
    asCategoryButton.setOpaque(false);
    actionPanel.add(asCategoryButton);
    descriptionButton = new JToggleButton(new ToggleDescriptionAction());
    descriptionButton.setUI(new BlueishButtonUI());
    descriptionButton.setText(null);
    descriptionButton.setOpaque(false);
    actionPanel.add(descriptionButton);
    split = new JSplitPane(JSplitPane.VERTICAL_SPLIT);
    split.setBorder(null);
    split.setResizeWeight(1.0);
    split.setContinuousLayout(true);
    add("Center", split);
    tableScroll = new JScrollPane();
    tableScroll.setBorder(BorderFactory.createEmptyBorder());
    split.setTopComponent(tableScroll);
    descriptionPanel = new JEditorPane("text/html", "<html>");
    descriptionPanel.setBorder(BorderFactory.createEmptyBorder());
    descriptionPanel.setEditable(false);
    descriptionPanel.setBackground(UIManager.getColor("Panel.background"));
    LookAndFeelTweaks.htmlize(descriptionPanel);
    selectionListener = new SelectionListener();
    descriptionScrollPane = new JScrollPane(descriptionPanel);
    descriptionScrollPane.setBorder(LookAndFeelTweaks.addMargin(BorderFactory.createLineBorder(UIManager.getColor("controlDkShadow"))));
    descriptionScrollPane.getViewport().setBackground(descriptionPanel.getBackground());
    descriptionScrollPane.setMinimumSize(new Dimension(50, 50));
    split.setBottomComponent(descriptionScrollPane);
    // by default description is not visible, toolbar is visible.
    setDescriptionVisible(false);
    setToolBarVisible(true);
}
Also used : JScrollPane(javax.swing.JScrollPane) JPanel(javax.swing.JPanel) FlowLayout(java.awt.FlowLayout) JToggleButton(javax.swing.JToggleButton) BlueishButtonUI(com.l2fprod.common.swing.plaf.blue.BlueishButtonUI) JEditorPane(javax.swing.JEditorPane) Dimension(java.awt.Dimension) JSplitPane(javax.swing.JSplitPane) ListSelectionListener(javax.swing.event.ListSelectionListener)

Aggregations

BlueishButtonUI (com.l2fprod.common.swing.plaf.blue.BlueishButtonUI)1 Dimension (java.awt.Dimension)1 FlowLayout (java.awt.FlowLayout)1 JEditorPane (javax.swing.JEditorPane)1 JPanel (javax.swing.JPanel)1 JScrollPane (javax.swing.JScrollPane)1 JSplitPane (javax.swing.JSplitPane)1 JToggleButton (javax.swing.JToggleButton)1 ListSelectionListener (javax.swing.event.ListSelectionListener)1