public static void setFormLayout( Composite composite, int margin ) { FormLayout formLayout = new FormLayout(); formLayout.marginWidth = margin; formLayout.marginHeight = margin; composite.setLayout( formLayout ); }
w = Math.max (computeWidth (child, data, flushCache), w); h = Math.max (computeHeight (child, data, flushCache), h);
/** * Returns a string containing a concise, human-readable * description of the receiver. * * @return a string representation of the layout */ public String toString () { String string = getName ()+" {"; if (marginWidth != 0) string += "marginWidth="+marginWidth+" "; if (marginHeight != 0) string += "marginHeight="+marginHeight+" "; if (marginLeft != 0) string += "marginLeft="+marginLeft+" "; if (marginRight != 0) string += "marginRight="+marginRight+" "; if (marginTop != 0) string += "marginTop="+marginTop+" "; if (marginBottom != 0) string += "marginBottom="+marginBottom+" "; if (spacing != 0) string += "spacing="+spacing+" "; string = string.trim(); string += "}"; return string; } }
w = Math.max (computeWidth (child, data, flushCache), w); h = Math.max (computeHeight (child, data, flushCache), h);
/** * Returns a string containing a concise, human-readable * description of the receiver. * * @return a string representation of the layout */ @Override public String toString () { String string = getName ()+" {"; if (marginWidth != 0) string += "marginWidth="+marginWidth+" "; if (marginHeight != 0) string += "marginHeight="+marginHeight+" "; if (marginLeft != 0) string += "marginLeft="+marginLeft+" "; if (marginRight != 0) string += "marginRight="+marginRight+" "; if (marginTop != 0) string += "marginTop="+marginTop+" "; if (marginBottom != 0) string += "marginBottom="+marginBottom+" "; if (spacing != 0) string += "spacing="+spacing+" "; string = string.trim(); string += "}"; return string; } }
public VfsFileChooserControls( VariableSpace space, Composite composite, int i, ModifyListener lsMod ) { super( composite, i ); this.space = space; this.lsMod = lsMod; FormLayout noMarginLayout = new FormLayout(); noMarginLayout.marginWidth = 0; noMarginLayout.marginHeight = 0; noMarginLayout.marginTop = 0; noMarginLayout.marginBottom = 0; this.setLayout( noMarginLayout ); addFileWidgets(); }
w = Math.max (computeWidth (child, data, flushCache), w); h = Math.max (computeHeight (child, data, flushCache), h);
/** * Returns a string containing a concise, human-readable * description of the receiver. * * @return a string representation of the layout */ public String toString () { String string = getName ()+" {"; if (marginWidth != 0) string += "marginWidth="+marginWidth+" "; if (marginHeight != 0) string += "marginHeight="+marginHeight+" "; if (marginLeft != 0) string += "marginLeft="+marginLeft+" "; if (marginRight != 0) string += "marginRight="+marginRight+" "; if (marginTop != 0) string += "marginTop="+marginTop+" "; if (marginBottom != 0) string += "marginBottom="+marginBottom+" "; if (spacing != 0) string += "spacing="+spacing+" "; string = string.trim(); string += "}"; return string; } }
protected void mainLayout( Class<?> PKG, String prefix, Image img ) { display = parent.getDisplay(); shell = new Shell( parent, SWT.DIALOG_TRIM | SWT.MIN | SWT.APPLICATION_MODAL ); props.setLook( shell ); shell.setImage( img ); shell.setLayout( new FormLayout() ); shell.setText( BaseMessages.getString( PKG, prefix + ".Shell.Title" ) ); }
w = Math.max (computeWidth (child, data, flushCache), w); h = Math.max (computeHeight (child, data, flushCache), h);
/** * Returns a string containing a concise, human-readable * description of the receiver. * * @return a string representation of the layout */ @Override public String toString () { String string = getName ()+" {"; if (marginWidth != 0) string += "marginWidth="+marginWidth+" "; if (marginHeight != 0) string += "marginHeight="+marginHeight+" "; if (marginLeft != 0) string += "marginLeft="+marginLeft+" "; if (marginRight != 0) string += "marginRight="+marginRight+" "; if (marginTop != 0) string += "marginTop="+marginTop+" "; if (marginBottom != 0) string += "marginBottom="+marginBottom+" "; if (spacing != 0) string += "spacing="+spacing+" "; string = string.trim(); string += "}"; return string; } }
props.setLook( composite ); FormLayout compLayout = new FormLayout(); compLayout.marginHeight = Const.FORM_MARGIN; compLayout.marginWidth = Const.FORM_MARGIN;
w = Math.max (computeWidth (child, data, flushCache), w); h = Math.max (computeHeight (child, data, flushCache), h);
/** * Returns a string containing a concise, human-readable * description of the receiver. * * @return a string representation of the layout */ @Override public String toString () { String string = getName ()+" {"; if (marginWidth != 0) string += "marginWidth="+marginWidth+" "; if (marginHeight != 0) string += "marginHeight="+marginHeight+" "; if (marginLeft != 0) string += "marginLeft="+marginLeft+" "; if (marginRight != 0) string += "marginRight="+marginRight+" "; if (marginTop != 0) string += "marginTop="+marginTop+" "; if (marginBottom != 0) string += "marginBottom="+marginBottom+" "; if (spacing != 0) string += "spacing="+spacing+" "; string = string.trim(); string += "}"; return string; } }
props.setLook( composite ); FormLayout formLayout = new FormLayout(); formLayout.marginWidth = Const.FORM_MARGIN; formLayout.marginHeight = Const.FORM_MARGIN;
w = Math.max (computeWidth (child, data, flushCache), w); h = Math.max (computeHeight (child, data, flushCache), h);
/** * Returns a string containing a concise, human-readable * description of the receiver. * * @return a string representation of the layout */ @Override public String toString () { String string = getName ()+" {"; if (marginWidth != 0) string += "marginWidth="+marginWidth+" "; if (marginHeight != 0) string += "marginHeight="+marginHeight+" "; if (marginLeft != 0) string += "marginLeft="+marginLeft+" "; if (marginRight != 0) string += "marginRight="+marginRight+" "; if (marginTop != 0) string += "marginTop="+marginTop+" "; if (marginBottom != 0) string += "marginBottom="+marginBottom+" "; if (spacing != 0) string += "spacing="+spacing+" "; string = string.trim(); string += "}"; return string; } }
props.setLook( composite ); FormLayout compLayout = new FormLayout(); compLayout.marginHeight = Const.FORM_MARGIN; compLayout.marginWidth = Const.FORM_MARGIN;
props.setLook( composite ); FormLayout compLayout = new FormLayout(); compLayout.marginHeight = Const.FORM_MARGIN; compLayout.marginWidth = Const.FORM_MARGIN;
public LabelText( Composite composite, int textStyle, String labelText, String toolTipText, int middle, int margin ) { super( composite, SWT.NONE ); props.setLook( this ); FormLayout formLayout = new FormLayout(); formLayout.marginWidth = 0; formLayout.marginHeight = 0; this.setLayout( formLayout ); wText = new Text( this, textStyle ); FormData fdText = new FormData(); fdText.left = new FormAttachment( middle, margin ); fdText.right = new FormAttachment( 100, 0 ); wText.setLayoutData( fdText ); wText.setToolTipText( toolTipText ); wLabel = new Label( this, SWT.RIGHT ); props.setLook( wLabel ); wLabel.setText( labelText ); FormData fdLabel = new FormData(); fdLabel.left = new FormAttachment( 0, 0 ); fdLabel.right = new FormAttachment( middle, 0 ); fdLabel.top = new FormAttachment( wText, 0, SWT.CENTER ); wLabel.setLayoutData( fdLabel ); wLabel.setToolTipText( toolTipText ); }