Skip to content

Commit

Permalink
TEIIDDES-2881
Browse files Browse the repository at this point in the history
 * replaced top, bottom, swap with icons
 * increased width of sort and type resolver buttons
  • Loading branch information
blafond committed Feb 2, 2017
1 parent 3899a3a commit cb91932
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 23 deletions.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -265,12 +265,9 @@ ReconcilerObject.statusMessage.noSqlProjectedSymbols=The SQL statement has no pr
ReconcilerObject.newColumnDialog.title=Create New Column

BindingsTablePanel.lockedCheckbox.text=Target Locked
BindingsTablePanel.upAttrButton.text=Up
BindingsTablePanel.downAttrButton.text=Down
BindingsTablePanel.swapAttrButton.text=Swap
BindingsTablePanel.topAttrButton.text=Top
BindingsTablePanel.bottomAttrButton.text=Bottom
BindingsTablePanel.deleteAttrButton.text=Delete
BindingsTablePanel.topButton.tooltip=Move selected to top
BindingsTablePanel.bottomButton.tooltip=Move selected to bottom
BindingsTablePanel.swapButton.tooltip=Swap selected columns
BindingsTablePanel.resolveTypeButton.text=Type Resolver...
BindingsTablePanel.datatype.note=Note: The data types shown are the runtime data types.
BindingsTablePanel.table.title=Column - SQL Bindings
Expand Down Expand Up @@ -1258,3 +1255,5 @@ TeiidMetadataImportDataSourcePage.noServerDefined=A data source cannot be create
Please start server {0} and re-launch this importer
TeiidMetadataImportDataSourcePage.serverNotStarted=A data source cannot be created unless connected to a server\n\n\
Please define and start a server then re-launch this importer

#TableOrViewSelectionValidator.invalidSelectionMessage=Must select existing table or view
Original file line number Diff line number Diff line change
Expand Up @@ -67,18 +67,15 @@ public class BindingsTablePanel extends Composite {
private static final int LABEL_GRID_STYLE = GridData.HORIZONTAL_ALIGN_BEGINNING;

private static final String LOCKED_CHECKBOX_TEXT = UiConstants.Util.getString("BindingsTablePanel.lockedCheckbox.text"); //$NON-NLS-1$
private static final String UP_ATTR_BUTTON_TEXT = UiConstants.Util.getString("BindingsTablePanel.upAttrButton.text"); //$NON-NLS-1$
private static final String DOWN_ATTR_BUTTON_TEXT = UiConstants.Util.getString("BindingsTablePanel.downAttrButton.text"); //$NON-NLS-1$
private static final String SWAP_ATTR_BUTTON_TEXT = UiConstants.Util.getString("BindingsTablePanel.swapAttrButton.text"); //$NON-NLS-1$
private static final String TOP_ATTR_BUTTON_TEXT = UiConstants.Util.getString("BindingsTablePanel.topAttrButton.text"); //$NON-NLS-1$
private static final String BOTTOM_ATTR_BUTTON_TEXT = UiConstants.Util.getString("BindingsTablePanel.bottomAttrButton.text"); //$NON-NLS-1$
private static final String DELETE_ATTR_BUTTON_TEXT = UiConstants.Util.getString("BindingsTablePanel.deleteAttrButton.text"); //$NON-NLS-1$
private static final String RESOLVE_TYPE_BUTTON_TEXT = UiConstants.Util.getString("BindingsTablePanel.resolveTypeButton.text"); //$NON-NLS-1$
private static final String BINDINGS_TABLE_TITLE_TEXT = UiConstants.Util.getString("BindingsTablePanel.table.title"); //$NON-NLS-1$
private static final String BINDINGS_TABLE_DATAYPE_NOTE_TEXT = UiConstants.Util.getString("BindingsTablePanel.datatype.note"); //$NON-NLS-1$
private static final String BINDINGS_TABLE_ATTR_COL_TEXT = UiConstants.Util.getString("BindingsTablePanel.attrCol.title"); //$NON-NLS-1$
private static final String BINDINGS_TABLE_SQL_COL_TEXT = UiConstants.Util.getString("BindingsTablePanel.sqlColumn.title"); //$NON-NLS-1$
private static final String DATATYPE_RECONCILER_DIALOG_TITLE = UiConstants.Util.getString("DatatypeReconciler.title.text"); //$NON-NLS-1$
private static final String TOP_BUTTON_TOOLTIP = UiConstants.Util.getString("BindingsTablePanel.topButton.tooltip"); //$NON-NLS-1$
private static final String SWAP_BUTTON_TOOLTIP = UiConstants.Util.getString("BindingsTablePanel.swapButton.tooltip"); //$NON-NLS-1$
private static final String BOTTOM_BUTTON_TOOLTIP = UiConstants.Util.getString("BindingsTablePanel.bottomButton.tooltip"); //$NON-NLS-1$

// Set the table column property names
private final String ATTRIBUTE_COLUMN = "attribute"; //$NON-NLS-1$
Expand Down Expand Up @@ -218,9 +215,10 @@ private void createControlButtonPanel() {
GridData gridData = new GridData(GridData.HORIZONTAL_ALIGN_BEGINNING);
buttonComposite.setLayoutData(gridData);

topButton = WidgetFactory.createButton(buttonComposite, TOP_ATTR_BUTTON_TEXT, BUTTON_GRID_STYLE);
topButton = WidgetFactory.createButton(buttonComposite, /*TOP_ATTR_BUTTON_TEXT,*/ BUTTON_GRID_STYLE);
topButton.setImage(UiPlugin.getDefault().getImage(UiConstants.Images.TOP_ICON));
topButton.setToolTipText(TOP_BUTTON_TOOLTIP);
topButton.setEnabled(!isReadOnly);
GridDataFactory.swtDefaults().hint(32, 28).grab(true, true).applyTo(topButton);
topButton.addSelectionListener(new SelectionAdapter() {
@Override
public void widgetSelected( final SelectionEvent event ) {
Expand All @@ -238,9 +236,10 @@ public void widgetSelected( final SelectionEvent event ) {
}
});

swapButton = WidgetFactory.createButton(buttonComposite, SWAP_ATTR_BUTTON_TEXT, BUTTON_GRID_STYLE);
swapButton = WidgetFactory.createButton(buttonComposite, /*SWAP_ATTR_BUTTON_TEXT,*/ BUTTON_GRID_STYLE);
swapButton.setImage(UiPlugin.getDefault().getImage(UiConstants.Images.SWAP_ICON));
swapButton.setToolTipText(SWAP_BUTTON_TOOLTIP);
swapButton.setEnabled(!isReadOnly);
GridDataFactory.swtDefaults().hint(38, 28).grab(true, true).applyTo(swapButton);
swapButton.addSelectionListener(new SelectionAdapter() {
@Override
public void widgetSelected( final SelectionEvent event ) {
Expand All @@ -258,9 +257,10 @@ public void widgetSelected( final SelectionEvent event ) {
}
});

bottomButton = WidgetFactory.createButton(buttonComposite, BOTTOM_ATTR_BUTTON_TEXT, BUTTON_GRID_STYLE);
bottomButton = WidgetFactory.createButton(buttonComposite, /*BOTTOM_ATTR_BUTTON_TEXT,*/ BUTTON_GRID_STYLE);
bottomButton.setImage(UiPlugin.getDefault().getImage(UiConstants.Images.BOTTOM_ICON));
bottomButton.setToolTipText(BOTTOM_BUTTON_TOOLTIP);
bottomButton.setEnabled(!isReadOnly);
GridDataFactory.swtDefaults().hint(52, 28).grab(true, true).applyTo(bottomButton);
bottomButton.addSelectionListener(new SelectionAdapter() {
@Override
public void widgetSelected( final SelectionEvent event ) {
Expand All @@ -280,7 +280,7 @@ public void widgetSelected( final SelectionEvent event ) {

resolveTypeButton = WidgetFactory.createButton(buttonComposite, RESOLVE_TYPE_BUTTON_TEXT, BUTTON_GRID_STYLE);
resolveTypeButton.setEnabled(!isReadOnly);
GridDataFactory.swtDefaults().hint(90, 28).grab(true, true).applyTo(resolveTypeButton);
GridDataFactory.swtDefaults().hint(110, 28).grab(true, true).applyTo(resolveTypeButton);
resolveTypeButton.addSelectionListener(new SelectionAdapter() {
@Override
public void widgetSelected( final SelectionEvent event ) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,6 @@ private void createControlButtonPanel() {
GridData gridData = new GridData(GridData.HORIZONTAL_ALIGN_BEGINNING);
buttonComposite.setLayoutData(gridData);
addButton = WidgetFactory.createButton(buttonComposite, BUTTON_GRID_STYLE);
// UiConstants.Util.getString("SqlTablePanel.addButton.text"), BUTTON_GRID_STYLE); //$NON-NLS-1$
addButton.setImage(UiPlugin.getDefault().getImage(UiConstants.Images.ADD_ICON));
addButton.addSelectionListener(new SelectionAdapter() {
@Override
Expand All @@ -159,7 +158,6 @@ public void widgetSelected( final SelectionEvent event ) {
}
});
removeButton = WidgetFactory.createButton(buttonComposite, BUTTON_GRID_STYLE);
//UiConstants.Util.getString("SqlTablePanel.removeSqlButton.text"), BUTTON_GRID_STYLE); //$NON-NLS-1$
removeButton.setImage(UiPlugin.getDefault().getImage(UiConstants.Images.REMOVE_ICON));
removeButton.addSelectionListener(new SelectionAdapter() {
@Override
Expand All @@ -168,7 +166,6 @@ public void widgetSelected( final SelectionEvent event ) {
}
});
clearButton = WidgetFactory.createButton(buttonComposite, BUTTON_GRID_STYLE);
// UiConstants.Util.getString("SqlTablePanel.clearButton.text"), BUTTON_GRID_STYLE); //$NON-NLS-1$
clearButton.setImage(UiPlugin.getDefault().getImage(UiConstants.Images.CLEAR_ICON));
clearButton.setToolTipText(UiConstants.Util.getString("SqlTablePanel.clearButton.text"));
clearButton.addSelectionListener(new SelectionAdapter() {
Expand All @@ -180,7 +177,7 @@ public void widgetSelected( final SelectionEvent event ) {

// jh Defect 21404: Add sort button
sortButton = WidgetFactory.createButton(buttonComposite, SORT_BUTTON_TEXT, BUTTON_GRID_STYLE);
GridDataFactory.swtDefaults().hint(36, 28).grab(true, true).applyTo(sortButton);
GridDataFactory.swtDefaults().hint(60, 28).grab(true, true).applyTo(sortButton);
sortButton.addSelectionListener(new SelectionAdapter() {
@Override
public void widgetSelected( final SelectionEvent event ) {
Expand Down

0 comments on commit cb91932

Please sign in to comment.