Search in sources :

Example 1 with BoxComponent

use of org.cytoscape.internal.prefs.lib.BoxComponent in project cytoscape-impl by cytoscape.

the class PrefsTables method makeRightSide.

private Component makeRightSide() {
    Box right = Box.createVerticalBox();
    // right.add(makeCheckBoxLine("Close Tables Without Save", "", "", "If checked, tables will be disposed upon closing without asking you to save"));
    right.add(makeCheckBoxLine("Show Button Bar", "table.showButtonBar", "If checked, a tool bar is visible"));
    right.add(makeCheckBoxLine("Alternating Background", "table.stripedBackground", "If checked, a tool bar is visible"));
    // right.add(makeCheckBoxLine("Remember Column Names",  "", "If checked, a tool bar is visible"));
    // right.add(makeCheckBoxLine("Show as Heat Maps", "table.heatMaps", "If checked, all numerical columns in your table will be color coded based on normalized intensity"));
    right.add(makeLabeledField("Number Format String", "floatingPointColumnFormat", "%.2f", "The digit specifies the number of decimal places; use e for scientific notation, or f for floating point"));
    Box colorline = Box.createHorizontalBox();
    fGridLineColor = new ColorMenuButton();
    fGridLineColor.setText("Color");
    fGridLineColor.setToolTipText("Set the line color distinguishing cells in the table");
    components.put("table.gridlineColor", fGridLineColor);
    colorline.add(new HBox(Box.createRigidArea(new Dimension(12, 15)), new BoxComponent("Grid Color", fGridLineColor)));
    // 
    fGridFillColor = new ColorMenuButton();
    fGridFillColor.setText("Color");
    fGridFillColor.setToolTipText("Set the background color for alternate rows in the grid");
    components.put("table.gridFillColor", fGridLineColor);
    HBox colorline2 = new HBox(Box.createRigidArea(new Dimension(12, 15)), new BoxComponent("Fill Color:", fGridFillColor), Box.createHorizontalGlue());
    right.add(new VBox(true, colorline, colorline2));
    right.add(Box.createVerticalGlue());
    return right;
}
Also used : ColorMenuButton(org.cytoscape.internal.prefs.lib.ColorMenuButton) HBox(org.cytoscape.internal.prefs.lib.HBox) BoxComponent(org.cytoscape.internal.prefs.lib.BoxComponent) HBox(org.cytoscape.internal.prefs.lib.HBox) Box(javax.swing.Box) VBox(org.cytoscape.internal.prefs.lib.VBox) JCheckBox(javax.swing.JCheckBox) Dimension(java.awt.Dimension) VBox(org.cytoscape.internal.prefs.lib.VBox)

Example 2 with BoxComponent

use of org.cytoscape.internal.prefs.lib.BoxComponent in project cytoscape-impl by cytoscape.

the class PrefsSecurity method makeRepositoryPanel.

AntiAliasedPanel makeRepositoryPanel() {
    AntiAliasedPanel panel = new AntiAliasedPanel("Proxy Settings");
    setSizes(panel, new Dimension(580, 120));
    fHost = new JTextField(25);
    // new JTextField(5);
    fPort = new RangedIntegerTextField(0, 9999, new Dimension(80, 27));
    fUsername = new JTextField(15);
    fPassword = new JPasswordField(15);
    components.put("proxy.host", fHost);
    components.put("proxy.port", fPort);
    components.put("proxy.username", fUsername);
    components.put("proxy.password", fPassword);
    JLabel[] labels = new JLabel[4];
    Font labelFont = new Font(Font.SANS_SERIF, Font.PLAIN, 10);
    for (int i = 0; i < 4; i++) {
        labels[i] = new JLabel(strs[i]);
        setSizes(labels[i], new Dimension(67, 27));
        labels[i].setFont(labelFont);
        labels[i].setHorizontalAlignment(SwingConstants.RIGHT);
        labels[i].setOpaque(false);
    }
    Dimension SPACE = new Dimension(20, 20);
    Box lin1 = Box.createHorizontalBox();
    Box lin2 = Box.createHorizontalBox();
    lin1.add(new HBox(true, true, Box.createRigidArea(SPACE), new BoxComponent(labels[0], fHost, new BoxComponent(labels[1], fPort))));
    lin2.add(new HBox(true, true, new BoxComponent(labels[2], fUsername, new BoxComponent(labels[3], fPassword))));
    panel.add(lin1);
    panel.add(lin2);
    return panel;
}
Also used : HBox(org.cytoscape.internal.prefs.lib.HBox) JPasswordField(javax.swing.JPasswordField) BoxComponent(org.cytoscape.internal.prefs.lib.BoxComponent) JLabel(javax.swing.JLabel) HBox(org.cytoscape.internal.prefs.lib.HBox) Box(javax.swing.Box) Dimension(java.awt.Dimension) JTextField(javax.swing.JTextField) Font(java.awt.Font) AntiAliasedPanel(org.cytoscape.internal.prefs.lib.AntiAliasedPanel) RangedIntegerTextField(org.cytoscape.internal.prefs.lib.RangedIntegerTextField)

Aggregations

Dimension (java.awt.Dimension)2 Box (javax.swing.Box)2 BoxComponent (org.cytoscape.internal.prefs.lib.BoxComponent)2 HBox (org.cytoscape.internal.prefs.lib.HBox)2 Font (java.awt.Font)1 JCheckBox (javax.swing.JCheckBox)1 JLabel (javax.swing.JLabel)1 JPasswordField (javax.swing.JPasswordField)1 JTextField (javax.swing.JTextField)1 AntiAliasedPanel (org.cytoscape.internal.prefs.lib.AntiAliasedPanel)1 ColorMenuButton (org.cytoscape.internal.prefs.lib.ColorMenuButton)1 RangedIntegerTextField (org.cytoscape.internal.prefs.lib.RangedIntegerTextField)1 VBox (org.cytoscape.internal.prefs.lib.VBox)1