input
stringlengths 10
828
| output
stringlengths 5
107
|
|---|---|
protected void show decoration set start decoration null arrow tip arrow new arrow tip 0 4 12 0 0 0 arrow set border color get line color set end decoration arrow
|
decorate the relation ship ends
|
protected void show illegal relationship java lang string warning base dialog show warning java awt component launcher view get instance res dependency line connection get string ctunallowed dependency non nls 1 warning
|
show warning message because relationship is illegal between current start and end figure
|
protected class diagram view get class diagram return class diagram
|
return the class diagram where this figure is shown
|
public void set size int new size my size new size
|
set the size of the diamond
|
public presentation edge get edge return edge
|
return the models presentation element
|
protected void add special menu jpopup menu popup menu overwrite for specific adaption
|
add individual popup menu items for this class
|
public void update view super update view text figure set text element utils map nls string note get node get content
|
model element changed from outside
|
public void basic display box point origin point corner super basic display box origin corner if launcher view get instance tool instanceof creation tool this instanceof link figure this instanceof note figure todo hack anchor point set afterwards by creation tool mouse down update coordinates
|
overwrites because relocation of new nodes comes after adding the figure to the
|
private void add attribute try 1 add model element factory create attribute def abstract class def get model element 2 add view for model see update model catch throwable e launcher view get instance handle exception e
|
add an attribute
|
public model element get model element if node null node iterator subject has next must be 1st subject for sure return model element node iterator subject next return null
|
return the model element displayed by this figure
|
private void mni copy launcher view get instance nyi copy
|
edit copy action
|
protected void initialize super initialize set layouter new simple layouter this set attribute figure popup menu adapt popup menu new jpopup menu set attribute jhot draw constants fill color ch ehi umleditor application launcher view get settings get background color set attribute jhot draw constants frame color ch ehi umleditor application launcher view get settings get foreground color
|
initialize the node
|
protected boolean is creating return creating
|
suppress visual updates while creating
|
protected void mni copy launcher view get instance nyi copy
|
edit copy action
|
private void mni cut launcher view get instance nyi cut non nls 1
|
edit cut action
|
protected void mni cut launcher view get instance nyi cut
|
edit cut action
|
private void mni fill color color chooser dialog dialog new color chooser dialog launcher view get instance true if dialog is saved set fill color dialog get chosen color get class diagram repaint
|
figures fill color action
|
private figure create attribute figure final attribute def attribute def attribute figure attribute figure new attribute figure attribute def get class diagram public void set text string new name string name get pure attribute name new name rename attribute prevent ping pong with meta model change element utils try set name attribute def name update model attribute figure set text attribute def get def lang name attribute figure set font get font return attribute figure
|
display attribute def in attribute compartment box
|
private void mni line color color chooser dialog dialog new color chooser dialog launcher view get instance true if dialog is saved set line color dialog get chosen color get class diagram repaint
|
line color action
|
private void mni line color color chooser dialog dialog new color chooser dialog launcher view get instance true if dialog is saved set line color dialog get chosen color
|
line color action
|
protected void mni paste launcher view get instance nyi paste
|
edit paste action
|
private figure create operation figure final uml operation operation operation figure operation figure new operation figure operation get class diagram public void set text string new name string name get pure operation name new name rename attribute prevent ping pong with meta model change element utils try set name operation name update model operation figure set text operation get def lang name operation figure set font get font return operation figure
|
display attribute def in attribute compartment box
|
private void mni paste launcher view get instance nyi paste
|
edit paste action
|
public void remove in model try model element tmp get model element 1 remove visible part remove visually 2 remove in model if tmp null element factory remove element tmp catch throwable e handle exception e remove in model null this
|
remove the figure in model implies visual deletion
|
public void remove visually try 1 remove drawing get class diagram remove this 2 remove node from model if get class diagram get diagram contains presentation element node if node instanceof ch ehi umleditor umlpresentation note node clear presentation edge get class diagram get diagram delete presentation element node remove presentation element node catch throwable e handle exception e common user access get mni edit remove text null this
|
remove the figure visually only
|
public void remove in model try 1 remove visually remove visually 2 remove in model if get model element null element factory remove element get model element set model element null catch throwable e node figure handle exception e node figure remove in model null this
|
remove the figure in model implies visual deletion
|
public void select in browser launcher view get instance get pnl navigation select element get model element
|
select the model element of this figure in navigation tree
|
protected void set class diagram class diagram view class diagram this class diagram class diagram
|
set the class diagram where this figure is shown
|
public void remove visually try 1 remove drawing if get class diagram null remove drawing get class diagram remove this 2 remove in model if edge null get class diagram get diagram contains presentation element edge remove edge from diagram get class diagram get diagram remove presentation element edge remove way points edge clear way point if edge contains subject get model element remove from model edge remove subject get model element catch throwable e node figure handle exception e common user access get mni edit remove text null this
|
remove the figure visually only in its diagram
|
protected void set creating boolean creating this creating creating if creating delay update while creating update view
|
suppress visual updates while creating
|
protected void set fill color java awt color color set attribute jhot draw constants fill color color if get node null color converter is same get node get background color prevent ping pong with meta model change get node set background color converter create color color
|
set the fill color
|
public boolean is empty return figure count 0
|
test whether this figure has child figures
|
protected void set font string font set attribute jhot draw constants font name font if get node null get node get font equals ignore case font prevent ping pong with meta model change get node set font font
|
set the font
|
public void set attribute string name object value if name equals jhot draw constants frame color don t forget to change color of decoration if get start decoration null abstract line decoration get start decoration set border color java awt color value changed if get end decoration null abstract line decoration get end decoration set border color java awt color value changed super set attribute name value
|
extend attribute map with popup menu and
|
protected void set line color java awt color color set attribute jhot draw constants frame color color if get node null color converter is same get node get foreground color prevent ping pong with meta model change get node set foreground color converter create color color
|
set the line frame color
|
private void set class diagram class diagram view class diagram this class diagram class diagram
|
set the class diagram drawing this edge
|
public void set node ch ehi umleditor umlpresentation presentation node node this node node
|
set the models presentation element
|
private void update operation figure todo tune currently all operation figure s are removed and readded at model change operations figure remove all operation separator set line visible false automatic display acc to existing methods if get model element instanceof classifier presentation abstract class get node is suppress operations iterator iterator classifier get model element iterator feature while iterator has next object feature iterator next if feature instanceof uml operation operation separator set line visible true operations figure add create operation figure uml operation feature operations figure update update
|
update the method figure and the class figure itself as well
|
public void show specification ch ehi umleditor application launcher view get instance show specification get model element
|
show the specification dialog of the presentation element
|
public void set edge presentation edge edge figure start figure end this edge edge save color get edge set foreground color converter create color get line color edge add endpoint node figure start get node edge add endpoint node figure end get node
|
set the edge and its coordinates
|
protected void set end connector connector new end connector super set end connector new end connector
|
overwrites for promoting visibility only
|
protected boolean update name string new name if new name equals get model element get def lang name prevent ping pong with meta model change event if element utils try set name get model element new name return false return true
|
update attribute name of model element
|
protected void set font string font set attribute jhot draw constants font name font if get edge null get edge get font equals ignore case font prevent ping pong with meta model change get edge set font font
|
set the font
|
public void update view show the saved colors should precede set node node if get node get background null set fill color color converter create color get node get background if get node get foreground null set line color color converter create color get node get foreground
|
model element changed from outside
|
protected void set line color java awt color color set attribute jhot draw constants frame color color if get edge null color converter is same get edge get foreground color prevent ping pong by meta model change get edge set foreground color converter create color color
|
set the line frame color
|
protected void set model element model element model element this model element model element
|
model element displayed by this edge
|
public void update view if get model element null if get model element contains namespace case removed parent detached this node before sending meta model changed event remove visually else node might have changed super update view package name figure set text get model element get def lang name todo package path figure set text from
|
model element changed from outside
|
protected void set start connector connector new start connector super set start connector new start connector
|
overwrites for promoting visibility only
|
protected void add special menu javax swing jpopup menu popup menu popup menu add new jseparator popup menu add chx navigable end popup menu add chx aggregable end popup menu add chx composite end popup menu add new jseparator chx show role set selected presentation role get edge is name visible popup menu add chx show role chx show multiplicity set selected presentation role get edge is multiplicity visible popup menu add chx show multiplicity chx show association name set selected is show association name popup menu add chx show association name update check boxes
|
add individual popup menu items for this class
|
protected void set tool view keep the class diagram where this figure is drawn set class diagram class diagram view abstract tool launcher view get instance tool view
|
sets the current uml tools view as diagram
|
protected void add xor note role def role def java awt dimension position if xor notes contains key role def xor notes put role def position
|
create xor note once for all participants only
|
protected void should warn string warning if last invalid edge null last invalid edge equals this last invalid edge this this show illegal relationship warning undraw illegal relationship release invalidate changed this edge figure is not any more desired in diagram if get class diagram null get class diagram remove this
|
check wether user must be warned because of illegal relationship
|
protected void show decoration set start decoration null set end decoration null
|
decorate the relation ship ends
|
protected void remove xor note object role def or participant role def role def null if role def or participant instanceof role def role def role def role def or participant else if role def or participant instanceof participant role def participant role def or participant get association if role def null xor notes contains key role def xor notes remove role def
|
useful to force recalculation of the position of xor note
|
protected association end get end association end if get model element instanceof association end return association end get model element else if get model element instanceof participant must be xor participant return association end participant get model element get association else probably not intitialized yet return null
|
return the role def which this figure is presenting
|
protected element get end element if get model element null if get model element instanceof association end if association end get model element contains participant return association end get model element get participant else if get model element instanceof participant xor return participant get model element get participant return null
|
return the ending model element of the relationship
|
private element get selected node tree path sel path get tre navigation get selection path if sel path null return element sel path get last path component return null
|
returns the tree node instance that is selected in the tree
|
protected element get start element if get model element null association end get model element contains association return association end get model element get association else return null if edge null presentation role edge contains association iterator iterator presentation role edge get association iterator subject if iterator has next return ch ehi uml1 4 foundation core association iterator next return null
|
return the starting model element of the relationship
|
public void update view don t remove while establishing connection if get class diagram null if get start element null get end element null get class diagram find figure get start element null get class diagram find figure get end element null both presentation nodes are to be found in class diagram remove visually
|
model element changed from outside
|
public string get pure attribute name string name string real name name int index name index of begin multiplicity if index 0 real name name substring 0 index else index name index of type separator if index 0 real name name substring 0 index return real name trim
|
format the attribute representation
|
public void update model string text attribute def get def lang name if class diagram is show attribute multiplicity text text begin multiplicity multiplicity converter get range attribute def get multiplicity end multiplicity if class diagram is show attribute types attribute def contains attr type text text type separator ili base type kind get type name attribute def false super set text text
|
format the attribute representation
|
public string get pure operation name string name string real name name int index name index of parameter begin if index 0 real name name substring 1 skip visibility index else todo nyi skip visibility return type real name name return real name trim
|
format the attribute representation
|
public void action performed java awt event action event e todo patch extended for key board enter handling end edit
|
stop editing at keyboard enter
|
protected void move relative int dx int dy if role def figure null role def figure basic move by dx dy if multiplicity figure null multiplicity figure basic move by dx dy
|
move the role def and cardinality figures
|
protected undoable create undo activity return new jhot draw text tool undo activity view get typing target get text
|
factory method for undo activity
|
protected void remove labels remove role remove multiplicity
|
remove visual components only in diagram
|
protected void remove multiplicity if multiplicity figure null get class diagram remove multiplicity figure multiplicity figure null if get edge null presentation role get edge set multiplicity angle 0 0 presentation role get edge set multiplicity radius 0 0
|
remove visual components only in diagram
|
protected void remove role if role def figure null get class diagram remove role def figure role def figure null if get edge null presentation role get edge set name angle 0 0 presentation role get edge set name radius 0 0
|
remove visual only in diagram
|
protected connector find association attribute connector element start end element int x int y element model element link figure link figure link figure find figure start end element if link figure null return null else make sure association attribute figure is not suppressed association attribute figure attr figure link figure show attribute figure start end element model element if attr figure null return null return connector attr figure connector at x y
|
find the figure of type association attribute figure in this drawing view
|
public void remove visually try remove visually ch ehi uml1 4 foundation core association get start element catch throwable e node figure handle exception e common user access get mni edit remove text null this
|
remove the figure visually only
|
private presentation role get edge return presentation role edge figure get edge
|
same edge as in parent figure
|
public void select in browser launcher view get instance get pnl navigation select element role def get model element get association
|
select the model element of this figure in navigation tree
|
public void remove visually try switch type case role def get edge set name visible false break case cardinality get edge set multiplicity visible false break case association name link figure remove labels break catch throwable e node figure handle exception e common user access get mni edit remove text null this
|
remove the figure visually only
|
protected class figure find class figure int x int y figure enumeration enumeration drawing figures while enumeration has more elements figure figure enumeration next figure if figure instanceof class figure figure instanceof association attribute figure figure contains point x y return class figure figure return null
|
find the class figure in this drawing view at the given coordinates
|
private void set aggregation end int aggregation kind set the from association end association end association end get end association end if association end null association end get aggregation aggregation kind prevent ping pong with meta model change event association end set aggregation aggregation kind show decoration
|
set the starting from participant classifier association end
|
public void draw graphics g if line visible g set color get frame color g draw line start point x start point y end point x 1 start point y
|
draw the separation line and to hold some space free
|
public void set line visible boolean visible line visible visible
|
set whether line shall be drawn visible or invisible
|
private void initialize try this set size new dimension 567 172 this set content pane get pnl main this set title association to linknode button group group new button group group add get rbt nary group add get rbt xor check consistency catch java lang throwable e handle exception e
|
this method initializes this
|
private jpanel get pnl main if pnl main null try pnl main new jpanel pnl main set layout new box layout get pnl main box layout y axis pnl main add get jpanel null catch java lang throwable e handle exception e return pnl main
|
this method initializes pnl main
|
protected figure find connectable figure int x int y connection figure connection copied code from jhot draw s connection tool find connectable figure figure enumeration k drawing figures reverse while k has more elements figure figure k next figure if figure includes connection figure can connect figure contains point x y return figure return null
|
find a possible node figure as target for given connection
|
private jpanel get jpanel if j panel null try j panel new jpanel j panel set layout new border layout j panel add get pnl south border layout south j panel add get pnl center border layout center catch java lang throwable e handle exception e return j panel
|
this method initializes j panel
|
private jpanel get pnl south if pnl south null try pnl south new jpanel pnl south set layout new flow layout pnl south set preferred size new dimension 0 30 pnl south add get btn ok null pnl south add get btn cancel null catch java lang throwable e handle exception e return pnl south
|
this method initializes pnl south
|
private jbutton get btn ok if btn ok null try btn ok new jbutton btn ok set text get okstring btn ok add action listener new java awt event action listener public void action performed java awt event action event e ok pressed catch java lang throwable e handle exception e return btn ok
|
this method initializes btn ok
|
private void set navigable boolean is navigable association end association end if association end null association end is navigable is navigable prevent ping pong with meta model change event association end set navigable is navigable show decoration
|
set beginning start association end
|
private jbutton get btn cancel if btn cancel null try btn cancel new jbutton btn cancel set text get cancel string btn cancel add action listener new java awt event action listener public void action performed java awt event action event e cancel pressed catch java lang throwable e handle exception e return btn cancel
|
this method initializes btn cancel
|
protected connection figure find connection int x int y copied method from jhot draw s connection tool find connection java util enumeration k drawing figures reverse while k has more elements figure figure figure k next element figure figure find figure inside x y if figure null figure instanceof connection figure return connection figure figure return null
|
finds an existing connection figure say edge at given coordinates
|
private void set navigable end boolean is navigable set navigable is navigable get end association end
|
set ending end association end
|
private jradio button get rbt nary if rbt nary null try rbt nary new jradio button rbt nary set bounds new rectangle 24 38 106 21 rbt nary set selected true rbt nary set text n ary rbt nary add item listener new java awt event item listener public void item state changed java awt event item event e check consistency catch java lang throwable e handle exception e return rbt nary
|
this method initializes rbt nary
|
protected void show decoration connection to link figure resp association def set start decoration null association end association end get end association end if association end null set end decoration null else set end decoration association line decoration create decoration association end get line color update immediately
|
show the aggregation kind visually
|
private jradio button get rbt xor if rbt xor null try rbt xor new jradio button rbt xor set bounds new rectangle 24 61 62 23 rbt xor set text xor rbt xor add item listener new java awt event item listener public void item state changed java awt event item event e check consistency catch java lang throwable e handle exception e return rbt xor
|
this method initializes rbt xor
|
protected void show illegal relationship java lang string warning new warning dialog launcher view get instance no connection res presentation role figure get string cwconnection not established non nls 1 warning
|
show warning message because relationship is illegal between current start and end figure
|
private jcombo box get cbx xor participant if cbx xor participant null try cbx xor participant new jcombo box cbx xor participant set bounds new rectangle 222 64 321 19 cbx xor participant add item listener new java awt event item listener public void item state changed java awt event item event e check consistency catch java lang throwable e handle exception e return cbx xor participant
|
this method initializes cbx xor participant
|
public void show specification ch ehi umleditor application launcher view get instance show specification get start element
|
show the specification dialog of the presentation element
|
protected void update labels if role def figure null role def figure update view if multiplicity figure null multiplicity figure update view
|
refresh label figures
|
protected connector find node connector element element int x int y figure figure find figure element if figure null return null else return connector figure connector at x y
|
find the figure in this drawing view containing the given element
|
private void update link figure ch ehi uml1 4 foundation core association association def figure link figure get class diagram find figure association def if link figure null link figure link figure update view
|
delegate any update to link figure
|
private void find parent element element root if root instanceof namespace iterator iterator namespace root iterator diagram while parent element null iterator has next if diagram equals diagram iterator next parent found parent element root if parent element null try further hierarchies iterator namespace root iterator owned element while parent element null iterator has next find parent element element iterator next
|
find parent model element of this diagram
|
public string get title object tokens model element get parent element get def lang name element utils map nls string get diagram get name return nls utils format message node figure get resource string class diagram view class ctclass diagram tokens non nls 1
|
return the title of this diagram
|
public void ignore meta model changes boolean ignore java awt container container this while container container get parent instanceof drawing frame drawing frame frame drawing frame container if ignore frame unregister listener else frame register listener
|
allow suppressing of meta model change events
|
public boolean is addable element element return element null element instanceof abstract class def is drawable package element get class class figure is pseudo classifier element element instanceof domain def
|
check wether element might by added to diagram
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.