Package javax.swing.border

Examples of javax.swing.border.CompoundBorder


  JTextField javaVersionField     = new JTextField();
 
  public EnvironmentPanel()
  {
    setLayout(new GridLayout(2, 2));
    setBorder(new CompoundBorder(new EmptyBorder(0, 0, 10, 0), new TitledBorder("Runtime environment")));
   
    JPanel javaVersionPanel = new JPanel(new BorderLayout());
    javaVersionPanel.add(new JLabel("Minimum java version: "), BorderLayout.WEST);
    javaVersionPanel.add(javaVersionField);
   
View Full Code Here


  JLink      licenseField      = new JLink("(Select license)");
 
  public ProductPanel()
  {
    setLayout(new GridLayout(3, 2));
    setBorder(new CompoundBorder(new EmptyBorder(0, 0, 10, 0), new TitledBorder("Product info")));
   
    JPanel namePanel         = new JPanel(new BorderLayout());
    JPanel unixNamePanel     = new JPanel(new BorderLayout());
    JPanel versionPanel      = new JPanel(new BorderLayout());
    JPanel manufacturerPanel = new JPanel(new BorderLayout());
View Full Code Here

    });
   
    buttonPanel.add(okButton);
   
    label      .setBorder(new EmptyBorder(10, 5, 5, 5));
    detailsPane.setBorder(new CompoundBorder(new EmptyBorder(0, 5, 0, 5), detailsPane.getBorder()));
   
    add(label, BorderLayout.NORTH);
    add(detailsPane);
    add(buttonPanel, BorderLayout.SOUTH);
  }
View Full Code Here

    ButtonPanel.setBorder(border5);

    // File Menu Buttons
    JPanel p2 = createHorizontalPanel(false);
    ButtonPanel.add(p2);
    p2.setBorder(new CompoundBorder(new TitledBorder(null, "File Menu", TitledBorder.LEFT, TitledBorder.TOP), border5));

    // Add Button
    JButton btn;
    btn = createSaveButton();
    p2.add(btn);
    group.add(btn);
    p2.add(Box.createRigidArea(VGAP5));

    btn = createLoadlButton();
    p2.add(btn);
    group.add(btn);
    p2.add(Box.createRigidArea(VGAP5));

    //btn = createSaveAsButton();
    //p2.add(btn);
    //group.add(btn);
    //p2.add(Box.createRigidArea(VGAP5));
   
    btn = createSaveWorldButton();
    p2.add(btn);
    group.add(btn);
    p2.add(Box.createRigidArea(VGAP5));
   
    btn = createLoadWorldButton();
    p2.add(btn);
    group.add(btn);
    p2.add(Box.createRigidArea(VGAP5));
    
    // Simulation Mode Buttons
    p2 = createHorizontalPanel(false);
    ButtonPanel.add(p2);
    p2.setBorder(new CompoundBorder(new TitledBorder(null, "Mode",
        TitledBorder.LEFT, TitledBorder.TOP), border5));

    // Add Button
    btn = createEditModeButton();
    p2.add(btn);
    group.add(btn);
    p2.add(Box.createRigidArea(VGAP5));

    btn = createSimModeButton();
    p2.add(btn);
    group.add(btn);
    p2.add(Box.createRigidArea(VGAP5));

    // Simulation Action Buttons
    p2 = createHorizontalPanel(false);
    ButtonPanel.add(p2);
    p2.setBorder(new CompoundBorder(new TitledBorder(null, "Simulation", TitledBorder.LEFT, TitledBorder.TOP), border5));

    // Add Button
    btn = createRunButton();
    p2.add(btn);
    group.add(btn);
    p2.add(Box.createRigidArea(VGAP5));

    btn = createStopButton();
    p2.add(btn);
    group.add(btn);
    p2.add(Box.createRigidArea(VGAP5));

    btn = createResetButton();
    p2.add(btn);
    group.add(btn);
    p2.add(Box.createRigidArea(VGAP5));
   
    btn = createSpeedChangeButton();
    p2.add(btn);
    group.add(btn);
    p2.add(Box.createRigidArea(VGAP5));
   
    btn = createAreaChangeButton();
    p2.add(btn);
    group.add(btn);
    p2.add(Box.createRigidArea(VGAP5));
    
    //btn = createGetSOIInfoButton();
    //p2.add(btn);
    //group.add(btn);
    //p2.add(Box.createRigidArea(VGAP5));
   
    // Screen Action Buttons
    p2 = createHorizontalPanel(false);
    ButtonPanel.add(p2);
    p2.setBorder(new CompoundBorder(new TitledBorder(null, "Screen", TitledBorder.LEFT, TitledBorder.TOP), border5));

    // Add Button
    btn = createShowInfoButton();
    p2.add(btn);
    group.add(btn);
View Full Code Here

       
       if( wMode == windowMode.TEST || wMode == windowMode.DMP ){
         // Buttons
         JPanel p2 = createHorizontalPanel(false);
         ButtonPanel.add(p2);
         p2.setBorder(new CompoundBorder( new TitledBorder(null, "File",
                           TitledBorder.LEFT, TitledBorder.TOP), border5));
        
         // Add Button
          JButton btn; 
         btn = createLoadButton();
         p2.add(btn);
         group.add(btn)
         p2.add(Box.createRigidArea(VGAP5));
        
         btn = createSaveButton();
         p2.add(btn);
         group.add(btn)
         p2.add(Box.createRigidArea(VGAP5));
       }
      
       // Buttons
       JPanel p3 = createHorizontalPanel(false);
       ButtonPanel.add(p3);
       p3.setBorder(new CompoundBorder( new TitledBorder(null, "Compile",
                         TitledBorder.LEFT, TitledBorder.TOP), border5));
      
       // Add Button
       JButton btn2;
       btn2 = createRunButton();
View Full Code Here

     */
    public void testCreateCompoundBorderBorderBorder() {
        LineBorder border1 = new LineBorder(Color.red, 33, false);
        LineBorder border2 = new LineBorder(Color.red, 33, true);
        EmptyBorder border3 = new EmptyBorder(1, 1, 1, 1);
        CompoundBorder border4 = BorderFactory.createCompoundBorder(border1, border2);
        CompoundBorder border5 = BorderFactory.createCompoundBorder(border2, border3);
        CompoundBorder border7 = BorderFactory.createCompoundBorder(border2, null);
        CompoundBorder border8 = BorderFactory.createCompoundBorder(null, border3);
        assertEquals("border fields coinsides", border1, border4.getOutsideBorder());
        assertEquals("border fields coinsides", border2, border4.getInsideBorder());
        assertEquals("border fields coinsides", border2, border5.getOutsideBorder());
        assertEquals("border fields coinsides", border3, border5.getInsideBorder());
        assertEquals("border fields coinsides", border2, border7.getOutsideBorder());
        assertNull("border fields coinsides", border7.getInsideBorder());
        assertNull("border fields coinsides", border8.getOutsideBorder());
        assertEquals("border fields coinsides", border3, border8.getInsideBorder());
    }
View Full Code Here

    /*
     * Class under test for CompoundBorder createCompoundBorder()
     */
    public void testCreateCompoundBorder() {
        CompoundBorder border = BorderFactory.createCompoundBorder();
        assertNull(border.getInsideBorder());
        assertNull(border.getOutsideBorder());
    }
View Full Code Here

  class ColorComboRenderer1 extends JPanel implements ListCellRenderer {
    protected Color m_c = Color.black;

    public ColorComboRenderer1() {
      super();
      setBorder(new CompoundBorder(new MatteBorder(2, 10, 2, 10,
          Color.white), new LineBorder(Color.black)));
    }
View Full Code Here

        Border blackLineBorder =
                new BorderUIResource(new LineBorder(getBlack()));
        Border whiteLineBorder =
                new BorderUIResource(new LineBorder(getWhite()));

        Object textBorder = new BorderUIResource(new CompoundBorder(
                blackLineBorder,
                new BasicBorders.MarginBorder()));

        table.put("ToolTip.border", blackLineBorder);
        table.put("TitledBorder.border", blackLineBorder);
View Full Code Here

            bottom = 0;
        }

        Border margin = new EmptyBorder(top, left, bottom, right);
        JComponent separator = new JPanel();
        separator.setBorder(new CompoundBorder(margin, _border));

        /*
         * Finally, we can add the text (the label) and the separator (the panel) to this container
         * (this TitledSeparator).
         */
        setLayout(new JideBoxLayout(this, JideBoxLayout.X_AXIS));
        setOpaque(false);

        if (_textAlignment == SwingConstants.LEFT) {

            add(_labelComponent);
            add(separator, JideBoxLayout.VARY);
        }
        else if (_textAlignment == SwingConstants.RIGHT) {

            add(separator, JideBoxLayout.VARY);
            add(_labelComponent);
        }
        else {

            JComponent separator2 = new JPanel();
            separator2.setBorder(new CompoundBorder(margin, _border));

            add(separator, JideBoxLayout.FLEXIBLE);
            add(_labelComponent, JideBoxLayout.FIX);
            add(separator2, JideBoxLayout.FLEXIBLE);
        }
View Full Code Here

TOP

Related Classes of javax.swing.border.CompoundBorder

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.