input stringlengths 10 828 | output stringlengths 5 107 |
|---|---|
public void update position jnode node jnode group group grouping get node if group null group update presentation | notifies the group border painter that nodes position |
public boolean has content return content trim length 0 | returns true if node has some non whitespace content |
public void png export file file throws ioexception buffered image image produce image image io write image png file | produces an image and saves it as a png file to given location |
public boolean default edit operation host start editing this return true | default operation of edit via |
public void remove group string name jnode group group group names get name if group null return for jcomponent node group get content grouping remove node group names remove name group destroy | destroys a group |
public void image export file file throws ioexception illegal argument exception string filename file get name if filename ends with png png export file else if filename ends with jpeg filename ends with jpg jpeg export file else string msg file must have either jpeg or png suffix throw new illegal argument exception msg | produces an image and saves it to given location |
protected boolean asked save if is saved return true if application main local persistence application main global persistence write joption pane show message dialog this it s not possible to save the diagram in demo mode your changes will be lost sorry joption pane information message return true int option joption pane show confirm dialog this do you want to save get title trigger get state switch option case joption pane yes option save diagram false case joption pane no option return true case joption pane cancel option default return false | attempts to save diagram |
public void enable numbering boolean state numbering state set content this content | enables showing statements number |
public boolean rename group string name from string name to jnode group group group names get name from check group names get name to if group null check null return false group set title name to group names remove name from group names put name to group return true | renames a group |
public void set end a point p set ends p null | sets starting point of the line |
public string get display content if numbering spec is editable content trim length 0 return host issue index this 1 content else return content | returns the content the way its displayed with number |
public void set end z point p set ends null p | sets ending point of the line |
public void sync group list collection string new list group handler get group list boolean keep selected current group null new list contains current group group selector remove all items if new list is empty group selector set enabled false state scroller set visible false else for string s new list group selector add item s if keep selected group selector set selected item current group else group selector set selected index 0 group selector set enabled true state scroller set visible true state table validate state scroller validate | updates the list of the available groups using the output |
public void set ends point a point z boolean flag a false flag z false if a null a equals end a flag a true end a a if z null z equals end z flag z true end z z if flag a flag z update bounds | sets both points of the line |
protected boolean save diagram boolean ask name if this is saved ask name return true if get filename trigger has state ask name file file choose save jthinker files if file null return false get filename trigger set state file file file get filename trigger get state diagram data spec linker get diagram spec try spec save file catch throwable t logger log level severe exception t joption pane show message dialog this unable to save unable to save joption pane error message return false get modified trigger set state false return true | saves the diagram |
public void clear empty groups set string to remove new hash set string for string key group names key set if group names get key has content to remove add key for string key to remove remove group key | destroys all groups that contain no nodes |
public point get end a return end a | returns starting point of the line |
public void set text string text remove all for string st slice string text jlabel l new jlabel st l set visible true l set alignment x jlabel center alignment add l invalidate text info text | sets a new textual content |
public point get end z return end z | returns starting point of the line |
public string get text return text info | returns the text that component currently displays not sliced |
public diagram options get options return options | returns the holder of diagrams optional settings |
public void display manager dialog component element frame frame window utils find frame element group manager manager new group manager this node bundle frame manager set visible true | displays a management dialog |
public void display int width int height set bounds 200 200 width height set visible true | display a dialog |
public void set title string title border set title title update presentation | updates groups title |
public void update presentation if content is empty set visible false else int up down left right iterator jcomponent iterator content iterator rectangle rect iterator next get bounds left rect x right rect x rect width up rect y down rect y rect height while iterator has next iterator next get bounds rect left math min left rect x right math max right rect x rect width up math min up rect y down math max down rect y rect height set bounds left 30 up 30 right left 60 down up 60 set visible true holder repaint background | recalculates bounds and request a repaint |
public double distance to inner point point a point b new point a b translate get x get y return distance to point b | calculates distance from random point in widgets |
public void add content jcomponent component content add component update presentation | adds a component to the group |
public void remove content jcomponent component content remove component update presentation | removes a component from the group |
public double distance to point point a return geometry utils distance to line a end a end z | calculates distance from random point in widget parents |
public int content size return content size | returns count of associated components |
public void destroy content clear holder remove background this | clears content and removes itself from the background |
public boolean is conflict return conflict | returns true if edge is drawn as a conflict |
public void set conflict boolean conflict conflict conflict repaint | sets should this edge be displayed as a conflict |
public void set color color color this set background color get component 0 set background color background color | sets color to be used as a background |
public abstract action make reasons action return new abstract action suggest reasons public void action performed action event e interactor suggest reasons | creates a suggest reasons action |
public void add undesired effect point p engine new node point if p null throw new null pointer exception view get class to string jnode data spec node type statement clone node data type ude here p jnode node manager add spec node set color color pink view edit node node | adds a new undesired effect to the diagram |
public abstract action make ellipse action return new abstract action suggest ellipse public void action performed action event e interactor suggest ellipse | creates a suggest ellipse action |
public abstract action make udeaction return new abstract action add undesired effect public void action performed action event e interactor add undesired effect | creates an add undesired effect action |
public void remove jnode node nodes remove node for jedge edge get edges node remove edge for jleg leg get legs node remove leg view remove node | removes a node from container |
public interactor action factory get action factory if factory null factory new interactor action factory this return factory | returns the interactors |
public void add jedge edge boolean ca nodes contains edge get peer a cz nodes contains edge get peer z if ca cz edges add edge view add edge else string msg nodes for edge must be already contained throw new illegal argument exception msg | adds an edge to container |
public void add jleg leg boolean ca nodes contains leg get peer a cz edges contains leg get peer z if ca cz legs add leg view add leg else string msg ends for leg must be already contained throw new illegal argument exception msg | adds a leg to container |
public void remove jedge edges for jedge edge edges edge get peer a unwatch edge edge get peer z unwatch edge for jleg leg get legs edge remove leg edges remove edge view remove edge | removes an edge from container |
public void remove jleg leg leg get peer a unwatch leg legs remove leg view remove leg | removes a leg from container |
public t get int i return content get i | gets item at the specified index |
public int locate t item if item null return locate gap for int i 0 i content size i if item equals content get i return i return 1 | finds index of the item |
public int locate gap for int i 0 i content size i if content get i null return i return 1 | locates a first gap in the list |
public int add t item int t locate item if t 1 return t for int i 0 i content size i if content get i null content set i item return i content add item return content size 1 | adds an item to the container |
public boolean remove t item int t locate item if t 1 return false content set t null relax tail return true | removes an item from the container and leaves a gap instead |
public void state changed trigger event extends t event set state mix first get state second get state | dispatches state change of the datasources |
public void relax list t vector get content content clear content add all vector | removes all gaps from the list |
public boolean has state return state null | checks does this trigger has some state or not |
public diagram data get diagram spec nodes relax edges relax diagram data result new diagram data type result load this return result | calculates a diagram making specification for the current content |
public boolean contains t item return locate item 1 | returns true if item is in the array and false otherwise |
public void add state consumer trigger listener super t consumer if consumer null throw new illegal argument exception null consumer not allowed consumers add consumer | adds a consumer to a collection of consumers that should be notified |
public void remove state consumer trigger listener t consumer consumers remove consumer | removes a consumer from a collection of consumers that should be |
public boolean contains jedge edge return edges contains edge | checks does holder contain an edge or not |
protected int get consumer count return consumers size | returns a total number of attached |
public int issue index jnode node return nodes locate node | returns a numeric index of the node |
public boolean allows conflict return type is conflict allowed | returns true is diagram allows conflict shaped arrows |
public void update location point new value window utils compute center point component set state new value | immediately calculates components location and updates trigger state |
public void fix t data rest remove data add mapper fetch data | marks node as fixed it should not be moved during optimization |
public ordering level get level return level | returns current layout policy |
public void fix everything for t item rest add mapper fetch item rest clear | marks all nodes as fixed |
public void set level ordering level level this level level | sets current layout policy |
public point new node point dimension node size collection t nodes overlap resolver t resolver init overlap resolver resolver fix everything return resolver new node point data get area size width node size nodes | picks a free point for a node of given size that doesnt |
public point new node point dimension node size list t nodes collections empty list return new node point node size nodes | picks a free point for a node of given size that doesnt |
public point center point t stuff int x 0 int y 0 int c 0 for t t stuff point p geometry utils compute center point data get mapping fetch t x p x y p y c return new point x c y c | computes a center point of several nodes |
public void get state system out println get state try inst1 get state fail illegal state exception must be thrown catch illegal state exception e assert equals 1 inst1 get state | test of get state method of class mutable trigger |
public object apply a var1 b var2 return close one var1 var2 | invokes this closure once by applying the given pair of variables to it |
public object apply a var1 b var2 c var3 return close one var1 var2 var3 | invokes this closure once by applying the given triple of variables to it |
public object apply object vars throws wrong closure invocation exception return close one vars | invokes this closure once by applying the given set of variables to it |
public object apply return close one | invoke this closure |
public object apply a var return close one var | invokes this closure once by applying the given variable to it |
public closure0 curry a curry return curry new closure0 curry 1 | curry this closure by fixing its only free variable to a given value |
public object apply a var1 b var2 c var3 d var4 return close one var1 var2 var3 var4 | invokes this closure once by applying the given quadruple of variables to it |
protected abstract closure of object closed object string method name object args class closed class closed object instanceof class class closed object closed object get class invokable invokable method name equals constructor new invokable constructor find constructor closed class args new invokable method find method closed class method name args bind invocation invokable args set closed invokable is static null closed object return this | defines the method invoked by this closure |
public int get free vars number return free vars number | returns the number of free variables in this closure |
public integer aggregate integer first integer second return first second | aggregates two ints by summing them |
public double aggregate double first double second return first second | aggregates two doubles by summing them |
public number aggregate number first number second if second null return first null 0 0 first if second instanceof integer return aggregate first integer second if second instanceof long return aggregate first long second if second instanceof float return aggregate first float second if second instanceof double return aggregate first double second if second instanceof big integer return aggregate first big integer second if second instanceof big decimal return aggregate first big decimal second throw new runtime exception unable to aggregate first and second | aggregates two number by summing them |
public long aggregate long first long second return first second | aggregates two longs by summing them |
public t empty item return null | just returns null which is the idempotent item for a choosing aggreagation |
public void by string by add new string group condition by | adds a group condition the groups on the property with the given name |
public void as string alias get last as alias | sets an alias for the groups created using this condition |
public group condition as string alias this alias alias return this | sets an alias for the groups created using this condition |
public argument group condition head object argument argument actual argument actual argument argument additional properties put actual argument get inkvoked property name actual argument return this | adds the value of the given argument in the groups header |
public t first return get 0 as list get 0 | returns the first item in this group |
public int get size return find all size | returns how many items are present in this group |
public string get head value string key return | returns the value of the tag with the given key |
public object key return group key | returns the key of this group |
public t first return group first | returns the first item in this group |
public int get size return group get size | returns how many items are present in this group |
public string get head value string key return group get head value key | returns the value of the tag with the given key |
public t aggregate aggregator t aggregator return lambda aggregate get inner aggregator | aggregates the items in this iterable using the given |
public t first return list get 0 | returns the first item in this group |
public string join return lambda join get inner | joins all the object in this iterable by concatenating all their string representation |
public string get head value string key object value head map get key return value null value to string | returns the value of the tag with the given key |
public string join string separator return lambda join get inner separator | joins all the object in this iterable by concatenating all their string representation |
public t for each matcher matcher return lambda for each list t lambda select get inner matcher | transforms the subset of objects in this iterable that match the given mathcer |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.