com.sun.swingset3.utilities.GradientPanel Java Examples

The following examples show how to use com.sun.swingset3.utilities.GradientPanel. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: DemoSelectorPanel.java    From littleluck with Apache License 2.0 5 votes vote down vote up
protected JComponent createTitleArea(String demoSetTitle) {
    JPanel titleAreaPanel = new JPanel(new BorderLayout());
    titlePanel = new GradientPanel(
            UIManager.getColor(SwingSet3.TITLE_GRADIENT_COLOR1_KEY),
            UIManager.getColor(SwingSet3.TITLE_GRADIENT_COLOR2_KEY));
    titlePanel.setLayout(new BorderLayout());
    titlePanel.setBorder(panelBorder);
    demoListLabel = new JLabel(demoSetTitle);
    demoListLabel.setOpaque(false);
    demoListLabel.setHorizontalAlignment(JLabel.LEADING);
    titlePanel.add(demoListLabel, BorderLayout.CENTER);
    titleAreaPanel.add(titlePanel, BorderLayout.NORTH);        
    
    // Add panel with view combobox
    viewPanel = new JPanel();
    viewPanel.setLayout(new BoxLayout(viewPanel, BoxLayout.X_AXIS));
    viewPanel.setBorder(new CompoundBorder(chiselBorder,
            new EmptyBorder(12,8,12,8)));
    JLabel viewLabel = new JLabel("View:");
    viewPanel.add(viewLabel);
    viewPanel.add(Box.createHorizontalStrut(6));
    JComboBox viewComboBox = new JComboBox();
    viewComboBox.addItem("by category");
    viewPanel.add(viewComboBox);
    titleAreaPanel.add(viewPanel, BorderLayout.CENTER);
    
    return titleAreaPanel;
}
 
Example #2
Source File: DemoSelectorPanel.java    From beautyeye with Apache License 2.0 5 votes vote down vote up
protected JComponent createTitleArea(String demoSetTitle) {
    JPanel titleAreaPanel = new JPanel(new BorderLayout());
    titlePanel = new GradientPanel(
            UIManager.getColor(SwingSet3.TITLE_GRADIENT_COLOR1_KEY),
            UIManager.getColor(SwingSet3.TITLE_GRADIENT_COLOR2_KEY));
    titlePanel.setLayout(new BorderLayout());
    titlePanel.setBorder(panelBorder);
    demoListLabel = new JLabel(demoSetTitle);
    demoListLabel.setOpaque(false);
    demoListLabel.setHorizontalAlignment(JLabel.LEADING);
    titlePanel.add(demoListLabel, BorderLayout.CENTER);
    titleAreaPanel.add(titlePanel, BorderLayout.NORTH);        
    
    // Add panel with view combobox
    viewPanel = new JPanel();
    viewPanel.setLayout(new BoxLayout(viewPanel, BoxLayout.X_AXIS));
    viewPanel.setBorder(new CompoundBorder(chiselBorder,
            new EmptyBorder(12,8,12,8)));
    JLabel viewLabel = new JLabel("View:");
    viewPanel.add(viewLabel);
    viewPanel.add(Box.createHorizontalStrut(6));
    JComboBox viewComboBox = new JComboBox();
    viewComboBox.addItem("by category");
    viewPanel.add(viewComboBox);
    titleAreaPanel.add(viewPanel, BorderLayout.CENTER);
    
    return titleAreaPanel;
}
 
Example #3
Source File: DemoSelectorPanel.java    From Darcula with Apache License 2.0 5 votes vote down vote up
protected JComponent createTitleArea(String demoSetTitle) {
    JPanel titleAreaPanel = new JPanel(new BorderLayout());
    titlePanel = new GradientPanel(
            UIManager.getColor(SwingSet3.TITLE_GRADIENT_COLOR1_KEY),
            UIManager.getColor(SwingSet3.TITLE_GRADIENT_COLOR2_KEY));
    titlePanel.setLayout(new BorderLayout());
    titlePanel.setBorder(panelBorder);
    demoListLabel = new JLabel(demoSetTitle);
    demoListLabel.setOpaque(false);
    demoListLabel.setHorizontalAlignment(JLabel.LEADING);
    titlePanel.add(demoListLabel, BorderLayout.CENTER);
    titleAreaPanel.add(titlePanel, BorderLayout.NORTH);        
    
    // Add panel with view combobox
    viewPanel = new JPanel();
    viewPanel.setLayout(new BoxLayout(viewPanel, BoxLayout.X_AXIS));
    viewPanel.setBorder(new CompoundBorder(chiselBorder,
            new EmptyBorder(12,8,12,8)));
    JLabel viewLabel = new JLabel("View:");
    viewPanel.add(viewLabel);
    viewPanel.add(Box.createHorizontalStrut(6));
    JComboBox viewComboBox = new JComboBox();
    viewComboBox.addItem("by category");
    viewPanel.add(viewComboBox);
    titleAreaPanel.add(viewPanel, BorderLayout.CENTER);
    
    return titleAreaPanel;
}