Search in sources :

Example 6 with JTabbedPane

use of javax.swing.JTabbedPane in project ACS by ACS-Community.

the class ErrorTreeCellRenderer method getJTabbedPane.

/**
	 * This method initializes jTabbedPane	
	 * 	
	 * @return javax.swing.JTabbedPane	
	 */
private JTabbedPane getJTabbedPane() {
    if (jTabbedPane == null) {
        jTabbedPane = new JTabbedPane();
        jTabbedPane.addTab("Table view", null, getTableViewPanel(), null);
        jTabbedPane.addTab("XML View", null, getXmlViewPanel(), null);
    }
    return jTabbedPane;
}
Also used : JTabbedPane(javax.swing.JTabbedPane)

Example 7 with JTabbedPane

use of javax.swing.JTabbedPane in project ACS by ACS-Community.

the class ReducedChainDlg method initGUI.

/**
	 * Initialize the GUI
	 */
private void initGUI() {
    setIconImage(new ImageIcon(AlarmGUIType.class.getResource(AlarmGUIType.iconFolder + "arrow_in.png")).getImage());
    setModalityType(Dialog.ModalityType.MODELESS);
    setDefaultCloseOperation(HIDE_ON_CLOSE);
    rootPane.setLayout(new BorderLayout());
    JTabbedPane tabbedPane = new JTabbedPane();
    JScrollPane tableScrollPane = new JScrollPane(JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED, JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED);
    tableScrollPane.setViewportView(table);
    table.addRemoveColumn(AlarmTableColumn.ICON, false);
    tabbedPane.addTab("Table view", tableScrollPane);
    JScrollPane treeScrollPane = new JScrollPane(JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED, JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED);
    treeScrollPane.setViewportView(tree);
    tabbedPane.addTab("Tree view", treeScrollPane);
    rootPane.add(tabbedPane, BorderLayout.CENTER);
    JPanel buttonPnl = new JPanel();
    buttonPnl.add(refreshBtn);
    refreshBtn.addActionListener(this);
    refreshBtn.setEnabled(false);
    buttonPnl.add(closeBtn);
    closeBtn.addActionListener(this);
    rootPane.add(buttonPnl, BorderLayout.SOUTH);
    pack();
    setVisible(true);
}
Also used : JScrollPane(javax.swing.JScrollPane) ImageIcon(javax.swing.ImageIcon) JPanel(javax.swing.JPanel) AlarmGUIType(alma.acsplugins.alarmsystem.gui.table.AlarmGUIType) BorderLayout(java.awt.BorderLayout) JTabbedPane(javax.swing.JTabbedPane)

Example 8 with JTabbedPane

use of javax.swing.JTabbedPane in project ACS by ACS-Community.

the class ObjectExplorer method getJTabbedPaneTreesContainer.

//	----- getters for manually added components -----
private JTabbedPane getJTabbedPaneTreesContainer() {
    if (jTabbedPaneTreesContainer == null) {
        try {
            jTabbedPaneTreesContainer = new JTabbedPane();
            jTabbedPaneTreesContainer.addTab("By type", getJPanel2());
            jTabbedPaneTreesContainer.addTab("By device", getJPanelTreeByName());
        } catch (java.lang.Throwable ivjExc) {
            handleException(ivjExc);
        }
    }
    return jTabbedPaneTreesContainer;
}
Also used : JTabbedPane(javax.swing.JTabbedPane)

Example 9 with JTabbedPane

use of javax.swing.JTabbedPane in project jdk8u_jdk by JetBrains.

the class Test8007563 method run.

public void run() {
    if (this.frame == null) {
        if (!updateLookAndFeel()) {
            return;
        }
        this.pane = new JTabbedPane();
        this.pane.setOpaque(false);
        this.pane.setBackground(Color.RED);
        for (int i = 0; i < 3; i++) {
            this.pane.addTab("Tab " + i, new JLabel("Content area " + i));
        }
        this.frame = new JFrame(getClass().getSimpleName());
        this.frame.getContentPane().setBackground(Color.BLUE);
        this.frame.add(this.pane);
        this.frame.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);
        this.frame.setSize(400, 200);
        this.frame.setLocationRelativeTo(null);
        this.frame.setVisible(true);
    } else {
        Point point = new Point(this.pane.getWidth() - 2, 2);
        convertPointToScreen(point, this.pane);
        Color actual = ROBOT.getPixelColor(point.x, point.y);
        boolean opaque = this.pane.isOpaque();
        Color expected = opaque ? this.pane.getBackground() : this.frame.getContentPane().getBackground();
        if (!expected.equals(actual)) {
            addOpaqueError(opaque);
        }
        if (!opaque) {
            this.pane.setOpaque(true);
            this.pane.repaint();
        } else {
            this.frame.dispose();
            this.frame = null;
            this.pane = null;
            LATCH.countDown();
        }
    }
    invokeLater(this);
}
Also used : JFrame(javax.swing.JFrame) JTabbedPane(javax.swing.JTabbedPane) Color(java.awt.Color) JLabel(javax.swing.JLabel) Point(java.awt.Point) Point(java.awt.Point)

Example 10 with JTabbedPane

use of javax.swing.JTabbedPane in project jdk8u_jdk by JetBrains.

the class DimensionEncapsulation method run.

@Override
public void run() {
    runTest(new Panel());
    runTest(new Button());
    runTest(new Checkbox());
    runTest(new Canvas());
    runTest(new Choice());
    runTest(new Label());
    runTest(new Scrollbar());
    runTest(new TextArea());
    runTest(new TextField());
    runTest(new Dialog(new JFrame()));
    runTest(new Frame());
    runTest(new Window(new JFrame()));
    runTest(new FileDialog(new JFrame()));
    runTest(new List());
    runTest(new ScrollPane());
    runTest(new JFrame());
    runTest(new JDialog(new JFrame()));
    runTest(new JWindow(new JFrame()));
    runTest(new JLabel("hi"));
    runTest(new JMenu());
    runTest(new JTree());
    runTest(new JTable());
    runTest(new JMenuItem());
    runTest(new JCheckBoxMenuItem());
    runTest(new JToggleButton());
    runTest(new JSpinner());
    runTest(new JSlider());
    runTest(Box.createVerticalBox());
    runTest(Box.createHorizontalBox());
    runTest(new JTextField());
    runTest(new JTextArea());
    runTest(new JTextPane());
    runTest(new JPasswordField());
    runTest(new JFormattedTextField());
    runTest(new JEditorPane());
    runTest(new JButton());
    runTest(new JColorChooser());
    runTest(new JFileChooser());
    runTest(new JCheckBox());
    runTest(new JInternalFrame());
    runTest(new JDesktopPane());
    runTest(new JTableHeader());
    runTest(new JLayeredPane());
    runTest(new JRootPane());
    runTest(new JMenuBar());
    runTest(new JOptionPane());
    runTest(new JRadioButton());
    runTest(new JRadioButtonMenuItem());
    runTest(new JPopupMenu());
    //runTest(new JScrollBar()); --> don't test defines max and min in
    // terms of preferred
    runTest(new JScrollPane());
    runTest(new JViewport());
    runTest(new JSplitPane());
    runTest(new JTabbedPane());
    runTest(new JToolBar());
    runTest(new JSeparator());
    runTest(new JProgressBar());
    if (!failures.isEmpty()) {
        System.out.println("These classes failed");
        for (final Component failure : failures) {
            System.out.println(failure.getClass());
        }
        throw new RuntimeException("Test failed");
    }
}
Also used : JDesktopPane(javax.swing.JDesktopPane) Choice(java.awt.Choice) JTextArea(javax.swing.JTextArea) TextArea(java.awt.TextArea) JTextArea(javax.swing.JTextArea) Label(java.awt.Label) JLabel(javax.swing.JLabel) JTableHeader(javax.swing.table.JTableHeader) JToggleButton(javax.swing.JToggleButton) JToggleButton(javax.swing.JToggleButton) Button(java.awt.Button) JRadioButton(javax.swing.JRadioButton) JButton(javax.swing.JButton) JFrame(javax.swing.JFrame) Checkbox(java.awt.Checkbox) JDialog(javax.swing.JDialog) FileDialog(java.awt.FileDialog) Dialog(java.awt.Dialog) JTextField(javax.swing.JTextField) TextField(java.awt.TextField) JFormattedTextField(javax.swing.JFormattedTextField) JSlider(javax.swing.JSlider) ArrayList(java.util.ArrayList) List(java.awt.List) Canvas(java.awt.Canvas) JWindow(javax.swing.JWindow) JRadioButtonMenuItem(javax.swing.JRadioButtonMenuItem) JOptionPane(javax.swing.JOptionPane) JCheckBoxMenuItem(javax.swing.JCheckBoxMenuItem) JCheckBox(javax.swing.JCheckBox) JTree(javax.swing.JTree) JFileChooser(javax.swing.JFileChooser) JPasswordField(javax.swing.JPasswordField) ScrollPane(java.awt.ScrollPane) JScrollPane(javax.swing.JScrollPane) JTable(javax.swing.JTable) JSpinner(javax.swing.JSpinner) JSplitPane(javax.swing.JSplitPane) JColorChooser(javax.swing.JColorChooser) JInternalFrame(javax.swing.JInternalFrame) JDialog(javax.swing.JDialog) JFrame(javax.swing.JFrame) Frame(java.awt.Frame) JInternalFrame(javax.swing.JInternalFrame) JRadioButton(javax.swing.JRadioButton) JLayeredPane(javax.swing.JLayeredPane) JTabbedPane(javax.swing.JTabbedPane) JButton(javax.swing.JButton) JProgressBar(javax.swing.JProgressBar) JTextField(javax.swing.JTextField) JSeparator(javax.swing.JSeparator) JTextPane(javax.swing.JTextPane) JMenuItem(javax.swing.JMenuItem) Component(java.awt.Component) Scrollbar(java.awt.Scrollbar) Window(java.awt.Window) JWindow(javax.swing.JWindow) JScrollPane(javax.swing.JScrollPane) JViewport(javax.swing.JViewport) JFormattedTextField(javax.swing.JFormattedTextField) JLabel(javax.swing.JLabel) JToolBar(javax.swing.JToolBar) JPopupMenu(javax.swing.JPopupMenu) Panel(java.awt.Panel) JEditorPane(javax.swing.JEditorPane) JRootPane(javax.swing.JRootPane) FileDialog(java.awt.FileDialog) JMenu(javax.swing.JMenu) JMenuBar(javax.swing.JMenuBar)

Aggregations

JTabbedPane (javax.swing.JTabbedPane)250 JPanel (javax.swing.JPanel)129 BorderLayout (java.awt.BorderLayout)73 JScrollPane (javax.swing.JScrollPane)67 JButton (javax.swing.JButton)60 JLabel (javax.swing.JLabel)60 Dimension (java.awt.Dimension)53 ActionEvent (java.awt.event.ActionEvent)41 ActionListener (java.awt.event.ActionListener)37 GridLayout (java.awt.GridLayout)31 ChangeListener (javax.swing.event.ChangeListener)30 ChangeEvent (javax.swing.event.ChangeEvent)29 GridBagLayout (java.awt.GridBagLayout)26 JCheckBox (javax.swing.JCheckBox)26 JFrame (javax.swing.JFrame)26 JSplitPane (javax.swing.JSplitPane)26 Insets (java.awt.Insets)25 JComponent (javax.swing.JComponent)25 GridBagConstraints (java.awt.GridBagConstraints)24 ImageIcon (javax.swing.ImageIcon)23