Package javax.swing.border

Examples of javax.swing.border.MatteBorder


    }

    class RepresentMatteBorder implements Represent {

        public Node representData(Object data) {
            MatteBorder mb = (MatteBorder) data;
            return representSequence(getTag(data.getClass(), new Tag(data.getClass())),
                    Arrays.asList(new Object[] { mb.getBorderInsets(), mb.getMatteColor() }), true);
        }
View Full Code Here


        DumperOptions options = new DumperOptions();
        options.setWidth(400);
        Yaml yaml = new Yaml(new ImmutablesRepresenter(), options);
        Insets insets = new Insets(10, 20, 30, 40);
        Color color = new Color(100, 150, 200);
        MatteBorder border = BorderFactory.createMatteBorder(insets.top, insets.left,
                insets.bottom, insets.right, color);
        String dump = yaml.dump(border);
        assertEquals(
                "!!javax.swing.border.MatteBorder [!!java.awt.Insets [10, 20, 30, 40], !!java.awt.Color [100, 150, 200, 255]]\n",
                dump);
        Object loaded = yaml.load(dump);
        assertTrue(loaded instanceof MatteBorder);
        MatteBorder loadedBorder = (MatteBorder) loaded;
        assertEquals(insets, loadedBorder.getBorderInsets());
        assertEquals(color, loadedBorder.getMatteColor());
    }
View Full Code Here

    public static TitledBorder createTitledBorder(final String title) {
        return new TitledBorder(title);
    }

    public static MatteBorder createMatteBorder(final int top, final int left, final int bottom, final int right, final Icon tileIcon) {
        return new MatteBorder(top, left, bottom, right, tileIcon);
    }
View Full Code Here

    public static MatteBorder createMatteBorder(final int top, final int left, final int bottom, final int right, final Icon tileIcon) {
        return new MatteBorder(top, left, bottom, right, tileIcon);
    }

    public static MatteBorder createMatteBorder(final int top, final int left, final int bottom, final int right, final Color color) {
        return new MatteBorder(top, left, bottom, right, color);
    }
View Full Code Here

        return createCompoundBorder(new Flush3DBorder());
    }

    public static Border getDesktopIconBorder() {
        LineBorder lineBorder = new LineBorder(new ColorUIResource(122, 138, 153), 1);
        MatteBorder matteBorder = new MatteBorder(new Insets(2, 2, 1, 2), new ColorUIResource(238, 238, 238));

        return new BorderUIResource.CompoundBorderUIResource(lineBorder, matteBorder);
    }
View Full Code Here

                EtchedBorder.RAISED, defaults.getColor("controlShadow"),
                defaults.getColor("controlLtHighlight")
            )
        );

        final MatteBorder matteborder = new MatteBorder(1, 1, 1, 1, Color.black);
        final EmptyBorder emptyborder = new MatteBorder(2, 2, 2, 2, defaults.getColor("control"));
        final BorderUIResource.CompoundBorderUIResource compBorder
            = new BorderUIResource.CompoundBorderUIResource(emptyborder, matteborder);
        final BorderUIResource.EmptyBorderUIResource emptyBorderUI
            = new BorderUIResource.EmptyBorderUIResource(0, 0, 0, 0);
        defaults.put("SplitPane.border", emptyBorderUI);
View Full Code Here

        frame.setLocation(150, window.getHeight() - 140);
        frame.setSize(new Dimension(window.getWidth() - 160, 130));
        frame.setName("Incoming Message");
        frame.setBackground(Color.WHITE);
        frame.getRootPane().setBorder(
            new MatteBorder(4, 4, 4, 4, color));

        frame.setLayout(new BorderLayout());
        if (font != null)
          frame.setFont(font);
View Full Code Here

        Component c = super.prepareRenderer(renderer, row, column);

        if (isCellEditable(row, column)
            && column != getColumnCount() - 1) {
          if (c instanceof JTextField) {
            ((JTextField) c).setBorder(new MatteBorder(1, 1, 1, 1,
                Color.BLACK));
          } else if (c instanceof JComboBox) {
            ((JComboBox) c).setBorder(new MatteBorder(1, 1, 1, 1,
                Color.BLACK));
          } else if (c instanceof JLabel) {
            ((JLabel) c).setBorder(new MatteBorder(1, 1, 1, 1,
                Color.BLACK));
          }
        }
        return c;
      }
View Full Code Here

    this.tabs = new JTabbedPane();
    this.tabs.setTabPlacement(SwingUtilities.LEFT);

    this.tabs.setUI(new MyTabPaneUI());

    this.tabs.setBorder(new MatteBorder(4, 0, 0, 0, color));
    this.tabs.setBackground(color);
    this.tabs.setTabPlacement(SwingConstants.LEFT);

    this.setLayout(new BorderLayout());
View Full Code Here

    private int pushedColumn;
    private Hashtable state;
    private JButton downButton, upButton;

    public SortButtonRenderer() {
        MatteBorder matteBorder = BorderFactory.createMatteBorder(0, 0, 1, 1, Color.gray);
        setBorder(matteBorder);

        pushedColumn = -1;
        state = new Hashtable();
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.