Browse files

[390583] [Accessibility] Run on server table columns cannot be resized

with keyboard only
  • Loading branch information...
1 parent 6b0aa46 commit 2f0e6af0a43783fbe2bf5d88ffae54ec739442bd @sghung sghung committed Mar 19, 2013
View
3 plugins/org.eclipse.wst.server.ui/serverui/org/eclipse/wst/server/ui/internal/Messages.java
@@ -1,5 +1,5 @@
/**********************************************************************
- * Copyright (c) 2005, 2012 IBM Corporation and others.
+ * Copyright (c) 2005, 2013 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -138,6 +138,7 @@
public static String actionRename;
public static String actionDelete;
public static String actionRemove;
+ public static String actionColumns;
public static String dialogRemoveModuleConfirm;
public static String dialogRemoveModulesConfirm;
public static String terminateServerDialogTitle;
View
3 ...org.eclipse.wst.server.ui/serverui/org/eclipse/wst/server/ui/internal/Messages.properties
@@ -1,5 +1,5 @@
###############################################################################
-# Copyright (c) 2004, 2012 IBM Corporation and others.
+# Copyright (c) 2004, 2013 IBM Corporation and others.
# All rights reserved. This program and the accompanying materials
# are made available under the terms of the Eclipse Public License v1.0
# which accompanies this distribution, and is available at
@@ -151,6 +151,7 @@ actionSwitchServerLocation=Switch Location
switchServerLocation=Location:
switchServerLocationMetadata=[workspace metadata]
actionRename=Re&name
+actionColumns=Columns...
# Status column text
viewStatusStarted=Started
View
15 ...ipse.wst.server.ui/serverui/org/eclipse/wst/server/ui/internal/RuntimePreferencePage.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2003, 2012 IBM Corporation and others.
+ * Copyright (c) 2003, 2013 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -19,8 +19,10 @@
import org.eclipse.jface.dialogs.ProgressMonitorDialog;
import org.eclipse.jface.operation.IRunnableWithProgress;
import org.eclipse.jface.preference.PreferencePage;
+import org.eclipse.jface.util.ConfigureColumns;
import org.eclipse.jface.viewers.ISelection;
import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.jface.window.IShellProvider;
import org.eclipse.jface.window.Window;
import org.eclipse.jface.wizard.WizardDialog;
import org.eclipse.swt.SWT;
@@ -45,7 +47,7 @@
/**
* The preference page that holds server runtimes.
*/
-public class RuntimePreferencePage extends PreferencePage implements IWorkbenchPreferencePage, IRuntimeLifecycleListener {
+public class RuntimePreferencePage extends PreferencePage implements IWorkbenchPreferencePage, IRuntimeLifecycleListener, IShellProvider {
protected Button edit;
protected Button remove;
protected Label pathLabel;
@@ -285,6 +287,15 @@ public void run(IProgressMonitor monitor2) {
}
});
+ Button columnsButton = SWTUtil.createButton(buttonComp, Messages.actionColumns);
+ data = (GridData) columnsButton.getLayoutData();
+ final RuntimePreferencePage thisClass = this;
+ columnsButton.addSelectionListener(new SelectionAdapter() {
+ public void widgetSelected(SelectionEvent e) {
+ ConfigureColumns.forTable(runtimeComp.getTable(), thisClass);
+ }
+ });
+
pathLabel = new Label(parent, SWT.NONE);
pathLabel.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
View
4 ....server.ui/serverui/org/eclipse/wst/server/ui/internal/viewers/AbstractTreeComposite.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2003, 2011 IBM Corporation and others.
+ * Copyright (c) 2003, 2013 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -104,7 +104,7 @@ public void doubleClick(DoubleClickEvent event) {
Point p = description.computeSize(SWT.DEFAULT, SWT.DEFAULT);
description.setText("");
data = new GridData(GridData.FILL_HORIZONTAL | GridData.VERTICAL_ALIGN_CENTER);
- data.horizontalSpan = 2;
+ data.horizontalSpan = 1;
if (p.y > 10)
data.heightHint = p.y;
else
View
6 ...e.wst.server.ui/serverui/org/eclipse/wst/server/ui/internal/viewers/RuntimeComposite.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2003, 2007 IBM Corporation and others.
+ * Copyright (c) 2003, 2013 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -168,4 +168,8 @@ protected void createTableViewer() {
public IRuntime getSelectedRuntime() {
return selection;
}
+
+ public Table getTable(){
+ return table;
+ }
}
View
28 ...se.wst.server.ui/serverui/org/eclipse/wst/server/ui/internal/viewers/ServerComposite.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2003, 2012 IBM Corporation and others.
+ * Copyright (c) 2003, 2013 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -21,13 +21,18 @@
import org.eclipse.jface.viewers.LabelProviderChangedEvent;
import org.eclipse.jface.viewers.SelectionChangedEvent;
import org.eclipse.jface.viewers.StructuredSelection;
+import org.eclipse.jface.window.IShellProvider;
+import org.eclipse.jface.util.ConfigureColumns;
import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.SelectionAdapter;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.Tree;
import org.eclipse.swt.widgets.TreeColumn;
+import org.eclipse.swt.widgets.Button;
import org.eclipse.ui.dialogs.FilteredTree;
-
import org.eclipse.wst.server.core.IModule;
import org.eclipse.wst.server.core.IServer;
import org.eclipse.wst.server.ui.internal.Messages;
@@ -36,7 +41,7 @@
/**
*
*/
-public class ServerComposite extends AbstractTreeComposite {
+public class ServerComposite extends AbstractTreeComposite implements IShellProvider {
protected IServer selection;
protected ServerSelectionListener listener;
protected ServerTreeContentProvider contentProvider;
@@ -172,4 +177,21 @@ public void run() {
job.setPriority(Job.SHORT);
job.schedule();
}
+
+ protected void createWidgets() {
+ super.createWidgets();
+
+ Button columnsButton = new Button(this, SWT.PUSH);
+ columnsButton.setText(Messages.actionColumns);
+ final ServerComposite myClass = this;
+ columnsButton.addSelectionListener(new SelectionAdapter() {
+ public void widgetSelected(SelectionEvent e) {
+ ConfigureColumns.forTree(treeViewer.getTree(), myClass);
+ }
+ });
+
+ GridData data = new GridData(GridData.VERTICAL_ALIGN_BEGINNING);
+ data.horizontalSpan = 1;
+ columnsButton.setLayoutData(data);
+ }
}

0 comments on commit 2f0e6af

Please sign in to comment.