Search in sources :

Example 31 with Graph

use of com.centurylink.mdw.designer.display.Graph in project mdw-designer by CenturyLinkCloud.

the class CanvasCommon method moveTextNote.

protected void moveTextNote(int ex, int ey) {
    TextNote selected_note = (TextNote) selected_obj;
    Graph graph = selected_note.graph;
    int x = selected_note.x;
    int y = selected_note.y;
    int w = selected_note.w;
    int h = selected_note.h;
    x = ex - delta_x;
    y = ey - delta_y;
    if (x < graph.x)
        x = graph.x;
    else if (x + w > graph.x + graph.w)
        x = graph.x + graph.w - w;
    if (y < graph.y)
        y = graph.y;
    else if (y + h > graph.y + graph.h)
        y = graph.y + graph.h - h;
    selected_note.x = x;
    selected_note.y = y;
    if (!graph.isReadonly())
        graph.setDirtyLevel(Graph.GEOCHANGE);
}
Also used : Graph(com.centurylink.mdw.designer.display.Graph) SubGraph(com.centurylink.mdw.designer.display.SubGraph) TextNote(com.centurylink.mdw.designer.display.TextNote)

Aggregations

Graph (com.centurylink.mdw.designer.display.Graph)31 SubGraph (com.centurylink.mdw.designer.display.SubGraph)31 Link (com.centurylink.mdw.designer.display.Link)9 Node (com.centurylink.mdw.designer.display.Node)9 ValidationException (com.centurylink.mdw.designer.utils.ValidationException)7 DataAccessException (com.centurylink.mdw.common.exception.DataAccessException)6 TextNote (com.centurylink.mdw.designer.display.TextNote)5 ProcessVO (com.centurylink.mdw.model.value.process.ProcessVO)5 RemoteException (java.rmi.RemoteException)5 ProcessInstanceVO (com.centurylink.mdw.model.value.process.ProcessInstanceVO)4 CodeTimer (com.centurylink.mdw.plugin.CodeTimer)4 FlowchartPage (com.centurylink.mdw.designer.pages.FlowchartPage)3 GraphFragment (com.centurylink.mdw.designer.display.GraphFragment)2 ProcessValidator (com.centurylink.mdw.designer.utils.ProcessValidator)2 ProcessWorker (com.centurylink.mdw.designer.utils.ProcessWorker)2 ActivityInstanceVO (com.centurylink.mdw.model.value.work.ActivityInstanceVO)2 WorkTransitionInstanceVO (com.centurylink.mdw.model.value.work.WorkTransitionInstanceVO)2 WorkflowProcess (com.centurylink.mdw.plugin.designer.model.WorkflowProcess)2 Graphics2D (java.awt.Graphics2D)2 ArrayList (java.util.ArrayList)2