Examples of nearest()


Examples of org.eclipse.sapphire.ui.def.ISapphireHint.nearest()

    @Override
    protected void compute( final Set<String> values )
    {
        final ISapphireHint element = context( ISapphireHint.class );
        final PartDef partdef = element.nearest( PartDef.class );
        final String hint = element.getName().text();
       
        if( hint != null )
        {
            if( hint.equals( PropertyEditorDef.HINT_CHECKBOX_LAYOUT ) )
View Full Code Here

Examples of org.eclipse.sapphire.ui.def.PartDef.nearest()

       
        final String additionalContributorsStr = def.getHint( PropertyEditorDef.HINT_ASSIST_CONTRIBUTORS );
       
        if( additionalContributorsStr != null )
        {
            final ISapphireUiDef rootdef = def.nearest( ISapphireUiDef.class );
           
            for( String segment : additionalContributorsStr.split( "," ) )
            {
                final Class<?> cl = rootdef.resolveClass( segment.trim() );
               
View Full Code Here

Examples of org.eclipse.sapphire.ui.diagram.DiagramConnectionPart.nearest()

    return false;
  }

  private boolean checkSourceReconnection() {
    DiagramConnectionPart connectionPart = this.connection.getModelPart();
    ConnectionService connService = connectionPart.nearest(SapphireDiagramEditorPagePart.class).service(ConnectionService.class);
    if (!connService.valid(newSource.getModelPart(), oldTarget.getModelPart(), connectionPart.getConnectionTypeId()))
      return false;

    return true;
  }
View Full Code Here

Examples of org.eclipse.sapphire.ui.diagram.DiagramConnectionPart.nearest()

    return true;
  }

  private boolean checkTargetReconnection() {
    DiagramConnectionPart connectionPart = this.connection.getModelPart();
    ConnectionService connService = connectionPart.nearest(SapphireDiagramEditorPagePart.class).service(ConnectionService.class);
    if (!connService.valid(oldSource.getModelPart(), newTarget.getModelPart(), connectionPart.getConnectionTypeId()))
      return false;
       
    return true;
  }
View Full Code Here

Examples of org.eclipse.sapphire.ui.diagram.editor.DiagramNodePart.nearest()

  {
        final ListFactory<SapphireActionHandler> handlers = ListFactory.start();
        if (getPart() instanceof DiagramNodePart)
        {
          DiagramNodePart nodePart = (DiagramNodePart)getPart();
          SapphireDiagramEditorPagePart pagePart = nodePart.nearest(SapphireDiagramEditorPagePart.class);
          List<IDiagramConnectionDef> connectionDefs = pagePart.possibleConnectionDefs(nodePart);
          for (IDiagramConnectionDef connDef : connectionDefs)
          {
            NodeCreateConnectionActionHandler handler = new NodeCreateConnectionActionHandler(connDef);
            handlers.add(handler);
View Full Code Here

Examples of org.eclipse.sapphire.ui.diagram.editor.ValidationMarkerPart.nearest()

  @Override
  protected IFigure createFigure()
  {
    ValidationMarkerModel markerModel = (ValidationMarkerModel)this.getModel();
    ValidationMarkerPart markerPart = (ValidationMarkerPart)markerModel.getSapphirePart();
    DiagramNodePart nodePart = markerPart.nearest(DiagramNodePart.class);
    ValidationMarkerSize size = markerPart.getSize();
    Image image = null;
       
    Element model = nodePart.getModelElement();   
    Status status = model.validation();
View Full Code Here

Examples of org.eclipse.sapphire.ui.forms.MasterDetailsContentNodePart.nearest()

                      final ActionHandlerDef def )
    {
        super.init( action, def );
       
        final MasterDetailsContentNodePart node = (MasterDetailsContentNodePart) getPart();
        final MasterDetailsEditorPagePart page = node.nearest( MasterDetailsEditorPagePart.class );
       
        this.service = page.service( ProblemsTraversalService.class );
       
        final Listener listener = new Listener()
        {
View Full Code Here

Examples of org.geomajas.gwt.client.spatial.LineSegment.nearest()

        LineSegment line = new LineSegment(coordinateArray[j], coordinateArray[j - 1]);
        double distance = line.distance(original);
        if (distance < currThreshold && distance < ruleDistance) {
          currThreshold = distance;
          minimumDistance = distance;
          snappingPoint = line.nearest(original);
        }
      }
    }

    return snappingPoint;
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.