/** * Return the margin right as specified in the stylesheet for this control, * or the defaultValue if none is specified. * * @param defaultValue * @return the margin in pixels */ public int getMarginRight(int defaultValue) { if (style == null) return defaultValue; return getPxValue( style.getPropertyCSSValue("margin-right"), defaultValue); //$NON-NLS-1$ }
/** * Create a CSSEngineHelper that can retrieve engine values for a particular * control. * * @param context * @param control */ public CSSEngineHelper(IEclipseContext context, Control control) { this.context = context; this.control = control; initialize(); }
CSSEngineHelper helper = new CSSEngineHelper(localContext, wbwShell); TrimmedPartLayout tl = new TrimmedPartLayout(wbwShell); tl.gutterTop = helper.getMarginTop(0); tl.gutterBottom = helper.getMarginBottom(0); tl.gutterLeft = helper.getMarginLeft(0); tl.gutterRight = helper.getMarginRight(0);
CSSEngineHelper helper = new CSSEngineHelper(localContext, wbwShell); TrimmedPartLayout tl = new TrimmedPartLayout(wbwShell); tl.gutterTop = helper.getMarginTop(0); tl.gutterBottom = helper.getMarginBottom(0); tl.gutterLeft = helper.getMarginLeft(0); tl.gutterRight = helper.getMarginRight(0);
/** * Return the margin top as specified in the stylesheet for this control, or * the defaultValue if none is specified. * * @param defaultValue * @return the margin in pixels */ public int getMarginTop(int defaultValue) { if (style == null) return defaultValue; return getPxValue(style.getPropertyCSSValue("margin-top"), defaultValue); //$NON-NLS-1$ }
/** * Create a CSSEngineHelper that can retrieve engine values for a particular * control. * * @param context * @param control */ public CSSEngineHelper(IEclipseContext context, Control control) { this.context = context; this.control = control; initialize(); }
/** * Return the margin top as specified in the stylesheet for this control, or * the defaultValue if none is specified. * * @param defaultValue * @return the margin in pixels */ public int getMarginTop(int defaultValue) { if (style == null) return defaultValue; return getPxValue(style.getPropertyCSSValue("margin-top"), defaultValue); //$NON-NLS-1$ }
/** * Return the margin right as specified in the stylesheet for this control, * or the defaultValue if none is specified. * * @param defaultValue * @return the margin in pixels */ public int getMarginRight(int defaultValue) { if (style == null) return defaultValue; return getPxValue( style.getPropertyCSSValue("margin-right"), defaultValue); //$NON-NLS-1$ }
/** * Return the margin bottom as specified in the stylesheet for this control, * or the defaultValue if none is specified. * * @param defaultValue * @return the margin in pixels */ public int getMarginBottom(int defaultValue) { if (style == null) return defaultValue; return getPxValue( style.getPropertyCSSValue("margin-bottom"), defaultValue); //$NON-NLS-1$ }
/** * Return the margin bottom as specified in the stylesheet for this control, * or the defaultValue if none is specified. * * @param defaultValue * @return the margin in pixels */ public int getMarginBottom(int defaultValue) { if (style == null) return defaultValue; return getPxValue( style.getPropertyCSSValue("margin-bottom"), defaultValue); //$NON-NLS-1$ }
/** * Return the margin left as specified in the stylesheet for this control, * or the defaultValue if none is specified. * * @param defaultValue * @return the margin in pixels */ public int getMarginLeft(int defaultValue) { if (style == null) return defaultValue; return getPxValue( style.getPropertyCSSValue("margin-left"), defaultValue); //$NON-NLS-1$ }
/** * Return the margin left as specified in the stylesheet for this control, * or the defaultValue if none is specified. * * @param defaultValue * @return the margin in pixels */ public int getMarginLeft(int defaultValue) { if (style == null) return defaultValue; return getPxValue( style.getPropertyCSSValue("margin-left"), defaultValue); //$NON-NLS-1$ }