本文整理了Java中org.eclipse.swt.graphics.Point.equals()
方法的一些代码示例,展示了Point.equals()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Point.equals()
方法的具体详情如下:
包路径:org.eclipse.swt.graphics.Point
类名称:Point
方法名:equals
[英]Compares the argument to the receiver, and returns true if they represent the same object using a class specific comparison.
[中]将参数与接收方进行比较,如果它们使用特定于类的比较表示相同对象,则返回true。
代码示例来源:origin: BiglySoftware/BiglyBT
public boolean setDrawOffset(Point drawOffset) {
if (drawOffset.equals(this.drawOffset)) {
return false;
}
this.drawOffset = drawOffset;
return true;
}
代码示例来源:origin: org.eclipse/org.eclipse.jdt.ui
public boolean equals(Object object) {
if (object == null || !CallHierarchyImageDescriptor.class.equals(object.getClass()))
return false;
CallHierarchyImageDescriptor other= (CallHierarchyImageDescriptor)object;
return (fBaseImage.equals(other.fBaseImage) && fFlags == other.fFlags && fSize.equals(other.fSize));
}
代码示例来源:origin: org.eclipse.jdt/org.eclipse.jdt.ui
@Override
public boolean equals(Object object) {
if (object == null || !CallHierarchyImageDescriptor.class.equals(object.getClass()))
return false;
CallHierarchyImageDescriptor other= (CallHierarchyImageDescriptor)object;
return (fBaseImage.equals(other.fBaseImage) && fFlags == other.fFlags && fSize.equals(other.fSize));
}
代码示例来源:origin: org.eclipse.jdt/org.eclipse.jdt.ui
@Override
public boolean equals(Object object) {
if (object == null || !JavaElementImageDescriptor.class.equals(object.getClass()))
return false;
JavaElementImageDescriptor other= (JavaElementImageDescriptor)object;
return (fBaseImage.equals(other.fBaseImage) && fFlags == other.fFlags && fSize.equals(other.fSize));
}
代码示例来源:origin: org.eclipse/org.eclipse.jdt.ui
public boolean equals(Object object) {
if (object == null || !JavaElementImageDescriptor.class.equals(object.getClass()))
return false;
JavaElementImageDescriptor other= (JavaElementImageDescriptor)object;
return (fBaseImage.equals(other.fBaseImage) && fFlags == other.fFlags && fSize.equals(other.fSize));
}
代码示例来源:origin: org.eclipse/org.eclipse.datatools.sqltools.sqleditor
public boolean equals(Object object)
{
if (object == null || !SQLImageDescriptor.class.equals(object.getClass()))
{
return false;
}
SQLImageDescriptor other = (SQLImageDescriptor) object;
return (_fBaseImage.equals(other._fBaseImage) && _fFlags == other._fFlags && _fSize.equals(other._fSize));
}
代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.jdt.ui
@Override
public boolean equals(Object object) {
if (object == null || !CallHierarchyImageDescriptor.class.equals(object.getClass()))
return false;
CallHierarchyImageDescriptor other= (CallHierarchyImageDescriptor)object;
return (fBaseImage.equals(other.fBaseImage) && fFlags == other.fFlags && fSize.equals(other.fSize));
}
代码示例来源:origin: org.eclipse.rap/org.eclipse.rap.rwt
private void clearPacked( Point oldSize ) {
if( !oldSize.equals( getSize() ) ) {
packed = false;
}
}
代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.ui.forms
public void layoutIfNecessary() {
if (dirtySize != null && control != null && control instanceof Composite) {
if (control.getSize().equals(dirtySize)) {
((Composite)control).layout(flushChildren);
flushChildren = false;
}
}
dirtySize = null;
}
}
代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.ui.workbench.texteditor
/**
* Fires a selection event to all selection listener of the action's
* text widget if the current selection differs from the given selection.
*
* @param oldSelection the old selection
* @since 3.0
*/
protected void fireSelectionChanged(Point oldSelection) {
Point selection= fTextWidget.getSelection();
if (oldSelection == null || !selection.equals(oldSelection))
doFireSelectionChanged(selection);
}
代码示例来源:origin: org.eclipse.platform/org.eclipse.ui.forms
public void layoutIfNecessary() {
if (dirtySize != null && control instanceof Composite) {
if (control.getSize().equals(dirtySize)) {
((Composite) control).layout(flushChildren);
flushChildren = false;
}
}
dirtySize = null;
}
}
代码示例来源:origin: org.eclipse.platform/org.eclipse.e4.ui.css.swt
protected void checkChangedHorizontalAndTopPixel() {
Point newHorizontalAndTopPixel = computeHorizontalAndTopPixel();
if (!newHorizontalAndTopPixel.equals(fLastHorizontalAndTopPixel)) {
fLastHorizontalAndTopPixel = newHorizontalAndTopPixel;
fPainter.redrawScrollBars();
}
}
代码示例来源:origin: org.eclipse.rap/org.eclipse.rap.rwt
void notifyResize( Point oldSize ) {
if( !oldSize.equals( getSize() ) ) {
notifyListeners( SWT.Resize, new Event() );
}
}
代码示例来源:origin: org.eclipse.rap/org.eclipse.rap.rwt
void notifyMove( Point oldLocation ) {
if( !oldLocation.equals( getLocation() ) ) {
notifyListeners( SWT.Move, new Event() );
}
}
代码示例来源:origin: org.eclipse.jdt/org.eclipse.jdt.ui
private void updatePopupLocation(boolean force) {
if (! force && fSnapPosition == SNAP_POSITION_LOWER_RIGHT)
return;
packPopup();
Point loc= computePopupLocation(fSnapPosition);
if (loc != null && ! loc.equals(fPopup.getLocation())) {
fPopup.setLocation(loc);
// XXX workaround for https://bugs.eclipse.org/bugs/show_bug.cgi?id=170774
// fPopup.moveBelow(fEditor.getSite().getShell().getShells()[0]);
}
}
代码示例来源:origin: org.eclipse.rap/org.eclipse.rap.rwt
@Override
void notifyResize( Point oldSize ) {
super.notifyResize( oldSize );
if( !oldSize.equals( getSize() ) ) {
repaint( getClientArea() );
}
}
代码示例来源:origin: org.eclipse.xtext/ui
protected void updatePopupLocation() {
packPopup();
Point loc = computePopupLocation();
if (loc != null && !loc.equals(popup.getLocation())) {
popup.setLocation(loc);
}
}
代码示例来源:origin: org.eclipse.rap/org.eclipse.rap.rwt
@Override
public void setBounds( Rectangle bounds ) {
Point oldSize = getSize();
super.setBounds( bounds );
if( !oldSize.equals( getSize() ) ) {
layoutItems();
}
}
代码示例来源:origin: org.eclipse.rap/org.eclipse.rap.rwt
private static void renderSelection( Text text ) {
Point newValue = text.getSelection();
boolean changed = hasChanged( text, PROP_SELECTION, newValue, ZERO_SELECTION );
if( !changed ) {
changed = hasChanged( text, PROP_TEXT, text.getText() ) && !newValue.equals( ZERO_SELECTION );
}
if( changed ) {
RemoteObject remoteObject = getRemoteObject( text );
remoteObject.set( PROP_SELECTION, new JsonArray().add( newValue.x ).add( newValue.y ) );
}
}
代码示例来源:origin: org.eclipse.rap/org.eclipse.rap.rwt
@Override
void notifyResize( Point oldSize ) {
if( !oldSize.equals( getSize() ) && !TextSizeUtil.isTemporaryResize() ) {
clearCachedHeights();
updateAllItems();
updateScrollBars();
adjustTopItemIndex();
}
super.notifyResize( oldSize );
}
内容来源于网络,如有侵权,请联系作者删除!