本文整理了Java中org.eclipse.swt.graphics.Transform.isDisposed()
方法的一些代码示例,展示了Transform.isDisposed()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Transform.isDisposed()
方法的具体详情如下:
包路径:org.eclipse.swt.graphics.Transform
类名称:Transform
方法名:isDisposed
[英]Returns true
if the Transform has been disposed, and false
otherwise.
This method gets the dispose state for the Transform. When a Transform has been disposed, it is an error to invoke any other method (except #dispose()) using the Transform.
[中]如果已释放转换,则返回true
,否则返回false
。
此方法获取转换的dispose状态。处理转换后,使用转换调用任何其他方法(除了#dispose())都是错误的。
代码示例来源:origin: pentaho/pentaho-kettle
public void dispose() {
gc.dispose();
if ( transform != null && transform.isDisposed() == false ) {
transform.dispose();
}
for ( Color color : colors ) {
color.dispose();
}
for ( Font font : fonts ) {
font.dispose();
}
}
代码示例来源:origin: pentaho/pentaho-kettle
public void dispose() {
gc.dispose();
if ( transform != null && transform.isDisposed() == false ) {
transform.dispose();
}
for ( Color color : colors ) {
color.dispose();
}
for ( Font font : fonts ) {
font.dispose();
}
}
代码示例来源:origin: pentaho/pentaho-kettle
if ( ( (Transform) object ).isDisposed() ) {
return;
代码示例来源:origin: org.eclipse.rap/org.eclipse.rap.rwt
/**
* Returns <code>true</code> if the Transform represents the identity matrix and false otherwise.
*
* @return <code>true</code> if the receiver is an identity Transform, and <code>false</code>
* otherwise
*/
public boolean isIdentity() {
if( isDisposed() ) {
SWT.error( SWT.ERROR_GRAPHIC_DISPOSED );
}
return Arrays.equals( elements, IDENTITY_MATRIX );
}
代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.linux.ppc
/**
* Returns a string containing a concise, human-readable
* description of the receiver.
*
* @return a string representation of the receiver
*/
@Override
public String toString() {
if (isDisposed()) return "Transform {*DISPOSED*}";
float[] elements = new float[6];
getElements(elements);
return "Transform {" + elements [0] + "," + elements [1] + "," +elements [2] + "," +elements [3] + "," +elements [4] + "," +elements [5] + "}";
}
代码示例来源:origin: org.eclipse.swt.cocoa.macosx/x86_64
/**
* Returns a string containing a concise, human-readable
* description of the receiver.
*
* @return a string representation of the receiver
*/
public String toString() {
if (isDisposed()) return "Transform {*DISPOSED*}";
float[] elements = new float[6];
getElements(elements);
return "Transform {" + elements [0] + ", " + elements [1] + ", " +elements [2] + ", " +elements [3] + ", " +elements [4] + ", " +elements [5] + "}";
}
代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.linux.s390x
/**
* Returns a string containing a concise, human-readable
* description of the receiver.
*
* @return a string representation of the receiver
*/
@Override
public String toString() {
if (isDisposed()) return "Transform {*DISPOSED*}";
float[] elements = new float[6];
getElements(elements);
return "Transform {" + elements [0] + "," + elements [1] + "," +elements [2] + "," +elements [3] + "," +elements [4] + "," +elements [5] + "}";
}
代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.swt.win32.win32.x86
/**
* Returns a string containing a concise, human-readable
* description of the receiver.
*
* @return a string representation of the receiver
*/
@Override
public String toString() {
if (isDisposed()) return "Transform {*DISPOSED*}";
float[] elements = new float[6];
getElements(elements);
return "Transform {" + elements [0] + "," + elements [1] + "," +elements [2] + "," +elements [3] + "," +elements [4] + "," +elements [5] + "}";
}
代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.aix.ppc
/**
* Returns a string containing a concise, human-readable
* description of the receiver.
*
* @return a string representation of the receiver
*/
@Override
public String toString() {
if (isDisposed()) return "Transform {*DISPOSED*}";
float[] elements = new float[6];
getElements(elements);
return "Transform {" + elements [0] + "," + elements [1] + "," +elements [2] + "," +elements [3] + "," +elements [4] + "," +elements [5] + "}";
}
代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.aix.ppc
/**
* Returns <code>true</code> if the Transform represents the identity matrix
* and false otherwise.
*
* @return <code>true</code> if the receiver is an identity Transform, and <code>false</code> otherwise
*/
public boolean isIdentity() {
if (isDisposed()) SWT.error(SWT.ERROR_GRAPHIC_DISPOSED);
float[] m = new float[6];
getElements(m);
return m[0] == 1 && m[1] == 0 && m[2] == 0 && m[3] == 1 && m[4] == 0 && m[5] == 0;
}
代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.swt.win32.win32.x86
/**
* Returns <code>true</code> if the Transform represents the identity matrix
* and false otherwise.
*
* @return <code>true</code> if the receiver is an identity Transform, and <code>false</code> otherwise
*/
public boolean isIdentity() {
if (isDisposed()) SWT.error(SWT.ERROR_GRAPHIC_DISPOSED);
return Gdip.Matrix_IsIdentity(handle);
}
代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.linux.ppc
/**
* Returns <code>true</code> if the Transform represents the identity matrix
* and false otherwise.
*
* @return <code>true</code> if the receiver is an identity Transform, and <code>false</code> otherwise
*/
public boolean isIdentity() {
if (isDisposed()) SWT.error(SWT.ERROR_GRAPHIC_DISPOSED);
float[] m = new float[6];
getElements(m);
return m[0] == 1 && m[1] == 0 && m[2] == 0 && m[3] == 1 && m[4] == 0 && m[5] == 0;
}
代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.swt.win32.win32.x86
/**
* Modifies the receiver such that the matrix it represents becomes the
* identity matrix.
*
* @exception SWTException <ul>
* <li>ERROR_GRAPHIC_DISPOSED - if the receiver has been disposed</li>
* </ul>
*
* @since 3.4
*/
public void identity() {
if (isDisposed()) SWT.error(SWT.ERROR_GRAPHIC_DISPOSED);
Gdip.Matrix_SetElements(handle, 1, 0, 0, 1, 0, 0);
}
代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.linux.s390x
/**
* Returns <code>true</code> if the Transform represents the identity matrix
* and false otherwise.
*
* @return <code>true</code> if the receiver is an identity Transform, and <code>false</code> otherwise
*/
public boolean isIdentity() {
if (isDisposed()) SWT.error(SWT.ERROR_GRAPHIC_DISPOSED);
float[] m = new float[6];
getElements(m);
return m[0] == 1 && m[1] == 0 && m[2] == 0 && m[3] == 1 && m[4] == 0 && m[5] == 0;
}
代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.linux.s390x
/**
* Modifies the receiver such that the matrix it represents becomes the
* identity matrix.
*
* @exception SWTException <ul>
* <li>ERROR_GRAPHIC_DISPOSED - if the receiver has been disposed</li>
* </ul>
*
* @since 3.4
*/
public void identity() {
if (isDisposed()) SWT.error(SWT.ERROR_GRAPHIC_DISPOSED);
Cairo.cairo_matrix_init(handle, 1, 0, 0, 1, 0, 0);
}
代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.linux.ppc
/**
* Modifies the receiver such that the matrix it represents becomes the
* identity matrix.
*
* @exception SWTException <ul>
* <li>ERROR_GRAPHIC_DISPOSED - if the receiver has been disposed</li>
* </ul>
*
* @since 3.4
*/
public void identity() {
if (isDisposed()) SWT.error(SWT.ERROR_GRAPHIC_DISPOSED);
Cairo.cairo_matrix_init(handle, 1, 0, 0, 1, 0, 0);
}
代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.aix.ppc
/**
* Modifies the receiver so that it represents a transformation that is
* equivalent to its previous transformation scaled by (scaleX, scaleY).
*
* @param scaleX the amount to scale in the X direction
* @param scaleY the amount to scale in the Y direction
*
* @exception SWTException <ul>
* <li>ERROR_GRAPHIC_DISPOSED - if the receiver has been disposed</li>
* </ul>
*/
public void scale(float scaleX, float scaleY) {
if (isDisposed()) SWT.error(SWT.ERROR_GRAPHIC_DISPOSED);
Cairo.cairo_matrix_scale(handle, scaleX, scaleY);
}
代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.linux.ppc
/**
* Modifies the receiver such that the matrix it represents becomes
* the mathematical inverse of the matrix it previously represented.
*
* @exception SWTException <ul>
* <li>ERROR_GRAPHIC_DISPOSED - if the receiver has been disposed</li>
* <li>ERROR_CANNOT_INVERT_MATRIX - if the matrix is not invertible</li>
* </ul>
*/
public void invert() {
if (isDisposed()) SWT.error(SWT.ERROR_GRAPHIC_DISPOSED);
if (Cairo.cairo_matrix_invert(handle) != 0) {
SWT.error(SWT.ERROR_CANNOT_INVERT_MATRIX);
}
}
代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.swt.win32.win32.x86
/**
* Modifies the receiver such that the matrix it represents becomes
* the mathematical inverse of the matrix it previously represented.
*
* @exception SWTException <ul>
* <li>ERROR_GRAPHIC_DISPOSED - if the receiver has been disposed</li>
* <li>ERROR_CANNOT_INVERT_MATRIX - if the matrix is not invertible</li>
* </ul>
*/
public void invert() {
if (isDisposed()) SWT.error(SWT.ERROR_GRAPHIC_DISPOSED);
if (Gdip.Matrix_Invert(handle) != 0) SWT.error(SWT.ERROR_CANNOT_INVERT_MATRIX);
}
代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.linux.ppc
/**
* Modifies the receiver so that it represents a transformation that is
* equivalent to its previous transformation translated by (offsetX, offsetY).
*
* @param offsetX the distance to translate in the X direction
* @param offsetY the distance to translate in the Y direction
*
* @exception SWTException <ul>
* <li>ERROR_GRAPHIC_DISPOSED - if the receiver has been disposed</li>
* </ul>
*/
public void translate(float offsetX, float offsetY) {
if (isDisposed()) SWT.error(SWT.ERROR_GRAPHIC_DISPOSED);
Cairo.cairo_matrix_translate(handle, DPIUtil.autoScaleUp(offsetX), DPIUtil.autoScaleUp(offsetY));
}
内容来源于网络,如有侵权,请联系作者删除!