Examples of Border


Examples of javax.swing.border.Border

    }

    private int getCBRBPadding(JComponent c, int position) {
        if (c.getUIClassID() == "CheckBoxUI" ||
              c.getUIClassID() == "RadioButtonUI") {
            Border border = c.getBorder();
            if (border instanceof UIResource) {
                return getInset(c, position);
            }
        }
        return 0;
View Full Code Here

Examples of javax.swing.border.Border

    }

    public JComponent createGroupComponent(GPOptionGroup group) {
        JPanel optionsPanel = new JPanel(new SpringLayout());
        if (group.isTitled()) {
            Border lineBorder = BorderFactory.createMatteBorder(1,0,0,0,Color.BLACK);
            optionsPanel.setBorder(BorderFactory.createTitledBorder(lineBorder,myi18n
                    .getOptionGroupLabel(group)));
        }
        GPOption[] options = group.getOptions();
        for (int i = 0; i < options.length; i++) {
View Full Code Here

Examples of javax.swing.border.Border

        g.fill(rect);
    }

    public Component getListCellRendererComponent(JList list, Object value,
            int index, boolean isSelected, boolean hasFocus) {
        Border border = isSelected ? selectBorder : normalBorder;
        setBorder(hasFocus ? focusBorder : border);
        if (value instanceof Paint) {
            paint = (Paint) value;
        }
        return this;
View Full Code Here

Examples of javax.swing.border.Border

   * @param type <code>Class</code>  not used
   * @param attr <code>Attribute</code> value needs to provide Border type name and optional parameter
   * @return <code>Object</code> runtime type is subclass of <code>AbstractBorder</code>
   */
  public Object convert(final Class type, final Attribute attr, Localizer localizer) {
    Border border = null;
    StringTokenizer st = new StringTokenizer(attr.getValue(), "(,)"); // border type + parameters
    int n = st.countTokens() - 1; // number of parameter to create a border
    String borderType = st.nextToken().trim();
    Method method = null;
    ConverterLibrary cvtlib = ConverterLibrary.getInstance();
View Full Code Here

Examples of javax.swing.border.Border

    m_presets = colorPresets;
    setupWidgets();
  }
  private void setupWidgets() {
    removeAll();
    Border border = BorderFactory.createEtchedBorder();
    setLayout(new GridBagLayout());
    GridBagConstraints gbc = new GridBagConstraints();
    gbc.fill = GridBagConstraints.BOTH;
    gbc.insets = new Insets(5,5,5,5);
    // scale stuff:
View Full Code Here

Examples of javax.swing.border.Border

    panel.add(new JLabel(imageManager.getImageIcon("images/widgets/help.png")), BorderLayout.WEST);

    DCLabel descriptionLabel = DCLabel.brightMultiLine(_helpMessage);
    panel.add(descriptionLabel, BorderLayout.CENTER);

    Border border = new CompoundBorder(WidgetUtils.BORDER_THIN, WidgetUtils.BORDER_EMPTY);
    panel.setBorder(border);

    panel.setPreferredSize(300, 130);

    return new DCToolTip(this, panel);
View Full Code Here

Examples of javax.swing.border.Border

   * If the <code>component</code> component is the child of a <code>JViewPort</code>
   * instance this border will be installed on its scroll pane parent.
   */
  public static void installFocusBorder(JComponent component) {
    if (unfocusedViewBorder == null) {
      Border unfocusedViewInteriorBorder = new AbstractBorder() {
          private Color  topLeftColor;
          private Color  botomRightColor;
          private Insets insets = new Insets(1, 1, 1, 1);
         
          {
View Full Code Here

Examples of javax.swing.border.Border

 
  /**
   * Returns the border of a component where a user may drop objects.
   */
  public static Border getDropableComponentBorder() {
    Border border = null;
    if (OperatingSystem.isMacOSXLeopardOrSuperior()) {
      border = UIManager.getBorder("InsetBorder.aquaVariant");
    }
    if (border == null) {
      border = BorderFactory.createLoweredBevelBorder();
View Full Code Here

Examples of javax.swing.border.Border

  /**
   * Returns a new panel with a border and the given <code>title</code>
   */
  public static JPanel createTitledPanel(String title) {
    JPanel titledPanel = new JPanel(new GridBagLayout());
    Border panelBorder = BorderFactory.createTitledBorder(title);
    // For systems different from Mac OS X 10.5, add an empty border
    if (!OperatingSystem.isMacOSXLeopardOrSuperior()) {
      panelBorder = BorderFactory.createCompoundBorder(
          panelBorder, BorderFactory.createEmptyBorder(0, 2, 2, 2));
    }   
View Full Code Here

Examples of javax.swing.border.Border

      };
    String navigationPanelIconPath = preferences.getLocalizedString(HomeComponent3D.class, "navigationPanel.icon");
    final ImageIcon nagivationPanelIcon = navigationPanelIconPath.length() > 0
        ? new ImageIcon(HomeComponent3D.class.getResource(navigationPanelIconPath))
        : null;
    navigationPanel.setBorder(new Border() {
        public void paintBorder(Component c, Graphics g, int x, int y, int width, int height) {
          if (nagivationPanelIcon != null) {
            nagivationPanelIcon.paintIcon(c, g, x, y);
          } else {
            // Draw a surrounding oval if no navigation panel icon is defined
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.