Package org.eclipse.gef

Examples of org.eclipse.gef.SnapToGrid


   
    public Object getAdapter(@SuppressWarnings("rawtypes") Class adapter) {
        if (adapter == SnapToHelper.class) {
            Boolean val = (Boolean) getViewer().getProperty(SnapToGrid.PROPERTY_GRID_ENABLED);
            if (val != null && val.booleanValue()) {
                return new SnapToGrid(this);
            }
        }
        return super.getAdapter(adapter);
    }
View Full Code Here


      if (val != null && val.booleanValue())
        snapStrategies.add(new SnapToGeometry(this));
      val = (Boolean) getViewer().getProperty(
          SnapToGrid.PROPERTY_GRID_ENABLED);
      if (val != null && val.booleanValue())
        snapStrategies.add(new SnapToGrid(this));

      if (snapStrategies.size() == 0)
        return null;
      if (snapStrategies.size() == 1)
        return snapStrategies.get(0);
View Full Code Here

   
    public Object getAdapter(Class adapter) {
        if (adapter == SnapToHelper.class) {
            Boolean val = (Boolean) getViewer().getProperty(SnapToGrid.PROPERTY_GRID_ENABLED);
            if (val != null && val.booleanValue()) {
                return new SnapToGrid(this);
            }
        }
        return super.getAdapter(adapter);
    }
View Full Code Here

      val = (Boolean) getViewer().getProperty(SnapToGeometry.PROPERTY_SNAP_ENABLED);
      if (val != null && val.booleanValue())
        snapStrategies.add(new SnapToGeometry(this));
      val = (Boolean) getViewer().getProperty(SnapToGrid.PROPERTY_GRID_ENABLED);
      if (val != null && val.booleanValue())
        snapStrategies.add(new SnapToGrid(this));

      if (snapStrategies.size() == 0)
        return null;
      if (snapStrategies.size() == 1)
        return snapStrategies.get(0);
View Full Code Here

    val = (Boolean)getViewer().getProperty(SnapToGeometry.PROPERTY_SNAP_ENABLED);
    if (val != null && val.booleanValue())
      snapStrategies.add(new SnapToGeometry(this));
    val = (Boolean)getViewer().getProperty(SnapToGrid.PROPERTY_GRID_ENABLED);
    if (val != null && val.booleanValue())
      snapStrategies.add(new SnapToGrid(this));
   
    if (snapStrategies.size() == 0)
      return null;
    if (snapStrategies.size() == 1)
      return snapStrategies.get(0);
View Full Code Here

TOP

Related Classes of org.eclipse.gef.SnapToGrid

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.