chemistry-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From f...@apache.org
Subject svn commit: r1755504 - /chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/java/org/apache/chemistry/opencmis/workbench/AbstractSpringLoginTab.java
Date Mon, 08 Aug 2016 12:58:56 GMT
Author: fmui
Date: Mon Aug  8 12:58:56 2016
New Revision: 1755504

URL: http://svn.apache.org/viewvc?rev=1755504&view=rev
Log:
Workbench: minor improvement

Modified:
    chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/java/org/apache/chemistry/opencmis/workbench/AbstractSpringLoginTab.java

Modified: chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/java/org/apache/chemistry/opencmis/workbench/AbstractSpringLoginTab.java
URL: http://svn.apache.org/viewvc/chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/java/org/apache/chemistry/opencmis/workbench/AbstractSpringLoginTab.java?rev=1755504&r1=1755503&r2=1755504&view=diff
==============================================================================
--- chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/java/org/apache/chemistry/opencmis/workbench/AbstractSpringLoginTab.java
(original)
+++ chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/java/org/apache/chemistry/opencmis/workbench/AbstractSpringLoginTab.java
Mon Aug  8 12:58:56 2016
@@ -18,17 +18,21 @@
  */
 package org.apache.chemistry.opencmis.workbench;
 
+import java.awt.Color;
 import java.awt.Component;
 import java.awt.Container;
 import java.awt.Dimension;
+import java.awt.FlowLayout;
 import java.awt.event.MouseAdapter;
 import java.awt.event.MouseEvent;
 import java.text.NumberFormat;
 
 import javax.swing.Icon;
+import javax.swing.JCheckBox;
 import javax.swing.JComponent;
 import javax.swing.JFormattedTextField;
 import javax.swing.JLabel;
+import javax.swing.JPanel;
 import javax.swing.JPasswordField;
 import javax.swing.JTextField;
 import javax.swing.Spring;
@@ -96,6 +100,25 @@ public abstract class AbstractSpringLogi
         return textField;
     }
 
+    protected JPanel createCheckBoxPanel(Container pane, String label, String help, JCheckBox...
buttons) {
+        JPanel panel = new JPanel(new FlowLayout(FlowLayout.LEFT, 0, 0));
+        JLabel panelLabel = new JLabel(label, SwingConstants.TRAILING);
+        panelLabel.setLabelFor(panel);
+
+        for (JCheckBox button : buttons) {
+            panel.add(button);
+            if (button != buttons[buttons.length - 1]) {
+                panel.add(new JPanel()).setMinimumSize(new Dimension(10, 10));
+            }
+        }
+
+        pane.add(panelLabel);
+        pane.add(createHelp(help));
+        pane.add(panel);
+
+        return panel;
+    }
+
     protected JComponent createHelp(String help) {
         if (help == null) {
             return new JLabel("");



Mime
View raw message