1 package com.quantum.view.tableview;
3 import java.sql.SQLException;
5 import com.quantum.ImageStore;
6 import com.quantum.Messages;
7 import com.quantum.sql.SQLResultSetResults;
8 import com.quantum.sql.Scrollable;
10 import org.eclipse.jface.viewers.ISelectionProvider;
11 import org.eclipse.jface.viewers.IStructuredSelection;
12 import org.eclipse.ui.IViewPart;
18 public class FullModeAction extends ResultSetAction {
22 * @param selectionProvider
24 public FullModeAction(IViewPart view, ISelectionProvider selectionProvider) {
25 super(view, selectionProvider);
26 setText(Messages.getString(getClass(), "text"));
27 setImageDescriptor(ImageStore.getImageDescriptor(ImageStore.FULLDATA));
28 setToolTipText(Messages.getString(getClass(), "text"));
31 protected void executeResultSetAction(SQLResultSetResults results) throws SQLException {
32 ((Scrollable) results).setFullMode(!((Scrollable) results).isFullMode());
33 results.refresh(getConnection(results));
37 protected boolean updateSelection(IStructuredSelection selection) {
38 return super.updateSelection(selection)
39 && (selection.getFirstElement() instanceof Scrollable);