Tabnine Logo
Node.bounds
Code IndexAdd Tabnine to your IDE (free)

How to use
bounds
method
in
com.effektif.workflow.api.workflow.diagram.Node

Best Java code snippets using com.effektif.workflow.api.workflow.diagram.Node.bounds (Showing top 9 results out of 315)

origin: com.effektif/effektif-workflow-api

public Diagram addNode(String activityId, double ulx, double uly, double lrx, double lry) {
 ensureCanvas();
 canvas.addNode(new Node()
  .elementId(activityId)
  .bounds(new Bounds(ulx, uly, lrx, lry)));
 return this;
}
origin: effektif/effektif

public Diagram addNode(String activityId, double ulx, double uly, double lrx, double lry) {
 ensureCanvas();
 canvas.addNode(new Node()
  .elementId(activityId)
  .bounds(new Bounds(ulx, uly, lrx, lry)));
 return this;
}
origin: effektif/effektif

double width = Double.valueOf(currentXml.removeAttribute(OMG_DC_URI, "width"));
double height = Double.valueOf(currentXml.removeAttribute(OMG_DC_URI, "height"));
node.bounds(new Bounds(new Point(x, y), width, height));
origin: effektif/effektif

@Test
public void testSetBounds() {
 Bounds bounds = new Bounds(Point.of(1, 2), Point.of(3, 4));
 Node node = new Node();
 node.bounds(bounds);
 
 assertNotNull(bounds);
 assertEquals(new Bounds(Point.of(1, 2), Point.of(3, 4)), node.bounds);
 
 node.bounds(null);
 assertNull(node.bounds);
 
}
 
origin: effektif/effektif

@Test
public void testEquals() {
 List<Node> children = new ArrayList<>();
 children.add(new Node().id("n1"));
 children.add(new Node().id("n2"));
 String actId = "a1";
 Bounds bounds = new Bounds(Point.of(1, 2), Point.of(3, 4));
 
 Node node1 = new Node()
  .elementId(actId)
  .bounds(bounds)
  .children(children);
 
 Node node2 = new Node()
  .elementId(actId)
  .bounds(bounds)
  .children(children);
 
 assertEquals(node1, node2);
 assertEquals(node1.hashCode(), node2.hashCode());
}
 
origin: effektif/effektif

@Test
public void testEnsureCanvas() {
 Diagram diagram = new Diagram();
 assertNotNull(diagram.canvas);
 assertNotNull(diagram.version);
 assertEquals(1l, diagram.version.longValue());
 
 diagram = new Diagram();
 diagram.version(2l);
 assertNotNull(diagram.canvas);
 assertEquals(2l, diagram.version.longValue());
 
 Node canvas = new Node().bounds(Bounds.of(1.0, 2.0, 3.0, 4.0));
 diagram = new Diagram()
  .canvas(canvas)
  .version(2l);
 // should stay untouched
 assertEquals(canvas, diagram.canvas);
 assertEquals(2l, diagram.version.longValue());
}
 
origin: effektif/effektif

@Test
public void testSetCanvas() {
 Diagram diagram = Diagram.newInstance();
 assertNotNull(diagram.canvas);
 Node canvas = new Node().bounds(Bounds.of(1.0, 2.0, 3.0, 4.0));
 assertNotEquals(canvas, diagram.canvas);
 diagram.canvas(canvas);
 assertEquals(canvas, diagram.canvas);
 
 diagram.canvas(null);
 assertNull(diagram.canvas);
}
 
origin: effektif/effektif

 @Test
 public void testEmptyDiagram() throws Exception {
  ExecutableWorkflow workflow = new ExecutableWorkflow().id(new WorkflowId(getWorkflowIdInternal()));
  workflow.setDiagram(new Diagram().canvas(new Node().addNode(new Node().bounds(new Bounds(0, 0, 10, 10)))));
  workflow = serializeWorkflow(workflow);
  // No execptions due to empty workflow and diagram.
 }
}
origin: effektif/effektif

@Test
public void testEquals() {
 Diagram diagram1 = Diagram.newInstance();
 Diagram diagram2 = Diagram.newInstance();
 assertEquals(diagram1, diagram2);
 
 diagram2.canvas(new Node().bounds(Bounds.of(1.0, 2.0, 3.0, 4.0)));
 assertNotEquals(diagram1, diagram2);
 
 diagram1.canvas.bounds(Bounds.of(1.0, 2.0, 3.0, 4.0));
 assertEquals(diagram1, diagram2);
 assertEquals(diagram1.hashCode(), diagram2.hashCode());
 
 diagram2.incVersion();
 assertNotEquals(diagram1, diagram2);
 diagram1.incVersion();
 assertEquals(diagram1, diagram2);
 
 String edgeId = "e1";
 diagram1.addEdge(new Edge().transitionId(edgeId));
 assertNotEquals(diagram1, diagram2);
 
 diagram2.addEdge(new Edge().transitionId(edgeId));
 assertEquals(diagram1, diagram2);
}
com.effektif.workflow.api.workflow.diagramNodebounds

Popular methods of Node

  • <init>
  • elementId
  • hasChildren
  • addNode
  • hashCode
  • id
  • children
  • equals
  • expanded
  • getChild
  • horizontal
  • isValid
    A Node is considered valid if its Bounds are valid and all the contained children are valid.
  • horizontal,
  • isValid

Popular in Java

  • Creating JSON documents from java classes using gson
  • scheduleAtFixedRate (ScheduledExecutorService)
  • getOriginalFilename (MultipartFile)
    Return the original filename in the client's filesystem.This may contain path information depending
  • getSharedPreferences (Context)
  • Graphics2D (java.awt)
    This Graphics2D class extends the Graphics class to provide more sophisticated control overgraphics
  • Selector (java.nio.channels)
    A controller for the selection of SelectableChannel objects. Selectable channels can be registered w
  • Stack (java.util)
    Stack is a Last-In/First-Out(LIFO) data structure which represents a stack of objects. It enables u
  • Semaphore (java.util.concurrent)
    A counting semaphore. Conceptually, a semaphore maintains a set of permits. Each #acquire blocks if
  • Collectors (java.util.stream)
  • JButton (javax.swing)
  • Best IntelliJ plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now