public void apply() { control.setLayoutData( fd ); } }
/** * setter for the input * * @param input */ public void setInput( C input ) { this.input = input; this.input.setLayoutData( getInputFD() ); }
private void addLabelBelow( Control label, Control widgetAbove ) { props.setLook( label ); FormData fData = new FormData(); fData.top = new FormAttachment( widgetAbove, Const.MARGIN ); fData.right = new FormAttachment( Const.MIDDLE_PCT, -Const.MARGIN ); label.setLayoutData( fData ); }
private void addLabelAfter( Control widget, Control widgetAbove ) { props.setLook( widget ); FormData fData = new FormData(); fData.top = new FormAttachment( widgetAbove, Const.MARGIN ); fData.right = new FormAttachment( Const.MIDDLE_PCT, -Const.MARGIN ); widget.setLayoutData( fData ); }
private void addWidgetAfter( Control widget, Control widgetAbove, Control widgetLeft ) { props.setLook( widget ); FormData fData = new FormData(); fData.left = new FormAttachment( widgetLeft, Const.MARGIN ); fData.top = new FormAttachment( widgetAbove, Const.MARGIN ); fData.right = new FormAttachment( 100, -Const.MARGIN ); widget.setLayoutData( fData ); }
protected Input( VariableSpace space, Composite composite, int width1, int width2 ) { super( composite, SWT.NONE ); WidgetUtils.setFormLayout( this, 0 ); label = new Label( this, SWT.LEFT ); initText( space, composite, SWT.LEFT | SWT.SINGLE | SWT.BORDER ); input.setLayoutData( new FormDataBuilder().top( label ).left().right( width1, width2 ).result() ); }
private void addControlBelow( Control control, Control widgetAbove ) { props.setLook( control ); FormData fData = new FormData(); fData.top = new FormAttachment( widgetAbove, Const.MARGIN ); fData.left = new FormAttachment( Const.MIDDLE_PCT, Const.MARGIN ); fData.right = new FormAttachment( 100, -Const.MARGIN ); control.setLayoutData( fData ); }
private void placeControl( Shell pShell, String text, Control control, Control under ) { int middle = props.getMiddlePct(); int margin = Const.MARGIN; Label label = new Label( pShell, SWT.RIGHT ); label.setText( text ); props.setLook( label ); FormData formDataLabel = new FormData(); formDataLabel.left = new FormAttachment( 0, 0 ); if ( under != null ) { formDataLabel.top = new FormAttachment( under, margin ); } else { formDataLabel.top = new FormAttachment( 0, 0 ); } formDataLabel.right = new FormAttachment( middle, 0 ); label.setLayoutData( formDataLabel ); props.setLook( control ); FormData formDataControl = new FormData(); formDataControl.left = new FormAttachment( middle, 0 ); if ( under != null ) { formDataControl.top = new FormAttachment( under, margin ); } else { formDataControl.top = new FormAttachment( 0, 0 ); } formDataControl.right = new FormAttachment( 100, 0 ); control.setLayoutData( formDataControl ); }
props.setLook( toolbarControl ); toolbarControl.setLayoutData( new FormData() ); FormData fdToolbar = new FormData(); fdToolbar.left = new FormAttachment( 0, 0 ); // First one in the left top corner fdToolbar.top = new FormAttachment( 0, 0 ); fdToolbar.right = new FormAttachment( 100, 0 ); toolbarControl.setLayoutData( fdToolbar ); toolbarControl.setParent( shell );
toolbarControl.setLayoutData( new FormData() ); FormData fd = new FormData(); fd.left = new FormAttachment( 0, 0 ); // First one in the left top corner fd.top = new FormAttachment( 0, 0 ); fd.right = new FormAttachment( 100, 0 ); toolbarControl.setLayoutData( fd );
toolbarControl.setLayoutData( new FormData() ); FormData fd = new FormData(); fd.left = new FormAttachment( 0, 0 ); // First one in the left top corner fd.top = new FormAttachment( 0, 0 ); fd.right = new FormAttachment( 100, 0 ); toolbarControl.setLayoutData( fd );
toolbarControl.setLayoutData( new FormData() ); FormData fd = new FormData(); fd.left = new FormAttachment( 0, 0 ); // First one in the left top corner fd.top = new FormAttachment( 0, 0 ); fd.right = new FormAttachment( 100, 0 ); toolbarControl.setLayoutData( fd );
toolbarControl.setLayoutData( new FormData() ); FormData fd = new FormData(); fd.left = new FormAttachment( 0, 0 ); // First one in the left top corner fd.top = new FormAttachment( 0, 0 ); fd.right = new FormAttachment( 100, 0 ); toolbarControl.setLayoutData( fd );
toolbarControl.setLayoutData( new FormData() ); FormData fd = new FormData(); fd.left = new FormAttachment( 0, 0 ); // First one in the left top corner fd.top = new FormAttachment( 0, 0 ); fd.right = new FormAttachment( 100, 0 ); toolbarControl.setLayoutData( fd );
protected void addToolBar() { try { XulLoader loader = new KettleXulLoader(); loader.setSettingsManager( XulSpoonSettingsManager.getInstance() ); ResourceBundle bundle = GlobalMessages.getBundle( "org/pentaho/di/ui/spoon/messages/messages" ); XulDomContainer xulDomContainer = loader.loadXul( XUL_FILE_BROWSER_TOOLBAR, bundle ); xulDomContainer.addEventHandler( this ); toolbar = (XulToolbar) xulDomContainer.getDocumentRoot().getElementById( "nav-toolbar" ); @SuppressWarnings( "unused" ) ToolBar swtToolBar = (ToolBar) toolbar.getManagedObject(); spoon.props.setLook( swtToolBar, Props.WIDGET_STYLE_TOOLBAR ); // Add a URL back = (XulToolbarbutton) toolbar.getElementById( "browse-back" ); back.setDisabled( true ); forward = (XulToolbarbutton) toolbar.getElementById( "browse-forward" ); forward.setLabel( BaseMessages.getString( PKG, "SpoonBrowser.Dialog.Forward" ) ); forward.setDisabled( false ); location = (XulTextbox) toolbar.getElementById( "browser-address" ); Control toolbarControl = (Control) toolbar.getManagedObject(); toolbarControl.setLayoutData( new FormData() ); toolbarControl.setParent( composite ); } catch ( Exception e ) { e.printStackTrace(); new ErrorDialog( shell, BaseMessages.getString( PKG, "Spoon.Exception.ErrorReadingXULFile.Title" ), BaseMessages .getString( PKG, "Spoon.Exception.ErrorReadingXULFile.Message", XUL_FILE_BROWSER_TOOLBAR ), e ); } }
toolbarFd.right = new FormAttachment( 100, 0 ); toolbarControl.setLayoutData( toolbarFd ); toolbarControl.setParent( this );
toolbarFd.right = new FormAttachment( 100, 0 ); toolbarControl.setLayoutData( toolbarFd ); toolbarControl.setParent( this );
toolbarControl.setLayoutData( new FormData() ); FormData fd = new FormData(); fd.left = new FormAttachment( 0, 0 ); // First one in the left top corner fd.top = new FormAttachment( 0, 0 ); fd.right = new FormAttachment( 100, 0 ); toolbarControl.setLayoutData( fd );
public void setLayoutData( GridData gd ) { label.setLayoutData( gd ); }
/** * {@inheritDoc} */ @Override public void restoreMaximization() { for (ISubView view : getSubViews()) { view.getControl().setLayoutData(layoutDataMap.get(view)); } layout(); }