Example usage for javax.swing BorderFactory createEmptyBorder

List of usage examples for javax.swing BorderFactory createEmptyBorder

Introduction

In this page you can find the example usage for javax.swing BorderFactory createEmptyBorder.

Prototype

public static Border createEmptyBorder() 

Source Link

Document

Creates an empty border that takes up no space.

Usage

From source file:userinterface.BioRecyclingRole.BioRecyclingJPanel.java

/**
 * Creates new form BioRecyclingJPanel//  ww w . j  a va  2 s.  c o  m
 */
public BioRecyclingJPanel(JPanel userProcessContainer, UserAccount userAccount,
        BioRecyclingOrganization organization, Enterprise enterprise) {
    initComponents();
    this.userProcessContainer = userProcessContainer;
    this.organization = organization;
    this.enterprise = enterprise;
    this.userAccount = userAccount;
    populateRequestTable();
    populateBioFactoryOutlet();
    jChart1.setBorder(BorderFactory.createEmptyBorder());
    jChart1.setContentAreaFilled(false);
}

From source file:userinterface.PlasticRecyclingServiceRole.PlasticRecyclingJPanel.java

/**
 * Creates new form PlasticRecyclingJPanel
 *///from w  w w .j a v  a2s. co  m
public PlasticRecyclingJPanel(JPanel userProcessContainer, UserAccount userAccount,
        PlasticRecyclingOrganization organization, Enterprise enterprise) {
    initComponents();
    this.userProcessContainer = userProcessContainer;
    this.organization = organization;
    this.enterprise = enterprise;
    this.userAccount = userAccount;
    populatePlasticFactoryOutlet();
    populateRequestTable();
    jChart1.setBorder(BorderFactory.createEmptyBorder());
    jChart1.setContentAreaFilled(false);
}

From source file:userinterface.MetalRecyclingServiceRole.MetalRecyclingServiceJPanel.java

/**
 * Creates new form MetalRecyclingServiceJPanel
 *//*w  w  w  .  ja v  a2 s .c  o  m*/
public MetalRecyclingServiceJPanel(JPanel userProcessContainer, UserAccount userAccount,
        MetalRecyclingOrganization organization, Enterprise enterprise) {
    initComponents();
    this.userProcessContainer = userProcessContainer;
    this.organization = organization;
    this.enterprise = enterprise;
    this.userAccount = userAccount;
    populateRequestTable();

    populateMetalFactoryOutlet();
    jChart1.setBorder(BorderFactory.createEmptyBorder());
    jChart1.setContentAreaFilled(false);
}

From source file:BorderTest.java

public BorderFrame() {
    setTitle("BorderTest");
    setSize(DEFAULT_WIDTH, DEFAULT_HEIGHT);

    demoPanel = new JPanel();
    buttonPanel = new JPanel();
    group = new ButtonGroup();

    addRadioButton("Lowered bevel", BorderFactory.createLoweredBevelBorder());
    addRadioButton("Raised bevel", BorderFactory.createRaisedBevelBorder());
    addRadioButton("Etched", BorderFactory.createEtchedBorder());
    addRadioButton("Line", BorderFactory.createLineBorder(Color.BLUE));
    addRadioButton("Matte", BorderFactory.createMatteBorder(10, 10, 10, 10, Color.BLUE));
    addRadioButton("Empty", BorderFactory.createEmptyBorder());

    Border etched = BorderFactory.createEtchedBorder();
    Border titled = BorderFactory.createTitledBorder(etched, "Border types");
    buttonPanel.setBorder(titled);/* w  ww  .ja v a  2 s  .  co m*/

    setLayout(new GridLayout(2, 1));
    add(buttonPanel);
    add(demoPanel);
}

From source file:org.fhaes.fhrecorder.util.ColorBar.java

/**
 * Constructs a new color bar./*from w ww.  j  a va 2  s.co  m*/
 * 
 * @param year the data to plot.
 */
public ColorBar(YearSummary year) {

    super(createChart(createDataset(year, FileController.getCustomOptions())));
    setPreferredSize(new java.awt.Dimension(100, 20));
    setBorder(BorderFactory.createEmptyBorder());
    setDomainZoomable(false); // Disable zooming
    setRangeZoomable(false);
    setPopupMenu(null); // Disable right-click menu
}

From source file:com.willwinder.universalgcodesender.uielements.macros.MacroActionPanel.java

public MacroActionPanel(BackendAPI backend) {
    if (backend == null) {
        throw new RuntimeException("BackendAPI must be provided.");
    }/*from w  w w.jav a 2  s .c o  m*/
    setMinimumSize(new Dimension(50, 0));
    this.backend = backend;
    backend.addUGSEventListener(this);

    // Insert a scrollpane in case the buttons wont fit.
    JScrollPane scrollPane = new JScrollPane(macroPanel, ScrollPaneConstants.VERTICAL_SCROLLBAR_AS_NEEDED,
            ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER);
    scrollPane.setBorder(BorderFactory.createEmptyBorder());
    setLayout(new BorderLayout());
    add(scrollPane, BorderLayout.CENTER);
}

From source file:de.erdesignerng.visual.editor.convertmodel.ConvertPropertyAdapter.java

@Override
public void model2view(Object aModel, String aPropertyName) {

    ConversionInfos theInfos = (ConversionInfos) aModel;

    String theCurrentTypeName = helper.getText(ERDesignerBundle.CURRENTDATATYPE);
    String theTargetTypeName = helper.getText(ERDesignerBundle.TARGETDATATYPE);

    DataType[] theTargetTypes = new DataType[theInfos.getTypeMapping().keySet().size()];

    List<DataType> theCurrentTypes = new ArrayList<>();
    theCurrentTypes.addAll(theInfos.getTypeMapping().keySet());

    Collections.sort(theCurrentTypes, new BeanComparator("name"));
    for (int i = 0; i < theCurrentTypes.size(); i++) {
        theTargetTypes[i] = theInfos.getTypeMapping().get(theCurrentTypes.get(i));
    }// w  w  w. java  2 s .com

    DefaultTable theTable = (DefaultTable) getComponent()[0];
    ConversionTableModel theModel = new ConversionTableModel(theCurrentTypeName, theTargetTypeName,
            theCurrentTypes, theTargetTypes);
    theTable.setModel(theModel);

    DefaultComboBox theTargetTypesEditor = new DefaultComboBox();
    theTargetTypesEditor.setBorder(BorderFactory.createEmptyBorder());
    theTargetTypesEditor.setModel(new DefaultComboBoxModel(theInfos.getTargetDialect().getDataTypes()
            .toArray(new DataType[theInfos.getTargetDialect().getDataTypes().size()])));
    theTable.getColumnModel().getColumn(1).setCellEditor(new DefaultCellEditor(theTargetTypesEditor));
    theTable.setRowHeight((int) theTargetTypesEditor.getPreferredSize().getHeight());
}

From source file:volker.streaming.music.gui.ApiPanel.java

private void initComponents() {

    URL onUrl = getClass().getResource("on.png");
    onIcon = getIcon(onUrl);/*from w  w  w.  ja v a 2s  .  co m*/
    URL offUrl = getClass().getResource("off.png");
    offIcon = getIcon(offUrl);

    statusButton = new JButton();
    statusLabel = new JLabel("Start/Stop:");
    stateLabel = new JLabel(status.get() ? RUNNING : STOPPED);
    iconBorder = BorderFactory.createEmptyBorder();
    textBorder = statusButton.getBorder();
    statusButton.addActionListener(new ActionListener() {
        @Override
        public void actionPerformed(ActionEvent e) {
            synchronized (status) {
                // status is only set here
                status.set(!status.get());
            }
            showUpdatedStatus();
        }
    });
    showUpdatedStatus();

    GroupLayout layout = new GroupLayout(this);
    this.setLayout(layout);
    layout.setHorizontalGroup(layout.createSequentialGroup().addContainerGap()
            .addGroup(layout.createParallelGroup(GroupLayout.Alignment.CENTER)
                    .addComponent(statusLabel, GroupLayout.Alignment.CENTER)
                    .addComponent(statusButton, GroupLayout.Alignment.CENTER)
                    .addComponent(stateLabel, GroupLayout.Alignment.CENTER))
            .addContainerGap());

    layout.setVerticalGroup(layout.createSequentialGroup().addContainerGap().addComponent(statusLabel)
            .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED).addComponent(statusButton)
            .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED).addComponent(stateLabel)
            .addContainerGap());
}

From source file:com.atlassian.theplugin.idea.config.serverconfig.defaultCredentials.TestDefaultCredentialsDialog.java

public TestDefaultCredentialsDialog(Project project, final ProjectConfiguration projectConfiguration,
        final UserCfg defaultCredentials) {
    super(project, false);
    this.project = project;
    addServerTypeServers(new ArrayList<ServerCfg>(projectConfiguration.getAllBambooServers()),
            ServerType.BAMBOO_SERVER, defaultCredentials);

    addServerTypeServers(new ArrayList<ServerCfg>(projectConfiguration.getAllJIRAServers()),
            ServerType.JIRA_SERVER, defaultCredentials);

    setTitle("Testing default credentials");
    setModal(true);/*  ww w.  ja v  a 2 s .co  m*/

    scroll.getViewport().setOpaque(false);
    scroll.setOpaque(false);
    scroll.setHorizontalScrollBarPolicy(ScrollPaneConstants.HORIZONTAL_SCROLLBAR_AS_NEEDED);
    scroll.setVerticalScrollBarPolicy(ScrollPaneConstants.VERTICAL_SCROLLBAR_AS_NEEDED);
    scroll.setBorder(BorderFactory.createEmptyBorder());

    buildServerContent();
    init();
}

From source file:com.eviware.soapui.support.components.JPropertiesTable.java

public JPropertiesTable(String title, T propertyObject) {
    super(new BorderLayout());
    this.title = title;

    tableModel = new PropertiesTableModel<T>(propertyObject);
    table = new PTable(tableModel);

    table.getColumnModel().getColumn(0).setHeaderValue("Property");
    table.getColumnModel().getColumn(1).setHeaderValue("Value");
    table.getColumnModel().getColumn(0).setCellRenderer(new PropertiesTableCellRenderer());
    table.getColumnModel().getColumn(1).setCellRenderer(new PropertiesTableCellRenderer());

    add(new JScrollPane(table), BorderLayout.CENTER);
    titledBorder = BorderFactory.createTitledBorder(BorderFactory.createEmptyBorder(), title);
    /*//w w w.j a  v  a  2s  .  com
     * Java 7 issue
     * 
     * old: titledBorder.setTitleFont( titledBorder.getTitleFont().deriveFont(
     * Font.PLAIN, 11 ) ); titledBorder.getTitleFont() return null in Java 7
     */
    Font defaultUIFont = getUIDefaultFont();
    if (defaultUIFont != null)
        titledBorder.setTitleFont(getUIDefaultFont().deriveFont(Font.PLAIN, 11));

    if (title != null)
        setBorder(titledBorder);

    table.setBackground(Color.WHITE);
    setPreferredSize(table.getPreferredSize());
}