Package javax.swing.border

Examples of javax.swing.border.MatteBorder


*
* @author Sergey A. Malenkov
*/
final class javax_swing_border_MatteBorder_PersistenceDelegate extends PersistenceDelegate {
    protected Expression instantiate(Object oldInstance, Encoder out) {
        MatteBorder border = (MatteBorder) oldInstance;
        Insets insets = border.getBorderInsets();
        Object object = border.getTileIcon();
        if (object == null) {
            object = border.getMatteColor();
        }
        Object[] args = new Object[] {
                insets.top,
                insets.left,
                insets.bottom,
                insets.right,
                object,
        };
        return new Expression(border, border.getClass(), "new", args);
    }
View Full Code Here


            m_h = j;
            m_source = image;
            m_img = m_source.getScaledInstance(m_w, m_h, 4);
            m_img.flush();
            setBackground(Color.white);
            setBorder(new MatteBorder(1, 1, 2, 2, Color.black));
        }
View Full Code Here

          myScalePercents = scalePercents;
            myPageIndex = pageIndex;
            myPageFormat = pageFormat;
            myChart = chart;
            setBackground(Color.white);
            setBorder(new MatteBorder(1, 1, 2, 2, Color.black));
        }
View Full Code Here

      }
    });

    final DCPanel buttonPanel = new DCPanel(WidgetUtils.BG_COLOR_DARK, WidgetUtils.BG_COLOR_DARK);
    buttonPanel.setLayout(new FlowLayout(FlowLayout.LEFT, 4, 10));
    buttonPanel.setBorder(new MatteBorder(1, 0, 0, 0, WidgetUtils.BG_COLOR_MEDIUM));
    buttonPanel.add(_previousPageButton);
    buttonPanel.add(_nextPageButton);

    return buttonPanel;
  }
View Full Code Here

      b.setIcon(icon);
    }
    b.setUI(new MetalButtonUI());
    b.setBackground(WidgetUtils.BG_COLOR_DARKEST);
    b.setForeground(WidgetUtils.BG_COLOR_BRIGHTEST);
    final MatteBorder outerBorder = new MatteBorder(1, 1, 1, 1, WidgetUtils.BG_COLOR_LESS_DARK);
    b.setBorder(new CompoundBorder(outerBorder, new EmptyBorder(2, 4, 2, 4)));
    b.setFocusPainted(false);
    return b;
  }
View Full Code Here

  }

  public static JXTaskPane createTaskPane(String title, Icon icon) {
    JXTaskPane taskPane = new JXTaskPane();
    Container cp = taskPane.getContentPane();
    ((JComponent) cp).setBorder(new MatteBorder(0, 1, 1, 1, WidgetUtils.BG_COLOR_DARKEST));
    taskPane.setFocusable(false);
    taskPane.setTitle(title);
    if (icon != null) {
      taskPane.setIcon(icon);
    }
View Full Code Here

      }
    });

    final DCPanel buttonPanel = new DCPanel(WidgetUtils.BG_COLOR_DARK, WidgetUtils.BG_COLOR_DARK);
    buttonPanel.setLayout(new FlowLayout(FlowLayout.LEFT, 4, 10));
    buttonPanel.setBorder(new MatteBorder(1, 0, 0, 0, WidgetUtils.BG_COLOR_MEDIUM));

    buttonPanel.add(new JLabel(imageManager.getImageIcon("images/model/column.png")));
    buttonPanel.add(displayColumnsCheckBox);
    buttonPanel.add(Box.createHorizontalStrut(20));
    buttonPanel.add(new JLabel(imageManager.getImageIcon("images/component-types/filter-outcome.png")));
View Full Code Here

    return l_btnReturn;
  }

  private JLabel getLabel(String a_strText) {
    JLabel l_lblReturn = new JLabel(a_strText, SwingConstants.CENTER);
    l_lblReturn.setBorder(new MatteBorder(0, 0, 1, 0, Color.BLACK));
    return l_lblReturn;
  }
View Full Code Here

        JComponent testButton = newJComponent();
        assertTrue(MetalBorders.getDesktopIconBorder() instanceof BorderUIResource.CompoundBorderUIResource);
        BorderUIResource.CompoundBorderUIResource border = (BorderUIResource.CompoundBorderUIResource) MetalBorders
                .getDesktopIconBorder();
        assertTrue(border.getInsideBorder() instanceof MatteBorder);
        MatteBorder insideBorder = (MatteBorder) border.getInsideBorder();
        assertTrue(border.getOutsideBorder() instanceof LineBorder);
        LineBorder outsideBorder = (LineBorder) border.getOutsideBorder();
        assertEquals(new Insets(2, 2, 1, 2), insideBorder.getBorderInsets(testButton));
        assertEquals(new Insets(1, 1, 1, 1), outsideBorder.getBorderInsets(testButton));
        assertTrue(insideBorder.isBorderOpaque());
        assertEquals(new ColorUIResource(238, 238, 238), insideBorder.getMatteColor());
        assertFalse(outsideBorder.getRoundedCorners());
        assertTrue(outsideBorder.isBorderOpaque());
        assertEquals(new ColorUIResource(122, 138, 153), outsideBorder.getLineColor());
        assertEquals(1, outsideBorder.getThickness());
    }
View Full Code Here

      dancingFlamesGraph1Pnl = new JPanel();
      dancingFlamesGraph1Pnl.setMinimumSize(new Dimension(180, 24));
      dancingFlamesGraph1Pnl.setPreferredSize(new Dimension(180, 24));
      panel_54.add(dancingFlamesGraph1Pnl);
      dancingFlamesGraph1Pnl.setBorder(new MatteBorder(1, 1, 1, 1, (Color) new Color(0, 0, 0)));
      dancingFlamesGraph1Pnl.setLayout(new BorderLayout(0, 0));
      panel_54.add(getPanel_37());
      panel_54.add(getPanel_41());
      panel_54.add(getDancingFlamesDrawTrianglesCBx());
      panel_54.add(getDancingFlamesDrawFFTCBx());
View Full Code Here

TOP

Related Classes of javax.swing.border.MatteBorder

Copyright © 2018 www.massapicom. 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.