Java Code Examples for javax.swing.border.BevelBorder#LOWERED

The following examples show how to use javax.swing.border.BevelBorder#LOWERED . 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: BevelBorderBeanInfo.java    From netbeans with Apache License 2.0 6 votes vote down vote up
public BevelTypePropertyEditor() {
    super(
        new int[] {
            BevelBorder.RAISED,
            BevelBorder.LOWERED,
        },
        new String[] {
            "javax.swing.border.BevelBorder.RAISED", // NOI18N
            "javax.swing.border.BevelBorder.LOWERED", // NOI18N
        },
        new String[] {
            "VALUE_BevelRaised",  // NOI18N
            "VALUE_BevelLowered", // NOI18N
        }
    );
}
 
Example 2
Source File: PropertiesDialog.java    From collect-earth with MIT License 6 votes vote down vote up
private JComponent getOperationModePanel() {
	final GridBagConstraints constraints = new GridBagConstraints();
	constraints.gridx = 0;
	constraints.gridy = 0;
	constraints.anchor = GridBagConstraints.LINE_START;
	constraints.insets = new Insets(5, 5, 5, 5);
	constraints.weightx = 1.0;
	constraints.fill = GridBagConstraints.HORIZONTAL;

	final JPanel typeOfUsePanel = new JPanel(new GridBagLayout());
	final Border border = new TitledBorder(new BevelBorder(BevelBorder.LOWERED),
			Messages.getString("OptionWizard.2")); //$NON-NLS-1$
	typeOfUsePanel.setBorder(border);

	JPanel serverPanel = getServerPanel();
	typeOfUsePanel.add(serverPanel, constraints);

	return typeOfUsePanel;
}
 
Example 3
Source File: NbTheme.java    From netbeans with Apache License 2.0 5 votes vote down vote up
private final void handleBevelBorder (org.xml.sax.AttributeList atts) {
    String key = atts.getValue (KEY_ATTR);
    int i = BevelBorder.LOWERED;
    String type = atts.getValue (TYPE_ATTR);
    if (type != null) 
        i = type.equals (TYPE_LOWERED) ? BevelBorder.LOWERED : BevelBorder.RAISED;
    BorderUIResource.BevelBorderUIResource resource = new BorderUIResource.BevelBorderUIResource (i);
    defaults.put (key, resource);
}
 
Example 4
Source File: ProgressWindow.java    From LoboBrowser with MIT License 5 votes vote down vote up
/**
 * @throws HeadlessException
 */
public ProgressWindow() throws HeadlessException {
  super(UserAgentImpl.getInstance().getName());
  this.setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE);
  final UserAgentContext uaContext = null; // TODO
  final ImageIcon windowIcon = DefaultWindowFactory.getInstance().getDefaultImageIcon(uaContext);
  if (windowIcon != null) {
    this.setIconImage(windowIcon.getImage());
  }
  final Container contentPane = this.getContentPane();
  contentPane.setLayout(new BoxLayout(contentPane, BoxLayout.Y_AXIS));
  final JPanel topPanel = new JPanel();
  contentPane.add(topPanel);
  contentPane.add(Box.createRigidArea(new Dimension(1, 18)));
  final Border bevelBorder = new BevelBorder(BevelBorder.LOWERED);
  final Border emptyBorder = new EmptyBorder(10, 10, 10, 10);
  final Border border = new CompoundBorder(bevelBorder, emptyBorder);
  topPanel.setBorder(border);
  topPanel.setLayout(new BorderLayout());

  this.statusProgressBar = new OpenProgressBar();
  this.statusProgressBar.setStringPainted(true);
  this.statusLabel = new JLabel();

  topPanel.add(statusLabel, BorderLayout.NORTH);
  topPanel.add(statusProgressBar, BorderLayout.CENTER);
}
 
Example 5
Source File: PropertiesDialog.java    From collect-earth with MIT License 4 votes vote down vote up
private JComponent getBrowsersOptionsPanel() {
	final JPanel panel = new JPanel(new GridBagLayout());
	final GridBagConstraints constraints = new GridBagConstraints();
	constraints.gridx = 0;
	constraints.gridy = 0;
	constraints.anchor = GridBagConstraints.LINE_START;
	constraints.insets = new Insets(5, 5, 5, 5);
	constraints.weightx = 1.0;
	constraints.fill = GridBagConstraints.HORIZONTAL;

	final JPanel browserChooserPanel = new JPanel();
	final Border browserBorder = new TitledBorder(new BevelBorder(BevelBorder.LOWERED),
			Messages.getString("OptionWizard.1")); //$NON-NLS-1$
	browserChooserPanel.setBorder(browserBorder);

	final ButtonGroup browserChooser = new ButtonGroup();
	final JComponent[] browsers = propertyToComponent.get(EarthProperty.BROWSER_TO_USE);

	for (final JComponent browserRadioButton : browsers) {
		browserChooserPanel.add(browserRadioButton);
		browserChooser.add((AbstractButton) browserRadioButton);

		((JRadioButton) browserRadioButton).addActionListener(e -> setRestartRequired(true));
	}
	constraints.gridy++;
	panel.add(browserChooserPanel, constraints);

	constraints.gridy++;
	constraints.gridx = 0;
	panel.add(propertyToComponent.get(EarthProperty.FIREFOX_BINARY_PATH)[0], constraints);

	constraints.gridy++;
	constraints.gridx = 0;
	panel.add(propertyToComponent.get(EarthProperty.CHROME_BINARY_PATH)[0], constraints);

	constraints.gridy++;
	constraints.gridx = 0;
	panel.add(propertyToComponent.get(EarthProperty.SAIKU_SERVER_FOLDER)[0], constraints);

	return panel;
}