geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hanhongf...@apache.org
Subject svn commit: r1132874 - in /geronimo/devtools/eclipse-plugin/trunk/plugins: org.apache.geronimo.st.ui/src/main/java/org/apache/geronimo/st/ui/internal/ org.apache.geronimo.st.ui/src/main/java/org/apache/geronimo/st/ui/sections/ org.apache.geronimo.st.v3...
Date Tue, 07 Jun 2011 06:26:45 GMT
Author: hanhongfang
Date: Tue Jun  7 06:26:44 2011
New Revision: 1132874

URL: http://svn.apache.org/viewvc?rev=1132874&view=rev
Log:
GERONIMODEVTOOLS-750 Associate labels can't be read by JAWS. Thanks Yi Xiao for the patch.

Modified:
    geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.ui/src/main/java/org/apache/geronimo/st/ui/internal/GeronimoServerWizardFragment.java
    geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.ui/src/main/java/org/apache/geronimo/st/ui/sections/ServerEditorSecuritySection.java
    geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.ui/src/main/java/org/apache/geronimo/st/v30/ui/internal/GeronimoServerWizardFragment.java
    geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.ui/src/main/java/org/apache/geronimo/st/v30/ui/sections/AbstractTableSection.java
    geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.ui/src/main/java/org/apache/geronimo/st/v30/ui/sections/ServerEditorSecuritySection.java

Modified: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.ui/src/main/java/org/apache/geronimo/st/ui/internal/GeronimoServerWizardFragment.java
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.ui/src/main/java/org/apache/geronimo/st/ui/internal/GeronimoServerWizardFragment.java?rev=1132874&r1=1132873&r2=1132874&view=diff
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.ui/src/main/java/org/apache/geronimo/st/ui/internal/GeronimoServerWizardFragment.java
(original)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.ui/src/main/java/org/apache/geronimo/st/ui/internal/GeronimoServerWizardFragment.java
Tue Jun  7 06:26:44 2011
@@ -30,6 +30,7 @@ import org.eclipse.swt.events.ModifyList
 import org.eclipse.swt.layout.GridData;
 import org.eclipse.swt.layout.GridLayout;
 import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Group;
 import org.eclipse.swt.widgets.Item;
 import org.eclipse.swt.widgets.Label;
 import org.eclipse.swt.widgets.Table;
@@ -120,15 +121,17 @@ public class GeronimoServerWizardFragmen
 			}
 		});
 
-		label = new Label(parent, SWT.NONE);
-		label.setText(Messages.specifyPorts);
-		GridData data = createTextGridData();
-		data.verticalIndent = 15;
-		data.horizontalSpan = 2;
-		label.setLayoutData(data);
-
+		Group portsGroup = new Group(parent, SWT.SHADOW_IN);
+		portsGroup.setText(Messages.specifyPorts);
+		
+		portsGroup.setLayout(new GridLayout(2, true));
+		GridData gd = new GridData();
+		gd.verticalIndent = 15;
+		gd.horizontalAlignment = GridData.FILL;
+		gd.horizontalSpan = 2;
+		portsGroup.setLayoutData(gd);
 		// ports
-		ports = new Table(parent, SWT.V_SCROLL | SWT.H_SCROLL
+		ports = new Table(portsGroup, SWT.V_SCROLL | SWT.H_SCROLL
 				| SWT.FULL_SELECTION);
 		ports.setHeaderVisible(true);
 		ports.setLinesVisible(false);
@@ -136,23 +139,23 @@ public class GeronimoServerWizardFragmen
 		TableColumn col = new TableColumn(ports, SWT.NONE);
 		col.setText(Messages.portName);
 		col.setResizable(false);
-		ColumnWeightData colData = new ColumnWeightData(15, 150, false);
+		ColumnWeightData colData = new ColumnWeightData(15, 100, false);
 		TableLayout tableLayout = new TableLayout();
 		tableLayout.addColumnData(colData);
 
 		col = new TableColumn(ports, SWT.NONE);
 		col.setText(Messages.portValue);
 		col.setResizable(false);
-		colData = new ColumnWeightData(8, 80, false);
+		colData = new ColumnWeightData(8, 100, false);
 		tableLayout.addColumnData(colData);
 
-		data = new GridData(GridData.FILL_HORIZONTAL
+		GridData data = new GridData(GridData.FILL_HORIZONTAL
 				| GridData.VERTICAL_ALIGN_FILL);
 		data.horizontalSpan = 2;
 		data.heightHint = 100;
 		ports.setLayoutData(data);
+		
 		ports.setLayout(tableLayout);
-
 		viewer = new TableViewer(ports);
 		viewer.setColumnProperties(new String[] { "name", "port" });
 

Modified: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.ui/src/main/java/org/apache/geronimo/st/ui/sections/ServerEditorSecuritySection.java
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.ui/src/main/java/org/apache/geronimo/st/ui/sections/ServerEditorSecuritySection.java?rev=1132874&r1=1132873&r2=1132874&view=diff
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.ui/src/main/java/org/apache/geronimo/st/ui/sections/ServerEditorSecuritySection.java
(original)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.ui/src/main/java/org/apache/geronimo/st/ui/sections/ServerEditorSecuritySection.java
Tue Jun  7 06:26:44 2011
@@ -75,50 +75,12 @@ public class ServerEditorSecuritySection
 		Section section = toolkit.createSection(parent,
 				ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED
 						| ExpandableComposite.TITLE_BAR 
-						| ExpandableComposite.FOCUS_TITLE);
+						| Section.DESCRIPTION | ExpandableComposite.FOCUS_TITLE);
 
 		section.setText(Messages.editorSectionSecurityTitle);
-	//	section.setDescription(Messages.editorSectionSecurityDescription);
+		section.setDescription(Messages.editorSectionSecurityDescription);
 		section.setLayoutData(new GridData(SWT.FILL, SWT.FILL, false, false));
-
-		Composite textComposite = toolkit.createComposite(section);
-        GridLayout gridLayout = new GridLayout();
-        gridLayout.numColumns = 2;
-        textComposite.setLayout(gridLayout);
-        textComposite.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false));
-        section.setDescriptionControl(textComposite);
-        //text
-        Label label = toolkit.createLabel(textComposite, Messages.editorSectionSecurityDescription);
         
-		// Button for managing account
-        Button manageAccountButton = toolkit.createButton(textComposite, CommonMessages.manageAccount,
SWT.PUSH);
-        GridData buttonData = new GridData(SWT.LEFT, SWT.CENTER, false, false);
-        manageAccountButton.setLayoutData(buttonData);
-        manageAccountButton.addSelectionListener(new SelectionAdapter() {
-            public void widgetSelected(SelectionEvent e) {
-                // if the server is started and local host, then we can bring up the dialog
-                if (!isLocalHost())
-                    MessageDialog.openError(Display.getCurrent().getActiveShell(), CommonMessages.errorOpenWizard,
CommonMessages.isNotLocalHost);
-                else 
-                {
-                    GeronimoAccountManager manager = new GeronimoAccountManager(server.getRuntime());
-                    try {
-                        manager.init();
-                    } catch (Exception e1) {
-                        MessageDialog.openError(Display.getCurrent().getActiveShell(), CommonMessages.errorOpenWizard,
CommonMessages.cannotRead);
-                        Trace.trace(Trace.ERROR, "Properties file containing user information
can't be read!", e1, Activator.logSections);
-                        return;
-                    }
-                    ManageAccountWizard wizard = new ManageAccountWizard(manager);
-                    WizardDialog dialog = new WizardDialog(Display.getCurrent().getActiveShell(),
wizard);
-                    dialog.open();
-                    if (dialog.getReturnCode() == Dialog.OK) {
-                    }
-                } 
-            }
-
-        });
-		
 		Composite composite = toolkit.createComposite(section);
 		GridLayout layout = new GridLayout();
 		layout.numColumns = 2;
@@ -150,6 +112,35 @@ public class ServerEditorSecuritySection
 				execute(new SetPasswordCommand(server, password.getText()));
 			}
 		});
+		
+		// Button for managing account
+        Button manageAccountButton = toolkit.createButton(composite, CommonMessages.manageAccount,
SWT.PUSH);
+        GridData buttonData = new GridData(SWT.LEFT, SWT.CENTER, false, false);
+        manageAccountButton.setLayoutData(buttonData);
+        manageAccountButton.addSelectionListener(new SelectionAdapter() {
+            public void widgetSelected(SelectionEvent e) {
+                // if the server is started and local host, then we can bring up the dialog
+                if (!isLocalHost())
+                    MessageDialog.openError(Display.getCurrent().getActiveShell(), CommonMessages.errorOpenWizard,
CommonMessages.isNotLocalHost);
+                else 
+                {
+                    GeronimoAccountManager manager = new GeronimoAccountManager(server.getRuntime());
+                    try {
+                        manager.init();
+                    } catch (Exception e1) {
+                        MessageDialog.openError(Display.getCurrent().getActiveShell(), CommonMessages.errorOpenWizard,
CommonMessages.cannotRead);
+                        Trace.trace(Trace.ERROR, "Properties file containing user information
can't be read!", e1, Activator.logSections);
+                        return;
+                    }
+                    ManageAccountWizard wizard = new ManageAccountWizard(manager);
+                    WizardDialog dialog = new WizardDialog(Display.getCurrent().getActiveShell(),
wizard);
+                    dialog.open();
+                    if (dialog.getReturnCode() == Dialog.OK) {
+                    }
+                } 
+            }
+
+        });
 	}
 
 	private String getUserName() {

Modified: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.ui/src/main/java/org/apache/geronimo/st/v30/ui/internal/GeronimoServerWizardFragment.java
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.ui/src/main/java/org/apache/geronimo/st/v30/ui/internal/GeronimoServerWizardFragment.java?rev=1132874&r1=1132873&r2=1132874&view=diff
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.ui/src/main/java/org/apache/geronimo/st/v30/ui/internal/GeronimoServerWizardFragment.java
(original)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.ui/src/main/java/org/apache/geronimo/st/v30/ui/internal/GeronimoServerWizardFragment.java
Tue Jun  7 06:26:44 2011
@@ -30,6 +30,7 @@ import org.eclipse.swt.events.ModifyList
 import org.eclipse.swt.layout.GridData;
 import org.eclipse.swt.layout.GridLayout;
 import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Group;
 import org.eclipse.swt.widgets.Item;
 import org.eclipse.swt.widgets.Label;
 import org.eclipse.swt.widgets.Table;
@@ -120,33 +121,36 @@ public class GeronimoServerWizardFragmen
             }
         });
 
-        label = new Label(parent, SWT.NONE);
-        label.setText(Messages.specifyPorts);
-        GridData data = createTextGridData();
-        data.verticalIndent = 15;
-        data.horizontalSpan = 2;
-        label.setLayoutData(data);
+		Group portsGroup = new Group(parent, SWT.SHADOW_IN);
+		portsGroup.setText(Messages.specifyPorts);
+		
+		portsGroup.setLayout(new GridLayout(2, true));
+		GridData gd = new GridData();
+		gd.verticalIndent = 15;
+		gd.horizontalAlignment = GridData.FILL;
+		gd.horizontalSpan = 2;
+		portsGroup.setLayoutData(gd);
+		// ports
+		ports = new Table(portsGroup, SWT.V_SCROLL | SWT.H_SCROLL
+				| SWT.FULL_SELECTION);
+		ports.setHeaderVisible(true);
+		ports.setLinesVisible(false);
+
+		TableColumn col = new TableColumn(ports, SWT.NONE);
+		col.setText(Messages.portName);
+		col.setResizable(false);
+		ColumnWeightData colData = new ColumnWeightData(15, 100, false);
+		TableLayout tableLayout = new TableLayout();
+		tableLayout.addColumnData(colData);
+
+		col = new TableColumn(ports, SWT.NONE);
+		col.setText(Messages.portValue);
+		col.setResizable(false);
+		colData = new ColumnWeightData(8, 100, false);
+		tableLayout.addColumnData(colData);
 
-        // ports
-        ports = new Table(parent, SWT.V_SCROLL | SWT.H_SCROLL
-                | SWT.FULL_SELECTION);
-        ports.setHeaderVisible(true);
-        ports.setLinesVisible(false);
-
-        TableColumn col = new TableColumn(ports, SWT.NONE);
-        col.setText(Messages.portName);
-        col.setResizable(false);
-        ColumnWeightData colData = new ColumnWeightData(15, 150, false);
-        TableLayout tableLayout = new TableLayout();
-        tableLayout.addColumnData(colData);
-
-        col = new TableColumn(ports, SWT.NONE);
-        col.setText(Messages.portValue);
-        col.setResizable(false);
-        colData = new ColumnWeightData(8, 80, false);
-        tableLayout.addColumnData(colData);
 
-        data = new GridData(GridData.FILL_HORIZONTAL
+        GridData data = new GridData(GridData.FILL_HORIZONTAL
                 | GridData.VERTICAL_ALIGN_FILL);
         data.horizontalSpan = 2;
         data.heightHint = 100;

Modified: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.ui/src/main/java/org/apache/geronimo/st/v30/ui/sections/AbstractTableSection.java
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.ui/src/main/java/org/apache/geronimo/st/v30/ui/sections/AbstractTableSection.java?rev=1132874&r1=1132873&r2=1132874&view=diff
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.ui/src/main/java/org/apache/geronimo/st/v30/ui/sections/AbstractTableSection.java
(original)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.ui/src/main/java/org/apache/geronimo/st/v30/ui/sections/AbstractTableSection.java
Tue Jun  7 06:26:44 2011
@@ -83,10 +83,12 @@ public abstract class AbstractTableSecti
         table.setLayout(tableLayout);
 
         sortListener = new SortListener(table, COLUMN_NAMES);
-        for (int i = 0; i < getTableColumnNames().length; i++) {
+        String[] columnNames = getTableColumnNames();
+        for (int i = 0; i < columnNames.length; i++) {
             tableLayout.addColumnData(new ColumnWeightData(35));
             TableColumn tableColumn = new TableColumn(table, SWT.NONE);
-            tableColumn.setText(getTableColumnNames()[i]);
+            tableColumn.setText(columnNames[i]);
+            tableColumn.setToolTipText(columnNames[i]);
             tableColumn.addListener(SWT.Selection, sortListener);
         }
 

Modified: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.ui/src/main/java/org/apache/geronimo/st/v30/ui/sections/ServerEditorSecuritySection.java
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.ui/src/main/java/org/apache/geronimo/st/v30/ui/sections/ServerEditorSecuritySection.java?rev=1132874&r1=1132873&r2=1132874&view=diff
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.ui/src/main/java/org/apache/geronimo/st/v30/ui/sections/ServerEditorSecuritySection.java
(original)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.ui/src/main/java/org/apache/geronimo/st/v30/ui/sections/ServerEditorSecuritySection.java
Tue Jun  7 06:26:44 2011
@@ -70,52 +70,14 @@ public class ServerEditorSecuritySection
 
         FormToolkit toolkit = getFormToolkit(parent.getDisplay());
 
-        Section section = toolkit.createSection(parent,
-                ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED
-                        | ExpandableComposite.TITLE_BAR 
-                        | ExpandableComposite.FOCUS_TITLE);
+        Section section = toolkit.createSection(parent, ExpandableComposite.TWISTIE
+                | ExpandableComposite.EXPANDED
+                | ExpandableComposite.TITLE_BAR
+                | Section.DESCRIPTION | ExpandableComposite.FOCUS_TITLE);
 
         section.setText(Messages.editorSectionSecurityTitle);
-    //  section.setDescription(Messages.editorSectionSecurityDescription);
+        section.setDescription(Messages.editorSectionSecurityDescription);
         section.setLayoutData(new GridData(SWT.FILL, SWT.FILL, false, false));
-
-        Composite textComposite = toolkit.createComposite(section);
-        GridLayout gridLayout = new GridLayout();
-        gridLayout.numColumns = 2;
-        textComposite.setLayout(gridLayout);
-        textComposite.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false));
-        section.setDescriptionControl(textComposite);
-        //text
-        Label label = toolkit.createLabel(textComposite, Messages.editorSectionSecurityDescription);
-        
-        // Button for managing account
-        Button manageAccountButton = toolkit.createButton(textComposite, CommonMessages.manageAccount,
SWT.PUSH);
-        GridData buttonData = new GridData(SWT.LEFT, SWT.CENTER, false, false);
-        manageAccountButton.setLayoutData(buttonData);
-        manageAccountButton.addSelectionListener(new SelectionAdapter() {
-            public void widgetSelected(SelectionEvent e) {
-                // if the server is started and local host, then we can bring up the dialog
-                if (!isLocalHost())
-                    MessageDialog.openError(Display.getCurrent().getActiveShell(), CommonMessages.errorOpenWizard,
CommonMessages.isNotLocalHost);
-                else 
-                {
-                    GeronimoAccountManager manager = new GeronimoAccountManager(server.getRuntime());
-                    try {
-                        manager.init();
-                    } catch (Exception e1) {
-                        MessageDialog.openError(Display.getCurrent().getActiveShell(), CommonMessages.errorOpenWizard,
CommonMessages.cannotRead);
-                        Trace.trace(Trace.ERROR, "Properties file containing user information
can't be read!", e1, Activator.logSections);
-                        return;
-                    }
-                    ManageAccountWizard wizard = new ManageAccountWizard(manager);
-                    WizardDialog dialog = new WizardDialog(Display.getCurrent().getActiveShell(),
wizard);
-                    dialog.open();
-                    if (dialog.getReturnCode() == Dialog.OK) {
-                    }
-                } 
-            }
-
-        });
         
         Composite composite = toolkit.createComposite(section);
         GridLayout layout = new GridLayout();
@@ -127,7 +89,7 @@ public class ServerEditorSecuritySection
         composite.setLayout(layout);
         composite.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false));
         section.setClient(composite);
-
+        
         // ------- Label and text field for the username -------
         createLabel(composite, Messages.username, toolkit);
         username = toolkit.createText(composite, getUserName(), SWT.BORDER);
@@ -148,6 +110,34 @@ public class ServerEditorSecuritySection
                 execute(new SetPasswordCommand(server, password.getText()));
             }
         });
+        // ----- Button manage account -----
+        Button manageAccountButton = toolkit.createButton(composite, CommonMessages.manageAccount,
SWT.PUSH);
+        GridData buttonData = new GridData(SWT.LEFT, SWT.CENTER, false, false);
+        manageAccountButton.setLayoutData(buttonData);
+        manageAccountButton.addSelectionListener(new SelectionAdapter() {
+            public void widgetSelected(SelectionEvent e) {
+                // if the server is started and local host, then we can bring up the dialog
+                if (!isLocalHost())
+                    MessageDialog.openError(Display.getCurrent().getActiveShell(), CommonMessages.errorOpenWizard,
CommonMessages.isNotLocalHost);
+                else 
+                {
+                    GeronimoAccountManager manager = new GeronimoAccountManager(server.getRuntime());
+                    try {
+                        manager.init();
+                    } catch (Exception e1) {
+                        MessageDialog.openError(Display.getCurrent().getActiveShell(), CommonMessages.errorOpenWizard,
CommonMessages.cannotRead);
+                        Trace.trace(Trace.ERROR, "Properties file containing user information
can't be read!", e1, Activator.logSections);
+                        return;
+                    }
+                    ManageAccountWizard wizard = new ManageAccountWizard(manager);
+                    WizardDialog dialog = new WizardDialog(Display.getCurrent().getActiveShell(),
wizard);
+                    dialog.open();
+                    if (dialog.getReturnCode() == Dialog.OK) {
+                    }
+                } 
+            }
+
+        });
     }
 
     private String getUserName() {



Mime
View raw message