/** * Returns the tab list of the receiver. * * @return the tab list * * @exception SWTException <ul> * <li>ERROR_GRAPHIC_DISPOSED - if the receiver has been disposed</li> * </ul> */ public int[] getTabs() { checkLayout(); return DPIUtil.autoScaleDown (getDevice(), getTabsInPixels ()); }
/** * Returns the line spacing of the receiver. * * @return the line spacing * * @exception SWTException <ul> * <li>ERROR_GRAPHIC_DISPOSED - if the receiver has been disposed</li> * </ul> */ public int getSpacing () { checkLayout(); return DPIUtil.autoScaleDown(getDevice(), getSpacingInPixels()); }
/** * Returns the width of the receiver. * * @return the width * * @exception SWTException <ul> * <li>ERROR_GRAPHIC_DISPOSED - if the receiver has been disposed</li> * </ul> */ public int getWidth () { checkLayout (); return DPIUtil.autoScaleDown(getDevice(), getWidthInPixels()); }
/** * Returns the tab list of the receiver. * * @return the tab list * * @exception SWTException <ul> * <li>ERROR_GRAPHIC_DISPOSED - if the receiver has been disposed</li> * </ul> */ public int[] getTabs() { checkLayout(); return DPIUtil.autoScaleDown (getDevice(), getTabsInPixels ()); }
/** * Returns the width of the receiver. * * @return the width * * @exception SWTException <ul> * <li>ERROR_GRAPHIC_DISPOSED - if the receiver has been disposed</li> * </ul> */ public int getWidth () { checkLayout (); return DPIUtil.autoScaleDown(getDevice(), getWidthInPixels()); }
/** * Returns the tab list of the receiver. * * @return the tab list * * @exception SWTException <ul> * <li>ERROR_GRAPHIC_DISPOSED - if the receiver has been disposed</li> * </ul> */ public int[] getTabs() { checkLayout(); return DPIUtil.autoScaleDown (getDevice(), getTabsInPixels ()); }
/** * Returns the line spacing of the receiver. * * @return the line spacing * * @exception SWTException <ul> * <li>ERROR_GRAPHIC_DISPOSED - if the receiver has been disposed</li> * </ul> */ public int getSpacing () { checkLayout(); return DPIUtil.autoScaleDown(getDevice(), getSpacingInPixels()); }
/** * Returns the line spacing of the receiver. * * @return the line spacing * * @exception SWTException <ul> * <li>ERROR_GRAPHIC_DISPOSED - if the receiver has been disposed</li> * </ul> */ public int getSpacing () { checkLayout(); return DPIUtil.autoScaleDown(getDevice(), getSpacingInPixels()); }
/** * Returns the width of the receiver. * * @return the width * * @exception SWTException <ul> * <li>ERROR_GRAPHIC_DISPOSED - if the receiver has been disposed</li> * </ul> */ public int getWidth () { checkLayout (); return DPIUtil.autoScaleDown(getDevice(), getWidthInPixels()); }
/** * Returns the receiver's indent. * * @return the receiver's indent * * @exception SWTException <ul> * <li>ERROR_GRAPHIC_DISPOSED - if the receiver has been disposed</li> * </ul> * * @since 3.2 */ public int getIndent () { checkLayout(); return DPIUtil.autoScaleDown(getDevice(), getIndentInPixels()); }
/** * Sets the receiver's tab list. Each value in the tab list specifies * the space in points from the origin of the text layout to the respective * tab stop. The last tab stop width is repeated continuously. * * @param tabs the new tab list * * @exception SWTException <ul> * <li>ERROR_GRAPHIC_DISPOSED - if the receiver has been disposed</li> * </ul> */ public void setTabs(int[] tabs) { checkLayout(); if (this.tabs == null && tabs == null) return; setTabsInPixels (DPIUtil.autoScaleUp (getDevice(), tabs)); }
/** * Sets the receiver's tab list. Each value in the tab list specifies * the space in points from the origin of the text layout to the respective * tab stop. The last tab stop width is repeated continuously. * * @param tabs the new tab list * * @exception SWTException <ul> * <li>ERROR_GRAPHIC_DISPOSED - if the receiver has been disposed</li> * </ul> */ public void setTabs(int[] tabs) { checkLayout(); if (this.tabs == null && tabs == null) return; setTabsInPixels (DPIUtil.autoScaleUp (getDevice(), tabs)); }
/** * Returns the receiver's indent. * * @return the receiver's indent * * @exception SWTException <ul> * <li>ERROR_GRAPHIC_DISPOSED - if the receiver has been disposed</li> * </ul> * * @since 3.2 */ public int getIndent () { checkLayout(); return DPIUtil.autoScaleDown(getDevice(), getIndentInPixels()); }
/** * Returns the receiver's indent. * * @return the receiver's indent * * @exception SWTException <ul> * <li>ERROR_GRAPHIC_DISPOSED - if the receiver has been disposed</li> * </ul> * * @since 3.2 */ public int getIndent () { checkLayout(); return DPIUtil.autoScaleDown(getDevice(), getIndentInPixels()); }
/** * Returns the bounds of the line for the specified line index. * * @param lineIndex the line index * @return the line bounds * * @exception IllegalArgumentException <ul> * <li>ERROR_INVALID_ARGUMENT - if the line index is out of range</li> * </ul> * @exception SWTException <ul> * <li>ERROR_GRAPHIC_DISPOSED - if the receiver has been disposed</li> * </ul> */ public Rectangle getLineBounds(int lineIndex) { checkLayout(); return DPIUtil.autoScaleDown(getDevice(), getLineBoundsInPixels(lineIndex)); }
/** * Returns the bounds of the line for the specified line index. * * @param lineIndex the line index * @return the line bounds * * @exception IllegalArgumentException <ul> * <li>ERROR_INVALID_ARGUMENT - if the line index is out of range</li> * </ul> * @exception SWTException <ul> * <li>ERROR_GRAPHIC_DISPOSED - if the receiver has been disposed</li> * </ul> */ public Rectangle getLineBounds(int lineIndex) { checkLayout(); return DPIUtil.autoScaleDown(getDevice(), getLineBoundsInPixels(lineIndex)); }
/** * Returns the receiver's wrap indent. * * @return the receiver's wrap indent * * @exception SWTException <ul> * <li>ERROR_GRAPHIC_DISPOSED - if the receiver has been disposed</li> * </ul> * * @since 3.6 */ public int getWrapIndent () { checkLayout (); return DPIUtil.autoScaleDown(getDevice(), getWrapIndentInPixels()); } int getWrapIndentInPixels () {
Rectangle getBoundsInPixels() { checkLayout(); computeRuns(); int[] w = new int[1], h = new int[1]; OS.pango_layout_get_size(layout, w, h); int wrapWidth = OS.pango_layout_get_width(layout); w[0] = wrapWidth != -1 ? wrapWidth : w[0] + OS.pango_layout_get_indent(layout); int width = OS.PANGO_PIXELS(w[0]); int height = OS.PANGO_PIXELS(h[0]); if (ascentInPoints != -1 && descentInPoints != -1) { height = Math.max (height, DPIUtil.autoScaleUp(getDevice(), ascentInPoints + descentInPoints)); } height += OS.PANGO_PIXELS(OS.pango_layout_get_spacing(layout)); return new Rectangle(0, 0, width, height); }
Rectangle getBoundsInPixels() { checkLayout(); computeRuns(); int[] w = new int[1], h = new int[1]; OS.pango_layout_get_size(layout, w, h); int wrapWidth = OS.pango_layout_get_width(layout); w[0] = wrapWidth != -1 ? wrapWidth : w[0] + OS.pango_layout_get_indent(layout); int width = OS.PANGO_PIXELS(w[0]); int height = OS.PANGO_PIXELS(h[0]); if (ascentInPoints != -1 && descentInPoints != -1) { height = Math.max (height, DPIUtil.autoScaleUp(getDevice(), ascentInPoints + descentInPoints)); } height += OS.PANGO_PIXELS(OS.pango_layout_get_spacing(layout)); return new Rectangle(0, 0, width, height); }
Rectangle getBoundsInPixels() { checkLayout(); computeRuns(); int[] w = new int[1], h = new int[1]; OS.pango_layout_get_size(layout, w, h); int wrapWidth = OS.pango_layout_get_width(layout); w[0] = wrapWidth != -1 ? wrapWidth : w[0] + OS.pango_layout_get_indent(layout); int width = OS.PANGO_PIXELS(w[0]); int height = OS.PANGO_PIXELS(h[0]); if (ascentInPoints != -1 && descentInPoints != -1) { height = Math.max (height, DPIUtil.autoScaleUp(getDevice(), ascentInPoints + descentInPoints)); } height += OS.PANGO_PIXELS(OS.pango_layout_get_spacing(layout)); return new Rectangle(0, 0, width, height); }