本文整理了Java中org.eclipse.swt.graphics.TextLayout.freeRuns()
方法的一些代码示例,展示了TextLayout.freeRuns()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。TextLayout.freeRuns()
方法的具体详情如下:
包路径:org.eclipse.swt.graphics.TextLayout
类名称:TextLayout
方法名:freeRuns
暂无
代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.swt.win32.win32.x86
void setIndentInPixels (int indent) {
if (indent <0) return;
if (this.indent == indent) return;
freeRuns();
this.indent = indent;
}
代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.swt.win32.win32.x86
void setWrapIndentInPixels (int wrapIndent) {
if (wrapIndent <0) return;
if (this.wrapIndent == wrapIndent) return;
freeRuns();
this.wrapIndent = wrapIndent;
}
代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.swt.win32.win32.x86
void setTabsInPixels (int[] tabs) {
if (Arrays.equals (this.tabs, tabs)) return;
freeRuns();
this.tabs = tabs;
}
代码示例来源:origin: org.eclipse.swt.cocoa.macosx/x86_64
void destroy() {
freeRuns();
if (textStorage != null) textStorage.release();
textStorage = null;
layoutManager = null;
textCOntainer= null;
fOnt= null;
text = null;
styles = null;
segments = null;
segmentsChars = null;
}
代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.aix.ppc
void setWidthInPixels (int width) {
if (wrapWidth == width) return;
freeRuns();
wrapWidth = width;
setWidth();
}
代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.linux.ppc
void setWidthInPixels (int width) {
if (wrapWidth == width) return;
freeRuns();
wrapWidth = width;
setWidth();
}
代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.linux.s390x
void setWidthInPixels (int width) {
if (wrapWidth == width) return;
freeRuns();
wrapWidth = width;
setWidth();
}
代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.swt.win32.win32.x86
void setWidthInPixels (int width) {
if (width <-1 || width == 0) SWT.error(SWT.ERROR_INVALID_ARGUMENT);
if (this.wrapWidth == width) return;
freeRuns();
this.wrapWidth = width;
}
代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.swt.win32.win32.x86
/**
* Sets the justification of the receiver. Note that the receiver's
* width must be set in order to use justification.
*
* @param justify new justify
*
* @exception SWTException
*
*
*
* @since 3.2
*/
public void setJustify (boolean justify) {
checkLayout();
if (this.justify == justify) return;
freeRuns();
this.justify = justify;
}
代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.swt.win32.win32.x86
/**
* Sets the orientation of the receiver, which must be one
* of SWT.LEFT_TO_RIGHT
or SWT.RIGHT_TO_LEFT
.
*
* @param orientation new orientation style
*
* @exception SWTException
*
*
*/
public void setOrientation (int orientation) {
checkLayout();
int mask = SWT.LEFT_TO_RIGHT | SWT.RIGHT_TO_LEFT;
orientation &= mask;
if (orientation == 0) return;
if ((orientation & SWT.LEFT_TO_RIGHT) != 0) orientation = SWT.LEFT_TO_RIGHT;
if (this.orientation == orientation) return;
textDirection = this.orientation = orientation;
freeRuns();
}
代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.linux.ppc
@Override
void destroy() {
fOnt= null;
text = null;
styles = null;
freeRuns();
segments = null;
segmentsChars = null;
if (layout != 0) OS.g_object_unref(layout);
layout = 0;
if (context != 0) OS.g_object_unref(context);
cOntext= 0;
}
代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.aix.ppc
@Override
void destroy() {
fOnt= null;
text = null;
styles = null;
freeRuns();
segments = null;
segmentsChars = null;
if (layout != 0) OS.g_object_unref(layout);
layout = 0;
if (context != 0) OS.g_object_unref(context);
cOntext= 0;
}
代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.linux.s390x
@Override
void destroy() {
fOnt= null;
text = null;
styles = null;
freeRuns();
segments = null;
segmentsChars = null;
if (layout != 0) OS.g_object_unref(layout);
layout = 0;
if (context != 0) OS.g_object_unref(context);
cOntext= 0;
}
代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.swt.win32.win32.x86
@Override
void destroy () {
freeRuns();
fOnt= null;
text = null;
segmentsText = null;
tabs = null;
styles = null;
runs = null;
lineOffset = null;
lineY = null;
lineWidth = null;
segments = null;
segmentsChars = null;
if (mLangFontLink2 != 0) {
/* Release() */
OS.VtblCall(2, mLangFontLink2);
mLangFontLink2 = 0;
}
OS.OleUninitialize();
}
代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.swt.win32.win32.x86
/**
* Sets the line spacing of the receiver. The line spacing
* is the space left between lines.
*
* @param spacing the new line spacing
*
* @exception IllegalArgumentException
*
*
* @exception SWTException
*
*
*/
public void setSpacing (int spacing) {
checkLayout();
if (spacing <0) SWT.error(SWT.ERROR_INVALID_ARGUMENT);
if (this.lineSpacingInPoints == spacing) return;
freeRuns();
this.lineSpacingInPoints = spacing;
}
代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.linux.ppc
/**
* Sets the ascent of the receiver. The ascent is distance in pixels
* from the baseline to the top of the line and it is applied to all
* lines. The default value is -1
which means that the
* ascent is calculated from the line fonts.
*
* @param ascent the new ascent
*
* @exception IllegalArgumentException
* -1
*
* @exception SWTException
*
*
*
* @see #setDescent(int)
* @see #getLineMetrics(int)
*/
public void setAscent (int ascent) {
checkLayout();
if (ascent <-1) SWT.error(SWT.ERROR_INVALID_ARGUMENT);
if (this.ascentInPoints == ascent) return;
freeRuns();
this.ascentInPoints = ascent;
}
代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.linux.ppc
/**
* Sets the descent of the receiver. The descent is distance in pixels
* from the baseline to the bottom of the line and it is applied to all
* lines. The default value is -1
which means that the
* descent is calculated from the line fonts.
*
* @param descent the new descent
*
* @exception IllegalArgumentException
* -1
*
* @exception SWTException
*
*
*
* @see #setAscent(int)
* @see #getLineMetrics(int)
*/
public void setDescent (int descent) {
checkLayout();
if (descent <-1) SWT.error(SWT.ERROR_INVALID_ARGUMENT);
if (this.descentInPoints == descent) return;
freeRuns();
this.descentInPoints = descent;
}
代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.swt.win32.win32.x86
/**
* Sets the default font which will be used by the receiver
* to draw and measure text. If the
* argument is null, then a default font appropriate
* for the platform will be used instead. Note that a text
* style can override the default font.
*
* @param font the new font for the receiver, or null to indicate a default font
*
* @exception IllegalArgumentException
*
*
* @exception SWTException
*
*
*/
public void setFont (Font font) {
checkLayout();
if (font != null && font.isDisposed()) SWT.error(SWT.ERROR_INVALID_ARGUMENT);
Font oldFOnt= this.font;
if (oldFOnt== font) return;
this.fOnt= font;
if (oldFont != null && oldFont.equals(font)) return;
freeRuns();
}
代码示例来源:origin: org.eclipse.swt.cocoa.macosx/x86_64
/**
* Sets the wrap indent of the receiver. This indent is applied to all lines
* in the paragraph except the first line.
*
* @param wrapIndent new wrap indent
*
* @exception SWTException
*
*
*
* @see #setIndent(int)
*
* @since 3.6
*/
public void setWrapIndent (int wrapIndent) {
checkLayout ();
if (wrapIndent <0) return;
if (this.wrapIndent == wrapIndent) return;
NSAutoreleasePool pool = null;
if (!NSThread.isMainThread()) pool = (NSAutoreleasePool) new NSAutoreleasePool().alloc().init();
try {
freeRuns();
this.wrapIndent = wrapIndent;
} finally {
if (pool != null) pool.release();
}
}
代码示例来源:origin: org.eclipse.swt.cocoa.macosx/x86_64
/**
* Sets the line spacing of the receiver. The line spacing
* is the space left between lines.
*
* @param spacing the new line spacing
*
* @exception IllegalArgumentException
*
*
* @exception SWTException
*
*
*/
public void setSpacing (int spacing) {
checkLayout();
if (spacing <0) SWT.error(SWT.ERROR_INVALID_ARGUMENT);
if (this.spacing == spacing) return;
NSAutoreleasePool pool = null;
if (!NSThread.isMainThread()) pool = (NSAutoreleasePool) new NSAutoreleasePool().alloc().init();
try {
freeRuns();
this.spacing = spacing;
} finally {
if (pool != null) pool.release();
}
}