Java Code Examples for javax.swing.border.TitledBorder#ABOVE_TOP

The following examples show how to use javax.swing.border.TitledBorder#ABOVE_TOP . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: javax_swing_plaf_BorderUIResource_TitledBorderUIResource.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 5 votes vote down vote up
protected TitledBorderUIResource getObject() {
    return new TitledBorderUIResource(
            new EmptyBorder(1, 2, 3, 4),
            "TITLE",
            TitledBorder.CENTER,
            TitledBorder.ABOVE_TOP,
            new Font("Serif", Font.ITALIC, 12),
            Color.RED);
}
 
Example 2
Source File: javax_swing_border_TitledBorder.java    From openjdk-8-source with GNU General Public License v2.0 5 votes vote down vote up
protected TitledBorder getObject() {
    return new TitledBorder(
            new EmptyBorder(1, 2, 3, 4),
            "TITLE",
            TitledBorder.CENTER,
            TitledBorder.ABOVE_TOP,
            new Font("Arial", Font.ITALIC, 12),
            Color.RED);
}
 
Example 3
Source File: javax_swing_border_TitledBorder.java    From hottub with GNU General Public License v2.0 5 votes vote down vote up
protected TitledBorder getObject() {
    return new TitledBorder(
            new EmptyBorder(1, 2, 3, 4),
            "TITLE",
            TitledBorder.CENTER,
            TitledBorder.ABOVE_TOP,
            new Font("Arial", Font.ITALIC, 12),
            Color.RED);
}
 
Example 4
Source File: javax_swing_plaf_BorderUIResource_TitledBorderUIResource.java    From hottub with GNU General Public License v2.0 5 votes vote down vote up
protected TitledBorderUIResource getObject() {
    return new TitledBorderUIResource(
            new EmptyBorder(1, 2, 3, 4),
            "TITLE",
            TitledBorder.CENTER,
            TitledBorder.ABOVE_TOP,
            new Font("Serif", Font.ITALIC, 12),
            Color.RED);
}
 
Example 5
Source File: javax_swing_border_TitledBorder.java    From jdk8u-jdk with GNU General Public License v2.0 5 votes vote down vote up
protected TitledBorder getObject() {
    return new TitledBorder(
            new EmptyBorder(1, 2, 3, 4),
            "TITLE",
            TitledBorder.CENTER,
            TitledBorder.ABOVE_TOP,
            new Font("Arial", Font.ITALIC, 12),
            Color.RED);
}
 
Example 6
Source File: javax_swing_border_TitledBorder.java    From jdk8u-jdk with GNU General Public License v2.0 5 votes vote down vote up
protected TitledBorder getObject() {
    return new TitledBorder(
            new EmptyBorder(1, 2, 3, 4),
            "TITLE",
            TitledBorder.CENTER,
            TitledBorder.ABOVE_TOP,
            new Font("Arial", Font.ITALIC, 12),
            Color.RED);
}
 
Example 7
Source File: javax_swing_border_TitledBorder.java    From jdk8u_jdk with GNU General Public License v2.0 5 votes vote down vote up
protected TitledBorder getObject() {
    return new TitledBorder(
            new EmptyBorder(1, 2, 3, 4),
            "TITLE",
            TitledBorder.CENTER,
            TitledBorder.ABOVE_TOP,
            new Font("Arial", Font.ITALIC, 12),
            Color.RED);
}
 
Example 8
Source File: javax_swing_plaf_BorderUIResource_TitledBorderUIResource.java    From openjdk-jdk9 with GNU General Public License v2.0 5 votes vote down vote up
protected TitledBorderUIResource getObject() {
    return new TitledBorderUIResource(
            new EmptyBorder(1, 2, 3, 4),
            "TITLE",
            TitledBorder.CENTER,
            TitledBorder.ABOVE_TOP,
            new Font("Serif", Font.ITALIC, 12),
            Color.RED);
}
 
Example 9
Source File: javax_swing_border_TitledBorder.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 5 votes vote down vote up
protected TitledBorder getObject() {
    return new TitledBorder(
            new EmptyBorder(1, 2, 3, 4),
            "TITLE",
            TitledBorder.CENTER,
            TitledBorder.ABOVE_TOP,
            new Font("Arial", Font.ITALIC, 12),
            Color.RED);
}
 
Example 10
Source File: javax_swing_plaf_BorderUIResource_TitledBorderUIResource.java    From jdk8u-dev-jdk with GNU General Public License v2.0 5 votes vote down vote up
protected TitledBorderUIResource getObject() {
    return new TitledBorderUIResource(
            new EmptyBorder(1, 2, 3, 4),
            "TITLE",
            TitledBorder.CENTER,
            TitledBorder.ABOVE_TOP,
            new Font("Serif", Font.ITALIC, 12),
            Color.RED);
}
 
Example 11
Source File: javax_swing_plaf_BorderUIResource_TitledBorderUIResource.java    From jdk8u-jdk with GNU General Public License v2.0 5 votes vote down vote up
protected TitledBorderUIResource getObject() {
    return new TitledBorderUIResource(
            new EmptyBorder(1, 2, 3, 4),
            "TITLE",
            TitledBorder.CENTER,
            TitledBorder.ABOVE_TOP,
            new Font("Serif", Font.ITALIC, 12),
            Color.RED);
}
 
Example 12
Source File: javax_swing_plaf_BorderUIResource_TitledBorderUIResource.java    From openjdk-8 with GNU General Public License v2.0 5 votes vote down vote up
protected TitledBorderUIResource getObject() {
    return new TitledBorderUIResource(
            new EmptyBorder(1, 2, 3, 4),
            "TITLE",
            TitledBorder.CENTER,
            TitledBorder.ABOVE_TOP,
            new Font("Serif", Font.ITALIC, 12),
            Color.RED);
}
 
Example 13
Source File: javax_swing_border_TitledBorder.java    From jdk8u60 with GNU General Public License v2.0 5 votes vote down vote up
protected TitledBorder getObject() {
    return new TitledBorder(
            new EmptyBorder(1, 2, 3, 4),
            "TITLE",
            TitledBorder.CENTER,
            TitledBorder.ABOVE_TOP,
            new Font("Arial", Font.ITALIC, 12),
            Color.RED);
}
 
Example 14
Source File: javax_swing_plaf_BorderUIResource_TitledBorderUIResource.java    From jdk8u60 with GNU General Public License v2.0 5 votes vote down vote up
protected TitledBorderUIResource getObject() {
    return new TitledBorderUIResource(
            new EmptyBorder(1, 2, 3, 4),
            "TITLE",
            TitledBorder.CENTER,
            TitledBorder.ABOVE_TOP,
            new Font("Serif", Font.ITALIC, 12),
            Color.RED);
}
 
Example 15
Source File: javax_swing_plaf_BorderUIResource_TitledBorderUIResource.java    From TencentKona-8 with GNU General Public License v2.0 5 votes vote down vote up
protected TitledBorderUIResource getObject() {
    return new TitledBorderUIResource(
            new EmptyBorder(1, 2, 3, 4),
            "TITLE",
            TitledBorder.CENTER,
            TitledBorder.ABOVE_TOP,
            new Font("Serif", Font.ITALIC, 12),
            Color.RED);
}
 
Example 16
Source File: javax_swing_border_TitledBorder.java    From dragonwell8_jdk with GNU General Public License v2.0 5 votes vote down vote up
protected TitledBorder getObject() {
    return new TitledBorder(
            new EmptyBorder(1, 2, 3, 4),
            "TITLE",
            TitledBorder.CENTER,
            TitledBorder.ABOVE_TOP,
            new Font("Arial", Font.ITALIC, 12),
            Color.RED);
}
 
Example 17
Source File: javax_swing_plaf_BorderUIResource_TitledBorderUIResource.java    From dragonwell8_jdk with GNU General Public License v2.0 5 votes vote down vote up
protected TitledBorderUIResource getObject() {
    return new TitledBorderUIResource(
            new EmptyBorder(1, 2, 3, 4),
            "TITLE",
            TitledBorder.CENTER,
            TitledBorder.ABOVE_TOP,
            new Font("Serif", Font.ITALIC, 12),
            Color.RED);
}
 
Example 18
Source File: TreesPanel.java    From beast-mcmc with GNU Lesser General Public License v2.1 4 votes vote down vote up
public TreesPanel(BeautiFrame parent, Action removeTreeAction) {
        super();
        this.frame = parent;

        treesTableModel = new TreesTableModel();
        treesTable = new JTable(treesTableModel);

        treesTable.getTableHeader().setReorderingAllowed(false);
        treesTable.getTableHeader().setResizingAllowed(false);
//        treesTable.getTableHeader().setDefaultRenderer(
//                new HeaderRenderer(SwingConstants.LEFT, new Insets(0, 4, 0, 4)));

        final TableColumnModel model = treesTable.getColumnModel();
        final TableColumn tableColumn0 = model.getColumn(0);
        tableColumn0.setCellRenderer(new ModelsTableCellRenderer(SwingConstants.LEFT, new Insets(0, 4, 0, 4)));

        TableEditorStopper.ensureEditingStopWhenTableLosesFocus(treesTable);

        treesTable.getSelectionModel().setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
        treesTable.getSelectionModel().addListSelectionListener(new ListSelectionListener() {
            public void valueChanged(ListSelectionEvent evt) {
                selectionChanged();
            }
        });

        JScrollPane scrollPane = new JScrollPane(treesTable,
                JScrollPane.VERTICAL_SCROLLBAR_ALWAYS,
                JScrollPane.HORIZONTAL_SCROLLBAR_NEVER);
        scrollPane.setOpaque(false);

        JPanel controlPanel1 = new JPanel(new FlowLayout(FlowLayout.LEFT));
        controlPanel1.setOpaque(false);

        setCurrentModelAndPrior(null);

        JPanel panel1 = new JPanel(new BorderLayout(0, 0));
        panel1.setOpaque(false);
        panel1.add(scrollPane, BorderLayout.CENTER);

        treeModelPanelParent = new JPanel(new FlowLayout(FlowLayout.LEFT));
        treeModelPanelParent.setOpaque(false);
        treeModelBorder = new TitledBorder(null, "Tree Model", TitledBorder.DEFAULT_JUSTIFICATION, TitledBorder.ABOVE_TOP);
        treeModelPanelParent.setBorder(treeModelBorder);

        JScrollPane scrollPane2 = new JScrollPane(treeModelPanelParent, JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED, JScrollPane.HORIZONTAL_SCROLLBAR_NEVER);
        scrollPane2.setOpaque(false);
        scrollPane2.setBorder(null);
        scrollPane2.getViewport().setOpaque(false);

        treePriorPanelParent = new JPanel(new FlowLayout(FlowLayout.LEFT));
        treePriorPanelParent.setOpaque(false);
        treePriorBorder = new TitledBorder(null, "Tree Prior", TitledBorder.DEFAULT_JUSTIFICATION, TitledBorder.ABOVE_TOP);
        treePriorPanelParent.setBorder(treePriorBorder);

        JPanel panel3 = new JPanel(new FlowLayout(FlowLayout.LEFT));
        panel3.setOpaque(false);
        linkTreePriorCheck.setEnabled(false);
        linkTreePriorCheck.setSelected(true);
        linkTreePriorCheck.addItemListener(new ItemListener() {
            public void itemStateChanged(ItemEvent ev) {
                updateShareSameTreePriorChanged();
            }
        });
        linkTreePriorCheck.setToolTipText("Decide whether to use one tree prior for all trees");
        panel3.add(linkTreePriorCheck);

        JPanel panel4 = new JPanel(new BorderLayout());
        panel4.setOpaque(false);
        panel4.add(treePriorPanelParent, BorderLayout.NORTH);
        panel4.add(scrollPane2, BorderLayout.CENTER);

        JSplitPane splitPane = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT, panel1, panel4);
        splitPane.setDividerLocation(180);
        splitPane.setContinuousLayout(true);
        splitPane.setBorder(BorderFactory.createEmptyBorder());
        splitPane.setOpaque(false);

        setOpaque(false);
        setLayout(new BorderLayout(0, 0));
        setBorder(new BorderUIResource.EmptyBorderUIResource(new Insets(12, 12, 12, 12)));

        add(panel3, BorderLayout.NORTH);
        add(splitPane, BorderLayout.CENTER);
    }
 
Example 19
Source File: ClockModelsPanel.java    From beast-mcmc with GNU Lesser General Public License v2.1 4 votes vote down vote up
public ClockModelsPanel(BeautiFrame parent) {

        super();

        this.frame = parent;

        modelTableModel = new ModelTableModel();
        modelTable = new JTable(modelTableModel);

        modelTable.getTableHeader().setReorderingAllowed(false);
        modelTable.getTableHeader().setResizingAllowed(false);
//        modelTable.getTableHeader().setDefaultRenderer(
//                new HeaderRenderer(SwingConstants.LEFT, new Insets(0, 4, 0, 4)));

        final TableColumnModel model = modelTable.getColumnModel();
        final TableColumn tableColumn0 = model.getColumn(0);
        tableColumn0.setCellRenderer(new ModelsTableCellRenderer(SwingConstants.LEFT, new Insets(0, 4, 0, 4)));

        TableEditorStopper.ensureEditingStopWhenTableLosesFocus(modelTable);

        modelTable.getSelectionModel().setSelectionMode(ListSelectionModel.MULTIPLE_INTERVAL_SELECTION);
        modelTable.getSelectionModel().addListSelectionListener(new ListSelectionListener() {
            public void valueChanged(ListSelectionEvent evt) {
                selectionChanged();
            }
        });

        JScrollPane scrollPane = new JScrollPane(modelTable,
                JScrollPane.VERTICAL_SCROLLBAR_ALWAYS, JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED);
        scrollPane.setOpaque(false);

//        ActionPanel actionPanel1 = new ActionPanel(false);
//        actionPanel1.setAddAction(addModelAction);
//        actionPanel1.setRemoveAction(removeModelAction);

        JPanel controlPanel1 = new JPanel(new FlowLayout(FlowLayout.LEFT));
        controlPanel1.setOpaque(false);
//        controlPanel1.add(actionPanel1);

        JPanel panel = new JPanel(new BorderLayout(0, 0));
        panel.setOpaque(false);
        panel.add(scrollPane, BorderLayout.CENTER);
//        panel.add(controlPanel1, BorderLayout.SOUTH);
        panel.setMinimumSize(new Dimension(MINIMUM_TABLE_WIDTH, 0));

        JToolBar toolBar = new JToolBar();
        toolBar.setFloatable(false);
        toolBar.setOpaque(false);
        toolBar.setBorder(BorderFactory.createEmptyBorder());

        toolBar.setLayout(new FlowLayout(java.awt.FlowLayout.LEFT, 0, 0));
        JButton button = new JButton(cloneModelsAction);
        PanelUtils.setupComponent(button);
        toolBar.add(button);
        panel.add(toolBar, BorderLayout.SOUTH);

        modelPanelParent = new JPanel(new FlowLayout(FlowLayout.CENTER));
        modelPanelParent.setOpaque(false);
        modelBorder = new TitledBorder(null, "Clock Model", TitledBorder.DEFAULT_JUSTIFICATION, TitledBorder.ABOVE_TOP);
        modelPanelParent.setBorder(modelBorder);

        setCurrentModel(null);

        JScrollPane scrollPane2 = new JScrollPane(modelPanelParent, JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED, JScrollPane.HORIZONTAL_SCROLLBAR_NEVER);
        scrollPane2.setOpaque(false);
        scrollPane2.setBorder(null);
        scrollPane2.getViewport().setOpaque(false);

        JSplitPane splitPane = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT, panel, scrollPane2);
        splitPane.setDividerLocation(MINIMUM_TABLE_WIDTH);
        splitPane.setContinuousLayout(true);
        splitPane.setBorder(BorderFactory.createEmptyBorder());
        splitPane.setOpaque(false);

        setOpaque(false);
        setBorder(new BorderUIResource.EmptyBorderUIResource(new Insets(12, 12, 12, 12)));
        setLayout(new BorderLayout(0, 0));
        add(splitPane, BorderLayout.CENTER);
    }
 
Example 20
Source File: SiteModelsPanel.java    From beast-mcmc with GNU Lesser General Public License v2.1 4 votes vote down vote up
public SiteModelsPanel(final BeautiFrame frame, Action removeModelAction) {

        super();

        this.frame = frame;

        modelTableModel = new ModelTableModel();
        modelTable = new JTable(modelTableModel);

        modelTable.getTableHeader().setReorderingAllowed(false);
        modelTable.getTableHeader().setResizingAllowed(false);
//        modelTable.getTableHeader().setDefaultRenderer(
//                new HeaderRenderer(SwingConstants.LEFT, new Insets(0, 4, 0, 4)));

        final TableColumnModel model = modelTable.getColumnModel();
        final TableColumn tableColumn0 = model.getColumn(0);
        tableColumn0.setCellRenderer(new ModelsTableCellRenderer(SwingConstants.LEFT, new Insets(0, 4, 0, 4)));

        TableEditorStopper.ensureEditingStopWhenTableLosesFocus(modelTable);

        modelTable.getSelectionModel().setSelectionMode(ListSelectionModel.MULTIPLE_INTERVAL_SELECTION);
        modelTable.getSelectionModel().addListSelectionListener(new ListSelectionListener() {
            public void valueChanged(ListSelectionEvent evt) {
                selectionChanged();
            }
        });

        JScrollPane scrollPane = new JScrollPane(modelTable,
                JScrollPane.VERTICAL_SCROLLBAR_ALWAYS, JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED);
        scrollPane.setOpaque(false);

//        ActionPanel actionPanel1 = new ActionPanel(false);
//        actionPanel1.setAddAction(addModelAction);
//        actionPanel1.setRemoveAction(removeModelAction);

        JPanel controlPanel1 = new JPanel(new FlowLayout(FlowLayout.LEFT));
        controlPanel1.setOpaque(false);
//        controlPanel1.add(actionPanel1);

        JPanel panel = new JPanel(new BorderLayout(0, 0));
        panel.setOpaque(false);
        panel.add(scrollPane, BorderLayout.CENTER);
//        panel.add(controlPanel1, BorderLayout.SOUTH);
        panel.setMinimumSize(new Dimension(MINIMUM_TABLE_WIDTH, 0));

        JToolBar toolBar = new JToolBar();
        toolBar.setFloatable(false);
        toolBar.setOpaque(false);
        toolBar.setBorder(BorderFactory.createEmptyBorder());

        toolBar.setLayout(new FlowLayout(java.awt.FlowLayout.LEFT, 0, 0));
        JButton button = new JButton(cloneModelsAction);
        PanelUtils.setupComponent(button);
        toolBar.add(button);
        panel.add(toolBar, BorderLayout.SOUTH);

        modelPanelParent = new JPanel(new FlowLayout(FlowLayout.CENTER));
        modelPanelParent.setOpaque(false);
        modelBorder = new TitledBorder(null, "Substitution Model", TitledBorder.DEFAULT_JUSTIFICATION, TitledBorder.ABOVE_TOP);
        modelPanelParent.setBorder(modelBorder);

        setCurrentModel(null);

        JScrollPane scrollPane2 = new JScrollPane(modelPanelParent, JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED, JScrollPane.HORIZONTAL_SCROLLBAR_NEVER);
        scrollPane2.setOpaque(false);
        scrollPane2.setBorder(null);
        scrollPane2.getViewport().setOpaque(false);

        JSplitPane splitPane = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT, panel, scrollPane2);
        splitPane.setDividerLocation(MINIMUM_TABLE_WIDTH);
        splitPane.setContinuousLayout(true);
        splitPane.setBorder(BorderFactory.createEmptyBorder());
        splitPane.setOpaque(false);

        setOpaque(false);
        setBorder(new BorderUIResource.EmptyBorderUIResource(new Insets(12, 12, 12, 12)));
        setLayout(new BorderLayout(0, 0));
        add(splitPane, BorderLayout.CENTER);
    }