param f the frame to set public static void set frame frame f argo dialog frame f setframe argodialog creates a new argo dialog with the default option type param title the title string for the dialog param modal code true code if the dialog is modal see dialog dialog frame string boolean public argo dialog string title boolean modal super frame title modal init argodialog optiontype argodialog creates a new argo dialog with the specified option type param title the title string for the dialog param option type defines which buttons will be available in the dialog param modal code true code if the dialog is modal see dialog dialog frame string int boolean public argo dialog string title int option type boolean modal super frame title option type modal init argodialog optiontype optiontype argodialog optiontype optiontype protected void name buttons name button get ok button button ok name button get cancel button button cancel name button get close button button close name button get yes button button yes name button get no button button no name button get help button button help namebuttons namebutton getokbutton namebutton getcancelbutton namebutton getclosebutton namebutton getyesbutton namebutton getnobutton namebutton gethelpbutton allocates names for a button param button the button to give names param key the key used to localize the button protected void name button abstract button button string key if button null button set text translator localize key string mnemonic translator localize key mnemonic key suffix if mnemonic null mnemonic length 0 button set mnemonic mnemonic char at 0 namebutton abstractbutton settext mnemonic_key_suffix setmnemonic charat private void init ui utils load common key map this uiutils loadcommonkeymap construct a default property panel for uml package elements public prop panel package this label package lookup icon package proppanelpackage lookupicon construct a property panel for uml packages with the name and icon param title the title for this panel param icon the icon to show next to the title public prop panel package string title image icon icon super title icon place elements proppanelpackage imageicon placeelements via this method the gui elements are added to the proppanel subclasses should override to place the elements the way they want protected void place elements add field label name get name text field add field label namespace get namespace selector add get visibility panel add get modifiers panel add separator add field label generalizations get generalization scroll add field label specializations get specialization scroll add separator add field label owned elements get owned elements scroll j list import list new uml mutable linked list new uml classifier package imports list model new action add package import null new action remove package import true add field label imported elements new j scroll pane import list add action new action navigate namespace add action new action add package add action new action add data type add action new action add enumeration add action new action dialog element import add action new action new stereotype add action new action new tag definition add action get delete action placeelements addfield getnametextfield addfield getnamespaceselector getvisibilitypanel getmodifierspanel addseparator addfield getgeneralizationscroll addfield getspecializationscroll addseparator addfield getownedelementsscroll jlist importlist umlmutablelinkedlist umlclassifierpackageimportslistmodel actionaddpackageimport actionremovepackageimport addfield jscrollpane importlist addaction actionnavigatenamespace addaction actionaddpackage addaction actionadddatatype addaction actionaddenumeration addaction actiondialogelementimport addaction actionnewstereotype addaction actionnewtagdefinition addaction getdeleteaction returns the modifiers panel return a panel with modifiers public j panel get modifiers panel if modifiers panel null modifiers panel create border panel translator localize label modifiers modifiers panel add new uml generalizable element abstract check box modifiers panel add new uml generalizable element leaf check box modifiers panel add new uml generalizable element root check box modifiers panel add new uml derived check box return modifiers panel jpanel getmodifierspanel modifierspanel modifierspanel createborderpanel modifierspanel umlgeneralizableelementabstractcheckbox modifierspanel umlgeneralizableelementleafcheckbox modifierspanel umlgeneralizableelementrootcheckbox modifierspanel umlderivedcheckbox modifierspanel returns the generalization scroll return j scroll pane public j scroll pane get generalization scroll if generalization scroll null j list list new uml linked list generalization list model generalization scroll new j scroll pane list return generalization scroll generalizationscroll jscrollpane jscrollpane getgeneralizationscroll generalizationscroll jlist umllinkedlist generalizationlistmodel generalizationscroll jscrollpane generalizationscroll returns the specialization scroll return j scroll pane public j scroll pane get specialization scroll if specialization scroll null j list list new uml linked list specialization list model specialization scroll new j scroll pane list return specialization scroll specializationscroll jscrollpane jscrollpane getspecializationscroll specializationscroll jlist umllinkedlist specializationlistmodel specializationscroll jscrollpane specializationscroll construct an action which brings up the add element import dialog public action dialog element import super put value action small icon resource loader wrapper lookup icon element import set the tooltip string put value action short description translator localize button add element import actiondialogelementimport putvalue small_icon resourceloaderwrapper lookupicon elementimport putvalue short_description see org tigris gef undo undoable action action performed java awt event action event override public void action performed action event e super action performed e object target target manager get instance get single model target if target null uml add dialog dialog new uml add dialog get choices target get selected target get dialog title is multi select is exclusive int result dialog show dialog argo frame get instance if result j option pane ok option do it target dialog get selected undoableaction actionperformed actionevent actionperformed actionevent actionperformed targetmanager getinstance getsinglemodeltarget umladddialog umladddialog getchoices getselected getdialogtitle ismultiselect isexclusive showdialog argoframe getinstance joptionpane ok_option doit getselected protected list get choices object target list result new array list todo correctly implement next function in the model subsystem for issue 1942 result add all model get model management helper get all possible imports target return result getchoices arraylist addall getmodelmanagementhelper getallpossibleimports protected list get selected object target list result new array list result add all model get facade get imported elements target return result getselected arraylist addall getfacade getimportedelements protected string get dialog title return translator localize dialog title add imported elements getdialogtitle public boolean is multi select return true ismultiselect public boolean is exclusive return true isexclusive protected void do it object target list selected model get model management helper set imported elements target selected doit getmodelmanagementhelper setimportedelements constructor public action set tag definition owner super translator localize set resource loader wrapper lookup icon set set the tooltip string put value action short description translator localize set actionsettagdefinitionowner resourceloaderwrapper lookupicon putvalue short_description override public void action performed action event e super action performed e object source e get source log info receiving e e getid e get action command if source instanceof uml combo box2 e get modifiers awt event mouse event mask uml combo box2 combo uml combo box2 source object o combo get selected item final object tag definition combo get target log info set owner to o if model get facade isa stereotype o model get facade isa tag definition tag definition model get core helper set owner tag definition o actionperformed actionevent actionperformed getsource getactioncommand umlcombobox2 getmodifiers awtevent mouse_event_mask umlcombobox2 umlcombobox2 getselecteditem tagdefinition gettarget getfacade isastereotype getfacade isatagdefinition tagdefinition getcorehelper setowner tagdefinition constructor public action set meta class super translator localize set resource loader wrapper lookup icon set set the tooltip string put value action short description translator localize set actionsetmetaclass resourceloaderwrapper lookupicon putvalue short_description public void action performed action event e super action performed e object source e get source object new base null object stereo null if source instanceof uml combo box2 uml combo box2 combo uml combo box2 source stereo combo get target if model get facade isa stereotype stereo collection old bases model get facade get base classes stereo new base combo get selected item if new base null todo how come this happens if old bases contains new base model get extension mechanisms helper add base class stereo new base else if new base null new base equals model get extension mechanisms helper add base class stereo model element actionperformed actionevent actionperformed getsource newbase umlcombobox2 umlcombobox2 umlcombobox2 gettarget getfacade isastereotype oldbases getfacade getbaseclasses newbase getselecteditem newbase oldbases newbase getextensionmechanismshelper addbaseclass newbase newbase newbase getextensionmechanismshelper addbaseclass modelelement construct a property panel for tag definition elements public prop panel tag definition super label tag definition title lookup icon tag definition add field translator localize label name get name text field add field translator localize label owner get owner selector add field translator localize label namespace gettd namespace selector add field translator localize label multiplicity get multiplicity combo box add get visibility panel add separator uml combo box navigator type combo box nav new uml combo box navigator translator localize label class navigate tooltip get type combo box type combo box nav set enabled false add field translator localize label type type combo box nav this field shows the model elements that have a tagged value according this tagged definition add field translator localize label tagged values get typed values scroll add action new action navigate container element add action new action new tag definition add action get delete action tagdefinition proppaneltagdefinition lookupicon tagdefinition addfield getnametextfield addfield getownerselector addfield gettdnamespaceselector addfield getmultiplicitycombobox getvisibilitypanel addseparator umlcomboboxnavigator typecomboboxnav umlcomboboxnavigator gettypecombobox typecomboboxnav setenabled addfield typecomboboxnav modelelements taggedvalue taggeddefinition addfield gettypedvaluesscroll addaction actionnavigatecontainerelement addaction actionnewtagdefinition addaction getdeleteaction protected j component gettd namespace selector if td namespace selector null td namespace selector new uml searchable combo box td namespace combo box model new action set tag definition namespace true return td namespace selector jcomponent gettdnamespaceselector tdnamespaceselector tdnamespaceselector umlsearchablecombobox tdnamespacecomboboxmodel actionsettagdefinitionnamespace tdnamespaceselector returns the stereotype selecter this is a component which allows the user to select a single item as the stereotype return the stereotype selecter protected j component get owner selector if owner selector null owner selector new box box layout x axis owner selector add new uml combo box navigator translator localize label owner navigate tooltip new uml combo box2 owner combo box model new action set tag definition owner return owner selector jcomponent getownerselector ownerselector ownerselector boxlayout x_axis ownerselector umlcomboboxnavigator umlcombobox2 ownercomboboxmodel actionsettagdefinitionowner ownerselector returns the multiplicity combo box return uml multiplicity combo box2 protected j panel get multiplicity combo box if multiplicity combo box null multiplicity combo box new uml multiplicity panel return multiplicity combo box multiplicitycombobox umlmultiplicitycombobox2 jpanel getmultiplicitycombobox multiplicitycombobox multiplicitycombobox umlmultiplicitypanel multiplicitycombobox returns the type combo box return uml combo box2 public uml combo box2 get type combo box if type combo box null if type combo box model null type combo box model new uml meta class combo box model type combo box new uml combo box2 type combo box model action set tag definition type get instance type combo box set enabled false return type combo box typecombobox umlcombobox2 umlcombobox2 gettypecombobox typecombobox typecomboboxmodel typecomboboxmodel umlmetaclasscomboboxmodel typecombobox umlcombobox2 typecomboboxmodel actionsettagdefinitiontype getinstance typecombobox setenabled typecombobox returns the typed values scroll return j scroll pane public j scroll pane get typed values scroll if typed values scroll null j list typed values list new uml linked list typed values list model typed values scroll new j scroll pane typed values list return typed values scroll typedvaluesscroll jscrollpane jscrollpane gettypedvaluesscroll typedvaluesscroll jlist typedvalueslist umllinkedlist typedvalueslistmodel typedvaluesscroll jscrollpane typedvalueslist typedvaluesscroll see org argouml uml ui uml combo box model2 is valid element object override protected boolean is valid element object o return model get facade isa namespace o umlcomboboxmodel2 isvalidelement isvalidelement getfacade isanamespace override protected void build model list collection roots project manager get manager get current project get roots collection c new hash set c add null for object root roots c add root c add all model get model management helper get all namespaces root object target get target these next lines for the case that the current namespace is not a valid one which of course should not happen but it does in this case for t ds from profiles todo enhance so that this never happens if target null object namespace model get facade get namespace target if namespace null c add namespace log warn the current td namespace is not a valid one set elements c buildmodellist projectmanager getmanager getcurrentproject getroots hashset addall getmodelmanagementhelper getallnamespaces gettarget tds getfacade getnamespace setelements override public void model changed uml change event evt rebuild the list from scratch to be sure it s correct object t get target if t null evt get source t evt instanceof attribute change event evt instanceof association change event allow the evt get new value to be null see parent class build model list modelchanged umlchangeevent gettarget getsource attributechangeevent associationchangeevent getnewvalue buildmodellist constructor for action set model element namespace protected action set tag definition namespace super translator localize set null set the tooltip string put value action short description translator localize set actionsetmodelelementnamespace actionsettagdefinitionnamespace putvalue short_description override public void action performed action event e super action performed e object source e get source object old namespace null object new namespace null object m null if source instanceof uml combo box2 uml combo box2 box uml combo box2 source object o box get target if model get facade isa model element o m o old namespace model get facade get namespace m o box get selected item if model get facade isa namespace o new namespace o if new namespace old namespace m null new namespace null if there is a namespace then there may not be a owner stereotype model get core helper set owner m null model get core helper set namespace m new namespace super action performed e actionperformed actionevent actionperformed getsource oldnamespace newnamespace umlcombobox2 umlcombobox2 umlcombobox2 gettarget getfacade isamodelelement oldnamespace getfacade getnamespace getselecteditem getfacade isanamespace newnamespace newnamespace oldnamespace newnamespace getcorehelper setowner getcorehelper setnamespace newnamespace actionperformed the constructor public action new tag definition super translator localize button new tagdefinition resource loader wrapper lookup icon button new tagdefinition set the tooltip string put value action short description translator localize button new tagdefinition actionnewtagdefinition resourceloaderwrapper lookupicon putvalue short_description public void action performed action event e super action performed e object t target manager get instance get model target object owner null object namespace null if model get facade isa stereotype t owner t else if model get facade isa package t namespace t else namespace model get facade get model t object new tag definition model get extension mechanisms factory build tag definition string null owner namespace target manager get instance set target new tag definition super action performed e actionperformed actionevent actionperformed targetmanager getinstance getmodeltarget getfacade isastereotype getfacade isapackage getfacade getmodel newtagdefinition getextensionmechanismsfactory buildtagdefinition targetmanager getinstance settarget newtagdefinition actionperformed constructor for action set tag definition type protected action set tag definition type super translator localize set null set the tooltip string put value action short description translator localize set actionsettagdefinitiontype actionsettagdefinitiontype putvalue short_description override public void action performed action event e super action performed e object source e get source log debug receiving e e getid e get action command string old type null string new type null object tag def null if source instanceof uml combo box2 uml combo box2 box uml combo box2 source object t box get target if model get facade isa tag definition t tag def t old type string model get facade get type tag def new type string box get selected item log debug selected item is new type if new type null new type equals old type tag def null log debug new type is new type model get extension mechanisms helper set tag type tag def new type actionperformed actionevent actionperformed getsource getactioncommand oldtype newtype tagdef umlcombobox2 umlcombobox2 umlcombobox2 gettarget getfacade isatagdefinition tagdef oldtype getfacade gettype tagdef newtype getselecteditem newtype newtype newtype oldtype tagdef newtype getextensionmechanismshelper settagtype tagdef newtype return returns the singleton instance public static action set tag definition type get instance return singleton actionsettagdefinitiontype getinstance the constructor public action add enumeration literal super translator localize button new enumeration literal resource loader wrapper lookup icon button new enumeration literal actionaddenumerationliteral resourceloaderwrapper lookupicon public void action performed action event ae super action performed ae object target target manager get instance get model target object enumeration if model get facade isa enumeration target enumeration target else if model get facade isa enumeration literal target enumeration model get facade get enumeration target else return object oper model get core factory build enumeration literal anon enumeration target manager get instance set target oper actionperformed actionevent actionperformed targetmanager getinstance getmodeltarget getfacade isaenumeration getfacade isaenumerationliteral getfacade getenumeration getcorefactory buildenumerationliteral targetmanager getinstance settarget constructor for action set element ownership specification protected action set generalizable element leaf super translator localize set null set the tooltip string put value action short description translator localize set actionsetelementownershipspecification actionsetgeneralizableelementleaf putvalue short_description public void action performed action event e super action performed e if e get source instanceof uml check box2 uml check box2 source uml check box2 e get source object target source get target if model get facade isa generalizable element target model get facade isa operation target model get facade isa reception target model get core helper set leaf target source is selected actionperformed actionevent actionperformed getsource umlcheckbox2 umlcheckbox2 umlcheckbox2 getsource gettarget getfacade isageneralizableelement getfacade isaoperation getfacade isareception getcorehelper setleaf isselected return returns the singleton public static action set generalizable element leaf get instance return singleton actionsetgeneralizableelementleaf getinstance constructor for action set structural feature type protected action set parameter type super translator localize set null set the tooltip string put value action short description translator localize set actionsetstructuralfeaturetype actionsetparametertype putvalue short_description override public void action performed action event e super action performed e object source e get source object old classifier null object new classifier null object para null if source instanceof uml combo box2 uml combo box2 box uml combo box2 source object o box get target if model get facade isa parameter o para o old classifier model get facade get type para o box get selected item if model get facade isa classifier o new classifier o if new classifier null new classifier old classifier para null model get core helper set type para new classifier super action performed e actionperformed actionevent actionperformed getsource oldclassifier newclassifier umlcombobox2 umlcombobox2 umlcombobox2 gettarget getfacade isaparameter oldclassifier getfacade gettype getselecteditem getfacade isaclassifier newclassifier newclassifier newclassifier oldclassifier getcorehelper settype newclassifier actionperformed return returns the singleton public static action set parameter type get instance return singleton actionsetparametertype getinstance constructor for action set element ownership specification protected action set model element visibility super translator localize set null set the tooltip string put value action short description translator localize set actionsetelementownershipspecification actionsetmodelelementvisibility putvalue short_description public void action performed action event e super action performed e if e get source instanceof j radio button j radio button source j radio button e get source string action command source get action command object target uml radio button panel source get parent get target if model get facade isa model element target model get facade isa element residence target model get facade isa element import target object kind null if action command equals public command kind model get visibility kind get public else if action command equals protected command kind model get visibility kind get protected else if action command equals package command kind model get visibility kind get package else kind model get visibility kind get private model get core helper set visibility target kind actionperformed actionevent actionperformed getsource jradiobutton jradiobutton jradiobutton getsource actioncommand getactioncommand umlradiobuttonpanel getparent gettarget getfacade isamodelelement getfacade isaelementresidence getfacade isaelementimport actioncommand public_command getvisibilitykind getpublic actioncommand protected_command getvisibilitykind getprotected actioncommand package_command getvisibilitykind getpackage getvisibilitykind getprivate getcorehelper setvisibility return returns the singleton public static action set model element visibility get instance return singleton actionsetmodelelementvisibility getinstance constructor for action set element ownership specification protected action set association end aggregation super translator localize action set null set the tooltip string put value action short description translator localize action set actionsetelementownershipspecification actionsetassociationendaggregation putvalue short_description public void action performed action event e super action performed e if e get source instanceof j radio button j radio button source j radio button e get source string action command source get action command object target uml radio button panel source get parent get target if model get facade isa association end target object m target object kind null if action command equals aggregate command kind model get aggregation kind get aggregate else if action command equals composite command kind model get aggregation kind get composite else kind model get aggregation kind get none model get core helper set aggregation m kind actionperformed actionevent actionperformed getsource jradiobutton jradiobutton jradiobutton getsource actioncommand getactioncommand umlradiobuttonpanel getparent gettarget getfacade isaassociationend actioncommand aggregate_command getaggregationkind getaggregate actioncommand composite_command getaggregationkind getcomposite getaggregationkind getnone getcorehelper setaggregation return returns the singleton public static action set association end aggregation get instance return singleton actionsetassociationendaggregation getinstance constructor for action set structural feature type protected action set structural feature type super translator localize set null set the tooltip string put value action short description translator localize set actionsetstructuralfeaturetype actionsetstructuralfeaturetype putvalue short_description override public void action performed action event e super action performed e object source e get source object old classifier null object new classifier null object attr null if source instanceof uml combo box2 uml combo box2 box uml combo box2 source object o box get target if model get facade isa structural feature o attr o old classifier model get facade get type attr o box get selected item if model get facade isa classifier o new classifier o if new classifier old classifier attr null model get core helper set type attr new classifier actionperformed actionevent actionperformed getsource oldclassifier newclassifier umlcombobox2 umlcombobox2 umlcombobox2 gettarget getfacade isastructuralfeature oldclassifier getfacade gettype getselecteditem getfacade isaclassifier newclassifier newclassifier oldclassifier getcorehelper settype newclassifier return returns the singleton public static action set structural feature type get instance return singleton actionsetstructuralfeaturetype getinstance constructor for action set element ownership specification protected action set parameter direction kind super translator localize set null set the tooltip string put value action short description translator localize set actionsetelementownershipspecification actionsetparameterdirectionkind putvalue short_description override public void action performed action event e super action performed e if e get source instanceof j radio button j radio button source j radio button e get source string action command source get action command object target uml radio button panel source get parent get target if model get facade isa parameter target object kind null if action command null kind null else if action command equals in command kind model get direction kind get in parameter else if action command equals out command kind model get direction kind get out parameter else if action command equals inout command kind model get direction kind get in out parameter else if action command equals return command kind model get direction kind get return parameter model get core helper set kind target kind actionperformed actionevent actionperformed getsource jradiobutton jradiobutton jradiobutton getsource actioncommand getactioncommand umlradiobuttonpanel getparent gettarget getfacade isaparameter actioncommand actioncommand in_command getdirectionkind getinparameter actioncommand out_command getdirectionkind getoutparameter actioncommand inout_command getdirectionkind getinoutparameter actioncommand return_command getdirectionkind getreturnparameter getcorehelper setkind return returns the singleton public static action set parameter direction kind get instance return singleton actionsetparameterdirectionkind getinstance constructor for action set element ownership specification protected action set association end navigable super translator localize action set null set the tooltip string put value action short description translator localize action set actionsetelementownershipspecification actionsetassociationendnavigable putvalue short_description public void action performed action event e super action performed e if e get source instanceof uml check box2 uml check box2 source uml check box2 e get source object target source get target if model get facade isa association end target object m target model get core helper set navigable m source is selected actionperformed actionevent actionperformed getsource umlcheckbox2 umlcheckbox2 umlcheckbox2 getsource gettarget getfacade isaassociationend getcorehelper setnavigable isselected return returns the singleton public static action set association end navigable get instance return singleton actionsetassociationendnavigable getinstance constructor for action set element ownership specification protected action set association end target scope super translator localize set null set the tooltip string put value action short description translator localize set actionsetelementownershipspecification actionsetassociationendtargetscope putvalue short_description public void action performed action event e super action performed e if e get source instanceof uml check box2 uml check box2 source uml check box2 e get source object target source get target if model get facade isa association end target object m target model get core helper set static m source is selected actionperformed actionevent actionperformed getsource umlcheckbox2 umlcheckbox2 umlcheckbox2 getsource gettarget getfacade isaassociationend getcorehelper setstatic isselected return returns the singleton public static action set association end target scope get instance return singleton actionsetassociationendtargetscope getinstance constructor for action set element ownership specification protected action set feature owner scope super translator localize set null set the tooltip string put value action short description translator localize set actionsetelementownershipspecification actionsetfeatureownerscope putvalue short_description public void action performed action event e super action performed e if e get source instanceof uml check box2 uml check box2 source uml check box2 e get source object target source get target if model get facade isa feature target model get core helper set static target source is selected actionperformed actionevent actionperformed getsource umlcheckbox2 umlcheckbox2 umlcheckbox2 getsource gettarget getfacade isafeature getcorehelper setstatic isselected return returns the singleton public static action set feature owner scope get instance return singleton actionsetfeatureownerscope getinstance constructor for action set model element stereotype protected action set model element stereotype super translator localize set null set the tooltip string put value action short description translator localize set actionsetmodelelementstereotype actionsetmodelelementstereotype putvalue short_description public void action performed action event e super action performed e object source e get source collection old stereo null object new stereo null object target null if source instanceof uml combo box2 uml combo box2 combo uml combo box2 source if model get facade isa stereotype combo get selected item new stereo combo get selected item if model get facade isa model element combo get target target combo get target old stereo model get facade get stereotypes target if equals combo get selected item new stereo null if old stereo null old stereo contains new stereo target null add stereotypes submenu if new stereo null model get core helper add stereotype target new stereo actionperformed actionevent actionperformed getsource oldstereo newstereo umlcombobox2 umlcombobox2 umlcombobox2 getfacade isastereotype getselecteditem newstereo getselecteditem getfacade isamodelelement gettarget gettarget oldstereo getfacade getstereotypes getselecteditem newstereo oldstereo oldstereo newstereo newstereo getcorehelper addstereotype newstereo return returns the singleton public static action set model element stereotype get instance return singleton actionsetmodelelementstereotype getinstance constructor for action set model element namespace public action set model element namespace super actionsetmodelelementnamespace actionsetmodelelementnamespace public void action performed action event e object source e get source object old namespace null object new namespace null object m null if source instanceof uml combo box2 uml combo box2 box uml combo box2 source object o box get target if model get facade isa model element o m o old namespace model get facade get namespace m o box get selected item if model get facade isa namespace o new namespace o if new namespace old namespace m null new namespace null super action performed e model get core helper set namespace m new namespace actionperformed actionevent getsource oldnamespace newnamespace umlcombobox2 umlcombobox2 umlcombobox2 gettarget getfacade isamodelelement oldnamespace getfacade getnamespace getselecteditem getfacade isanamespace newnamespace newnamespace oldnamespace newnamespace actionperformed getcorehelper setnamespace newnamespace constructor for action set element ownership specification protected action set changeability super translator localize set null set the tooltip string put value action short description translator localize set actionsetelementownershipspecification actionsetchangeability putvalue short_description public void action performed action event e super action performed e if e get source instanceof j radio button j radio button source j radio button e get source string action command source get action command object target uml radio button panel source get parent get target if model get facade isa association end target model get facade isa attribute target object m target if action command equals changeable command model get core helper set read only m false else if action command equals addonly command todo removed from uml 2 x phase out usage tfm 20070530 model get core helper set changeability m model get changeable kind get add only else model get core helper set read only m true actionperformed actionevent actionperformed getsource jradiobutton jradiobutton jradiobutton getsource actioncommand getactioncommand umlradiobuttonpanel getparent gettarget getfacade isaassociationend getfacade isaattribute actioncommand changeable_command getcorehelper setreadonly actioncommand addonly_command getcorehelper setchangeability getchangeablekind getaddonly getcorehelper setreadonly return returns the singleton public static action set changeability get instance return singleton actionsetchangeability getinstance constructor for action set structural feature type protected action set feature owner super translator localize set null set the tooltip string put value action short description translator localize set actionsetstructuralfeaturetype actionsetfeatureowner putvalue short_description public void action performed action event e super action performed e object source e get source object old classifier null object new classifier null object feature null if source instanceof uml combo box2 uml combo box2 box uml combo box2 source object o box get target if model get facade isa feature o feature o old classifier model get facade get owner feature o box get selected item if model get facade isa classifier o new classifier o if new classifier old classifier feature null new classifier null model get core helper set owner feature new classifier actionperformed actionevent actionperformed getsource oldclassifier newclassifier umlcombobox2 umlcombobox2 umlcombobox2 gettarget getfacade isafeature oldclassifier getfacade getowner getselecteditem getfacade isaclassifier newclassifier newclassifier oldclassifier newclassifier getcorehelper setowner newclassifier return returns the singleton public static action set feature owner get instance return singleton actionsetfeatureowner getinstance constructor for action set structural feature type protected action set generalization powertype super translator localize set null set the tooltip string put value action short description translator localize set actionsetstructuralfeaturetype actionsetgeneralizationpowertype putvalue short_description override public void action performed action event e super action performed e object source e get source object old classifier null object new classifier null object gen null if source instanceof uml combo box2 uml combo box2 box uml combo box2 source object o box get target if model get facade isa generalization o gen o old classifier model get facade get powertype gen o box get selected item if model get facade isa classifier o new classifier o if new classifier old classifier gen null model get core helper set powertype gen new classifier actionperformed actionevent actionperformed getsource oldclassifier newclassifier umlcombobox2 umlcombobox2 umlcombobox2 gettarget getfacade isageneralization oldclassifier getfacade getpowertype getselecteditem getfacade isaclassifier newclassifier newclassifier oldclassifier getcorehelper setpowertype newclassifier return returns the singleton public static action set generalization powertype get instance return singleton actionsetgeneralizationpowertype getinstance constructor protected action set behavioral feature query super translator localize set null set the tooltip string put value action short description translator localize set actionsetbehavioralfeaturequery putvalue short_description public void action performed action event e super action performed e if e get source instanceof uml check box2 uml check box2 source uml check box2 e get source object target source get target if model get facade isa behavioral feature target object m target model get core helper set query m source is selected actionperformed actionevent actionperformed getsource umlcheckbox2 umlcheckbox2 umlcheckbox2 getsource gettarget getfacade isabehavioralfeature getcorehelper setquery isselected return returns the singleton public static action set behavioral feature query get instance return singleton actionsetbehavioralfeaturequery getinstance constructor for action set element ownership specification protected action set element ownership specification super translator localize set null set the tooltip string put value action short description translator localize set actionsetelementownershipspecification actionsetelementownershipspecification putvalue short_description public void action performed action event e super action performed e if e get source instanceof uml check box2 uml check box2 source uml check box2 e get source object target source get target if model get facade isa model element target model get facade isa element import target object m target model get model management helper set specification m model get facade is specification m actionperformed actionevent actionperformed getsource umlcheckbox2 umlcheckbox2 umlcheckbox2 getsource gettarget getfacade isamodelelement getfacade isaelementimport getmodelmanagementhelper setspecification getfacade isspecification return returns the singleton public static action set element ownership specification get instance return singleton actionsetelementownershipspecification getinstance constructor for action set element ownership specification protected action set operation concurrency kind super translator localize set null set the tooltip string put value action short description translator localize set actionsetelementownershipspecification actionsetoperationconcurrencykind putvalue short_description public void action performed action event e super action performed e if e get source instanceof j radio button j radio button source j radio button e get source string action command source get action command object target uml radio button panel source get parent get target if model get facade isa operation target object m m model element target object kind null if action command equals sequential command kind model get concurrency kind get sequential else if action command equals guarded command kind model get concurrency kind get guarded else kind model get concurrency kind get concurrent model get core helper set concurrency m kind actionperformed actionevent actionperformed getsource jradiobutton jradiobutton jradiobutton getsource actioncommand getactioncommand umlradiobuttonpanel getparent gettarget getfacade isaoperation mmodelelement actioncommand sequential_command getconcurrencykind getsequential actioncommand guarded_command getconcurrencykind getguarded getconcurrencykind getconcurrent getcorehelper setconcurrency return returns the singleton public static action set operation concurrency kind get instance return singleton actionsetoperationconcurrencykind getinstance constructor protected action set class active super translator localize set null set the tooltip string put value action short description translator localize set actionsetclassactive putvalue short_description public void action performed action event e super action performed e if e get source instanceof uml check box2 uml check box2 source uml check box2 e get source object target source get target if model get facade isa class target object m target model get core helper set active m source is selected actionperformed actionevent actionperformed getsource umlcheckbox2 umlcheckbox2 umlcheckbox2 getsource gettarget getfacade isaclass getcorehelper setactive isselected return returns the singleton public static action set class active get instance return singleton actionsetclassactive getinstance the constructor public action add operation super translator localize button new operation resource loader wrapper lookup icon button new operation set the tooltip string put value action short description translator localize button new operation actionaddoperation resourceloaderwrapper lookupicon putvalue short_description public static action add operation get target follower if target follower null target follower new action add operation target manager get instance add target listener new target listener public void target added target event e set target public void target removed target event e set target public void target set target event e set target private void set target target follower set enabled target follower should be enabled target follower set enabled target follower should be enabled return target follower actionaddoperation gettargetfollower targetfollower targetfollower actionaddoperation targetmanager getinstance addtargetlistener targetlistener targetadded targetevent settarget targetremoved targetevent settarget targetset targetevent settarget settarget targetfollower setenabled targetfollower shouldbeenabled targetfollower setenabled targetfollower shouldbeenabled targetfollower target follower new action add operation target manager get instance add target listener new target listener public void target added target event e set target targetfollower actionaddoperation targetmanager getinstance addtargetlistener targetlistener targetadded targetevent settarget set target public void target removed target event e set target settarget targetremoved targetevent settarget public void target set target event e set target targetset targetevent settarget set target private void set target target follower set enabled target follower should be enabled settarget settarget targetfollower setenabled targetfollower shouldbeenabled public void action performed action event ae super action performed ae project project project manager get manager get current project object target target manager get instance get model target object classifier null if model get facade isa classifier target classifier target else if model get facade isa feature target classifier model get facade get owner target else return object return type project get default return type object oper model get core factory build operation classifier return type target manager get instance set target oper actionperformed actionevent actionperformed projectmanager getmanager getcurrentproject targetmanager getinstance getmodeltarget getfacade isaclassifier getfacade isafeature getfacade getowner returntype getdefaultreturntype getcorefactory buildoperation returntype targetmanager getinstance settarget return true if this tool should be enabled public boolean should be enabled object target target manager get instance get single model target if target null return false return model get facade isa classifier target model get facade isa feature target shouldbeenabled targetmanager getinstance getsinglemodeltarget getfacade isaclassifier getfacade isafeature the constructor for this class public action add attribute super translator localize button new attribute resource loader wrapper lookup icon button new attribute set the tooltip string put value action short description translator localize button new attribute actionaddattribute resourceloaderwrapper lookupicon putvalue short_description public static action add attribute get target follower if target follower null target follower new action add attribute target manager get instance add target listener new target listener public void target added target event e set target public void target removed target event e set target public void target set target event e set target private void set target target follower set enabled target follower should be enabled target follower set enabled target follower should be enabled return target follower actionaddattribute gettargetfollower targetfollower targetfollower actionaddattribute targetmanager getinstance addtargetlistener targetlistener targetadded targetevent settarget targetremoved targetevent settarget targetset targetevent settarget settarget targetfollower setenabled targetfollower shouldbeenabled targetfollower setenabled targetfollower shouldbeenabled targetfollower target follower new action add attribute target manager get instance add target listener new target listener public void target added target event e set target targetfollower actionaddattribute targetmanager getinstance addtargetlistener targetlistener targetadded targetevent settarget set target public void target removed target event e set target settarget targetremoved targetevent settarget public void target set target event e set target targetset targetevent settarget set target private void set target target follower set enabled target follower should be enabled settarget settarget targetfollower setenabled targetfollower shouldbeenabled public void action performed action event ae super action performed ae object target target manager get instance get single model target object classifier null if model get facade isa classifier target model get facade isa association end target classifier target else if model get facade isa feature target classifier model get facade get owner target else return project project project manager get manager get current project object attr type project get default attribute type object attr model get core factory build attribute2 classifier attr type target manager get instance set target attr actionperformed actionevent actionperformed targetmanager getinstance getsinglemodeltarget getfacade isaclassifier getfacade isaassociationend getfacade isafeature getfacade getowner projectmanager getmanager getcurrentproject attrtype getdefaultattributetype getcorefactory buildattribute2 attrtype targetmanager getinstance settarget return true if this tool should be enabled public boolean should be enabled object target target manager get instance get single model target if target null return false return model get facade isa classifier target model get facade isa feature target model get facade isa association end target shouldbeenabled targetmanager getinstance getsinglemodeltarget getfacade isaclassifier getfacade isafeature getfacade isaassociationend constructor for action set element ownership specification protected action set association end ordering super translator localize set null set the tooltip string put value action short description translator localize set actionsetelementownershipspecification actionsetassociationendordering putvalue short_description public void action performed action event e super action performed e if e get source instanceof uml check box2 uml check box2 source uml check box2 e get source object target source get target if model get facade isa association end target object m target if source is selected model get core helper set ordering m model get ordering kind get ordered else model get core helper set ordering m model get ordering kind get unordered actionperformed actionevent actionperformed getsource umlcheckbox2 umlcheckbox2 umlcheckbox2 getsource gettarget getfacade isaassociationend isselected getcorehelper setordering getorderingkind getordered getcorehelper setordering getorderingkind getunordered return returns the singleton public static action set association end ordering get instance return singleton actionsetassociationendordering getinstance constructor for action set element ownership specification protected action set generalizable element root super translator localize set null set the tooltip string put value action short description translator localize set actionsetelementownershipspecification actionsetgeneralizableelementroot putvalue short_description public void action performed action event e super action performed e if e get source instanceof uml check box2 uml check box2 source uml check box2 e get source object target source get target if model get facade isa generalizable element target model get facade isa operation target model get facade isa reception target model get core helper set root target source is selected actionperformed actionevent actionperformed getsource umlcheckbox2 umlcheckbox2 umlcheckbox2 getsource gettarget getfacade isageneralizableelement getfacade isaoperation getfacade isareception getcorehelper setroot isselected return returns the singleton public static action set generalizable element root get instance return singleton actionsetgeneralizableelementroot getinstance constructor for action set element ownership specification protected action set flow source super translator localize set null set the tooltip string put value action short description translator localize set actionsetelementownershipspecification actionsetflowsource putvalue short_description public void action performed action event e super action performed e if e get source instanceof uml combo box2 uml combo box2 source uml combo box2 e get source object target source get target if model get facade isa flow target object flow target object old null if model get facade get sources flow is empty old model get facade get sources flow to array 0 if old source get selected item if source get selected item null collection sources new array list sources add source get selected item model get core helper set sources flow sources actionperformed actionevent actionperformed getsource umlcombobox2 umlcombobox2 umlcombobox2 getsource gettarget getfacade isaflow getfacade getsources isempty getfacade getsources toarray getselecteditem getselecteditem arraylist getselecteditem getcorehelper setsources return returns the singleton public static action set flow source get instance return singleton actionsetflowsource getinstance constructor for action set structural feature type protected action set association end type super translator localize set null set the tooltip string put value action short description translator localize set actionsetstructuralfeaturetype actionsetassociationendtype putvalue short_description override public void action performed action event e super action performed e object source e get source object old classifier null object new classifier null object end null if source instanceof uml combo box2 uml combo box2 box uml combo box2 source object o box get target if model get facade isa association end o end o old classifier model get facade get type end o box get selected item if model get facade isa classifier o new classifier o if new classifier old classifier end null new classifier null model get core helper set type end new classifier super action performed e actionperformed actionevent actionperformed getsource oldclassifier newclassifier umlcombobox2 umlcombobox2 umlcombobox2 gettarget getfacade isaassociationend oldclassifier getfacade gettype getselecteditem getfacade isaclassifier newclassifier newclassifier oldclassifier newclassifier getcorehelper settype newclassifier actionperformed return returns the singleton public static action set association end type get instance return singleton actionsetassociationendtype getinstance constructor for action set composite state concurrent protected action set structural feature target scope super translator localize set null set the tooltip string put value action short description translator localize set actionsetcompositestateconcurrent actionsetstructuralfeaturetargetscope putvalue short_description override public void action performed action event e super action performed e if e get source instanceof uml check box2 uml check box2 source uml check box2 e get source object target source get target if model get facade isa structural feature target object m target model get core helper set target scope m source is selected model get scope kind get classifier model get scope kind get instance actionperformed actionevent actionperformed getsource umlcheckbox2 umlcheckbox2 umlcheckbox2 getsource gettarget getfacade isastructuralfeature getcorehelper settargetscope isselected getscopekind getclassifier getscopekind getinstance return returns the singleton public static action set structural feature target scope get instance return singleton actionsetstructuralfeaturetargetscope getinstance constructor for action set element ownership specification protected action set generalizable element abstract super translator localize set null set the tooltip string put value action short description translator localize set actionsetelementownershipspecification actionsetgeneralizableelementabstract putvalue short_description public void action performed action event e super action performed e if e get source instanceof uml check box2 uml check box2 source uml check box2 e get source object target source get target if model get facade isa generalizable element target model get facade isa operation target model get facade isa reception target model get core helper set abstract target source is selected actionperformed actionevent actionperformed getsource umlcheckbox2 umlcheckbox2 umlcheckbox2 getsource gettarget getfacade isageneralizableelement getfacade isaoperation getfacade isareception getcorehelper setabstract isselected return returns the singleton public static action set generalizable element abstract get instance return singleton actionsetgeneralizableelementabstract getinstance public button action new guard super put value name get key name put value short description translator localize get key name object icon resource loader wrapper lookup icon resource get icon name put value small icon icon buttonactionnewguard putvalue getkeyname putvalue short_description getkeyname resourceloaderwrapper lookupiconresource geticonname putvalue small_icon public void action performed action event e if is enabled return super action performed e object target target manager get instance get model target object guard model get facade get guard target if guard null guard model get state machines factory build guard target target manager get instance set target guard actionperformed actionevent isenabled actionperformed targetmanager getinstance getmodeltarget getfacade getguard getstatemachinesfactory buildguard targetmanager getinstance settarget public boolean is enabled object target target manager get instance get model target return model get facade isa transition target isenabled targetmanager getinstance getmodeltarget getfacade isatransition protected string get key name return button new guard getkeyname protected string get icon name return guard geticonname the constructor protected action set stub state reference state super translator localize action set null set the tooltip string put value action short description translator localize action set actionsetstubstatereferencestate putvalue short_description public void action performed action event e super action performed e if e get source instanceof uml combo box2 uml combo box2 box uml combo box2 e get source object o box get selected item if o null string name model get state machines helper get path o if name null model get state machines helper set reference state box get target name actionperformed actionevent actionperformed getsource umlcombobox2 umlcombobox2 umlcombobox2 getsource getselecteditem getstatemachineshelper getpath getstatemachineshelper setreferencestate gettarget return returns the singleton public static action set stub state reference state get instance return singleton actionsetstubstatereferencestate getinstance constructor for action set composite state concurrent protected action set composite state concurrent super translator localize action set null set the tooltip string put value action short description translator localize action set actionsetcompositestateconcurrent actionsetcompositestateconcurrent putvalue short_description public void action performed action event e super action performed e if e get source instanceof uml check box2 uml check box2 source uml check box2 e get source object target source get target if model get facade isa composite state target object composite state target model get state machines helper set concurrent composite state model get facade is concurrent composite state actionperformed actionevent actionperformed getsource umlcheckbox2 umlcheckbox2 umlcheckbox2 getsource gettarget getfacade isacompositestate compositestate getstatemachineshelper setconcurrent compositestate getfacade isconcurrent compositestate return returns the singleton public static action set composite state concurrent get instance return singleton actionsetcompositestateconcurrent getinstance constructor for action set model element stereotype protected action set submachine state submachine super translator localize action set null set the tooltip string put value action short description translator localize action set actionsetmodelelementstereotype actionsetsubmachinestatesubmachine putvalue short_description public void action performed action event e super action performed e if e get source instanceof uml combo box2 uml combo box2 box uml combo box2 e get source model get state machines helper set statemachine as submachine box get target box get selected item actionperformed actionevent actionperformed getsource umlcombobox2 umlcombobox2 umlcombobox2 getsource getstatemachineshelper setstatemachineassubmachine gettarget getselecteditem return returns the singleton public static action set submachine state submachine get instance return singleton actionsetsubmachinestatesubmachine getinstance constructor for action set composite state concurrent protected action set context state machine super translator localize action set null set the tooltip string put value action short description translator localize action set actionsetcompositestateconcurrent actionsetcontextstatemachine putvalue short_description public void action performed action event e super action performed e if e get source instanceof uml combo box2 uml combo box2 source uml combo box2 e get source object target source get target if model get facade get context target source get selected item model get state machines helper set context target source get selected item actionperformed actionevent actionperformed getsource umlcombobox2 umlcombobox2 umlcombobox2 getsource gettarget getfacade getcontext getselecteditem getstatemachineshelper setcontext getselecteditem return returns the singleton public static action set context state machine get instance return singleton actionsetcontextstatemachine getinstance constructor for action set element ownership specification protected action set action asynchronous super translator localize action set null set the tooltip string put value action short description translator localize action set actionsetelementownershipspecification actionsetactionasynchronous putvalue short_description public void action performed action event e super action performed e if e get source instanceof uml check box2 uml check box2 source uml check box2 e get source object target source get target if model get facade isa action target object m target model get common behavior helper set asynchronous m source is selected actionperformed actionevent actionperformed getsource umlcheckbox2 umlcheckbox2 umlcheckbox2 getsource gettarget getfacade isaaction getcommonbehaviorhelper setasynchronous isselected return returns the singleton public static action set action asynchronous get instance return singleton actionsetactionasynchronous getinstance construct a property panel for a link element public prop panel link super label link lookup icon link add field translator localize label name get name text field add field translator localize label namespace get namespace selector add field translator localize label association get association selector add separator j list connection list new uml linked list new uml link connection list model j scroll pane connection scroll new j scroll pane connection list add field translator localize label connections connection scroll add action new action navigate namespace add action new action new stereotype add action get delete action proppanellink lookupicon addfield getnametextfield addfield getnamespaceselector addfield getassociationselector addseparator jlist connectionlist umllinkedlist umllinkconnectionlistmodel jscrollpane connectionscroll jscrollpane connectionlist addfield connectionscroll addaction actionnavigatenamespace addaction actionnewstereotype addaction getdeleteaction returns the namespace selecter this is a component which allows the user to select a single item as the namespace return a component for selecting the namespace protected j component get association selector if association selector null association selector new uml searchable combo box association combo box model new action set link association true return new uml combo box navigator translator localize label association navigate tooltip association selector jcomponent getassociationselector associationselector associationselector umlsearchablecombobox associationcomboboxmodel actionsetlinkassociation umlcomboboxnavigator associationselector constructor for uml model element namespace combo box model public uml link association combo box model super assocation true umlmodelelementnamespacecomboboxmodel umllinkassociationcomboboxmodel see org argouml uml ui uml combo box model2 is valid element object protected boolean is valid element object o return model get facade isa association o umlcomboboxmodel2 isvalidelement isvalidelement getfacade isaassociation to simplify implementation we list all associations found with any of the classifiers represented by the linked instances p todo make a foolproof algorithm that only allows selecting associations that create a correct model also take into account n ary associations and associationclasses this algo best goes in the model subsystem e g in a method get all possible associations fora link see org argouml uml ui uml combo box model2 build model list protected void build model list collection link ends collection associations new hash set object t get target if model get facade isa link t link ends model get facade get connections t iterator ile link ends iterator while ile has next object instance model get facade get instance ile next collection c model get facade get classifiers instance iterator ic c iterator while ic has next object classifier ic next collection ae model get facade get association ends classifier iterator iae ae iterator while iae has next object association end iae next object association model get facade get association association end associations add association set elements associations getallpossibleassociationsforalink umlcomboboxmodel2 buildmodellist buildmodellist linkends hashset gettarget getfacade isalink linkends getfacade getconnections linkends hasnext getfacade getinstance getfacade getclassifiers hasnext getfacade getassociationends hasnext associationend getfacade getassociation associationend setelements protected object get selected model element if model get facade isa link get target return model get facade get association get target return null getselectedmodelelement getfacade isalink gettarget getfacade getassociation gettarget override public void model changed uml change event evt rebuild the list from scratch to be sure it s correct object t get target if t null evt get source t evt get new value null build model list in some cases se issue 3780 the list remains the same but the selected item differs without the next step the combo would not be refreshed set selected item get selected model element modelchanged umlchangeevent gettarget getsource getnewvalue buildmodellist setselecteditem getselectedmodelelement constructor for action set model element namespace public action set link association super translator localize set null set the tooltip string put value action short description translator localize set actionsetmodelelementnamespace actionsetlinkassociation putvalue short_description override public void action performed action event e super action performed e object source e get source object old assoc null object new assoc null object link null if source instanceof uml combo box2 uml combo box2 box uml combo box2 source object o box get target if model get facade isa link o link o old assoc model get facade get association o object n box get selected item if model get facade isa association n new assoc n if new assoc old assoc link null new assoc null model get core helper set association link new assoc actionperformed actionevent actionperformed getsource oldassoc newassoc umlcombobox2 umlcombobox2 umlcombobox2 gettarget getfacade isalink oldassoc getfacade getassociation getselecteditem getfacade isaassociation newassoc newassoc oldassoc newassoc getcorehelper setassociation newassoc constructor for action set association role base public action set association role base super actionsetassociationrolebase actionsetassociationrolebase public void action performed action event e super action performed e if e get source instanceof uml combo box2 uml combo box2 source uml combo box2 e get source object assoc source get selected item object ar source get target if model get facade get base ar assoc return base is already set to this assoc this check is needed otherwise the setbase below gives an exception if model get facade isa association assoc model get facade isa association role ar model get collaborations helper set base ar assoc actionperformed actionevent actionperformed getsource umlcombobox2 umlcombobox2 umlcombobox2 getsource getselecteditem gettarget getfacade getbase getfacade isaassociation getfacade isaassociationrole getcollaborationshelper setbase constructor action set represented operation collaboration super translator localize action set resource loader wrapper lookup icon action set actionsetrepresentedoperationcollaboration resourceloaderwrapper lookupicon public void action performed action event e super action performed e if e get source instanceof uml combo box2 uml combo box2 source uml combo box2 e get source object target source get target object new value source get selected item the selected value may be to clear the represented operation if model get facade isa operation new value new value null if model get facade get represented operation target new value model get collaborations helper set represented operation target new value actionperformed actionevent actionperformed getsource umlcombobox2 umlcombobox2 umlcombobox2 getsource gettarget newvalue getselecteditem getfacade isaoperation newvalue newvalue getfacade getrepresentedoperation newvalue getcollaborationshelper setrepresentedoperation newvalue constructor for action set composite state concurrent action set represented classifier collaboration super translator localize action set resource loader wrapper lookup icon action set actionsetcompositestateconcurrent actionsetrepresentedclassifiercollaboration resourceloaderwrapper lookupicon public void action performed action event e super action performed e if e get source instanceof uml combo box2 uml combo box2 source uml combo box2 e get source object target source get target object new value source get selected item the selected value may be to clear the represented classifier if model get facade isa classifier new value new value null if model get facade get represented classifier target new value model get collaborations helper set represented classifier target new value actionperformed actionevent actionperformed getsource umlcombobox2 umlcombobox2 umlcombobox2 getsource gettarget newvalue getselecteditem getfacade isaclassifier newvalue newvalue getfacade getrepresentedclassifier newvalue getcollaborationshelper setrepresentedclassifier newvalue construct a property panel for a classifier in state public prop panel classifier in state super label classifier in state lookup icon classifier in state add field translator localize label name get name text field add field translator localize label namespace get namespace selector add separator add field translator localize label type new uml combo box navigator translator localize label class navigate tooltip get classifier in state type selector field for states abstract action add model element2 action add new action addcis state abstract action remove element action remove new action removecis state uml mutable linked list list new uml mutable linked list new umlcis state list model action add null action remove true states scroll new j scroll pane list add field translator localize label instate states scroll add action new action navigate namespace add action get delete action classifierinstate proppanelclassifierinstate lookupicon classifierinstate addfield getnametextfield addfield getnamespaceselector addseparator addfield umlcomboboxnavigator getclassifierinstatetypeselector abstractactionaddmodelelement2 actionadd actionaddcisstate abstractactionremoveelement actionremove actionremovecisstate umlmutablelinkedlist umlmutablelinkedlist umlcisstatelistmodel actionadd actionremove statesscroll jscrollpane addfield statesscroll addaction actionnavigatenamespace addaction getdeleteaction protected j combo box get classifier in state type selector if type combo box null type combo box new uml searchable combo box type combo box model new action set classifier in state type true return type combo box jcombobox getclassifierinstatetypeselector typecombobox typecombobox umlsearchablecombobox typecomboboxmodel actionsetclassifierinstatetype typecombobox construct an action to set the type of a classifier in state action set classifier in state type super classifierinstate actionsetclassifierinstatetype public void action performed action event e object source e get source the source ui element of the event object old classifier null object new classifier null object cis null if source instanceof uml combo box2 uml combo box2 box uml combo box2 source object obj box get target if model get facade isa classifier in state obj try old classifier model get facade get type obj catch invalid element exception e1 no problem this classifier in state was just erased return cis obj object cl box get selected item if model get facade isa classifier cl new classifier cl if new classifier old classifier cis null new classifier null model get core helper set type cis new classifier super action performed e actionperformed actionevent getsource oldclassifier newclassifier umlcombobox2 umlcombobox2 umlcombobox2 gettarget getfacade isaclassifierinstate oldclassifier getfacade gettype invalidelementexception classifierinstate getselecteditem getfacade isaclassifier newclassifier newclassifier oldclassifier newclassifier getcorehelper settype newclassifier actionperformed construct a combobox model for a classifier in state s type public uml classifier in state type combo box model super type false classifierinstate umlclassifierinstatetypecomboboxmodel see org argouml uml ui uml combo box model2 is valid element object protected boolean is valid element object o return model get facade isa classifier o model get facade isa classifier in state o umlcomboboxmodel2 isvalidelement isvalidelement getfacade isaclassifier getfacade isaclassifierinstate get all classifiers that are not classifier in state see org argouml uml ui uml combo box model2 build model list protected void build model list object model project manager get manager get current project get model collection classifiers new array list model get core helper get all classifiers model collection new list new array list for object classifier classifiers if model get facade isa classifier in state classifier new list add classifier get the current type normally we won t need this but who knows if get target null object type model get facade get type get target if model get facade isa classifier in state type get the classifier type model get facade get type type if type null if new list contains type new list add type set elements new list classifierinstate umlcomboboxmodel2 buildmodellist buildmodellist projectmanager getmanager getcurrentproject getmodel arraylist getcorehelper getallclassifiers newlist arraylist getfacade isaclassifierinstate newlist gettarget getfacade gettype gettarget getfacade isaclassifierinstate getfacade gettype newlist newlist setelements newlist protected object get selected model element if get target null object type model get facade get type get target return type a classifier that is not a classifier in state return null getselectedmodelelement gettarget getfacade gettype gettarget classifierinstate the function in the parent removes items from the list when deselected we do not need that here see java beans property change listener property change java beans property change event public void model changed property change event evt if evt instanceof attribute change event if evt get property name equals type if evt get source get target get changed element evt null object elem get changed element evt set selected item elem propertychangelistener propertychange propertychangeevent modelchanged propertychangeevent attributechangeevent getpropertyname getsource gettarget getchangedelement getchangedelement setselecteditem construct an action to add a new classifier in state public action addcis state super set multi select true classifierinstate actionaddcisstate setmultiselect protected void do it collection selected object cis get target if model get facade isa classifier in state cis model get activity graphs helper set in states cis selected doit gettarget getfacade isaclassifierinstate getactivitygraphshelper setinstates protected list get choices list ret new array list object cis get target object classifier model get facade get type cis if model get facade isa classifier classifier ret add all model get model management helper get all model elements of kind with model classifier choice class return ret getchoices arraylist gettarget getfacade gettype getfacade isaclassifier addall getmodelmanagementhelper getallmodelelementsofkindwithmodel choiceclass protected string get dialog title return translator localize dialog title add state getdialogtitle protected list get selected object cis get target if model get facade isa classifier in state cis return new array list model get facade get in states cis return collections empty list getselected gettarget getfacade isaclassifierinstate arraylist getfacade getinstates empty_list construct an action to remove a classifier in state public action removecis state super translator localize menu popup remove classifierinstate actionremovecisstate public void action performed action event e super action performed e object state get object to remove if state null object cis get target if model get facade isa classifier in state cis collection states new array list model get facade get in states cis states remove state model get activity graphs helper set in states cis states actionperformed actionevent actionperformed getobjecttoremove gettarget getfacade isaclassifierinstate arraylist getfacade getinstates getactivitygraphshelper setinstates construct a list model for classifier in state elements public umlcis state list model super in state classifierinstate umlcisstatelistmodel instate protected void build model list object cis get target if model get facade isa classifier in state cis collection c model get facade get in states cis set all elements c buildmodellist gettarget getfacade isaclassifierinstate getfacade getinstates setallelements protected boolean is valid element object elem object cis get target if model get facade isa classifier in state cis collection c model get facade get in states cis if c contains elem return true return false isvalidelement gettarget getfacade isaclassifierinstate getfacade getinstates constructor public action new classifier in state super actionnewclassifierinstate public void action performed action event e object ofs target manager get instance get model target if model get facade isa object flow state ofs object type model get facade get type ofs if model get facade isa classifier in state type type model get facade get type type if model get facade isa classifier type collection c model get model management helper get all model elements of kind with model type choice class collection states new array list c prop panel object flow state remove top state from states if states size 1 return object state pick nicest state from states if state null states clear states add state super action performed e object cis model get activity graphs factory build classifier in state type states model get core helper set type ofs cis target manager get instance set target cis actionperformed actionevent targetmanager getinstance getmodeltarget getfacade isaobjectflowstate getfacade gettype getfacade isaclassifierinstate getfacade gettype getfacade isaclassifier getmodelmanagementhelper getallmodelelementsofkindwithmodel choiceclass arraylist proppanelobjectflowstate removetopstatefrom pickniceststatefrom actionperformed getactivitygraphsfactory buildclassifierinstate getcorehelper settype targetmanager getinstance settarget public boolean is enabled boolean is enabled false object t target manager get instance get model target if model get facade isa object flow state t object type model get facade get type t if model get facade isa classifier type if model get facade isa classifier in state type collection states model get model management helper get all model elements of kind with model type choice class if states size 0 is enabled true return is enabled isenabled isenabled targetmanager getinstance getmodeltarget getfacade isaobjectflowstate getfacade gettype getfacade isaclassifier getfacade isaclassifierinstate getmodelmanagementhelper getallmodelelementsofkindwithmodel choiceclass isenabled isenabled pick the nicest state from the collection p we distinct between the following levels of nice ul li named simple state excluding objectflowstate li named composite state excluding submachinestate li unnamed simple state excluding objectflowstate li unnamed composite state excluding submachinestate li any other param states the collection with states return the nicest state private object pick nicest state from collection states if states size 2 return states iterator next collection simples new array list collection composites new array list iterator i i states iterator while i has next object st i next string name model get facade get name st if model get facade isa simple state st model get facade isa object flow state st simples add st if name null name length 0 return st i states iterator while i has next object st i next string name model get facade get name st if model get facade isa composite state st model get facade isa submachine state st composites add st if name null name length 0 return st if simples size 0 return simples iterator next if composites size 0 return composites iterator next return states iterator next pickniceststatefrom arraylist arraylist hasnext getfacade getname getfacade isasimplestate getfacade isaobjectflowstate hasnext getfacade getname getfacade isacompositestate getfacade isasubmachinestate constructor for action set element ownership specification protected action set synch super translator localize action set null set the tooltip string put value action short description translator localize action set actionsetelementownershipspecification actionsetsynch putvalue short_description public void action performed action event e super action performed e if e get source instanceof uml check box2 uml check box2 source uml check box2 e get source object target source get target if model get facade isa object flow state target object m target model get activity graphs helper set synch m source is selected actionperformed actionevent actionperformed getsource umlcheckbox2 umlcheckbox2 umlcheckbox2 getsource gettarget getfacade isaobjectflowstate getactivitygraphshelper setsynch isselected return returns the singleton public static action set synch get instance return singleton actionsetsynch getinstance constructor for action set object flow state classifier public action set object flow state classifier super actionsetobjectflowstateclassifier actionsetobjectflowstateclassifier public void action performed action event e object source e get source the source ui element of the event object old classifier null object new classifier null object m null if source instanceof uml combo box2 uml combo box2 box uml combo box2 source object ofs box get target if model get facade isa object flow state ofs old classifier model get facade get type ofs m ofs object cl box get selected item if model get facade isa classifier cl new classifier cl if new classifier old classifier m null new classifier null super action performed e model get core helper set type m new classifier actionperformed actionevent getsource oldclassifier newclassifier umlcombobox2 umlcombobox2 umlcombobox2 gettarget getfacade isaobjectflowstate oldclassifier getfacade gettype getselecteditem getfacade isaclassifier newclassifier newclassifier oldclassifier newclassifier actionperformed getcorehelper settype newclassifier constructor for action new entry call action public action new entry call action super actionnewentrycallaction actionnewentrycallaction public void action performed action event e super action performed e object t target manager get instance get model target object ca model get common behavior factory create call action model get state machines helper set entry t ca target manager get instance set target ca actionperformed actionevent actionperformed targetmanager getinstance getmodeltarget getcommonbehaviorfactory createcallaction getstatemachineshelper setentry targetmanager getinstance settarget the constructor public action generation settings super translator localize action settings for project code generation null set the tooltip string put value action short description translator localize action settings for project code generation actiongenerationsettings putvalue short_description override public void action performed action event ae super action performed ae source path dialog cgd new source path dialog cgd set visible true actionperformed actionevent actionperformed sourcepathdialog sourcepathdialog setvisible return true if the action is enabled and the active diagram is a diagram see org tigris gef undo undoable action is enabled override public boolean is enabled return true undoableaction isenabled isenabled the constructor public action set source path super translator localize action set source path null set the tooltip string put value action short description translator localize action set source path actionsetsourcepath putvalue short_description override public void action performed action event e super action performed e file f get new directory if f null object obj target manager get instance get target if model get facade isa model element obj object tv model get facade get tagged value obj import interface source path tag if tv null model get extension mechanisms helper add tagged value obj model get extension mechanisms factory build tagged value import interface source path tag f get path else model get extension mechanisms helper set value of tag tv f get path actionperformed actionevent actionperformed getnewdirectory targetmanager getinstance gettarget getfacade isamodelelement getfacade gettaggedvalue importinterface source_path_tag getextensionmechanismshelper addtaggedvalue getextensionmechanismsfactory buildtaggedvalue importinterface source_path_tag getpath getextensionmechanismshelper setvalueoftag getpath return the new source path directory protected file get new directory object obj target manager get instance get target string name null string type null string path null if model get facade isa model element obj name model get facade get name obj object tv model get facade get tagged value obj import interface source path tag if tv null path model get facade get value of tag tv if model get facade isa package obj type package else if model get facade isa class obj type class if model get facade isa interface obj type interface else return null j file chooser chooser null file f null if path null f new file path if f null f get path length 0 chooser new j file chooser f get path if chooser null chooser new j file chooser if f null chooser set selected file f string s chooser title translator localize action set source path if type null s chooser title type if name null s chooser title name chooser set dialog title s chooser title chooser set file selection mode j file chooser directories only int retval chooser show dialog argo frame get instance translator localize dialog button ok if retval j file chooser approve option return chooser get selected file else return null getnewdirectory targetmanager getinstance gettarget getfacade isamodelelement getfacade getname getfacade gettaggedvalue importinterface source_path_tag getfacade getvalueoftag getfacade isapackage getfacade isaclass getfacade isainterface jfilechooser getpath jfilechooser getpath jfilechooser setselectedfile schoosertitle schoosertitle schoosertitle setdialogtitle schoosertitle setfileselectionmode jfilechooser directories_only showdialog argoframe getinstance jfilechooser approve_option getselectedfile the constructor public action generate project code super translator localize action generate code for project null set the tooltip string put value action short description translator localize action generate code for project actiongenerateprojectcode putvalue short_description override public void action performed action event ae super action performed ae list classes new array list argo diagram active diagram diagram utils get active diagram if active diagram null return object ns active diagram get namespace if ns null return while model get facade get namespace ns null ns model get facade get namespace ns collection elems model get model management helper get all model elements of kind ns model get meta types get classifier project p project manager get manager get current project collection elems model management helper get helper get all model elements of kind m classifier class for object cls elems if is code relevant classifier cls classes add cls class generation dialog cgd new class generation dialog classes true cgd set visible true actionperformed actionevent actionperformed arraylist argodiagram activediagram diagramutils getactivediagram activediagram activediagram getnamespace getfacade getnamespace getfacade getnamespace getmodelmanagementhelper getallmodelelementsofkind getmetatypes getclassifier projectmanager getmanager getcurrentproject modelmanagementhelper gethelper getallmodelelementsofkind mclassifier iscoderelevantclassifier classgenerationdialog classgenerationdialog setvisible check if the diagram is enabled return true if enabled see org tigris gef undo undoable action is enabled public boolean is enabled return true undoableaction isenabled isenabled param cls the classifier that is candidate for generation return true if the candidate is sound private boolean is code relevant classifier object cls if cls null return false if model get facade isa class cls model get facade isa interface cls return false string path generator manager get code path cls string name model get facade get name cls if name null name length 0 character is digit name char at 0 return false if path null return path length 0 object parent model get facade get namespace cls while parent null path generator manager get code path parent if path null return path length 0 parent model get facade get namespace parent return false iscoderelevantclassifier getfacade isaclass getfacade isainterface generatormanager getcodepath getfacade getname isdigit charat getfacade getnamespace generatormanager getcodepath getfacade getnamespace the constructor protected action import from sources this is never downlighted super translator localize action import sources resource loader wrapper lookup icon action import sources set the tooltip string put value action short description translator localize action import sources actionimportfromsources resourceloaderwrapper lookupicon putvalue short_description public void action performed action event event super action performed event if importer manager get instance has importers new import argo frame get instance else log info import sources dialog not shown no importers exception dialog ed new exception dialog argo frame get instance translator localize dialog title problem translator localize dialog import no importers intro translator localize dialog import no importers message ed set modal true ed set visible true actionperformed actionevent actionperformed importermanager getinstance hasimporters argoframe getinstance exceptiondialog exceptiondialog argoframe getinstance setmodal setvisible return returns the singleton public static action import from sources get instance return singleton actionimportfromsources getinstance constructor for action set multiplicity protected action set multiplicity super translator localize set null set the tooltip string put value action short description translator localize set actionsetmultiplicity actionsetmultiplicity putvalue short_description public void action performed action event e super action performed e object source e get source if source instanceof uml combo box2 object selected uml combo box2 source get selected item object target uml combo box2 source get target if target null selected null set selected item selected target actionperformed actionevent actionperformed getsource umlcombobox2 umlcombobox2 getselecteditem umlcombobox2 gettarget setselecteditem the user should implement this method to set the multiplicity the given item for the target of the comboboxmodel target param item the multiplicity that should be set param target the target of the comboboxmodel the modelelement that should have its multiplicity set the constructor private save graphics manager default filter file filters png filter other filters add file filters gif filter other filters add file filters svg filter other filters add file filters ps filter other filters add file filters eps filter set default filter by suffix configuration get string key default graphics filter default filter get suffix savegraphicsmanager defaultfilter filefilters png_filter otherfilters filefilters gif_filter otherfilters filefilters svg_filter otherfilters filefilters ps_filter otherfilters filefilters eps_filter setdefaultfilterbysuffix getstring key_default_graphics_filter defaultfilter getsuffix param suffix the extension of the new default file format public void set default filter by suffix string suffix for suffix filter sf other filters if sf get suffix equals ignore case suffix set default filter sf break setdefaultfilterbysuffix suffixfilter otherfilters getsuffix equalsignorecase setdefaultfilter param f the new default file format public void set default filter suffix filter f other filters remove f if other filters contains default filter other filters add default filter default filter f configuration set string key default graphics filter f get suffix collections sort other filters new comparator suffix filter public int compare suffix filter arg0 suffix filter arg1 return arg0 get suffix compare to ignore case arg1 get suffix setdefaultfilter suffixfilter otherfilters otherfilters defaultfilter otherfilters defaultfilter defaultfilter setstring key_default_graphics_filter getsuffix otherfilters suffixfilter suffixfilter suffixfilter getsuffix comparetoignorecase getsuffix collections sort other filters new comparator suffix filter public int compare suffix filter arg0 suffix filter arg1 return arg0 get suffix compare to ignore case arg1 get suffix otherfilters suffixfilter suffixfilter suffixfilter getsuffix comparetoignorecase getsuffix return returns the singleton public static save graphics manager get instance if instance null instance new save graphics manager return instance savegraphicsmanager getinstance savegraphicsmanager this function allows to add new filters this can be done e g by modules p param f the filter public void register suffix filter f other filters add f suffixfilter otherfilters param chooser the filechooser of which the filters will be set param default name default filename to show when chooser is displayed public void set file chooser filters j file chooser chooser string default name chooser add choosable file filter default filter iterator iter other filters iterator while iter has next chooser add choosable file filter suffix filter iter next chooser set file filter default filter string file name default name default filter get suffix chooser set selected file new file file name chooser add property change listener j file chooser file filter changed property new file filter changed listener chooser default name defaultname setfilechooserfilters jfilechooser defaultname addchoosablefilefilter defaultfilter otherfilters hasnext addchoosablefilefilter suffixfilter setfilefilter defaultfilter filename defaultname defaultfilter getsuffix setselectedfile filename addpropertychangelistener jfilechooser file_filter_changed_property filefilterchangedlistener defaultname constructor param c param name public file filter changed listener j file chooser c string name chooser c default name name filefilterchangedlistener jfilechooser defaultname public void property change property change event evt suffix filter filter suffix filter evt get new value string file name default name filter get suffix the next line does not work chooser set selected file new file file name so let s do it the hard way swing utilities invoke later new anonymous1 file name propertychange propertychangeevent suffixfilter suffixfilter getnewvalue filename defaultname getsuffix setselectedfile filename swingutilities invokelater filename private string file name constructor param fn the filename anonymous1 string fn file name fn filename filename see java lang runnable run public void run chooser set selected file new file file name setselectedfile filename param name the filename return the filter public suffix filter get filter from file name string name if name to lower case ends with default filter get suffix return default filter iterator iter other filters iterator while iter has next suffix filter filter suffix filter iter next if name to lower case ends with filter get suffix return filter return null suffixfilter getfilterfromfilename tolowercase endswith defaultfilter getsuffix defaultfilter otherfilters hasnext suffixfilter suffixfilter tolowercase endswith getsuffix return the extension of the default filter just the text not the public string get default suffix return default filter get suffix getdefaultsuffix defaultfilter getsuffix param in the input file or path name which may or may not have a recognised extension return the amended file or pathname guaranteed to have a recognised extension public string fix extension string in if get filter from file name in null in get default suffix return in fixextension getfilterfromfilename getdefaultsuffix param suffix the suffix extension of the filename which corresponds to the graphics format to be used return the action that will do the save public save graphics action get save action by suffix string suffix save graphics action cmd null if file filters ps filter get suffix equals suffix cmd new saveps action translator localize action save ps else if file filters eps filter get suffix equals suffix cmd new save scaledeps action translator localize action save eps else if file filters png filter get suffix equals suffix cmd new savepng action2 translator localize action save png else if file filters gif filter get suffix equals suffix cmd new savegif action translator localize action save gif todo the following can be used when we drop java 5 support or when an imageio gif writer plugin is bundled cmd new savegif action2 translator localize action save gif else if file filters svg filter get suffix equals suffix cmd new savesvg action translator localize action save svg return cmd savegraphicsaction getsaveactionbysuffix savegraphicsaction filefilters ps_filter getsuffix savepsaction filefilters eps_filter getsuffix savescaledepsaction filefilters png_filter getsuffix savepngaction2 filefilters gif_filter getsuffix savegifaction savegifaction2 filefilters svg_filter getsuffix savesvgaction return the complete collection of suffix filters the first one is the default one public list suffix filter get settings list list suffix filter c new array list suffix filter c add default filter c add all other filters return c suffixfilters suffixfilter getsettingslist suffixfilter arraylist suffixfilter defaultfilter addall otherfilters adjust the drawing area so that instead of a tight bounding box it includes the canvas origin and some space around the lower and right sides so that the elements will be roughly centered elements which are off the top or left side of the canvas may still be clipped ie if the original drawing area had a negative x or y coordinate param area rectangle representing original drawing area return an expanded rectangle static rectangle adjust drawing area rectangle area int x margin area x if x margin 0 x margin 0 int y margin area y if y margin 0 y margin 0 int margin math max x margin y margin if margin min margin margin min margin return new rectangle 0 0 area width 2 margin area height 2 margin adjustdrawingarea xmargin xmargin xmargin ymargin ymargin ymargin xmargin ymargin min_margin min_margin class save scaledeps action extends saveeps action save scaledeps action string name super name savescaledepsaction saveepsaction savescaledepsaction override protected void save graphics output stream s editor ce rectangle drawing area throws io exception double editor scale ce get scale int x int drawing area x editor scale int y int drawing area y editor scale int h int drawing area height editor scale int w int drawing area width editor scale drawing area new rectangle x y w h postscript writer ps new postscript writer s drawing area ps scale editor scale editor scale ce print ps ps dispose savegraphics outputstream drawingarea ioexception editorscale getscale drawingarea editorscale drawingarea editorscale drawingarea editorscale drawingarea editorscale drawingarea postscriptwriter postscriptwriter drawingarea editorscale editorscale private static final logger log logger get logger savepng action2 class savepng action2 string name super name getlogger savepngaction2 savepngaction2 override public void action performed action event ae editor ce globals cur editor rectangle drawing area ce get layer manager get active layer calc drawing area if the diagram is empty gef won t write anything leaving us with an empty and invalid file handle this case ourselves to prevent this from happening if drawing area width 0 drawing area height 0 rectangle dummy area new rectangle 0 0 50 50 try save graphics output stream ce dummy area catch java io io exception e log error error while exporting graphics e return anything else is handled the normal way super action performed ae actionperformed actionevent cureditor drawingarea getlayermanager getactivelayer calcdrawingarea drawingarea drawingarea dummyarea savegraphics outputstream dummyarea ioexception actionperformed write the diagram contained by the current editor into an output stream as a png image override protected void save graphics output stream s editor ce rectangle drawing area throws io exception rectangle canvas area save graphics manager adjust drawing area drawing area create an image which will do deferred rendering of the gef diagram on demand as data is pulled from it rendered image i new deferred buffered image canvas area buffered image type int argb ce scale log debug created deferred buffered image drawing area canvas area scale scale imageio write i png s outputstream savegraphics outputstream drawingarea ioexception canvasarea savegraphicsmanager adjustdrawingarea drawingarea renderedimage deferredbufferedimage canvasarea bufferedimage type_int_argb deferredbufferedimage drawingarea canvasarea creates a new savegif action param name the name of the action savegif action2 string name super name savegifaction savegifaction2 write the diagram contained by the current editor into an output stream as a gif image override protected void save graphics output stream s editor ce rectangle drawing area throws io exception rectangle canvas area save graphics manager adjust drawing area drawing area rendered image i new deferred buffered image canvas area buffered image type int argb ce scale note gef s gif writer uses jeff poskanzer s gif encoder but that saves a copy of the entire image in an internal buffer before starting work defeating the whole purpose of our incremental rendering java se 6 has a native gif writer but it s not in java 5 one is available in the jai imageio library but we don t currently bundle that and at 6 mb it seems like a heavyweight solution but i don t have time to produce a stripped down version right now tfm https jai imageio dev java net imageio write i gif s outputstream savegraphics outputstream drawingarea ioexception canvasarea savegraphicsmanager adjustdrawingarea drawingarea renderedimage deferredbufferedimage canvasarea bufferedimage type_int_argb creates a new instance of action add package public action add package super translator localize action add package actionaddpackage actionaddpackage public void action performed action event e super action performed e object namespace target manager get instance get model target model get core helper add owned element namespace model get model management factory create package actionperformed actionevent actionperformed targetmanager getinstance getmodeltarget getcorehelper addownedelement getmodelmanagementfactory createpackage public static action delete model elements get target follower if target follower null target follower new action delete model elements target manager get instance add target listener new target listener public void target added target event e set target public void target removed target event e set target public void target set target event e set target private void set target target follower set enabled target follower should be enabled target follower set enabled target follower should be enabled return target follower actiondeletemodelelements gettargetfollower targetfollower targetfollower actiondeletemodelelements targetmanager getinstance addtargetlistener targetlistener targetadded targetevent settarget targetremoved targetevent settarget targetset targetevent settarget settarget targetfollower setenabled targetfollower shouldbeenabled targetfollower setenabled targetfollower shouldbeenabled targetfollower target follower new action delete model elements target manager get instance add target listener new target listener public void target added target event e set target targetfollower actiondeletemodelelements targetmanager getinstance addtargetlistener targetlistener targetadded targetevent settarget set target public void target removed target event e set target settarget targetremoved targetevent settarget public void target set target event e set target targetset targetevent settarget set target private void set target target follower set enabled target follower should be enabled settarget settarget targetfollower setenabled targetfollower shouldbeenabled constructor public action delete model elements super translator localize action delete from model resource loader wrapper lookup icon action delete from model set the tooltip string put value action short description translator localize action delete from model put value action small icon resource loader wrapper lookup icon delete actiondeletemodelelements resourceloaderwrapper lookupicon putvalue short_description putvalue small_icon resourceloaderwrapper lookupicon public void action performed action event ae super action performed ae keyboard focus manager focus manager keyboard focus manager get current keyboard focus manager component focus owner focus manager get focus owner if focus owner instanceof fig text editor todo probably really want to cancel editing fig text editor focus owner cancel editing fig text editor focus owner end editing else if focus owner instanceof j table j table table j table focus owner if table is editing table cell editor ce table get cell editor if ce null ce cancel cell editing project p project manager get manager get current project object targets target manager get instance get targets to array this next line fixes issue 4276 target manager get instance set target null object target null for int i targets length 1 i 0 i target targets i try if sure remove target remove from the model if target instanceof fig object owner fig target get owner if owner null target owner p move to trash target catch invalid element exception e log debug model element deleted twice ignoring 2nd delete actionperformed actionevent actionperformed keyboardfocusmanager focusmanager keyboardfocusmanager getcurrentkeyboardfocusmanager focusowner focusmanager getfocusowner focusowner figtexteditor figtexteditor focusowner cancelediting figtexteditor focusowner endediting focusowner jtable jtable jtable focusowner isediting tablecelleditor getcelleditor cancelcellediting projectmanager getmanager getcurrentproject targetmanager getinstance gettargets toarray targetmanager getinstance settarget sureremove getowner movetotrash invalidelementexception a utility method that asks the user if he is sure to remove the selected target p param target the object that will be removed return boolean public static boolean sure remove object target usage of other sure remove method is legacy they should be integrated boolean sure false if model get facade isa model element target sure sure remove model element target else if model get facade isauml element target it is a uml element that is not a model element sure true else if target instanceof argo diagram lets see if this diagram has some figs on it argo diagram diagram argo diagram target if diagram get nodes size diagram get edges size 0 the diagram contains figs so lets ask the user if he she is sure string confirm str message format format translator localize optionpane remove from model confirm delete new object diagram get name string text translator localize optionpane remove from model confirm delete title int response j option pane show confirm dialog argo frame get instance confirm str text j option pane yes no option sure response j option pane yes option else no content of diagram sure true else if target instanceof fig we can delete figs like figrects now too if model get facade isa model element fig target get owner sure sure remove model element fig target get owner else sure true else if target instanceof comment edge we can delete comment edge now too thanks to issue 3643 sure true return sure sureremove sureremove getfacade isamodelelement sureremovemodelelement getfacade isaumlelement modelelement argodiagram argodiagram argodiagram getnodes getedges confirmstr messageformat getname joptionpane showconfirmdialog argoframe getinstance confirmstr joptionpane yes_no_option joptionpane yes_option getfacade isamodelelement getowner sureremovemodelelement getowner commentedge commentedge an utility method that asks the user if he is sure to remove a selected model element param me the modelelement that may be removed return boolean protected static boolean sure remove model element object me project p project manager get manager get current project int count p get presentation count for me boolean do ask false string confirm str if count 1 confirm str translator localize optionpane remove from model will remove from diagrams do ask true todo if a namespace with sub classdiagrams is deleted then confirm str translator localize optionpane remove from model will remove subdiagram do ask true if do ask return true string name model get facade get name me if name null name equals name translator localize optionpane remove from model anon element name confirm str message format format translator localize optionpane remove from model confirm delete new object name confirm str int response j option pane show confirm dialog argo frame get instance confirm str translator localize optionpane remove from model confirm delete title j option pane yes no option return response j option pane yes option sureremovemodelelement projectmanager getmanager getcurrentproject getpresentationcountfor doask confirmstr confirmstr doask confirmstr doask doask getfacade getname confirmstr messageformat confirmstr joptionpane showconfirmdialog argoframe getinstance confirmstr joptionpane yes_no_option joptionpane yes_option return true if the tool should be enabled public boolean should be enabled list targets target manager get instance get targets for object target targets if model get facade isa model element target model get model management helper is read only target return false int size 0 try editor ce globals cur editor list fig figs ce get selection manager get figs size figs size catch exception e todo this catch block needs to be narrower and do something with the caught exception tfm 20071120 ignore if size 0 return true todo all of the following can be broken if we have multiple targets selected object target target manager get instance get target if target instanceof argo diagram we cannot delete the last diagram return project manager get manager get current project get diagram list size 1 if model get facade isa model target we cannot delete the model itself target equals project manager get manager get current project get model return false if model get facade isa association end target return model get facade get other association ends target size 1 if model get state machines helper is top state target we can not delete a top state it comes and goes with the statemachine issue 2655 return false return target null shouldbeenabled targetmanager getinstance gettargets getfacade isamodelelement getmodelmanagementhelper isreadonly cureditor getselectionmanager getfigs targetmanager getinstance gettarget argodiagram projectmanager getmanager getcurrentproject getdiagramlist getfacade isamodel projectmanager getmanager getcurrentproject getmodel getfacade isaassociationend getfacade getotherassociationends getstatemachineshelper istopstate constructor for abstract action remove element protected abstract action remove element this translator localize menu popup remove abstractactionremoveelement abstractactionremoveelement the constructor param name the name for this action protected abstract action remove element string name super translator localize name null set the tooltip string put value action short description translator localize name abstractactionremoveelement putvalue short_description returns the target return m model element public object get target return target mmodelelement gettarget sets the target param the target the target to set public void set target object the target target the target set enabled is enabled thetarget settarget thetarget thetarget setenabled isenabled returns the object to remove return object public object get object to remove return object to remove objecttoremove getobjecttoremove objecttoremove sets the object to remove param the object to remove the object to remove to set public void set object to remove object the object to remove object to remove the object to remove set enabled is enabled objecttoremove theobjecttoremove objecttoremove setobjecttoremove theobjecttoremove objecttoremove theobjecttoremove setenabled isenabled override public boolean is enabled return get object to remove null model get model management helper is read only get object to remove get target null model get model management helper is read only get target isenabled getobjecttoremove getmodelmanagementhelper isreadonly getobjecttoremove gettarget getmodelmanagementhelper isreadonly gettarget the constructor param name the i18n key for this action name protected action new diagram string name super translator localize name resource loader wrapper lookup icon name set the tooltip string put value action short description translator localize name actionnewdiagram resourceloaderwrapper lookupicon putvalue short_description override public void action performed action event e super action performed e todo since there may be multiple top level elements in a project this should be using the default namespace currently undefined or something similar project p project manager get manager get current project object ns find namespace if ns null is valid namespace ns argo diagram diagram create diagram ns assert diagram null no diagram was returned by the concrete class p add member diagram todo make the explorer listen to project member property changes to eliminate coupling on gui explorer event adaptor get instance model element added diagram get namespace target manager get instance set target diagram else log error no valid namespace found throw new illegal state exception no valid namespace found actionperformed actionevent actionperformed projectmanager getmanager getcurrentproject findnamespace isvalidnamespace argodiagram creatediagram addmember explorereventadaptor getinstance modelelementadded getnamespace targetmanager getinstance settarget illegalstateexception find the right namespace for the diagram return the namespace or null protected object find namespace project p project manager get manager get current project return p get root findnamespace projectmanager getmanager getcurrentproject getroot param namespace the namespace in which to create the diagram return the new diagram test if the given namespace is a valid namespace to add the diagram to todo this method was created to facilitate the merge of this class with action add diagram param ns the namespace to check return returns code true code if valid public boolean is valid namespace object ns return true actionadddiagram isvalidnamespace utility function to create a collaboration return a new collaboration param namespace the back up namespace to put the collaboration in protected static object create collaboration object namespace object target target manager get instance get model target if model get facade isauml element target model get model management helper is read only target target namespace object collaboration null if model get facade isa operation target object ns model get facade get namespace model get facade get owner target collaboration model get collaborations factory build collaboration ns target else if model get facade isa classifier target object ns model get facade get namespace target collaboration model get collaborations factory build collaboration ns target else collaboration model get collaborations factory create collaboration if model get facade isa namespace target todo not all namespaces are useful here any wf rs namespace target else if model get facade isa model element target object ns model get facade get namespace target if model get facade isa namespace ns namespace ns model get core helper set namespace collaboration namespace model get core helper set name collaboration unattached collaboration return collaboration createcollaboration targetmanager getinstance getmodeltarget getfacade isaumlelement getmodelmanagementhelper isreadonly getfacade isaoperation getfacade getnamespace getfacade getowner getcollaborationsfactory buildcollaboration getfacade isaclassifier getfacade getnamespace getcollaborationsfactory buildcollaboration getcollaborationsfactory createcollaboration getfacade isanamespace wfrs getfacade isamodelelement getfacade getnamespace getfacade isanamespace getcorehelper setnamespace getcorehelper setname unattachedcollaboration the constructor public action generate one super translator localize action generate selected classes null set the tooltip string put value action short description translator localize action generate selected classes actiongenerateone putvalue short_description override public void action performed action event ae super action performed ae list classes get candidates there is no need to test if classes is empty because the should be enabled mechanism blanks out the possibility to choose this alternative in this case class generation dialog cgd new class generation dialog classes cgd set visible true actionperformed actionevent actionperformed getcandidates shouldbeenabled classgenerationdialog classgenerationdialog setvisible return true if the action is enabled and there is at least a candidate class see org tigris gef undo undoable action is enabled override public boolean is enabled todo this seems to be called at startup only so no check so far return true list classes get candidates return classes size 0 undoableaction isenabled isenabled getcandidates return the candidates for generation private list get candidates list classes new array list collection targets target manager get instance get targets for object target targets if target instanceof fig target fig target get owner if model get facade isa class target model get facade isa interface target classes add target return classes getcandidates arraylist targetmanager getinstance gettargets getowner getfacade isaclass getfacade isainterface the constructor param name the name public uml model element ordered list model2 string name super name umlmodelelementorderedlistmodel2 see org argouml uml ui uml model element list model2 build model list protected abstract void build model list umlmodelelementlistmodel2 buildmodellist buildmodellist see org argouml uml ui uml model element list model2 is valid element java lang object protected abstract boolean is valid element object element umlmodelelementlistmodel2 isvalidelement isvalidelement move a element from the given position down one position i e a swap of the two positions anyone listening to the model will then be updated by the events listener mechanism if the element is already the last element in the list nothing is done param index the current position move element at given index to top of list param index starting position of element to be moved move element at given index to bottom of list param index starting position of element to be moved public boolean build popup j popup menu popup int index j menu item move to top new j menu item new move to top action this index j menu item move up new j menu item new move up action this index j menu item move down new j menu item new move down action this index j menu item move to bottom new j menu item new move to bottom action this index popup add move to top popup add move up popup add move down popup add move to bottom return true buildpopup jpopupmenu jmenuitem movetotop jmenuitem movetotopaction jmenuitem moveup jmenuitem moveupaction jmenuitem movedown jmenuitem movedownaction jmenuitem movetobottom jmenuitem movetobottomaction movetotop moveup movedown movetobottom the constructor public move up action uml model element ordered list model2 the model int the index super translator localize menu popup moveup model the model index the index moveupaction umlmodelelementorderedlistmodel2 themodel theindex themodel theindex override public void action performed action event e super action performed e model move down index 1 actionperformed actionevent actionperformed movedown see javax swing action is enabled override public boolean is enabled return index 0 isenabled isenabled the constructor public move down action uml model element ordered list model2 the model int the index super translator localize menu popup movedown model the model index the index movedownaction umlmodelelementorderedlistmodel2 themodel theindex themodel theindex override public void action performed action event e super action performed e model move down index actionperformed actionevent actionperformed movedown see javax swing action is enabled override public boolean is enabled return model get size index 1 isenabled isenabled getsize construct an action to move the item at the given index to the top of the given list param the model the list model to operate on param the index starting position of element to move public move to top action uml model element ordered list model2 the model int the index super translator localize menu popup movetotop model the model index the index themodel theindex movetotopaction umlmodelelementorderedlistmodel2 themodel theindex themodel theindex override public void action performed action event e super action performed e model move to top index actionperformed actionevent actionperformed movetotop see javax swing action is enabled override public boolean is enabled return model get size 1 index 0 isenabled isenabled getsize construct an action to move the item at the given index to the bottom of the given list param the model the list model to operate on param the index starting position of element to move public move to bottom action uml model element ordered list model2 the model int the index super translator localize menu popup movetobottom model the model index the index themodel theindex movetobottomaction umlmodelelementorderedlistmodel2 themodel theindex themodel theindex override public void action performed action event e super action performed e model move to bottom index actionperformed actionevent actionperformed movetobottom see javax swing action is enabled override public boolean is enabled return model get size 1 index model get size 1 isenabled isenabled getsize getsize construct an action to add a model element to some list protected abstract action add model element2 super translator localize menu popup add modelelement null set the tooltip string put value action short description translator localize menu popup add modelelement abstractactionaddmodelelement2 putvalue short_description construct a named action to add a model element to some list param name name for action public abstract action add model element2 string name super name abstractactionaddmodelelement2 construct an action to add a model element to some list with the given name and icon param name name for action param icon icon for action public abstract action add model element2 string name icon icon super name icon abstractactionaddmodelelement2 override public void action performed action event e super action performed e uml add dialog dialog new uml add dialog get choices get selected get dialog title is multi select is exclusive int result dialog show dialog argo frame get instance if result j option pane ok option do it dialog get selected actionperformed actionevent actionperformed umladddialog umladddialog getchoices getselected getdialogtitle ismultiselect isexclusive showdialog argoframe getinstance joptionpane ok_option doit getselected returns the choices the user has in the uml add dialog the choices are depicted on the left side of the uml add dialog sorry arabic users and can be moved via the buttons on the dialog to the right side on the right side are the selected modelelements return list of choices umladddialog umladddialog the modelelements already selected before the dialog is shown return list of model elements the action that has to be done by argo uml after the user clicks ok in the uml add dialog param selected the choices the user has selected in the uml add dialog argouml umladddialog umladddialog see javax swing action is enabled override public boolean is enabled return get choices is empty isenabled isenabled getchoices isempty returns the uml model target return uml model element protected object get target return target modelelement gettarget sets the uml model target param the target the target to set public void set target object the target target the target thetarget settarget thetarget thetarget returns the title of the dialog return string returns the exclusive return boolean public boolean is exclusive return exclusive isexclusive returns the multi select return boolean public boolean is multi select return multi select multiselect ismultiselect multiselect sets the exclusive param the exclusive the exclusive to set public void set exclusive boolean the exclusive exclusive the exclusive theexclusive setexclusive theexclusive theexclusive sets the multi select param the multi select the multi select to set public void set multi select boolean the multi select multi select the multi select multiselect themultiselect multiselect setmultiselect themultiselect multiselect themultiselect the constructor public abstract action navigate this button go up true abstractactionnavigate param key the key to be localized of the name of the action param has icon true if there is an icon for this action public abstract action navigate string key boolean has icon super translator localize key has icon resource loader wrapper lookup icon key null set the tooltip string put value action short description translator localize key put value action small icon resource loader wrapper lookup icon resource navigate up hasicon abstractactionnavigate hasicon hasicon resourceloaderwrapper lookupicon putvalue short_description putvalue small_icon resourceloaderwrapper lookupiconresource navigateup param new icon the icon for this action return this action public abstract action navigate set icon icon new icon put value action small icon new icon return this newicon abstractactionnavigate seticon newicon putvalue small_icon newicon abstract method to do the navigation the actual navigation is performed by action performed param source the object to navigate from return the object to navigate to actionperformed see javax swing action is enabled public boolean is enabled object target target manager get instance get model target return target null navigate to target null isenabled isenabled targetmanager getinstance getmodeltarget navigateto public void action performed action event e super action performed e object target target manager get instance get model target if model get facade isauml element target object elem target object nav navigate to elem if nav null target manager get instance set target nav actionperformed actionevent actionperformed targetmanager getinstance getmodeltarget getfacade isaumlelement navigateto targetmanager getinstance settarget see org argouml ui targetmanager target listener target added org argouml ui targetmanager target event public void target added target event e set enabled is enabled targetlistener targetadded targetevent targetadded targetevent setenabled isenabled see org argouml ui targetmanager target listener target removed org argouml ui targetmanager target event public void target removed target event e set enabled is enabled targetlistener targetremoved targetevent targetremoved targetevent setenabled isenabled see org argouml ui targetmanager target listener target set org argouml ui targetmanager target event public void target set target event e set enabled is enabled targetlistener targetset targetevent targetset targetevent setenabled isenabled the constructor defaults to name action new global and no icon protected abstract action new model element super translator localize action new null set the tooltip string put value action short description translator localize action new no_icon abstractactionnewmodelelement putvalue short_description the constructor param name the to be localized name of the action protected abstract action new model element string name super translator localize name resource loader wrapper lookup icon name set the tooltip string put value action short description translator localize name abstractactionnewmodelelement resourceloaderwrapper lookupicon putvalue short_description returns the target return model element public object get target return target modelelement gettarget sets the target param the target the target to set public void set target object the target target the target thetarget settarget thetarget thetarget the constructor public action add top level package super translator localize action add top level package null set the tooltip string put value action short description translator localize action add top level package actionaddtoplevelpackage putvalue short_description public void action performed action event ae super action performed ae project p project manager get manager get current project int num packs p get user defined model list size string name str package num packs 1 object model model get model management factory create model model get core helper set name model name str p add member model super action performed ae new action class diagram action performed ae actionperformed actionevent actionperformed projectmanager getmanager getcurrentproject numpacks getuserdefinedmodellist namestr package_ numpacks getmodelmanagementfactory createmodel getcorehelper setname namestr addmember actionperformed actionclassdiagram actionperformed constructor for action add diagram param s the name for this action public action add diagram string s super translator localize s resource loader wrapper lookup icon s set the tooltip string put value action short description translator localize s actionadddiagram actionadddiagram resourceloaderwrapper lookupicon putvalue short_description override public void action performed action event e todo the project should be bound to the action when it is created project p project manager get manager get current project object ns find namespace if ns null is valid namespace ns super action performed e diagram settings settings p get project settings get default diagram settings todo we should really be passing the default settings to the diagram factory so they get set at creation time argo diagram diagram create diagram ns settings p add member diagram todo make the explorer listen to project member property changes to eliminate coupling on gui explorer event adaptor get instance model element added ns target manager get instance set target diagram else log error no valid namespace found throw new illegal state exception no valid namespace found actionperformed actionevent projectmanager getmanager getcurrentproject findnamespace isvalidnamespace actionperformed diagramsettings getprojectsettings getdefaultdiagramsettings argodiagram creatediagram addmember explorereventadaptor getinstance modelelementadded targetmanager getinstance settarget illegalstateexception find the right namespace for the diagram return the namespace or null protected object find namespace project p project manager get manager get current project object target target manager get instance get model target object ns null if target null model get facade isa model element target model get model management helper is read only target todo when read only projects are supported instead of just profiles this could be a read only extent as well collection c p get roots if c null c is empty target c iterator next else what if model get facade isa namespace target ns target else object owner null if model get facade isa operation target owner model get facade get owner target if owner null model get facade isa namespace owner ns owner if ns null model get facade isa model element target owner model get facade get namespace target if owner null model get facade isa namespace owner ns owner if ns null ns p get root return ns findnamespace projectmanager getmanager getcurrentproject targetmanager getinstance getmodeltarget getfacade isamodelelement getmodelmanagementhelper isreadonly getroots isempty getfacade isanamespace getfacade isaoperation getfacade getowner getfacade isanamespace getfacade isamodelelement getfacade getnamespace getfacade isanamespace getroot test if the given namespace is a valid namespace to add the diagram to param ns the namespace to check return returns code true code if valid creates the diagram classes derived from this class should implement any specific behaviour to create the diagram param ns the namespace the uml diagram should get return uml diagram deprecated for 0 27 3 by tfmorris subclasses should override link create diagram object diagram settings this method is no longer abstract so implementing classes may remove it deprecated public argo diagram create diagram suppress warnings unused object ns do nothing during the deprecation period then it can be removed return null umldiagram umldiagram creatediagram diagramsettings argodiagram creatediagram suppresswarnings create a new diagram to be implemented by subclasses it will become abstract after 0 28 to enforce this requirement param owner owner of the diagram may be a namespace statemachine or collaboration depending on the type of diagram param settings default rendering settings for all figs in the new diagram return newly created diagram public argo diagram create diagram object owner diagram settings settings argo diagram d create diagram owner d set diagram settings settings return d argodiagram creatediagram diagramsettings argodiagram creatediagram setdiagramsettings construct a tagged values pane for the property panel public tab tagged values super tab tagged values set icon new up arrow icon button panel new tool bar button panel set name get title button panel set floatable false j button b new j button button panel add b b set action new action new tag definition b set text b set focusable false b new j button button panel add b b set tool tip text translator localize button delete b set action new action remove tagged value table b set text b set focusable false table set model new tab tagged values model table set row selection allowed false tag definitions combo box model new uml tag definition combo box model tag definitions combo box new uml combo box2 tag definitions combo box model class tag definition class class model get meta types get tag definition tag definitions combo box set renderer new uml list cell renderer2 false table set default editor tag definition class new default cell editor tag definitions combo box table set default renderer tag definition class new uml table cell renderer table get selection model add list selection listener this j scroll pane sp new j scroll pane table font label font look and feel mgr get instance get standard font table set font label font title label new j label none resize columns set layout new border layout title label set label for button panel j panel top pane new j panel new border layout top pane add title label border layout west top pane add button panel border layout center add top pane border layout north add sp border layout center add component listener this taggedvalues tabtaggedvalues seticon uparrowicon buttonpanel toolbar buttonpanel setname gettitle buttonpanel setfloatable jbutton jbutton buttonpanel setaction actionnewtagdefinition settext setfocusable jbutton buttonpanel settooltiptext setaction actionremovetaggedvalue settext setfocusable setmodel tabtaggedvaluesmodel setrowselectionallowed tagdefinitionscomboboxmodel umltagdefinitioncomboboxmodel tagdefinitionscombobox umlcombobox2 tagdefinitionscomboboxmodel tagdefinitionclass getmetatypes gettagdefinition tagdefinitionscombobox setrenderer umllistcellrenderer2 setdefaulteditor tagdefinitionclass defaultcelleditor tagdefinitionscombobox setdefaultrenderer tagdefinitionclass umltablecellrenderer getselectionmodel addlistselectionlistener jscrollpane jscrollpane labelfont lookandfeelmgr getinstance getstandardfont setfont labelfont titlelabel jlabel resizecolumns setlayout borderlayout titlelabel setlabelfor buttonpanel jpanel toppane jpanel borderlayout toppane titlelabel borderlayout toppane buttonpanel borderlayout toppane borderlayout borderlayout addcomponentlistener resize the columns public void resize columns table column key col table get column model get column 0 table column val col table get column model get column 1 key col set min width 50 key col set width 150 key col set preferred width 150 val col set min width 250 val col set width 550 val col set preferred width 550 table do layout resizecolumns tablecolumn keycol getcolumnmodel getcolumn tablecolumn valcol getcolumnmodel getcolumn keycol setminwidth keycol setwidth keycol setpreferredwidth valcol setminwidth valcol setwidth valcol setpreferredwidth dolayout public void set target object the target stop editing object t the target instanceof fig fig the target get owner the target if model get facade isa model element t target null should be enabled false return target t should be enabled true only update our model if we re visible if is visible set target internal target settarget thetarget stopediting thetarget thetarget getowner thetarget getfacade isamodelelement shouldbeenabled shouldbeenabled isvisible settargetinternal make sure any pending edits are flushed private void stop editing if table is editing table cell editor ce table get cell editor try if ce null ce stop cell editing ce cancel cell editing catch invalid element exception e most likely cause of this is that someone deleted our target with the event pump turned off so we didn t get notification nothing we can do about it now and we are changing targets anyway so just log it log warn failed to cancel editing model element deleted while edit in progress stopediting isediting tablecelleditor getcelleditor stopcellediting cancelcellediting invalidelementexception private void set target internal object t tag definitions combo box model set target t table set auto resize mode j table auto resize all columns tab tagged values model table get model set target t table size columns to fit 0 if t null title label set text target model get facade getuml class name t model get facade get name t else title label set text none validate settargetinternal tagdefinitionscomboboxmodel settarget setautoresizemode jtable auto_resize_all_columns tabtaggedvaluesmodel getmodel settarget sizecolumnstofit titlelabel settext getfacade getumlclassname getfacade getname titlelabel settext see org argouml ui tab target get target public object get target return target tabtarget gettarget gettarget see org argouml ui tab target refresh public void refresh set target target tabtarget settarget public boolean should be enabled object the target object t the target instanceof fig fig the target get owner the target if model get facade isa model element t should be enabled false return should be enabled should be enabled true return true shouldbeenabled thetarget thetarget thetarget getowner thetarget getfacade isamodelelement shouldbeenabled shouldbeenabled shouldbeenabled org argouml ui targetmanager target event public void target added target event e set target e get new target targetevent targetadded targetevent settarget getnewtarget org argouml ui targetmanager target event public void target removed target event e set target e get new target targetevent targetremoved targetevent settarget getnewtarget org argouml ui targetmanager target event public void target set target event e set target e get new target targetevent targetset targetevent settarget getnewtarget return returns the table model protected tab tagged values model get table model return tab tagged values model table get model tablemodel tabtaggedvaluesmodel gettablemodel tabtaggedvaluesmodel getmodel return returns the table protected j table get table return table jtable gettable public void value changed list selection event e if e get value is adjusting default list selection model sel default list selection model e get source collection tvs model get facade get tagged values collection target int index sel get lead selection index if index 0 index tvs size object tag def model get facade get tag definition tab tagged values model get from collection tvs index tag definitions combo box model set selected item tag def valuechanged listselectionevent getvalueisadjusting defaultlistselectionmodel defaultlistselectionmodel getsource getfacade gettaggedvaluescollection getleadselectionindex tagdef getfacade gettagdefinition tabtaggedvaluesmodel getfromcollection tagdefinitionscomboboxmodel setselecteditem tagdef see java awt event component listener component shown java awt event component event public void component shown component event e update our model with our saved target set target internal target componentlistener componentshown componentevent componentshown componentevent settargetinternal public void component hidden component event e stop updating model when we re not visible stop editing set target internal null componenthidden componentevent stopediting settargetinternal public void component moved component event e ignored componentmoved componentevent public void component resized component event e ignored componentresized componentevent construct an action to remove a tagged value from the table param table tv a j table backed by a tab tagged values model public action remove tagged value j table table tv super translator localize button delete resource loader wrapper lookup icon delete set the tooltip string put value action short description translator localize button delete table table tv taggedvalue tabletv jtable tabtaggedvaluesmodel actionremovetaggedvalue jtable tabletv resourceloaderwrapper lookupicon putvalue short_description tabletv override public void action performed action event e super action performed e tab tagged values model model tab tagged values model table get model model remove row table get selected row actionperformed actionevent actionperformed tabtaggedvaluesmodel tabtaggedvaluesmodel getmodel removerow getselectedrow constructor public action generate all super translator localize action generate all classes null set the tooltip string put value action short description translator localize action generate all classes actiongenerateall putvalue short_description override public void action performed action event ae super action performed ae argo diagram active diagram diagram utils get active diagram if active diagram instanceof uml class diagram return uml class diagram d uml class diagram active diagram list classes new array list list nodes d get nodes for object owner nodes if model get facade isa class owner model get facade isa interface owner continue string name model get facade get name owner if name null name length 0 character is digit name char at 0 continue classes add owner if classes size 0 collection selected objects target manager get instance get targets for object selected selected objects if model get facade isa package selected add collection model get model management helper get all model elements of kind selected model get meta types getuml class classes add collection model get model management helper get all model elements of kind selected model get meta types get interface classes else if model get facade isa class selected model get facade isa interface selected if classes contains selected classes add selected class generation dialog cgd new class generation dialog classes cgd set visible true actionperformed actionevent actionperformed argodiagram activediagram diagramutils getactivediagram activediagram umlclassdiagram umlclassdiagram umlclassdiagram activediagram arraylist getnodes getfacade isaclass getfacade isainterface getfacade getname isdigit charat selectedobjects targetmanager getinstance gettargets selectedobjects getfacade isapackage addcollection getmodelmanagementhelper getallmodelelementsofkind getmetatypes getumlclass addcollection getmodelmanagementhelper getallmodelelementsofkind getmetatypes getinterface getfacade isaclass getfacade isainterface classgenerationdialog classgenerationdialog setvisible return true if the action is enabled and the active diagram is a class diagram see org tigris gef undo undoable action is enabled override public boolean is enabled todo this seems to be called at startup only so no check so far return true argo diagram active diagram diagram utils get active diagram return active diagram instanceof uml class diagram undoableaction isenabled isenabled argodiagram activediagram diagramutils getactivediagram activediagram umlclassdiagram adds elements from collection without duplicates private void add collection collection c collection v for object o c if v contains o v add o addcollection the constructor takes the name of the tagged value as a string which will hold boolean data param the tag name the name of the taggedvalue containing boolean values public action boolean tagged value string the tag name super translator localize set null set the tooltip string put value action short description translator localize set tag name the tag name thetagname actionbooleantaggedvalue thetagname putvalue short_description tagname thetagname set the taggedvalue according to the condition of the checkbox the taggedvalue will be created if not existing see java awt event action listener action performed java awt event action event override public void action performed action event e super action performed e if e get source instanceof uml check box2 return uml check box2 source uml check box2 e get source object obj source get target if model get facade isa model element obj return boolean new state source is selected object tagged value model get facade get tagged value obj tag name if tagged value null tagged value model get extension mechanisms factory build tagged value tag name todo rework to use uml 1 4 tag definitions tfm model get extension mechanisms helper add tagged value obj tagged value if new state model get common behavior helper set value tagged value true else model get common behavior helper set value tagged value false actionlistener actionperformed actionevent actionperformed actionevent actionperformed getsource umlcheckbox2 umlcheckbox2 umlcheckbox2 getsource gettarget getfacade isamodelelement newstate isselected taggedvalue getfacade gettaggedvalue tagname taggedvalue taggedvalue getextensionmechanismsfactory buildtaggedvalue tagname tagdefinitions getextensionmechanismshelper addtaggedvalue taggedvalue newstate getcommonbehaviorhelper setvalue taggedvalue getcommonbehaviorhelper setvalue taggedvalue constructor for a new instance can only be called by this class or its children since used to create static instances only param d code true code if the compartment is to be shown code false code if it is to be hidden param c the text to be displayed for this action param type the type of compartment see definition at link c type protected action compartment display boolean d string c int type super translator localize c display d c type type ctype actioncompartmentdisplay ctype return the compartment show and or hide actions needed for the selected figs return only returns the actions for the menu items that make sense for the current selection public static collection action get actions collection action actions new array list action editor ce globals cur editor int present 0 int visible 0 boolean oper present false boolean oper visible false boolean attr present false boolean attr visible false boolean ep present false boolean ep visible false boolean enum present false boolean enum visible false list fig figs ce get selection manager get figs for fig f figs if f instanceof attributes compartment container present attr present true attr visible attributes compartment container f is attributes visible if attr visible visible if f instanceof operations compartment container present oper present true oper visible operations compartment container f is operations visible if oper visible visible if f instanceof extensions compartment container present ep present true ep visible extensions compartment container f is extension point visible if ep visible visible if f instanceof enum literals compartment container present enum present true enum visible enum literals compartment container f is enum literals visible if enum visible visible set up hide all show all if present 1 if visible 0 actions add hide all compartments if present visible 0 actions add show all compartments if attr present if attr visible actions add hide attr compartment else actions add show attr compartment if enum present if enum visible actions add hide enumliteral compartment else actions add show enumliteral compartment if oper present if oper visible actions add hide oper compartment else actions add show oper compartment if ep present if ep visible actions add hide extpoint compartment else actions add show extpoint compartment return actions getactions arraylist cureditor operpresent opervisible attrpresent attrvisible eppresent epvisible enumpresent enumvisible getselectionmanager getfigs attributescompartmentcontainer attrpresent attrvisible attributescompartmentcontainer isattributesvisible attrvisible operationscompartmentcontainer operpresent opervisible operationscompartmentcontainer isoperationsvisible opervisible extensionscompartmentcontainer eppresent epvisible extensionscompartmentcontainer isextensionpointvisible epvisible enumliteralscompartmentcontainer enumpresent enumvisible enumliteralscompartmentcontainer isenumliteralsvisible enumvisible hide_all_compartments show_all_compartments attrpresent attrvisible hide_attr_compartment show_attr_compartment enumpresent enumvisible hide_enumliteral_compartment show_enumliteral_compartment operpresent opervisible hide_oper_compartment show_oper_compartment eppresent epvisible hide_extpoint_compartment show_extpoint_compartment action method invoked when an event triggers this action p the link c type instance variable defines the action to take and the link display instance variable whether it should set visibility or not p param ae the event that triggered us override public void action performed action event ae iterator i globals cur editor get selection manager selections iterator while i has next selection sel selection i next fig f sel get content perform the action if c type compartment attribute 0 if f instanceof attributes compartment container attributes compartment container f set attributes visible display if c type compartment operation 0 if f instanceof operations compartment container operations compartment container f set operations visible display if c type compartment extensionpoint 0 if f instanceof fig use case fig use case f set extension point visible display if c type compartment enumliteral 0 if f instanceof enum literals compartment container enum literals compartment container f set enum literals visible display ctype actionperformed actionevent cureditor getselectionmanager hasnext getcontent ctype compartment_attribute attributescompartmentcontainer attributescompartmentcontainer setattributesvisible ctype compartment_operation operationscompartmentcontainer operationscompartmentcontainer setoperationsvisible ctype compartment_extensionpoint figusecase figusecase setextensionpointvisible ctype compartment_enumliteral enumliteralscompartmentcontainer enumliteralscompartmentcontainer setenumliteralsvisible constructor param me the model element param st the stereotype public action add stereotype object me object st super translator localize build string st null set the tooltip string put value action short description translator localize build string st model element me stereotype st actionaddstereotype buildstring putvalue short_description buildstring modelelement private static string build string object st project p project manager get manager get current project project settings ps p get project settings return notation utility uml generate stereotype st ps get notation settings is use guillemets buildstring projectmanager getmanager getcurrentproject projectsettings getprojectsettings notationutilityuml generatestereotype getnotationsettings isuseguillemets override public void action performed action event ae super action performed ae if model get facade get stereotypes model element contains stereotype model get core helper remove stereotype model element stereotype else model get core helper add stereotype model element stereotype actionperformed actionevent actionperformed getfacade getstereotypes modelelement getcorehelper removestereotype modelelement getcorehelper addstereotype modelelement override public object get value string key if selected equals key if model get facade get stereotypes model element contains stereotype return boolean true else return boolean false return super get value key getvalue getfacade getstereotypes modelelement getvalue default constructor public tab diagram this diagram tabdiagram constructor param tag the type of diagram that we are creating public tab diagram string tag super tag set layout new border layout graph new dndj graph graph set drawing size 612 30 2 792 55 20 2 todo should update to size of diagram contents globals set status bar new status bar adapter j panel p new j panel p set layout new border layout p set border new etched border etched border lowered p add graph border layout center add p border layout center graph add graph selection listener this graph add mode change listener this tabdiagram setlayout borderlayout dndjgraph setdrawingsize setstatusbar statusbaradapter jpanel jpanel setlayout borderlayout setborder etchedborder etchedborder borderlayout borderlayout addgraphselectionlistener addmodechangelistener override public object clone next statement gives us a clone j graph but not a cloned toolbar tab diagram new panel new tab diagram if target null new panel set target target tool bar factory factory new tool bar factory target get actions factory set rollover true factory set floatable false new panel set tool bar factory create tool bar set tool bar factory create tool bar return new panel jgraph tabdiagram newpanel tabdiagram newpanel settarget toolbarfactory toolbarfactory getactions setrollover setfloatable newpanel settoolbar createtoolbar settoolbar createtoolbar newpanel sets the target of the tab the target should always be an instance of uml diagram param t the target public void set target object t if t instanceof uml diagram this is perfectly normal and happens among other things within the call to set diagram below log debug target is null in set target or not an instance of uml diagram return uml diagram new target uml diagram t if target null target remove property change listener remove this new target add property change listener remove this set tool bar new target getj tool bar note this listener needs to always be active even if this tab isn t visible graph remove graph selection listener this graph set diagram new target graph add graph selection listener this target new target umldiagram settarget umldiagram setdiagram umldiagram umldiagram newtarget umldiagram removepropertychangelistener newtarget addpropertychangelistener settoolbar newtarget getjtoolbar removegraphselectionlistener setdiagram newtarget addgraphselectionlistener newtarget see org argouml ui tab target get target public object get target return target tabtarget gettarget gettarget getter for the toolbar return the tool bar public j tool bar get tool bar return tool bar toolbar jtoolbar gettoolbar toolbar see org argouml ui tab target refresh public void refresh set target target tabtarget settarget see org argouml ui tab target should be enabled java lang object public boolean should be enabled object new target return new target instanceof argo diagram tabtarget shouldbeenabled shouldbeenabled newtarget newtarget argodiagram getter for the link j graph return the j graph public j graph getj graph return graph jgraph jgraph jgraph getjgraph see java awt component set visible boolean public void set visible boolean b super set visible b getj graph set visible b setvisible setvisible setvisible getjgraph setvisible in the selection changed method not only the selection of this diagram is set but also the selection in the projectbrowser param gse the event public void selection changed graph selection event gse if updating selection updating selection true list fig selections gse get selections action cut get instance set enabled selections null selections is empty todo if action copy is no longer a singleton how shall this work action copy get instance set enabled selections null selections is empty action paste get instance set enabled globals clip board null globals clip board is empty the old selection list current selection target manager get instance get targets list removed targets new array list current selection list added targets new array list for object selection selections object owner target manager get instance get owner selection if current selection contains owner removed targets remove owner remains selected else add to selection added targets add owner if added targets size 1 removed targets size current selection size removed targets size 0 optimize for the normal case to minimize target changes target manager get instance set target added targets get 0 else for object o removed targets target manager get instance remove target o for object o added targets target manager get instance add target o updating selection false selectionchanged selectionchanged graphselectionevent updatingselection updatingselection getselections actioncut getinstance setenabled isempty actioncopy actioncopy getinstance setenabled isempty actionpaste getinstance setenabled clipboard clipboard isempty currentselection targetmanager getinstance gettargets removedtargets arraylist currentselection addedtargets arraylist targetmanager getinstance getowner currentselection removedtargets addedtargets addedtargets removedtargets currentselection removedtargets targetmanager getinstance settarget addedtargets removedtargets targetmanager getinstance removetarget addedtargets targetmanager getinstance addtarget updatingselection param listener the listener to be removed public void remove graph selection listener graph selection listener listener graph remove graph selection listener listener removegraphselectionlistener graphselectionlistener removegraphselectionlistener public void mode change mode change event mce log debug tab diagram got mode change event if target null target might not have been initialised yet globals get sticky globals mode instanceof mode select if target instanceof uml diagram target deselect all tools modechange modechangeevent tabdiagram getsticky modeselect _target umldiagram deselectalltools param listener the listener to be removed public void remove mode change listener mode change listener listener graph remove mode change listener listener removemodechangelistener modechangelistener removemodechangelistener sets the toolbar adds the toolbar to the north borderlayout position of the diagram p param toolbar is the toolbar to be set public void set tool bar j tool bar toolbar if arrays as list get components contains toolbar if target null remove uml diagram get target getj tool bar add toolbar border layout north tool bar toolbar invalidate validate repaint settoolbar jtoolbar aslist getcomponents umldiagram gettarget getjtoolbar borderlayout toolbar target event public void target added target event e set target e get new target select e get new targets targetevent targetadded targetevent settarget getnewtarget getnewtargets public void target removed target event e how to handle empty target lists probably the tab diagram should only show an empty pane in that case set target e get new target select e get new targets targetremoved targetevent tabdiagram settarget getnewtarget getnewtargets org argouml ui targetmanager target event public void target set target event e set target e get new target select e get new targets targetevent targetset targetevent settarget getnewtarget getnewtargets private void select object targets layer manager manager graph get editor get layer manager list fig fig list new array list fig for int i 0 i targets length i if targets i null fig the target null if targets i instanceof fig manager get active layer get contents contains targets i the target fig targets i else the target manager presentation for targets i if the target null fig list contains the target fig list add the target this checks the order in addition to the contents is that really what we want here tfm 20070603 if fig list equals graph selected figs graph deselect all graph select new vector fig fig list layermanager geteditor getlayermanager figlist arraylist thetarget getactivelayer getcontents thetarget thetarget presentationfor thetarget figlist thetarget figlist thetarget figlist selectedfigs deselectall figlist public void property change property change event arg0 if remove equals arg0 get property name log debug got remove event for diagram arg0 get source old value arg0 get old value although we register for notification of diagrams being deleted we currently depend on the target manager to assign a new target when this happens when we implement mdi and have our own list of open diagrams we can ressurect the use of this propertychange propertychangeevent getpropertyname getsource getoldvalue targetmanager constructor for the editor param d the diagram that this editor works in public argo editor diagram d super d setup rendering hints argoeditor setuprenderinghints constructor for the editor param gm the graphmodel param c the component public argo editor graph model gm j component c super gm c setup rendering hints argoeditor graphmodel jcomponent setuprenderinghints override public void mouse entered mouse event me if get active text editor null get active text editor request focus translate mouse event me globals cur editor this push mode fig modifying mode globals mode set under mouse me modemanager mouse entered me mouseentered mouseevent getactivetexteditor getactivetexteditor requestfocus translatemouseevent cureditor pushmode figmodifyingmode setundermouse _modemanager mouseentered override public void mouse moved mouse event me redraw manager lock translate mouse event me globals cur editor this set under mouse me fig current fig get current fig if current fig null globals get show fig tips string tip current fig get tip string me if tip null getj component null j component c getj component if c get tool tip text null c get tool tip text equals tip c set tool tip text tip else if getj component null getj component get tool tip text null getj component set tool tip text null was selectionmanager mouse moved me modemanager mouse moved me redraw manager unlock redrawer repair damage mousemoved mouseevent redrawmanager translatemouseevent cureditor setundermouse currentfig getcurrentfig currentfig getshowfigtips currentfig gettipstring getjcomponent jcomponent getjcomponent gettooltiptext gettooltiptext settooltiptext getjcomponent getjcomponent gettooltiptext getjcomponent settooltiptext _selectionmanager mousemoved _modemanager mousemoved redrawmanager _redrawer repairdamage override public synchronized void paint graphics g if should paint return if g instanceof graphics2d graphics2d g2 graphics2d g g2 set rendering hints argo rendering hints double scale get scale g2 scale scale scale get layer manager paint g get layer manager get active layer paint g if canselectelements selectionmanager paint g modemanager paint g shouldpaint setrenderinghints argorenderinghints getscale getlayermanager getlayermanager getactivelayer _canselectelements _selectionmanager _modemanager construct a new set of rendering hints to reflect current user settings private void setup rendering hints argo rendering hints new rendering hints null argo rendering hints put rendering hints key fractionalmetrics rendering hints value fractionalmetrics on if configuration get boolean argo key smooth edges false argo rendering hints put rendering hints key rendering rendering hints value render quality argo rendering hints put rendering hints key antialiasing rendering hints value antialias on argo rendering hints put rendering hints key text antialiasing rendering hints value text antialias on else argo rendering hints put rendering hints key rendering rendering hints value render speed argo rendering hints put rendering hints key antialiasing rendering hints value antialias off argo rendering hints put rendering hints key text antialiasing rendering hints value text antialias off renderinghints setuprenderinghints argorenderinghints renderinghints argorenderinghints renderinghints key_fractionalmetrics renderinghints value_fractionalmetrics_on getboolean key_smooth_edges argorenderinghints renderinghints key_rendering renderinghints value_render_quality argorenderinghints renderinghints key_antialiasing renderinghints value_antialias_on argorenderinghints renderinghints key_text_antialiasing renderinghints value_text_antialias_on argorenderinghints renderinghints key_rendering renderinghints value_render_speed argorenderinghints renderinghints key_antialiasing renderinghints value_antialias_off argorenderinghints renderinghints key_text_antialiasing renderinghints value_text_antialias_off public class argo mode create fig text extends mode create fig text override public string instructions return translator localize statusmsg help create text argomodecreatefigtext modecreatefigtext override public fig create new item mouse event e int snapx int snapy return new argo fig text null new rectangle snapx snapy 0 0 diagram utils get active diagram get diagram settings true createnewitem mouseevent argofigtext diagramutils getactivediagram getdiagramsettings construct a new path to coordinate conversion object which positions at a percentage along a path with a given distance perpendicular to the path at the anchor point param path fig fig representing the edge which will be used for positioning param the item fig the fig to be placed param path percent distance in integer percentages along path for anchor point from which the offset is computed beginning of path is 0 and end of path is 100 param displacement distance from the edge to place the fig this is computed along the normal public path item placement fig edge path fig fig the item fig int path percent int displacement this path fig the item fig path percent 0 90 displacement pathfig theitemfig pathpercent pathitemplacement figedge pathfig theitemfig pathpercent pathfig theitemfig pathpercent construct a new path to coordinate conversion object which positions an anchor point on the path at a percentage along a path with an offset and from the anchor point at a distance measured at a given angle param path fig fig representing the edge which will be used for positioning param the item fig the fig to be placed param path percent distance in integer percentages along path for anchor point from which the offset is computed beginning of path is 0 and end of path is 100 param path delta delta distance in coordinate space units to add to the computed percentage position param displacement angle angle to add to computed line slope when computing the displacement vector param displacement distance distance from the edge to place the fig this is computed along the normal from the anchor position using path percent path delta public path item placement fig edge path fig fig the item fig int path percent int path delta int displacement angle int displacement distance super path fig item fig the item fig set anchor path percent path delta set displacement vector displacement angle 180 displacement distance pathfig theitemfig pathpercent pathdelta displacementangle displacementdistance pathpercent pathdelta pathitemplacement figedge pathfig theitemfig pathpercent pathdelta displacementangle displacementdistance pathfig itemfig theitemfig setanchor pathpercent pathdelta setdisplacementvector displacementangle displacementdistance construct a new path to coordinate conversion object which positions an anchor point on the path at a percentage along a path with an offset and from the anchor point at a distance measured in x y coordinates param path fig fig representing the edge which will be used for positioning param the item fig the fig to be placed param path percent distance in integer percentages along path for anchor point from which the offset is computed beginning of path is 0 and end of path is 100 param path delta delta distance in coordinate space units to add to the computed percentage position param absolute offset point representing xy offset from anchor to use for positioning public path item placement fig edge path fig fig the item fig int path percent int path delta point absolute offset super path fig item fig the item fig set anchor path percent path delta set absolute offset absolute offset pathfig theitemfig pathpercent pathdelta absoluteoffset pathitemplacement figedge pathfig theitemfig pathpercent pathdelta absoluteoffset pathfig itemfig theitemfig setanchor pathpercent pathdelta setabsoluteoffset absoluteoffset returns the fig that this path item placement places to get the fig of the edge which owns this fig use use get path fig see org tigris gef base path conv get path fig note used by pgml tee return the fig that this path item places public fig get item fig return item fig pathitemplacement getpathfig pathconv getpathfig getitemfig itemfig compute a position this strangely named method computes a position using the current set of parameters and returns the result by updating the provided point param result point in which to return result not read as input see org tigris gef base path conv stuff point java awt point public void stuff point point result result get position result pathconv stuffpoint stuffpoint getposition get the computed target position based on the current set of parameters return the computed position public point get position return get position new point getposition getposition override public point get point return get position getpoint getposition get the anchor position the represents the point along the path that is used as the starting point for all other calculations return the anchor position represented by the current percentage and path offset parameters public point get anchor position int path distance get path distance point anchor new point pathfigure stuff point along perimeter path distance anchor return anchor getanchorposition pathdistance getpathdistance _pathfigure stuffpointalongperimeter pathdistance compute distance along the path based on percentage and offset clamped to the length of the path return the distance private int get path distance int length pathfigure get perimeter length int distance math max 0 length percent 100 path offset boundary condition in gef make sure this is less than not equal if distance length distance length 1 return distance getpathdistance _pathfigure getperimeterlength pathoffset get the computed position based on the current set of parameters param result point in which to return result not read as input but it em is em modified return the updated point private point get position point result point anchor get anchor position result set location anchor if we re using a fixed offset just add it and return no collision detection is done in this case if use angle result translate offset x offset y return result double slope get slope result set location apply offset slope vector offset anchor check for a collision between our computed position and the edge if use collision check int increment 2 increase offset by 2px at a time todo the size of text figs which is what we care about most isn t computed correctly by gef if we got ambitious we could recompute a proper size ourselves dimension size new dimension item fig get width item fig get height get the points representing the poly line for our edge fig edge fp fig edge pathfigure point points fp get points if intersects points result size increase offset by increments until we re clear int scaled offset vector offset increment int limit 20 int count 0 limit our retries in case its too hard to get free while intersects points result size count limit result set location apply offset slope scaled offset anchor scaled offset increment if we timed out give it one more try on the other side if false count limit log debug retry limit exceeded trying other side result set location anchor todo this works for 90 degree angles but is suboptimal for other angles it should reflect the angle rather than just using a negative offset along the same vector result set location apply offset slope vector offset anchor count 0 scaled offset scaled offset while intersects points result size count limit result set location apply offset slope scaled offset anchor scaled offset increment log debug final point count result offset of scaled offset return result getposition getanchorposition setlocation useangle getslope setlocation applyoffset vectoroffset usecollisioncheck itemfig getwidth itemfig getheight figedge figedge _pathfigure getpoints scaledoffset vectoroffset setlocation applyoffset scaledoffset scaledoffset setlocation setlocation applyoffset vectoroffset scaledoffset scaledoffset setlocation applyoffset scaledoffset scaledoffset scaledoffset check for intersection between the segments of a poly line and a rectangle unlike fig edge intersects this only checks the main path not any associated path items like ourselves param points set of points representing line segments param center position of center param size size of bounding box return true if they intersect private boolean intersects point points point center dimension size convert to bounding box very screwy gef sometimes uses center and sometimes upper left todo gef also positions text at the nominal baseline which is well inside the bounding box and gives the overall size incorrectly rectangle r new rectangle center x size width 2 center y size height 2 size width size height line2d line new line2d double for int i 0 i points length 1 i line set line points i points i 1 if r intersects line line return true return false figedge setline intersectsline convenience method to set anchor percentage distance and offset param new percent distance as a percent of total path 0 percent 100 param new offset offset in drawing coordinate system public void set anchor int new percent int new offset set anchor percent new percent set anchor offset new offset newpercent newoffset setanchor newpercent newoffset setanchorpercent newpercent setanchoroffset newoffset set distance along path of anchor in integer percentages param new percent distance as a percent of total path 0 percent 100 public void set anchor percent int new percent percent new percent newpercent setanchorpercent newpercent newpercent set offset along path to be applied to anchor after percentage based location is calculated specified in units of the drawing coordinate system param new offset offset in drawing coordinate system public void set anchor offset int new offset path offset new offset newoffset setanchoroffset newoffset pathoffset newoffset set a fixed offset from the anchor point param new offset a point who s x y coordinates will be used as a displacement from anchor point public void set absolute offset point new offset offset new offset use angle false newoffset setabsoluteoffset newoffset newoffset useangle attempts to set a new location for the fig being controlled by this path item takes the given point which represents an x y position and calculates the most appropriate angle and displacement to achieve this new position used when the user drags a label on the diagram override param new point the new target location for the path item fig see org tigris gef base path conv set point java awt point public void set point point new point int vect compute vector new point set displacement angle vect 0 set displacement distance vect 1 newpoint pathitem pathconv setpoint setpoint newpoint computevector newpoint setdisplacementangle setdisplacementdistance compute an angle and distance which is equivalent to the given point this is a convenience method to help callers get coordinates in a form that can be passed back in using link set displacement vector int int param point the desired target point return an array of two integers containing the angle and distance public int compute vector point point point anchor get anchor position int distance int anchor distance point int angl 0 double path slope get slope double offset slope get slope anchor point if swap path slope math pi 2 path slope math pi 3 2 angl int offset slope path slope math pi 180 else angl int offset slope path slope math pi 180 int result new int angl distance return result setdisplacementvector computevector getanchorposition pathslope getslope offsetslope getslope pathslope pathslope offsetslope pathslope offsetslope pathslope set the displacement vector to the given angle and distance param vector angle angle in degrees relative to the edge at the anchor point param vector distance distance along vector in drawing coordinate units public void set displacement vector int vector angle int vector distance set displacement angle vector angle set displacement distance vector distance vectorangle vectordistance setdisplacementvector vectorangle vectordistance setdisplacementangle vectorangle setdisplacementdistance vectordistance set the displacement vector to the given angle and distance param vector angle angle in degrees relative to the edge at the anchor point param vector distance distance along vector in drawing coordinate units public void set displacement vector double vector angle int vector distance set displacement angle vector angle set displacement distance vector distance vectorangle vectordistance setdisplacementvector vectorangle vectordistance setdisplacementangle vectorangle setdisplacementdistance vectordistance param offset angle the new angle for the displacement vector specified in degrees relative to the edge at the anchor public void set displacement angle int offset angle angle offset angle math pi 180 0 use angle true offsetangle setdisplacementangle offsetangle offsetangle useangle param offset angle the new angle for the displacement vector specified in degrees relative to the edge at the anchor public void set displacement angle double offset angle angle offset angle math pi 180 0 use angle true offsetangle setdisplacementangle offsetangle offsetangle useangle set distance along displacement vector to place the figure param new distance distance in units of the drawing coordinate system public void set displacement distance int new distance vector offset new distance use angle true newdistance setdisplacementdistance newdistance vectoroffset newdistance useangle don t know what this is supposed to do since gef has no api spec for it but we don t implement it and it ll throw an unsupported operation exception if you try to use it param new point ignored see org tigris gef base path conv set closest point java awt point public void set closest point point new point throw new unsupported operation exception unsupportedoperationexception newpoint pathconv setclosestpoint setclosestpoint newpoint unsupportedoperationexception compute slope of path at the anchor point slope is computed using a short segment instead of using the instantaneous slope so it will give unusual results near discontinuities in the path ie bends return the slope radians in the range 0 slope 2pi private double get slope final int slope seg len 40 segment size for computing slope int path length pathfigure get perimeter length int path distance get path distance two points for line segment used to compute slope of path here note that this is the average slope not instantaneous so it will give screwy results near bends in the path int d1 math max 0 path distance slope seg len 2 if our position was clamped try to make it up on the other end int d2 math min path length 1 d1 slope seg len can t get the slope of a point just return an arbitrary point if d1 d2 return 0 point p1 pathfigure point along perimeter d1 point p2 pathfigure point along perimeter d2 double theta get slope p1 p2 return theta getslope slopeseglen pathlength _pathfigure getperimeterlength pathdistance getpathdistance pathdistance slopeseglen pathlength slopeseglen _pathfigure pointalongperimeter _pathfigure pointalongperimeter getslope compute the slope in radians of the line between two points param p1 first point param p2 second point return slope in radians in the range 0 slope 2pi private static double get slope point p1 point p2 our angle theta is arctan opposite adjacent because y increases going down the screen positive angles are clockwise rather than counterclockwise int opposite p2 y p1 y int adjacent p2 x p1 x double theta if adjacent 0 this shouldn t happen because of our line segment size check if opposite 0 return 0 we re going vertical goose in top gun if opposite 0 theta math pi 3 2 else theta math pi 2 else arctan only returns pi 2 to pi 2 handle the other two quadrants and normalize to 0 2pi theta math atan double opposite double adjacent quadrant ii iii if adjacent 0 theta math pi quadrant iv if theta 0 theta math pi 2 return theta getslope apply an offset for a given distance along the normal vector computed to the line specified by the two points param p1 point one of line to use in computing normal vector param p2 point two of line to use in computing normal vector param the offset distance to displace fig along normal vector param anchor the start point to apply the offset from not modified return a new computed point describing the location after the offset has been applied to the anchor private point apply offset double theta int the offset point anchor point result new point anchor set the following for some backward compatibility with old algorithm final boolean above and right false log debug slope theta math pi pi theta math pi 180 0 add displacement angle to slope if swap theta math pi 2 theta math pi 3 2 theta theta angle else theta theta angle transform to 0 2pi range if we ve gone all the way around circle if theta math pi 2 theta math pi 2 if theta 0 theta math pi 2 compute our deltas int dx int the offset math cos theta int dy int the offset math sin theta for backward compatibility everything is above and right todo do in polar domain if above and right dx math abs dx dy math abs dy result x dx result y dy log debug result x result y theta theta 180 math pi dx dx dy dy return result theoffset applyoffset theoffset aboveandright theoffset theoffset aboveandright paint the virtual connection from the edge to where the path item is placed according to this path item placement algorithm param g the graphics object see org tigris gef base path conv paint java awt graphics public void paint graphics g final point p1 get anchor position point p2 get point rectangle r item fig get bounds load the standard colour just add an alpha channel color c globals get prefs handle color for item fig c new color c get red c get green c get blue 100 g set color c r grow 2 2 g fill round rect r x r y r width r height 8 8 if r contains p2 p2 get rect line intersection r p1 p2 g draw line p1 x p1 y p2 x p2 y pathconv getanchorposition getpoint itemfig getbounds getprefs handlecolorfor itemfig getred getgreen getblue setcolor fillroundrect getrectlineintersection drawline finds the point where a rectangle and line intersect finds the intersection point between the border of a rectangle r and a line drawn between two points p out outside the rectangle and p in inside the rectangle if the p in is not inside the rectangle or if any other problem occurs p in is returned param r rectangle to find the intersection of param p out point outside the rectangle param p in point inside the rectangle return the intersection between line p out p in and rectangle r private point get rect line intersection rectangle r point p out point p in line2d double m n m new line2d double p out p in n new line2d double r x r y r x r width r y if m intersects line n return intersection m n n new line2d double r x r width r y r x r width r y r height if m intersects line n return intersection m n n new line2d double r x r y r height r x r width r y r height if m intersects line n return intersection m n n new line2d double r x r y r x r y r width if m intersects line n return intersection m n should never get here if we do return the inner point log warn could not find rectangle intersection using inner point return p in pout pin pin pin pout pin pout pin getrectlineintersection pout pin pout pin intersectsline intersectsline intersectsline intersectsline pin finds the intersection point of two lines it is surprising that this method isn t already available in the base line2d class of java if a stock method exists or is implemented in future feel free replace this code with it param m first line param n second line return intersection point of first and second line private point intersection line2d m line2d n double d n gety2 n gety1 m getx2 m getx1 n getx2 n getx1 m gety2 m gety1 double a n getx2 n getx1 m gety1 n gety1 n gety2 n gety1 m getx1 n getx1 double as a d double x m getx1 as m getx2 m getx1 double y m gety1 as m gety2 m gety1 return new point int x int y returns the value of the percent field the position of the anchor point as a percentage of the edge important used by pgml tee return the value of the percent field public int get percent return percent getpercent returns the value of the angle field converted to degrees the angle of the path item relative to the edge important used by pgml tee return the value of the angle field in degrees public double get angle return angle 180 math pi getangle returns the value of the vector offset field the vector offset field is the distance away from the edge along the path vector that the item fig is placed important used by pgml tee return the value of the vector offset field public int get vector offset return vector offset vectoroffset vectoroffset vectoroffset getvectoroffset vectoroffset the code action navigability code constructor param assoc start a code m association end code object at the start of an association param assoc end a code m association end code object at the end of an association param nav the type of navigation required in the association being either ul li bidirectional li starttoend li endtostart ul return the constructed class public static action navigability new action navigability object assoc start object assoc end int nav return new action navigability get description assoc start assoc end nav assoc start assoc end nav actionnavigability assocstart massociationend assocend massociationend actionnavigability newactionnavigability assocstart assocend actionnavigability getdescription assocstart assocend assocstart assocend build a description string from the given association ends and the navigability param assoc start association end 1 param assoc end association end 2 param nav the navigability return the string containing a human readible indication of the navigability private static string get description object assoc start object assoc end int nav string start name model get facade get name model get facade get type assoc start string end name model get facade get name model get facade get type assoc end if start name null start name length 0 start name translator localize action navigation anon if end name null end name length 0 end name translator localize action navigation anon if nav starttoend return translator message format action navigation from to new object start name end name else if nav endtostart return translator message format action navigation from to new object end name start name else return translator localize action navigation bidirectional assocstart assocend getdescription assocstart assocend startname getfacade getname getfacade gettype assocstart endname getfacade getname getfacade gettype assocend startname startname startname endname endname endname messageformat startname endname messageformat endname startname the constructor param label the description as build in code get description code param the association start association end 1 param the association end association end 2 param the navigability the navigability one of bidirectional starttoend endtostart protected action navigability string label object the association start object the association end int the navigability super label null set the tooltip string put value action short description label this nav the navigability this assoc start the association start this assoc end the association end getdescription theassociationstart theassociationend thenavigability actionnavigability theassociationstart theassociationend thenavigability putvalue short_description thenavigability assocstart theassociationstart assocend theassociationend public void action performed action event ae super action performed ae model get core helper set navigable assoc start nav bidirectional nav endtostart model get core helper set navigable assoc end nav bidirectional nav starttoend actionperformed actionevent actionperformed getcorehelper setnavigable assocstart getcorehelper setnavigable assocend the is action is always enabled return always true the action is always enabled see org tigris gef undo undoable action is enabled public boolean is enabled return true undoableaction isenabled isenabled the constructor param show edge to show or not to show param desc the name protected action edges display boolean show edge string desc super desc null set the tooltip string put value action short description desc show show edge showedge actionedgesdisplay showedge putvalue short_description showedge override public void action performed action event ae super action performed ae argo diagram d diagram utils get active diagram editor ce globals cur editor mutable graph model mgm mutable graph model ce get graph model enumeration e ce get selection manager selections elements while e has more elements selection sel selection e next element object owner sel get content get owner if show add mgm add node related edges owner collection c model get facade get comments owner iterator i c iterator while i has next object annotated element i next fig f d presentation for annotated element and now what how do i add it to the diagram else remove list edges mgm get in edges owner edges add all mgm get out edges owner iterator e2 edges iterator while e2 has next object edge e2 next if model get facade isa association end edge edge model get facade get association edge fig fig d presentation for edge if fig null fig remove from diagram the next does not yet work for comment edges collection c model get facade get comments owner iterator i c iterator while i has next object annotated element i next fig f d presentation for annotated element if f null f remove from diagram actionperformed actionevent actionperformed argodiagram diagramutils getactivediagram cureditor mutablegraphmodel mutablegraphmodel getgraphmodel getselectionmanager hasmoreelements nextelement getcontent getowner addnoderelatededges getfacade getcomments hasnext annotatedelement presentationfor annotatedelement getinedges addall getoutedges hasnext getfacade isaassociationend getfacade getassociation presentationfor removefromdiagram getfacade getcomments hasnext annotatedelement presentationfor annotatedelement removefromdiagram return true if the action is enabled see org tigris gef undo undoable action is enabled override public boolean is enabled return true undoableaction isenabled isenabled return returns the show edges public static undoable action get show edges return show edges showedges undoableaction getshowedges showedges return returns the hide edges public static undoable action get hide edges return hide edges hideedges undoableaction gethideedges hideedges param key the name to be localized public abstract action check box menu item string key super translator localize key null set the tooltip string put value action short description translator localize key abstractactioncheckboxmenuitem putvalue short_description this action should be enabled when ul li all targets are modelelements that support this checkmark and li all targets have the checkmark either on or off mixed is not yet supported but could be if a tri state checkmark is implemented ul public boolean is enabled boolean result true boolean common value true only initialized to prevent warning boolean first true iterator i target manager get instance get targets iterator while i has next result object t i next try boolean value value of target t if first common value value first false result common value value catch illegal argument exception e result false not supported for this target return result isenabled commonvalue targetmanager getinstance gettargets hasnext valueoftarget commonvalue commonvalue illegalargumentexception param t the target modelelement return the value of the checkmark for this modelelement this action is performed on all targets see java awt event action listener action performed java awt event action event public final void action performed action event e super action performed e iterator i target manager get instance get targets iterator while i has next object t i next toggle value of target t actionlistener actionperformed actionevent actionperformed actionevent actionperformed targetmanager getinstance gettargets hasnext togglevalueoftarget param t the target modelelement abstract void toggle value of target object t togglevalueoftarget constructor for creating the mode label drag instance param editor the editor which will own this mode public mode label drag editor editor super editor modelabeldrag modelabeldrag constructor for creating the mode label drag instance public mode label drag super modelabeldrag modelabeldrag reply a string of instructions that should be shown in the statusbar when this mode starts return the text to display in the status bar override public string instructions return grabs label to begin movement turns cursor into a hand param me the mouse event to process override see org tigris gef base mode impl mouse pressed java awt event mouse event public void mouse pressed mouse event me point click point me get point fig under mouse editor hit click point if under mouse instanceof fig edge list fig fig list fig edge under mouse get path item figs for fig fig fig list if fig contains click point consume to stop other modes from trying to take over me consume drag fig fig drag base point fig get center deltax click point x drag base point x deltay click point y drag base point y fig edge fig edge under mouse break modeimpl mousepressed mouseevent mousepressed mouseevent clickpoint getpoint undermouse clickpoint undermouse figedge figlist figedge undermouse getpathitemfigs figlist clickpoint dragfig dragbasepoint getcenter clickpoint dragbasepoint clickpoint dragbasepoint figedge figedge undermouse handle mouse released events param me the mouse event to process see org tigris gef base mode impl mouse released java awt event mouse event public void mouse released mouse event me if drag fig null drag fig null mousereleased modeimpl mousereleased mouseevent mousereleased mouseevent dragfig dragfig handle mouse dragged events param me the mouse event to process see org tigris gef base mode impl mouse dragged java awt event mouse event public void mouse dragged mouse event me if drag fig null me editor translate mouse event me point new point me get point subtract the the offset of the click to take account of user having not initially clicked in the centre new point translate deltax deltay path item placement strategy pips fig edge get path item placement strategy drag fig pips set point new point new point pips get point int dx new point x drag base point x int dy new point y drag base point y drag base point set location new point drag fig translate dx dy me consume editor damaged drag fig mousedragged modeimpl mousedragged mouseevent mousedragged mouseevent dragfig translatemouseevent newpoint getpoint newpoint pathitemplacementstrategy figedge getpathitemplacementstrategy dragfig setpoint newpoint newpoint getpoint newpoint dragbasepoint newpoint dragbasepoint dragbasepoint setlocation newpoint dragfig dragfig the constructor param name the localized name of the action param coll the uml objects to be added public action add existing nodes string name collection coll super name objects coll actionaddexistingnodes override public boolean is enabled argo diagram dia diagram utils get active diagram if dia null return false mutable graph model gm mutable graph model dia get graph model for object o objects if gm can add node o return true return false isenabled argodiagram diagramutils getactivediagram mutablegraphmodel mutablegraphmodel getgraphmodel canaddnode override public void action performed action event ae super action performed ae editor ce globals cur editor graph model gm ce get graph model if gm instanceof mutable graph model return string instructions translator localize misc message click on diagram to add globals show status instructions final mode add to diagram place mode new mode add to diagram objects instructions globals mode place mode false actionperformed actionevent actionperformed cureditor graphmodel getgraphmodel mutablegraphmodel showstatus modeaddtodiagram placemode modeaddtodiagram placemode param model elements the modelelements to add nodes for param location the point where to drop the node also code null code is acceptable param diagram the diagram to add the nodes to public static void add nodes collection model elements point location argo diagram diagram mutable graph model gm mutable graph model diagram get graph model collection old targets target manager get instance get targets int count 0 for object me model elements if diagram instanceof uml diagram uml diagram diagram does accept me uml diagram diagram drop me location else if model get facade isa nary association me add existing node command cmd new add existing node command me location count cmd execute else if model get facade isauml element me if gm can add edge me gm add edge me todo an association class should be possible to add as a side effect of adding a node and its related edges but that doesn t work as things are currently structured tfm 20061208 if model get facade isa association class me mode create association class build in active layer globals cur editor me else if gm can add node me add existing node command cmd new add existing node command me location count cmd execute target manager get instance set targets old targets modelelements addnodes modelelements argodiagram mutablegraphmodel mutablegraphmodel getgraphmodel oldtargets targetmanager getinstance gettargets modelelements umldiagram umldiagram doesaccept umldiagram getfacade isanaryassociation addexistingnodecommand addexistingnodecommand getfacade isaumlelement canaddedge addedge associationclass getfacade isaassociationclass modecreateassociationclass buildinactivelayer cureditor canaddnode addexistingnodecommand addexistingnodecommand targetmanager getinstance settargets oldtargets param action the action public radio action action action super string action get value action name icon action get value action small icon put value action short description action get value action short description real action action radioaction getvalue getvalue small_icon putvalue short_description getvalue short_description realaction public void action performed java awt event action event action event uml diagram diagram uml diagram diagram utils get active diagram if globals get sticky diagram get selected action this if the user selects an action that is already selected in sticky mode double clicked then we turn off sticky mode and make sure no action is selected globals set sticky false diagram deselect all tools editor ce globals cur editor if ce null ce finish mode return super action performed action event real action action performed action event diagram set selected action this globals set sticky is double click if is double click editor ce globals cur editor if ce null ce finish mode actionperformed actionevent actionevent umldiagram umldiagram diagramutils getactivediagram getsticky getselectedaction setsticky deselectalltools cureditor finishmode actionperformed actionevent realaction actionperformed actionevent setselectedaction setsticky isdoubleclick isdoubleclick cureditor finishmode return the action public action get action return real action getaction realaction the default constructor p deprecated for 0 27 2 by tfmorris use link fig node model element object rectangle diagram settings deprecated protected fig node model element notation settings new notation settings this rectangle marks the whole modelelement figure everything is inside it big port new fig rect x0 y0 0 0 debug color debug color name fig new fig name with abstract and bold x0 y0 width name fig height true stereotype fig new fig stereotypes group x0 y0 width stereoheight construct figs fignodemodelelement diagramsettings fignodemodelelement notationsettings notationsettings bigport figrect debug_color debug_color namefig fignamewithabstractandbold name_fig_height stereotypefig figstereotypesgroup constructfigs construct an unplaced fig with no owner using the given rendering settings private void construct figs todo why isn t this stuff managed by the name fig itself name fig set filled true name fig set text place string name fig set bot margin 7 make space for the clarifier name fig set right margin 4 margin between text and border name fig set left margin 4 ready to edit false set shadow size get settings get default shadow width todo how to handle changes in shadowsize from the project properties stereotype style get settings get default stereotype view constructfigs namefig namefig setfilled namefig settext placestring namefig setbotmargin namefig setrightmargin namefig setleftmargin readytoedit setshadowsize getsettings getdefaultshadowwidth stereotypestyle getsettings getdefaultstereotypeview construct a figure at a specific position for a given model element p param element model element associated with figure param x horizontal location param y vertical location deprecated for 0 27 2 by tfmorris use link fig node model element object rectangle diagram settings deprecated protected fig node model element object element int x int y this set owner element name fig set text place string ready to edit false set location x y modelelement fignodemodelelement diagramsettings fignodemodelelement setowner namefig settext placestring readytoedit setlocation construct a figure at a specific position for a given model element with the given settings this is the constructor used by the pgml parser when loading a diagram from a file p beware the width and height in the given rectangle are currently ignored according issue 5604 this is a bug param element model element associated with figure param bounds x y are used to set position width height are ignored param render settings the rendering settings to use for the fig protected fig node model element object element rectangle bounds diagram settings render settings super super set owner element todo we currently don t support per fig settings for most stuff so we can just use the defaults that we were given settings new diagram settings render settings settings render settings be careful here since subclasses could have overridden this with the assumption that it wouldn t be called before the constructors finished super set fill color fill color super set line color line color super set line width line width super set text color text color some subclasses will try to use this notation settings are different since we know that at a minimum the is show path setting can change because with implement path container so we make sure that we have a private copy of the notation settings notation settings new notation settings settings get notation settings this rectangle marks the whole modelelement figure everything is inside it big port new fig rect x0 y0 0 0 debug color debug color name fig new fig name with abstract and bold element new rectangle x0 y0 width name fig height get settings true construct figs todo for a fig pool the element will be null when issue 5031 is resolved this constraint can be reinstated if element null throw new illegal argument exception an owner must be supplied if element null model get facade isauml element element throw new illegal argument exception the owner must be a model element got a element get class get name name fig set text place string if element null notation provider name notation provider factory2 get instance get notation provider get notation provider type element this this next line presumes that the 1st fig with this owner is the previous port and consequently nullifies the owner of this 1st fig bind port element big port add a listener for changes to any property add element listener element if bounds null set location bounds x bounds y todo the following is carried over from set owner but probably isn t needed rendering changed it does the following add as needed update name text update stereotype text update stereotype icon update bounds damage ready to edit true modelelement rendersettings fignodemodelelement diagramsettings rendersettings setowner diagramsettings rendersettings rendersettings setfillcolor fill_color setlinecolor line_color setlinewidth line_width settextcolor text_color isshowpath pathcontainer notationsettings notationsettings getnotationsettings bigport figrect debug_color debug_color namefig fignamewithabstractandbold name_fig_height getsettings constructfigs figpool illegalargumentexception getfacade isaumlelement illegalargumentexception getclass getname namefig settext placestring notationprovidername notationproviderfactory2 getinstance getnotationprovider getnotationprovidertype bindport bigport addelementlistener setlocation setowner renderingchanged updatenametext updatestereotypetext updatestereotypeicon updatebounds readytoedit this is the final call at creation time of the fig i e here it is put on a diagram param lay the layer which has a 1 1 relation to the diagram see org tigris gef presentation fig set layer org tigris gef base layer override public void set layer layer lay super set layer lay determine default path visible setlayer setlayer setlayer determinedefaultpathvisible clone this figure after the base clone method has been called determine which child figs of the clone represent the name stereotype and port p todo enclosed figs encloser and event senders may also need to be cloned see java lang object clone return the cloned figure override public object clone final fig node model element clone fig node model element super clone final iterator clone iter clone get figs iterator for object this fig get figs final fig clone fig fig clone iter next if this fig get big port clone set big port clone fig if this fig name fig clone name fig fig single line text this fig todo mvw i think this has to be clone name fig fig single line text clone fig but have not the means to investigate since this code is not yet used enable the menu items for copy paste to test btw in some other fig node model element classes i see the same mistake if this fig get stereotype fig clone stereotype fig fig stereotypes group this fig idem here clone stereotype fig fig stereotypes group clone fig return clone enclosedfigs eventsenders fignodemodelelement fignodemodelelement cloneiter getfigs thisfig getfigs clonefig cloneiter thisfig getbigport setbigport clonefig thisfig namefig namefig figsinglelinetext thisfig namefig figsinglelinetext clonefig fignodemodelelement thisfig getstereotypefig stereotypefig figstereotypesgroup thisfig stereotypefig figstereotypesgroup clonefig default reply text to be shown while placing node in diagram overrule this when the text is not new uml class name return the text to be shown while placing node in diagram public string place string if model get facade isa model element get owner string place string model get facade get name get owner if place string null place string todo i18n new model get facade getuml class name get owner return place string return umlclassname placestring getfacade isamodelelement getowner placestring getfacade getname getowner placestring placestring getfacade getumlclassname getowner placestring param id uid public void set itemuid itemuid id item uid id setitemuid itemuid return uid public itemuid get itemuid return item uid getitemuid itemuid get the fig that displays the model element name return the name fig protected fig text get name fig return name fig figtext getnamefig namefig get the rectangle in which the model elements name is displayed return bounding box for name public rectangle get name bounds return name fig get bounds getnamebounds namefig getbounds set the fig that displays the model element name param fig the name fig protected void set name fig fig text fig name fig fig if name fig null update font setnamefig figtext namefig namefig updatefont get the name of the model element this fig represents return the name of the model element public string get name return name fig get text getname namefig gettext change the name of the model element this fig represents param n the name of the model element public void set name string n name fig set text n setname namefig settext this method returns a vector of one of these 4 types abstract action j menu j menu item j separator inherit doc override public vector get pop up actions mouse event me action list pop up actions new action list super get pop up actions me is read only show argoj menu show build show pop up if show get menu component count 0 pop up actions add show popup add offset should be equal to the number of items added here pop up actions add new j separator popup add offset 1 if remove from diagram pop up actions add project actions get instance get remove from diagram action popup add offset if is read only pop up actions add new action delete model elements popup add offset check if multiple items are selected if target manager get instance get targets size 1 todo having critics actions here introduces an unnecessary dependency on the critics subsystem have it register its desired actions using an extension mechanism tfm to do list td list designer the designer get to do list list to do item items td list element list for offender get owner if items null items size 0 todo this creates a dependency on the critics subsystem we need a generic way for modules including our internal subsystems to request addition of actions to the popup menu tfm 20080430 argoj menu critiques new argoj menu menu popup critiques to do item item under mouse hit clarifier me getx me gety if item under mouse null critiques add new action go to critique item under mouse critiques add separator for to do item item items if item item under mouse critiques add new action go to critique item pop up actions add 0 new j separator pop up actions add 0 critiques add stereotypes submenu final action stereo actions stereotype utility get apply stereotype actions get owner if stereo actions null pop up actions add 0 new j separator final argoj menu stereotypes new argoj menu menu popup apply stereotypes for action action stereo actions stereotypes add check item action pop up actions add 0 stereotypes add stereotype view submenu argoj menu stereotypes view new argoj menu menu popup stereotype view todo there are cyclic dependencies between action stereotype view and fig node model element register these actions opaquely since we don t what they are tfm stereotypes view add radio item new action stereotype view textual this stereotypes view add radio item new action stereotype view big icon this stereotypes view add radio item new action stereotype view small icon this pop up actions add 0 stereotypes view return pop up actions abstractaction jmenu jmenuitem jseparator inheritdoc getpopupactions mouseevent actionlist popupactions actionlist getpopupactions isreadonly argojmenu buildshowpopup getmenucomponentcount popupactions popupaddoffset popupactions jseparator popupaddoffset removefromdiagram popupactions projectactions getinstance getremovefromdiagramaction popupaddoffset isreadonly popupactions actiondeletemodelelements popupaddoffset targetmanager getinstance gettargets todolist tdlist thedesigner gettodolist todoitem tdlist elementlistforoffender getowner argojmenu argojmenu todoitem itemundermouse hitclarifier itemundermouse actiongotocritique itemundermouse addseparator todoitem itemundermouse actiongotocritique popupactions jseparator popupactions stereoactions stereotypeutility getapplystereotypeactions getowner stereoactions popupactions jseparator argojmenu argojmenu stereoactions addcheckitem popupactions argojmenu stereotypesview argojmenu actionstereotypeview fignodemodelelement stereotypesview addradioitem actionstereotypeviewtextual stereotypesview addradioitem actionstereotypeviewbigicon stereotypesview addradioitem actionstereotypeviewsmallicon popupactions stereotypesview popupactions protected argoj menu build show pop up argoj menu show menu new argoj menu menu popup show for undoable action ua action set path get actions show menu add ua return show menu argojmenu buildshowpopup argojmenu showmenu argojmenu undoableaction actionsetpath getactions showmenu showmenu return the pop up menu item for visibility protected object build visibility pop up argoj menu visibility menu new argoj menu menu popup visibility visibility menu add radio item new action visibility public get owner visibility menu add radio item new action visibility private get owner visibility menu add radio item new action visibility protected get owner visibility menu add radio item new action visibility package get owner return visibility menu buildvisibilitypopup argojmenu visibilitymenu argojmenu visibilitymenu addradioitem actionvisibilitypublic getowner visibilitymenu addradioitem actionvisibilityprivate getowner visibilitymenu addradioitem actionvisibilityprotected getowner visibilitymenu addradioitem actionvisibilitypackage getowner visibilitymenu build a pop up menu item for the various modifiers p this function is designed to be easily extendable with new items param items bitwise or of the items root abstract leaf active return the menu item protected object build modifier pop up int items argoj menu modifier menu new argoj menu menu popup modifiers if items abstract 0 modifier menu add check item new action modifier abstract get owner if items leaf 0 modifier menu add check item new action modifier leaf get owner if items root 0 modifier menu add check item new action modifier root get owner if items active 0 modifier menu add check item new action modifier active get owner return modifier menu buildmodifierpopup argojmenu modifiermenu argojmenu modifiermenu addcheckitem actionmodifierabstract getowner modifiermenu addcheckitem actionmodifierleaf getowner modifiermenu addcheckitem actionmodifierroot getowner modifiermenu addcheckitem actionmodifieractive getowner modifiermenu see org tigris gef presentation fig get enclosing fig override public fig get enclosing fig return encloser getenclosingfig getenclosingfig override public void set enclosing fig fig new encloser fig old encloser encloser layer perspective layer layer perspective get layer if layer null argo diagram diagram argo diagram layer get diagram diagram encloser changed this fig node old encloser fig node new encloser super set enclosing fig new encloser if layer null new encloser old encloser diagram diagram layer get diagram if diagram instanceof argo diagram argo diagram uml diagram argo diagram diagram set the namespace of the enclosed model element to the namespace of the encloser object namespace null if new encloser null the node s been placed on the diagram uml diagram set model element namespace get owner null else the node s been placed within some fig namespace new encloser get owner if model get facade isa namespace namespace uml diagram set model element namespace get owner namespace if encloser instanceof fig node model element fig node model element encloser remove enclosed fig this if new encloser instanceof fig node model element fig node model element new encloser add enclosed fig this encloser new encloser setenclosingfig newencloser oldencloser layerperspective layerperspective getlayer argodiagram argodiagram getdiagram encloserchanged fignode oldencloser fignode newencloser setenclosingfig newencloser newencloser oldencloser getdiagram argodiagram argodiagram umldiagram argodiagram newencloser umldiagram setmodelelementnamespace getowner newencloser getowner getfacade isanamespace umldiagram setmodelelementnamespace getowner fignodemodelelement fignodemodelelement removeenclosedfig newencloser fignodemodelelement fignodemodelelement newencloser addenclosedfig newencloser handle the case where this fig is moved into a component param new encloser the new encloser for this fig protected void move into component fig new encloser final object component new encloser get owner final object owner get owner assert model get facade isa component component assert model get facade isauml element owner final collection er1 model get facade get element residences owner final collection er2 model get facade get resident elements component boolean found false find all element residences between the class and the component final collection object common new array list object er1 common retain all er2 for object element residence common if found found true there is already a correct element residence else there were 2 element residences strange case model get uml factory delete element residence if found there was no element residence yet so let s create one model get core factory build element residence owner component newencloser moveintocomponent newencloser newencloser getowner getowner getfacade isacomponent getfacade isaumlelement getfacade getelementresidences getfacade getresidentelements elementresidences arraylist retainall elementresidence elementresidence elementresidences getumlfactory elementresidence elementresidence getcorefactory buildelementresidence add a fig that is enclosed by this figure param fig the fig to be added public void add enclosed fig fig fig enclosed figs add fig addenclosedfig enclosedfigs removes the given fig from the list of enclosed figs param fig the fig to be removed public void remove enclosed fig fig fig enclosed figs remove fig removeenclosedfig enclosedfigs see org tigris gef presentation fig get enclosed figs override public vector fig get enclosed figs return enclosed figs getenclosedfigs getenclosedfigs enclosedfigs see org tigris gef presentation fig make selection override public selection make selection return new selection default clarifiers this makeselection makeselection selectiondefaultclarifiers displays visual indications of pending to do items please note that the list of advices to do list is not the same as the list of element known by the fig node figs therefore it is necessary to check if the graphic item exists before drawing on it see cl attribute compartment for an example param g the graphics device see org argouml uml cognitive critics cl attribute compartment public void paint clarifiers graphics g todo generalize extension and remove critic specific stuff int iconx getx int icony gety 10 to do list td list designer the designer get to do list list to do item items td list element list for offender get owner for to do item item items icon icon item get clarifier if icon instanceof clarifier clarifier icon set fig this clarifier icon set to do item item if icon null icon paint icon null g iconx icony iconx icon get icon width items td list element list for offender this for to do item item items icon icon item get clarifier if icon instanceof clarifier clarifier icon set fig this clarifier icon set to do item item if icon null icon paint icon null g iconx icony iconx icon get icon width todoitems todolist fignode _figs clattributecompartment clattributecompartment paintclarifiers todolist tdlist thedesigner gettodolist todoitem tdlist elementlistforoffender getowner todoitem getclarifier setfig settodoitem painticon geticonwidth tdlist elementlistforoffender todoitem getclarifier setfig settodoitem painticon geticonwidth param x the x of the hit param y the y of the hit return the todo item of which the clarifier has been hit protected to do item hit clarifier int x int y todo to do item stuff should be made an opaque extension int iconx getx to do list td list designer the designer get to do list list to do item items td list element list for offender get owner for to do item item items icon icon item get clarifier int width icon get icon width if y gety 15 y gety 10 x iconx x iconx width return item iconx width for to do item item items icon icon item get clarifier if icon instanceof clarifier clarifier icon set fig this clarifier icon set to do item item if clarifier icon hit x y return item items td list element list for offender this for to do item item items icon icon item get clarifier int width icon get icon width if y gety 15 y gety 10 x iconx x iconx width return item iconx width for to do item item items icon icon item get clarifier if icon instanceof clarifier clarifier icon set fig this clarifier icon set to do item item if clarifier icon hit x y return item return null todoitem hitclarifier todoitem todolist tdlist thedesigner gettodolist todoitem tdlist elementlistforoffender getowner todoitem getclarifier geticonwidth todoitem getclarifier setfig settodoitem tdlist elementlistforoffender todoitem getclarifier geticonwidth todoitem getclarifier setfig settodoitem override public string get tip string mouse event me todo generalize extension and remove critic specific code to do item item hit clarifier me getx me gety string tip if item null globals cur editor get selection manager contains fig this tip item get headline else if get owner null tip model get facade get tip string get owner else tip to string if tip null tip length 0 tip ends with tip return tip gettipstring mouseevent todoitem hitclarifier cureditor getselectionmanager containsfig getheadline getowner getfacade gettipstring getowner tostring endswith public void vetoable change property change event pce log debug in vetoable change object src pce get source if src get owner delayed change notify delayed notify new delayed change notify this pce swing utilities invoke later delayed notify else log debug fig node model element got vetoable change from non owner src vetoablechange propertychangeevent vetoablechange getsource getowner delayedchangenotify delayednotify delayedchangenotify swingutilities invokelater delayednotify fignodemodelelement vetoablechange public void delayed vetoable change property change event pce log debug in delayed vetoable change update any text colors fonts etc rendering changed end trans delayedvetoablechange propertychangeevent delayedvetoablechange renderingchanged endtrans determine new bounds p this algorithm makes the box grow if the calculated minimum size grows but then it can never shrink again not even if the calculated minimum size is smaller protected void update bounds if check size return rectangle bbox get bounds dimension min size get minimum size bbox width math max bbox width min size width bbox height math max bbox height min size height set bounds bbox x bbox y bbox width bbox height updatebounds checksize getbounds minsize getminimumsize minsize minsize setbounds public void property change final property change event pve final object src pve get source final string p name pve get property name if pve instanceof delete instance event src get owner remove from diagram return we are getting events we don t want filter them out if pve get property name equals supplier dependency model get facade isa dependency pve get old value todo can we instruct the model event pump not to send these in the first place see defect 5095 return we handle and consume editing events if p name equals editing boolean false equals pve get new value try parse the text that was edited text edited fig text src resize the fig node to accomodate the new text final rectangle bbox get bounds final dimension min size get minimum size bbox width math max bbox width min size width bbox height math max bbox height min size height set bounds bbox x bbox y bbox width bbox height end trans catch property veto exception ex log error could not parse the text entered property veto exception ex else if p name equals editing boolean true equals pve get new value if is read only text edit started fig text src else super property change pve if model get facade isauml element src final uml change event event uml change event pve if the source of the event is an uml object e g the owner of this fig but not always only the owner is shown e g for a class also its attributes are shown then the uml model has been changed final object owner get owner if owner null todo should this not be an assert return try model changed event catch invalid element exception e if log is debug enabled log debug model changed method accessed deleted element format event event e if event get source owner stereotype equals event get property name stereotype changed event runnable do work runnable new runnable public void run try update layout event catch invalid element exception e if log is debug enabled log debug update layout method accessed deleted element format event event e swing utilities invoke later do work runnable propertychange propertychangeevent getsource pname getpropertyname deleteinstanceevent getowner removefromdiagram getpropertyname supplierdependency getfacade isadependency getoldvalue pname getnewvalue textedited figtext fignode getbounds minsize getminimumsize minsize minsize setbounds endtrans propertyvetoexception propertyvetoexception pname getnewvalue isreadonly texteditstarted figtext propertychange getfacade isaumlelement umlchangeevent umlchangeevent getowner modelchanged invalidelementexception isdebugenabled modelchanged formatevent getsource getpropertyname stereotypechanged doworkrunnable updatelayout invalidelementexception isdebugenabled updatelayout formatevent swingutilities invokelater doworkrunnable runnable do work runnable new runnable public void run try update layout event catch invalid element exception e if log is debug enabled log debug update layout method accessed deleted element format event event e doworkrunnable updatelayout invalidelementexception isdebugenabled updatelayout formatevent private string format event property change event event return n t event event get class get name n t source event get source n t old event get old value n t name event get property name formatevent propertychangeevent getclass getname getsource getoldvalue getpropertyname return true if the model element that this fig represents is read only return the model element is read only private boolean is read only return model get model management helper is read only get owner isreadonly getmodelmanagementhelper isreadonly getowner called by property changed when it detects that a stereotype has been added or removed on removal the fig node removes its listener to that stereotype when a new stereotype is detected we add a listener todo bob says in my opinion we shouldn t be doing this here fig stereotype should always be listening to change of its owners name fig stereotypes compartment should always be listening for add or remove of stereotypes to its owner those classes will need to pass some event to the fig node on the awt thread only if a change results in a change of size that requires a redraw p note runs at the model mdr thread p param event the uml change event that caused the change private void stereotype changed final uml change event event final object owner get owner assert owner null try if event get old value null remove element listener event get old value if event get new value null add element listener event get new value name catch invalid element exception e log debug stereotype changed method accessed deleted element e propertychanged fignode figstereotype figstereotypescompartment fignode umlchangeevent stereotypechanged umlchangeevent getowner getoldvalue removeelementlistener getoldvalue getnewvalue addelementlistener getnewvalue invalidelementexception stereotypechanged this method is called when the user doubleclicked on the text field and starts editing subclasses should overrule this field to e g supply help to the user about the used format p it is also possible to alter the text to be edited already here e g by adding the stereotype in front of the name by using set fully handle stereotypes true in the notation settings argument of the notation provider to string function but that seems not user friendly see issue 3838 param ft the fig text that will be edited and contains the start text protected void text edit started fig text ft if ft get name fig show help notation provider name get parsing help ft set text notation provider name to string get owner get notation settings if ft instanceof compartment fig text final compartment fig text fig text compartment fig text ft show help fig text get notation provider get parsing help fig text set text fig text get notation provider to string fig text get owner get notation settings setfullyhandlestereotypes notationsettings notationprovider tostring figtext texteditstarted figtext getnamefig showhelp notationprovidername getparsinghelp settext notationprovidername tostring getowner getnotationsettings compartmentfigtext compartmentfigtext figtext compartmentfigtext showhelp figtext getnotationprovider getparsinghelp figtext settext figtext getnotationprovider tostring figtext getowner getnotationsettings utility function to localize the given string with help text and show it in the status bar of the argouml window this function is used in favour of the inline call to enable later improvements e g it would be possible to show a help balloon p todo work this out one matter to possibly improve show multiple lines param s the given string to be localized and shown protected void show help string s if s null convert null to empty string and clear help message argo event pump fire event new argo help event argo event types help changed this else argo event pump fire event new argo help event argo event types help changed this translator localize s showhelp argoeventpump fireevent argohelpevent argoeventtypes help_changed argoeventpump fireevent argohelpevent argoeventtypes help_changed this method is called after the user finishes editing a text field that is in the fig node model element determine which field and update the model this class handles the name the stereotype and any compartment fig texts subclasses should override to handle other text elements param ft the fig text that has been edited and contains the new text throws property veto exception thrown when new text represents an unacceptable value protected void text edited fig text ft throws property veto exception if ft name fig todo can we delegate this to a specialist fig name class if get owner null return notation provider name parse get owner ft get text ft set text notation provider name to string get owner get notation settings if ft instanceof compartment fig text final compartment fig text fig text compartment fig text ft fig text get notation provider parse ft get owner ft get text ft set text fig text get notation provider to string ft get owner get notation settings fignodemodelelement compartmentfigtexts figtext propertyvetoexception textedited figtext propertyvetoexception namefig figname getowner notationprovidername getowner gettext settext notationprovidername tostring getowner getnotationsettings compartmentfigtext compartmentfigtext figtext compartmentfigtext figtext getnotationprovider getowner gettext settext figtext getnotationprovider tostring getowner getnotationsettings override public void mouse clicked mouse event me if ready to edit if model get facade isa model element get owner todo why is this clearing the name tfm model get core helper set name get owner ready to edit true else log debug not ready to edit name return if me is consumed return if me get click count 2 me is popup trigger me get modifiers input event button3 mask get owner null is read only rectangle r new rectangle me getx 2 me gety 2 4 4 fig f hit fig r if f instanceof mouse listener f is visible mouse listener f mouse clicked me else if f instanceof fig group f is visible this enables direct text editing for sub figs of a fig group object fig f2 fig group f hit fig r if f2 instanceof mouse listener mouse listener f2 mouse clicked me else create contained model element fig group f me mouseclicked mouseevent readytoedit getfacade isamodelelement getowner getcorehelper setname getowner readytoedit isconsumed getclickcount ispopuptrigger getmodifiers inputevent button3_mask getowner isreadonly hitfig mouselistener isvisible mouselistener mouseclicked figgroup isvisible figgroup figgroup hitfig mouselistener mouselistener mouseclicked createcontainedmodelelement figgroup public void key pressed key event ke if ke is consumed get owner null return name fig key pressed ke keypressed keyevent isconsumed getowner namefig keypressed public void key released key event ke if ke is consumed get owner null return name fig key released ke keyreleased keyevent isconsumed getowner namefig keyreleased public void key typed key event ke if editable is read only return if ready to edit if model get facade isa model element get owner model get core helper set name get owner ready to edit true else log debug not ready to edit name return if ke is consumed get owner null return name fig key typed ke keytyped keyevent isreadonly readytoedit getfacade isamodelelement getowner getcorehelper setname getowner readytoedit isconsumed getowner namefig keytyped this is a template method called by the argouml framework as the result of a change to a model element do not call this method directly yourself p override this in any subclasses in order to change what model elements the fig node is listening to as a result of change to the model p p this method is guaranteed by the framework to be running on the same thread as the model subsystem p todo lets refactor this at some time to take uml change event argument param event the uml change event that caused the change protected void model changed property change event event if event instanceof association change event event instanceof attribute change event if notation provider name null notation provider name update listener this get owner event todo this brute force approach of updating listeners on each and every event without checking the event type or any other information is going to cause lots of invalid element exceptions in subclasses implementations of update listeners and they won t have the event information to make their own decisions update listeners get owner get owner fignode umlchangeevent umlchangeevent modelchanged propertychangeevent associationchangeevent attributechangeevent notationprovidername notationprovidername updatelistener getowner invalidelementexceptions updatelisteners updatelisteners getowner getowner this is a template method called by the argouml framework as the result of a change to a model element do not call this method directly yourself p override this in any subclasses in order to restructure the fig node due to change of any model element that this fig node is listening to p p this method automatically updates the stereotype rendering p p the default behavior is to update the name and stereotype text p p for e g a package if the visibility is changed via the properties panel then the display of it on the diagram has to follow the change this is not handled here but by the notation provider name p p this method is guaranteed by the framework to be running on the swing awt thread p param event the uml change event that caused the change protected void update layout uml change event event assert event null final object owner get owner assert owner null if owner null return boolean need damage false if event instanceof association change event event instanceof attribute change event if notation provider name null update name text need damage true if event get source owner stereotype equals event get property name update stereotype text update stereotype icon need damage true if need damage damage fignode fignode notationprovidername umlchangeevent updatelayout umlchangeevent getowner needdamage associationchangeevent attributechangeevent notationprovidername updatenametext needdamage getsource getpropertyname updatestereotypetext updatestereotypeicon needdamage needdamage create a new model element contained in the fig owner used by subclasses to for example create an attribute within a class param fg the fig group to which this applies param me the input event that triggered us in the current implementation a mouse double click protected void create contained model element fig group fg input event me must be overridden to make sense i didn t want to make it abstract because it might not be required createcontainedmodelelement figgroup inputevent param o the given object return true if one of my figs has the given object as owner protected boolean is partly owner object o if o null o get owner return true for object fig get figs if is partly owner fig fig o return true return false ispartlyowner getowner getfigs ispartlyowner param fig the given fig may be a group param o the given object return true if one of the given figs has the given object as owner protected boolean is partly owner fig fig object o if o null return false if o fig get owner return true if fig instanceof fig group for object fig2 fig group fig get figs if is partly owner fig fig2 o return true return false ispartlyowner getowner figgroup figgroup getfigs ispartlyowner override public void delete from model object own get owner if own null get project move to trash own for object fig get figs fig fig delete from model super delete from model deletefrommodel getowner getproject movetotrash getfigs deletefrommodel deletefrommodel this method should only be called once for any one fig instance that represents a model element ie not for a fig edge note it is called either by the constructor that takes an model element as an argument or it is called by pgml stack parser after it has created the fig by use of the empty constructor the assigned model element owner must not change during the lifetime of the fig p todo it is planned to refactor so that there is only one fig constructor when this is achieved this method can refactored out param owner the model element that this fig represents throws illegal argument exception if the owner given is not a model element see org tigris gef presentation fig set owner java lang object deprecated for 0 27 3 by tfmorris owner must be provided in constructor and may not be changed afterwards public void set owner object owner if owner null throw new illegal argument exception an owner must be supplied if get owner null throw new illegal state exception the owner cannot be changed once set if model get facade isauml element owner throw new illegal argument exception the owner must be a model element got a owner get class get name super set owner owner name fig set owner owner for setting abstract if get stereotype fig null get stereotype fig set owner owner init notation providers owner ready to edit true rendering changed update bounds included in the previous line this next line presumes that the 1st fig with this owner is the previous port and consequently nullifies the owner of this 1st fig bind port owner big port update listeners null owner figedgenote pgmlstackparser illegalargumentexception setowner setowner illegalargumentexception getowner illegalstateexception getfacade isaumlelement illegalargumentexception getclass getname setowner namefig setowner getstereotypefig getstereotypefig setowner initnotationproviders readytoedit renderingchanged updatebounds bindport bigport updatelisteners replace the notation provider s p this method shall not be used for the initial creation of notation providers but only for replacing them when required initialization must be done in the constructor using methods which can t be overridden p notation providers can not be updated they are lightweight throw away objects hence this method creates a new notation provider whenever needed e g when the notation language is changed by the user then the n ps are to be re created so this method shall not be called from a fig constructor p after the removal of the deprecated method set owner this method shall contain the following statement assert notation provider name null param own owning uml element protected void init notation providers object own if notation provider name null notation provider name clean listener this own if model get facade isauml element own notation name notation notation find notation get notation settings get notation language notation provider name notation provider factory2 get instance get notation provider get notation provider type own this notation notationprovider notationproviders notationprovider nps setowner notationprovidername initnotationproviders notationprovidername notationprovidername cleanlistener getfacade isaumlelement notationname findnotation getnotationsettings getnotationlanguage notationprovidername notationproviderfactory2 getinstance getnotationprovider getnotationprovidertype overrule this for subclasses that need a different notation provider return the type of the notation provider protected int get notation provider type return notation provider factory2 type name notationprovider getnotationprovidertype notationproviderfactory2 type_name updates the text of the stereotype fig text override in subclasses to get wanted behaviour protected void update stereotype text if get owner null log warn null owner for this to string this get class return if get stereotype fig null get stereotype fig populate figtext updatestereotypetext getowner tostring getclass getstereotypefig getstereotypefig updates the text of the name fig text protected void update name text if ready to edit if get owner null return if notation provider name null name fig set text notation provider name to string get owner get notation settings todo why does the font need updating tfm update font update bounds figtext updatenametext readytoedit getowner notationprovidername namefig settext notationprovidername tostring getowner getnotationsettings updatefont updatebounds see org argouml uml diagram ui path container is path visible public boolean is path visible return get notation settings is show paths pathcontainer ispathvisible ispathvisible getnotationsettings isshowpaths public void set path visible boolean visible notation settings ns get notation settings if ns is show paths visible return mutable graph support enable save action todo use this event mechanism to update the checkmark on the presentation tab fire prop change path visible visible visible ns set show paths visible if ready to edit rendering changed damage setpathvisible notationsettings getnotationsettings isshowpaths mutablegraphsupport enablesaveaction firepropchange pathvisible setshowpaths readytoedit renderingchanged at creation time of the fig we determine if the path should be visible by default p the path is a concatenation of the names of all packages by which this modelelement is contained seperated by for uml at least p if the default namespace of the diagram corresponds to the namespace of the modelelement then we do not show the path otherwise we do p r rose uses the same heuristic algorithm but shows from lt path gt below the name while we follow the uml syntax protected void determine default path visible object model element get owner layer perspective layer layer perspective get layer if layer null model get facade isa model element model element argo diagram diagram argo diagram layer get diagram object element ns model get facade get namespace model element object diagram ns diagram get namespace if element ns null boolean visible element ns diagram ns get notation settings set show paths visible update name text damage it is done either layer or owner was null rrose determinedefaultpathvisible modelelement getowner layerperspective layerperspective getlayer getfacade isamodelelement modelelement argodiagram argodiagram getdiagram elementns getfacade getnamespace modelelement diagramns getnamespace elementns elementns diagramns getnotationsettings setshowpaths updatenametext deprecated override public string class name and bounds return get class get name getx gety get width get height path visible is path visible stereotype view get stereotype view classnameandbounds getclass getname getwidth getheight pathvisible ispathvisible stereotypeview getstereotypeview implementations of this method should register unregister the fig for all model events for fig node model element only the fig itself is registered as listening to all events fired by the owner itself but for for example fig class the fig must also register for events fired by the operations and attributes of the owner p an explanation of the original purpose of this method is given in issue 1321 p this function is used by the model changed function p in certain cases it is imperative that indeed all listeners are updated since they are all removed by a call to remove element listener p if this method is called with both the old owner and the new owner equal and not null and we listen only to the owner itself then we can safely ignore the call but else we need to update the listeners of the related elements since the related elements may have been replaced param new owner null or the owner of this the former means that all listeners have to be removed param old owner null or the previous owner the former means that all listeners have to be set protected void update listeners object old owner object new owner if old owner new owner return if old owner null remove element listener old owner if new owner null add element listener new owner fignodemodelelement figclass modelchanged removeelementlistener oldowner newowner newowner oldowner updatelisteners oldowner newowner oldowner newowner oldowner removeelementlistener oldowner newowner addelementlistener newowner see org argouml application events argo notation event listener notation changed org argouml application events argo notation event deprecated for 0 27 2 by tfmorris changes to notatation provider are now handled by the owning diagram deprecated public void notation changed argo notation event event if get owner null return try rendering changed catch exception e log error exception e argonotationeventlistener notationchanged argonotationevent notationchanged argonotationevent getowner renderingchanged see org argouml application events argo notation event listener notation added org argouml application events argo notation event deprecated for 0 27 2 by tfmorris deprecated public void notation added argo notation event event default is to do nothing argonotationeventlistener notationadded argonotationevent notationadded argonotationevent see org argouml application events argo notation event listener notation removed org argouml application events argo notation event deprecated for 0 27 2 by tfmorris deprecated public void notation removed argo notation event event default is to do nothing argonotationeventlistener notationremoved argonotationevent notationremoved argonotationevent see org argouml application events argo notation event listener notation provider added org argouml application events argo notation event deprecated for 0 27 2 by tfmorris deprecated public void notation provider added argo notation event event default is to do nothing argonotationeventlistener notationprovideradded argonotationevent notationprovideradded argonotationevent see org argouml application events argo notation event listener notation provider removed org argouml application events argo notation event deprecated for 0 27 2 by tfmorris deprecated public void notation provider removed argo notation event event default is to do nothing argonotationeventlistener notationproviderremoved argonotationevent notationproviderremoved argonotationevent rerender the entire fig p this is may be an expensive operation for subclasses which are complex so should be used sparingly this functionality was originally the functionality of model changed but model changed takes the event now into account public void rendering changed init notation providers get owner update name text update stereotype text update stereotype icon update bounds damage modelchanged modelchanged renderingchanged initnotationproviders getowner updatenametext updatestereotypetext updatestereotypeicon updatebounds protected void update stereotype icon if get owner null log warn owner of this to string this get class is null log warn i return return if stereotype fig profile icon null for object fig get figs fig fig set visible fig stereotype fig profile icon this remove fig stereotype fig profile icon stereotype fig profile icon null if original name fig null this set name fig original name fig original name fig null for fig icon floating stereotypes this remove fig icon floating stereotypes clear int practical view get practical view object model element get owner collection stereos model get facade get stereotypes model element boolean hiding practical view diagram appearance stereotype view small icon if get stereotype fig null get stereotype fig set hiding stereotypes with icon hiding if practical view diagram appearance stereotype view big icon image replace icon null if stereos size 1 object stereo stereos iterator next todo find a way to replace this dependency on project replace icon get project get profile configuration get fig node strategy get icon for stereotype stereo if replace icon null stereotype fig profile icon new fig profile icon replace icon get name stereotype fig profile icon set owner get owner stereotype fig profile icon set location get big port get location add fig stereotype fig profile icon original name fig this get name fig final fig text label fig stereotype fig profile icon get label fig set name fig label fig label fig add property change listener this get big port set bounds stereotype fig profile icon get bounds for object fig get figs fig fig set visible fig stereotype fig profile icon else if practical view diagram appearance stereotype view small icon int i this getx this get width icon width 2 for object stereo stereos todo find a way to replace this dependency on project image icon get project get profile configuration get fig node strategy get icon for stereotype stereo if icon null fig image fimg new fig image i this get big port gety 2 icon fimg set size icon width icon get height null icon width icon get width null add fig fimg floating stereotypes add fimg i icon width 2 update small icons this get width todo this is a redundant invocation update stereotype text damage calc bounds update edges update bounds redraw updatestereotypeicon getowner tostring getclass stereotypefigprofileicon getfigs setvisible stereotypefigprofileicon removefig stereotypefigprofileicon stereotypefigprofileicon originalnamefig setnamefig originalnamefig originalnamefig floatingstereotypes removefig floatingstereotypes practicalview getpracticalview modelelement getowner getfacade getstereotypes modelelement practicalview diagramappearance stereotype_view_small_icon getstereotypefig getstereotypefig sethidingstereotypeswithicon practicalview diagramappearance stereotype_view_big_icon replaceicon replaceicon getproject getprofileconfiguration getfignodestrategy geticonforstereotype replaceicon stereotypefigprofileicon figprofileicon replaceicon getname stereotypefigprofileicon setowner getowner stereotypefigprofileicon setlocation getbigport getlocation addfig stereotypefigprofileicon originalnamefig getnamefig figtext labelfig stereotypefigprofileicon getlabelfig setnamefig labelfig labelfig addpropertychangelistener getbigport setbounds stereotypefigprofileicon getbounds getfigs setvisible stereotypefigprofileicon practicalview diagramappearance stereotype_view_small_icon getwidth icon_width getproject getprofileconfiguration getfignodestrategy geticonforstereotype figimage figimage getbigport setsize icon_width getheight icon_width getwidth addfig floatingstereotypes icon_width updatesmallicons getwidth updatestereotypetext calcbounds updateedges updatebounds public void calc bounds if suppress calc bounds return super calc bounds calcbounds suppresscalcbounds calcbounds the setter for check size param flag the new value public void enable size checking boolean flag check size flag checksize enablesizechecking checksize override public boolean hit rectangle r int corners hit count corners contained r x r y r width r height if filled return corners hit 0 intersects r return corners hit 0 corners hit 4 intersects r cornershit countcornerscontained _filled cornershit cornershit cornershit override public final void remove from diagram fig delegate get remove delegate if delegate instanceof fig node model element fig node model element delegate remove from diagram impl else if delegate instanceof fig edge model element fig edge model element delegate remove from diagram impl else if delegate null remove from diagram impl removefromdiagram getremovedelegate fignodemodelelement fignodemodelelement removefromdiagramimpl figedgemodelelement figedgemodelelement removefromdiagramimpl removefromdiagramimpl subclasses should override this to redirect a remove request from one fig to another e g fig class association class uses this to delegate the remove to its attached fig association class return the fig that handles the remove request protected fig get remove delegate return this figclassassociationclass figassociationclass getremovedelegate if you override this method make sure to remove all listeners if you don t objects in a deleted project will still receive events p also important for remove from diagram protected void remove from diagram impl if notation provider name null this test needed for a fig pool notation provider name clean listener this get owner remove all element listeners set shadow size 0 super remove from diagram get model listeners removed if get stereotype fig null get stereotype fig remove from diagram removefromdiagramimpl notationprovidername figpool notationprovidername cleanlistener getowner removeallelementlisteners setshadowsize removefromdiagram getstereotypefig getstereotypefig removefromdiagram get the fig containing the stereotype s return the stereotype fig group protected fig stereotypes group get stereotype fig if stereotype fig null stereotype fig new fig stereotypes group get owner new rectangle x0 y0 width stereoheight settings return stereotype fig figgroup figstereotypesgroup getstereotypefig stereotypefig stereotypefig figstereotypesgroup getowner stereotypefig param bp the big port which is the port where edges connect to this node protected void set big port fig bp this big port bp bind port get owner big port bigport setbigport bigport bindport getowner bigport return the fig which is the port where edges connect to this node public fig get big port return big port getbigport bigport return returns the check size protected boolean is check size return check size checksize ischecksize checksize see org tigris gef presentation fig node is drag connectable public boolean is drag connectable return false fignode isdragconnectable isdragconnectable param e the encloser to set protected void set encloser fig e this encloser e _encloser setencloser return returns the encloser protected fig get encloser return encloser _encloser getencloser return returns the ready to edit protected boolean is ready to edit return ready to edit readytoedit isreadytoedit readytoedit param v if ready to edit protected void set ready to edit boolean v ready to edit v setreadytoedit readytoedit todo move this in fig group in gef param scb the suppress calc bounds to set protected void set suppress calc bounds boolean scb this suppress calc bounds scb figgroup suppresscalcbounds setsuppresscalcbounds suppresscalcbounds set visibility of figure if the field link invisible allowed is not code true code and this method is passed a parameter of code false code it will throw an illegal argument exception param visible new visibility code true code visible see org tigris gef presentation fig set visible boolean public void set visible boolean visible if visible invisible allowed throw new illegal argument exception visibility of a fig node should never be false invisibleallowed illegalargumentexception setvisible setvisible invisibleallowed illegalargumentexception fignode to redraw each element correctly when changing its location with x and y additions also manages relocation of enclosed figs param x inc the increment in the x direction param y inc the increment in the y direction public void displace int x inc int y inc list fig figs vector rectangle r fig get bounds set location r fig x x inc r fig y y inc figs vector list fig get enclosed figs clone if figs vector is empty for int i 0 i figs vector size i fig node model element figs vector get i displace x inc y inc xinc yinc xinc yinc figsvector rfig getbounds setlocation rfig xinc rfig yinc figsvector getenclosedfigs figsvector isempty figsvector fignodemodelelement figsvector xinc yinc param allowed true if the function remove from diagram is allowed protected void allow remove from diagram boolean allowed this remove from diagram allowed removefromdiagram allowremovefromdiagram removefromdiagram public void set di element di element element this di element element setdielement dielement dielement public di element get di element return di element dielement getdielement dielement return returns the popup add offset protected static int get popup add offset return popup add offset popupaddoffset getpopupaddoffset popupaddoffset determine if this node can be edited return editable state public boolean is editable return editable iseditable by default a node is directly editable by simply selecting that node and starting to type should a subclass of fig node model element not desire this behaviour then it should call set editable false in its constructor param can edit new state false editing disabled protected void set editable boolean can edit this editable can edit fignodemodelelement seteditable canedit seteditable canedit canedit add an element listener and remember the registration param element element to listen for changes on see org argouml model model event pump add model event listener property change listener object string protected void add element listener object element listeners add new object element null model get pump add model event listener this element modeleventpump addmodeleventlistener propertychangelistener addelementlistener getpump addmodeleventlistener add a listener for a given property name and remember the registration param element element to listen for changes on param property name of property to listen for changes of see org argouml model model event pump add model event listener property change listener object string protected void add element listener object element string property listeners add new object element property model get pump add model event listener this element property modeleventpump addmodeleventlistener propertychangelistener addelementlistener getpump addmodeleventlistener add a listener for an array of property names and remember the registration param element element to listen for changes on param property array of property names strings to listen for changes of see org argouml model model event pump add model event listener property change listener object string protected void add element listener object element string property listeners add new object element property model get pump add model event listener this element property modeleventpump addmodeleventlistener propertychangelistener addelementlistener getpump addmodeleventlistener remove an element listener and remembered registration param element element to listen for changes on see org argouml model model event pump add model event listener property change listener object string protected void remove element listener object element listeners remove new object element null model get pump remove model event listener this element modeleventpump addmodeleventlistener propertychangelistener removeelementlistener getpump removemodeleventlistener unregister all listeners registered through add element listener see add element listener object string protected void remove all element listeners remove element listeners listeners addelementlistener addelementlistener removeallelementlisteners removeelementlisteners private void remove element listeners set object listener set for object listener listener set object property listener 1 if property null model get pump remove model event listener this listener 0 else if property instanceof string model get pump remove model event listener this listener 0 string property else if property instanceof string model get pump remove model event listener this listener 0 string property else throw new runtime exception internal error in remove all element listeners listeners remove all listener set removeelementlisteners listenerset listenerset getpump removemodeleventlistener getpump removemodeleventlistener getpump removemodeleventlistener runtimeexception removeallelementlisteners removeall listenerset private void add element listeners set object listener set for object listener listener set object property listener 1 if property null add element listener listener 0 else if property instanceof string add element listener listener 0 string property else if property instanceof string add element listener listener 0 string property else throw new runtime exception internal error in add element listeners addelementlisteners listenerset listenerset addelementlistener addelementlistener addelementlistener runtimeexception addelementlisteners update the set of registered listeners to match the given set using a minimal update strategy to remove unneeded listeners and add new listeners param listener set a set of arrays containing a tuple of a uml element to be listened to and a set of property to be listened for protected void update element listeners set object listener set set object removes new hash set object listeners removes remove all listener set remove element listeners removes set object adds new hash set object listener set adds remove all listeners add element listeners adds listenerset updateelementlisteners listenerset hashset removeall listenerset removeelementlisteners hashset listenerset removeall addelementlisteners return the current notation arguments or null if none are set deprecated for 0 27 3 by tfmorris use link get notation settings deprecated protected hash map string object get notation arguments return np arguments getnotationsettings hashmap getnotationarguments nparguments param key param value deprecated for 0 27 3 by tfmorris use link get notation settings deprecated protected void put notation argument string key object value if notation provider name null lazily initialize if not done yet if np arguments null np arguments new hash map string object np arguments put key value getnotationsettings putnotationargument notationprovidername nparguments nparguments hashmap nparguments this optional method is not implemented it will throw an link unsupported operation exception if used figs are added to a graph model which is in turn owned by a project p param project the project deprecated suppress warnings deprecation deprecated public void set project project project throw new unsupported operation exception unsupportedoperationexception graphmodel suppresswarnings setproject unsupportedoperationexception deprecated for 0 27 2 by tfmorris implementations should have all the information that they require in the diagram settings object return the owning project see org argouml uml diagram ui argo fig get project deprecated public project get project return argo fig util get project this diagramsettings argofig getproject getproject argofigutil getproject determine if this fig is the sole selected target in the target manager return true if this is the sole target protected boolean is single target return target manager get instance get single model target get owner targetmanager issingletarget targetmanager getinstance getsinglemodeltarget getowner return current stereotype view deprecated for 0 27 2 by tfmorris use link get stereotype style public int get stereotype view return stereotype style ordinal getstereotypestyle getstereotypeview stereotypestyle return see org argouml uml diagram ui stereotype styled get stereotype style public stereotype style get stereotype style return stereotype style stereotypestyled getstereotypestyle stereotypestyle getstereotypestyle stereotypestyle return a stereotype view which is most practical for the current conditions if the current mode is set to code big icon code mode and the model element has zero or more than one stereotype the practical view should be the textual view return current practical stereotype view private int get practical view todo assert model element null int practical view get stereotype view object model element get owner if model element null collection stereos model get facade get stereotypes model element if get stereotype view diagram appearance stereotype view big icon stereos null stereos size 1 stereos size 1 todo find a way to replace this dependency on project get project get profile configuration get fig node strategy get icon for stereotype stereos iterator next null practical view diagram appearance stereotype view textual return practical view bigicon getpracticalview modelelement practicalview getstereotypeview modelelement getowner modelelement getfacade getstereotypes modelelement getstereotypeview diagramappearance stereotype_view_big_icon getproject getprofileconfiguration getfignodestrategy geticonforstereotype practicalview diagramappearance stereotype_view_textual practicalview sets the stereotype view param s the stereotype view to be set deprecated for 0 27 2 by tfmorris use link set stereotype style stereotype style public void set stereotype view int s set stereotype style stereotype style get enum s setstereotypestyle stereotypestyle setstereotypeview setstereotypestyle stereotypestyle getenum set the stereotype style to be used for rendering this fig param style the stereotype style to be set public void set stereotype style stereotype style style stereotype style style rendering changed setstereotypestyle stereotypestyle stereotypestyle renderingchanged sets the bounds of this node taking the stereotype view into consideration br do not override this method override link set standard bounds int int int int instead inherit doc override protected void set bounds impl final int x final int y final int w final int h if get practical view diagram appearance stereotype view big icon if stereotype fig profile icon null stereotype fig profile icon set bounds stereotype fig profile icon getx stereotype fig profile icon gety w h fig class calls set bounds impl before we set the stereotype fig profile icon else set standard bounds x y w h if get stereotype view diagram appearance stereotype view small icon update small icons w setstandardbounds inheritdoc setboundsimpl getpracticalview diagramappearance stereotype_view_big_icon stereotypefigprofileicon stereotypefigprofileicon setbounds stereotypefigprofileicon stereotypefigprofileicon figclass setboundsimpl stereotypefigprofileicon setstandardbounds getstereotypeview diagramappearance stereotype_view_small_icon updatesmallicons private void update small icons int wid int i this getx wid icon width 2 for fig ficon floating stereotypes ficon set location i this get big port gety 2 i icon width 2 get name fig set right margin floating stereotypes size icon width 5 updatesmallicons icon_width floatingstereotypes setlocation getbigport icon_width getnamefig setrightmargin floatingstereotypes icon_width replaces link set bounds impl int int int int param x desired x coordinate of upper left corner param y desired y coordinate of upper left corner param w desired width of the fig class param h desired height of the fig class see org tigris gef presentation fig set bounds impl int int int int protected void set standard bounds final int x final int y final int w final int h setboundsimpl figclass figclass setboundsimpl setstandardbounds handles diagram font changing param e the event or null see org argouml application events argo diagram appearance event listener diagram font changed org argouml application events argo diagram appearance event deprecated for 0 27 2 by tfmorris the owning diagram manages global changes to rendering defaults public void diagram font changed argo diagram appearance event e update font update bounds damage argodiagramappearanceeventlistener diagramfontchanged argodiagramappearanceevent diagramfontchanged argodiagramappearanceevent updatefont updatebounds this function should for all fig texts recalculate the font style plain bold italic bold italic and apply it by calling fig text set font p if the deep update font function does not work for a subclass then override this method protected void update font int style get name fig font style font f get settings get font style name fig set font f deep update font this figtexts figtext setfont deepupdatefont updatefont getnamefigfontstyle getsettings getfont namefig setfont deepupdatefont determines the font style based on the uml model overrule this in figs that have to show bold or italic based on the uml model they represent e g abstract classes show their name in italic return the font style for the name fig protected int get name fig font style todo why do we need this when we can just change the font and achieve the same effect show bold name get settings is show bold names return show bold name font bold font plain namefig getnamefigfontstyle showboldname getsettings isshowboldnames showboldname changes the font for all figs contained in the given fig group p todo in fact there is a design error in this method e g for a class if the name is italic since the class is abstract then the classes features should be in plain font this problem can be fixed by implementing the update font method in all subclasses param fg the fig group to change the font of private void deep update font fig group fg todo fonts shouldn t be handled any differently than other rendering attributes boolean changed false list fig figs fg get figs for fig f figs if f instanceof argo fig text argo fig text f rendering changed changed true if f instanceof fig group deep update font fig group f if changed fg calc bounds figgroup updatefont figgroup deepupdatefont figgroup getfigs argofigtext argofigtext renderingchanged figgroup deepupdatefont figgroup calcbounds public diagram settings get settings todo this is a temporary crutch to use until all figs are updated to use the constructor that accepts a diagram settings object if settings null log debug falling back to project wide settings project p get project if p null return p get project settings get default diagram settings return settings diagramsettings getsettings diagramsettings getproject getprojectsettings getdefaultdiagramsettings public void set settings diagram settings render settings settings render settings rendering changed setsettings diagramsettings rendersettings rendersettings renderingchanged protected notation settings get notation settings return notation settings notationsettings getnotationsettings notationsettings public void set line width int w super set line width w default for name and stereotype is no border get name fig set line width 0 if get stereotype fig null get stereotype fig set line width 0 setlinewidth setlinewidth getnamefig setlinewidth getstereotypefig getstereotypefig setlinewidth construct a new selection node clarifiers for the given fig param f the given fig private selection default clarifiers fig f super f selectionnodeclarifiers selectiondefaultclarifiers override protected icon get icons return null geticons override protected string get instructions int index return null getinstructions override protected object get new node type int index return null getnewnodetype override protected object get new edge type int index return null getnewedgetype override protected boolean is reverse edge int index return false isreverseedge the constructor this action is not global since it is never disabled public action add note super translator localize action new comment resource loader wrapper lookup icon action new comment set the tooltip string put value action short description translator localize action new comment put value action small icon resource loader wrapper lookup icon resource new note actionaddnote resourceloaderwrapper lookupicon putvalue short_description putvalue small_icon resourceloaderwrapper lookupiconresource override public void action performed action event ae super action performed ae update all tools enabled status collection targets target manager get instance get model targets let s build the comment first unlinked argo diagram diagram diagram utils get active diagram object comment model get core factory build comment null diagram get namespace mutable graph model mgm mutable graph model diagram get graph model now we link it to the modelelements which are represented by fig node object first target null iterator i targets iterator while i has next object obj i next fig dest fig diagram presentation for obj if dest fig instanceof fig edge model element fig edge model element dest edge fig edge model element dest fig dest edge make edge port dest fig dest edge get edge port dest edge calc bounds if model get facade isa model element obj model get facade isa comment obj if first target null first target obj prevent e g association classes from being added trice if model get facade get annotated elements comment contains obj model get core helper add annotated element comment obj create the node fig for the comment itself and draw it mgm add node comment remember the fig for later fig note fig diagram presentation for comment create the comment links and draw them i model get facade get annotated elements comment iterator while i has next object obj i next if diagram presentation for obj null comment edge comment edge new comment edge comment obj mgm add edge comment edge fig edge fe fig edge diagram presentation for comment edge fig poly fp fig poly fe get fig fp set complete true place the comment fig on the nicest spot on the diagram note fig set location calculate location diagram first target note fig select the new comment as target target manager get instance set target note fig get owner actionperformed actionevent actionperformed targetmanager getinstance getmodeltargets argodiagram diagramutils getactivediagram getcorefactory buildcomment getnamespace mutablegraphmodel mutablegraphmodel getgraphmodel fignode firsttarget hasnext destfig presentationfor destfig figedgemodelelement figedgemodelelement destedge figedgemodelelement destfig destedge makeedgeport destfig destedge getedgeport destedge calcbounds getfacade isamodelelement getfacade isacomment firsttarget firsttarget associationclasses getfacade getannotatedelements getcorehelper addannotatedelement addnode notefig presentationfor getfacade getannotatedelements hasnext presentationfor commentedge commentedge commentedge addedge commentedge figedge figedge presentationfor commentedge figpoly figpoly getfig setcomplete notefig setlocation calculatelocation firsttarget notefig targetmanager getinstance settarget notefig getowner calculate the position of the comment based on the 1st target only param diagram the diagram that we are working in param first target the object element of the first found comment param note fig the fig for the comment return the position where it should be placed private point calculate location argo diagram diagram object first target fig note fig point point new point default pos default pos if first target null return point fig elem fig diagram presentation for first target if elem fig null return point if elem fig instanceof fig edge model element elem fig fig edge model element elem fig get edge port if elem fig instanceof fig node todo we need a better algorithm point x elem fig getx elem fig get width distance point y elem fig gety todo this can t depend on project browser alternate below rectangle drawing area project browser get instance get editor pane get bounds perhaps something like the following would work instead rectangle drawing area globals cur editor getj component get visible rect if point x note fig get width drawing area getx point x elem fig getx note fig get width distance if point x 0 return point point x elem fig getx point y elem fig gety note fig get height distance if point y 0 return point point y elem fig gety elem fig get height distance if point y note fig get height drawing area get height return new point 0 0 return point firsttarget notefig calculatelocation argodiagram firsttarget notefig default_pos default_pos firsttarget elemfig presentationfor firsttarget elemfig elemfig figedgemodelelement elemfig figedgemodelelement elemfig getedgeport elemfig fignode elemfig elemfig getwidth elemfig projectbrowser drawingarea projectbrowser getinstance geteditorpane getbounds drawingarea cureditor getjcomponent getvisiblerect notefig getwidth drawingarea elemfig notefig getwidth elemfig elemfig notefig getheight elemfig elemfig getheight notefig getheight drawingarea getheight the constructor param m the multiplicity param s src or dest anything else is interpreted as dest protected action multiplicity string m string s super m null set the tooltip string put value action short description m str s mult m actionmultiplicity putvalue short_description override public void action performed action event ae super action performed ae list sels globals cur editor get selection manager selections if sels size 1 selection sel selection sels get 0 fig f sel get content object owner fig edge model element f get owner collection asc ends model get facade get connections owner iterator iter asc ends iterator object asc end null if str equals src asc end iter next else while iter has next asc end iter next if mult equals model get facade to string model get facade get multiplicity asc end model get core helper set multiplicity asc end model get data types factory create multiplicity string mult actionperformed actionevent actionperformed cureditor getselectionmanager getcontent figedgemodelelement getowner ascends getfacade getconnections ascends ascend ascend hasnext ascend getfacade tostring getfacade getmultiplicity ascend getcorehelper setmultiplicity ascend getdatatypesfactory createmultiplicity return true if the action is enabled see org tigris gef undo undoable action is enabled public boolean is enabled return true undoableaction isenabled isenabled return returns the src mult one public static undoable action get src mult one return src mult one srcmultone undoableaction getsrcmultone srcmultone return returns the dest mult one public static undoable action get dest mult one return dest mult one destmultone undoableaction getdestmultone destmultone return returns the src mult zero to one public static undoable action get src mult zero to one return src mult zero to one srcmultzerotoone undoableaction getsrcmultzerotoone srcmultzerotoone return returns the dest mult zero to one public static undoable action get dest mult zero to one return dest mult zero to one destmultzerotoone undoableaction getdestmultzerotoone destmultzerotoone return returns the src mult zero to many public static undoable action get src mult zero to many return src mult zero to many srcmultzerotomany undoableaction getsrcmultzerotomany srcmultzerotomany return returns the dest mult zero to many public static undoable action get dest mult zero to many return dest mult zero to many destmultzerotomany undoableaction getdestmultzerotomany destmultzerotomany return returns the src mult one to many public static undoable action get src mult one to many return src mult one to many srcmultonetomany undoableaction getsrcmultonetomany srcmultonetomany return returns the dest mult one to many public static undoable action get dest mult one to many return dest mult one to many destmultonetomany undoableaction getdestmultonetomany destmultonetomany constructor is private since it cannot be called directly for a singleton make use of the access funtion p public action add extension point super translator localize button new extension point resource loader wrapper lookup icon button new extension point set the tooltip string put value action short description translator localize button new extension point actionaddextensionpoint resourceloaderwrapper lookupicon putvalue short_description get the single instance of the action p since we are a singleton this is the only way of accessing the instance which is created if it does not exist p return the singleton instance public static action add extension point singleton create the singleton if it does not exist and then return it if singleton null singleton new action add extension point return singleton actionaddextensionpoint actionaddextensionpoint called if this action is invoked p see java awt event action listener action performed java awt event action event param ae the action that caused us to be invoked public void action performed action event ae super action performed ae find the target in the project browser we can only do anything if its a use case object target target manager get instance get model target if model get facade isa use case target return create a new extension point and make it the browser target then invoke the superclass action method object ep model get use cases factory build extension point target target manager get instance set target ep actionlistener actionperformed actionevent actionperformed actionevent actionperformed targetmanager getinstance getmodeltarget getfacade isausecase getusecasesfactory buildextensionpoint targetmanager getinstance settarget a predicate to determine if this action is enabled p see org tigris gef undo undoable action is enabled return code true code if the superclass affirms this action is enabled and the target is a use case code false code otherwise public boolean is enabled object target target manager get instance get model target return super is enabled model get facade isa use case target undoableaction isenabled isenabled targetmanager getinstance getmodeltarget isenabled getfacade isausecase constructor param the fig the fig param the item fig the item fig param new percent the percent param new offset the offset public path conv percent2 fig the fig fig the item fig int new percent int new offset super the fig item fig the item fig set percent offset new percent new offset thefig theitemfig newpercent newoffset pathconvpercent2 thefig theitemfig newpercent newoffset thefig itemfig theitemfig setpercentoffset newpercent newoffset public void stuff point point res int fig length pathfigure get perimeter length if fig length 10 res set location pathfigure get center return int point to get fig length percent 100 pathfigure stuff point along perimeter point to get res apply offset amount pathfigure point along perimeter point to get 5 pathfigure point along perimeter point to get 5 offset res stuffpoint figlength _pathfigure getperimeterlength figlength setlocation _pathfigure getcenter pointtoget figlength _pathfigure stuffpointalongperimeter pointtoget applyoffsetamount _pathfigure pointalongperimeter pointtoget _pathfigure pointalongperimeter pointtoget set the percent and offset again param new percent the new percent param new offset the new offset public void set percent offset int new percent int new offset percent new percent offset new offset newpercent newoffset setpercentoffset newpercent newoffset newpercent newoffset see org tigris gef base path conv set closest point java awt point public void set closest point point new point pathconv setclosestpoint setclosestpoint newpoint protected void apply offset amount point p1 point p2 int the offset point res slope of the line we re finding the normal to is slope and the normal is the negative reciprocal slope is p1 y p2 y p1 x p2 x so recip is p1 x p2 x p1 y p2 y int recipnumerator p1 x p2 x 1 int recipdenominator p1 y p2 y if recipdenominator 0 recipnumerator 0 return find the point offset on the line that gives a correct offset double len math sqrt recipnumerator recipnumerator recipdenominator recipdenominator int dx int recipdenominator the offset len int dy int recipnumerator the offset len res x math abs dx res y math abs dy int width item fig get width 2 if recipnumerator 0 double slope double recipdenominator double recipnumerator double factor tanh slope res x math abs factor width else res x width applyoffsetamount theoffset theoffset theoffset itemfig getwidth calculate the tangens hyperbolicus param x the argument return tangens hyberbolicus private double tanh double x return math exp x math exp x 2 math exp x math exp x 2 the constructor param x initial location param y initial location param w initial width param h initial height deprecated 0 27 2 by tfmorris use link argo fig text object rectangle diagram settings boolean deprecated public argo fig text int x int y int w int h super x y w h set font family dialog argofigtext diagramsettings argofigtext setfontfamily the constructor param x initial location param y initial location param w initial width param h initial height param expand only true if this fig is supposed to grow only deprecated 0 27 2 by tfmorris use link argo fig text object rectangle diagram settings boolean deprecated public argo fig text int x int y int w int h boolean expand only super x y w h expand only set font family dialog todo is this needed expandonly argofigtext diagramsettings argofigtext expandonly expandonly setfontfamily construct a text fig owned by the given uml element p even if there is no owner then you still have to use this constructor setting the owner parameter to null is acceptable param owner owning model element or null param bounds rectangle describing bounds of figure param render settings render settings param expand only true if fig should never shrink public argo fig text object owner rectangle bounds diagram settings render settings boolean expand only this bounds x bounds y bounds width bounds height expand only todo we don t currently have any settings that can change on a per fig basis so we can just use the project diagram defaults settings new diagram settings render settings settings render settings super set font family settings get font name super set font size settings get font size super set fill color fill color super set text fill color fill color super set text color text color certain types of fixed text e g a fig stereotype with a keyword may not have an owner if owner null super set owner owner model get pump add model event listener this owner remove rendersettings expandonly argofigtext diagramsettings rendersettings expandonly expandonly diagramsettings rendersettings rendersettings setfontfamily getfontname setfontsize getfontsize setfillcolor fill_color settextfillcolor fill_color settextcolor text_color figstereotype setowner getpump addmodeleventlistener override public void delete from model super delete from model fire prop change remove null null notifier send notification new notification remove this 0 deletefrommodel deletefrommodel firepropchange sendnotification public void remove notification listener notification listener listener notification filter filter object handback throws listener not found exception notifier remove notification listener listener filter handback removenotificationlistener notificationlistener notificationfilter listenernotfoundexception removenotificationlistener public void add notification listener notification listener listener notification filter filter object handback throws illegal argument exception notifier add notification listener listener filter handback addnotificationlistener notificationlistener notificationfilter illegalargumentexception addnotificationlistener see javax management notification broadcaster get notification info public m bean notification info get notification info return notifier get notification info notificationbroadcaster getnotificationinfo mbeannotificationinfo getnotificationinfo getnotificationinfo see javax management notification broadcaster remove notification listener javax management notification listener public void remove notification listener notification listener listener throws listener not found exception notifier remove notification listener listener notificationbroadcaster removenotificationlistener notificationlistener removenotificationlistener notificationlistener listenernotfoundexception removenotificationlistener this optional method is not implemented it will throw an link unsupported operation exception if used figs are added to a graph model which is in turn owned by a project param project the project deprecated suppress warnings deprecation deprecated public void set project project project throw new unsupported operation exception unsupportedoperationexception graphmodel suppresswarnings setproject unsupportedoperationexception return the owning project see org argouml uml diagram ui argo fig get project deprecated for 0 27 2 by tfmorris implementations should have all the information that they require in the diagram settings object suppress warnings deprecation deprecated public project get project return argo fig util get project this argofig getproject diagramsettings suppresswarnings getproject argofigutil getproject public void rendering changed update font set bounds get bounds damage renderingchanged updatefont setbounds getbounds handles diagram font changing param e the event deprecated for 0 27 2 by tfmorris use link rendering changed deprecated public void diagram font changed suppress warnings unused argo diagram appearance event e rendering changed renderingchanged diagramfontchanged suppresswarnings argodiagramappearanceevent renderingchanged this function should for all fig texts recalculate the font style plain bold italic bold italic and apply it by calling fig text set font protected void update font set font get settings get font get fig font style figtexts figtext setfont updatefont setfont getsettings getfont getfigfontstyle determines the font style based on the uml model overrule this in figs that have to show bold or italic based on the uml model they represent e g abstract classes show their name in italic return the font style for the name fig protected int get fig font style return font plain namefig getfigfontstyle set owning uml element param own uml element see org tigris gef presentation fig set owner java lang object deprecated for 0 27 3 by tfmorris the owner must be specified in the constructor and never changed suppress warnings deprecation override deprecated public void set owner object own super set owner own setowner suppresswarnings setowner setowner update listeners for a new owner obsolete since owner is not allow to change param old owner the old owner param new owner the new owner deprecated for 0 27 3 by tfmorris the owner must be specified in the constructor and never changed deprecated protected void update listeners object old owner object new owner if old owner new owner return if old owner null model get pump remove model event listener this old owner if new owner null model get pump add model event listener this new owner remove oldowner newowner updatelisteners oldowner newowner oldowner newowner oldowner getpump removemodeleventlistener oldowner newowner getpump addmodeleventlistener newowner override public void property change property change event pce super property change pce if remove equals pce get property name pce get source get owner delete from model propertychange propertychangeevent propertychange getpropertyname getsource getowner deletefrommodel public diagram settings get settings todo this is a temporary crutch to use until all figs are updated to use the constructor that accepts a diagram settings object if settings null project p get project if p null return p get project settings get default diagram settings return settings diagramsettings getsettings diagramsettings getproject getprojectsettings getdefaultdiagramsettings public void set settings diagram settings render settings settings render settings rendering changed setsettings diagramsettings rendersettings rendersettings renderingchanged create a mode to add the given elements to the diagram param model elements the model elements to add param instructions the instruction to place in status bar public mode add to diagram final collection object model elements final string instructions this model elements model elements if instructions null this instructions else this instructions instructions modelelements modeaddtodiagram modelelements modelelements modelelements return a string to be shown in the status bar of the editor when this mode is on top of the mode manager override public string instructions return instructions modemanager return a cross hair cursor public cursor get initial cursor return cursor get predefined cursor cursor crosshair cursor getinitialcursor getpredefinedcursor crosshair_cursor on mouse release add the elements to the diagram param me the mouse event override public void mouse released final mouse event me if me is consumed if log is debug enabled log debug mouse released but rejected as already consumed return todo use per project undo manager not global undo manager get instance add memento lock this start mutable graph model gm mutable graph model editor get graph model final int x me getx final int y me gety editor damage all final point snap pt new point x y editor snap snap pt editor damage all int count 0 layer lay editor get layer manager get active layer graph node renderer renderer editor get graph node renderer final list fig node placed figs new array list fig node model elements size argo diagram diag diagram utils get active diagram if diag instanceof uml diagram for final object node model elements if uml diagram diag does accept node final fig node pers renderer get fig node for gm lay node null pers set location snap pt x count 100 snap pt y if log is debug enabled log debug mouse moved location set pers getx pers gety todo use per project undo manager not global undo manager get instance start chain editor add pers gm add node node if add related edges gm add node related edges node fig encloser null final rectangle bbox pers get bounds final list fig other figs lay get contents for final fig other fig other figs if other fig get use trap rect continue if other fig instanceof fig node continue if other fig is visible continue if other fig equals pers continue final rectangle trap other fig get trap rect if trap null trap contains bbox x bbox y trap contains bbox x bbox width bbox y bbox height encloser other fig pers set enclosing fig encloser placed figs add pers todo use per project undo manager not global undo manager get instance remove memento lock this if undo manager get instance is generate mementos add to diagram memento memento new add to diagram memento editor placed figs undo manager get instance add memento memento undo manager get instance add memento lock this editor get selection manager select placed figs done me consume mousereleased mouseevent isconsumed isdebugenabled mousereleased undomanager getinstance addmementolock mutablegraphmodel mutablegraphmodel getgraphmodel damageall snappt snappt damageall getlayermanager getactivelayer graphnoderenderer getgraphnoderenderer fignode placedfigs arraylist fignode modelelements argodiagram diagramutils getactivediagram umldiagram modelelements umldiagram doesaccept fignode getfignodefor setlocation snappt snappt isdebugenabled mousemoved undomanager getinstance startchain addnode addrelatededges addnoderelatededges getbounds otherfigs getcontents otherfig otherfigs otherfig getusetraprect otherfig fignode otherfig isvisible otherfig otherfig gettraprect otherfig setenclosingfig placedfigs undomanager getinstance removemementolock undomanager getinstance isgeneratemementos addtodiagrammemento addtodiagrammemento placedfigs undomanager getinstance addmemento undomanager getinstance addmementolock getselectionmanager placedfigs public void key typed key event ke if ke get key char key event vk escape log debug esc pressed leave keytyped keyevent getkeychar keyevent vk_escape add to diagram memento final editor ed final list fig node nodes placed this nodes placed nodes placed this editor ed this mgm mutable graph model editor get graph model addtodiagrammemento fignode nodesplaced nodesplaced nodesplaced mutablegraphmodel getgraphmodel public void undo todo use per project undo manager not global undo manager get instance add memento lock this for fig node fig node nodes placed mgm remove node fig node get owner editor remove fig node undo manager get instance remove memento lock this undomanager getinstance addmementolock fignode fignode nodesplaced removenode fignode getowner fignode undomanager getinstance removemementolock public void redo todo use per project undo manager not global undo manager get instance add memento lock this for fig node fig node nodes placed editor add fig node mgm add node fig node get owner undo manager get instance remove memento lock this undomanager getinstance addmementolock fignode fignode nodesplaced fignode addnode fignode getowner undomanager getinstance removemementolock undo manager get instance remove memento lock this public void dispose undomanager getinstance removemementolock public string to string return is start chain add to diagram memento tostring isstartchain addtodiagrammemento param key the name to be localized param has icon true if an icon should be shown public abstract action radio menu item string key boolean has icon super translator localize key has icon resource loader wrapper lookup icon key null set the tooltip string put value action short description translator localize key hasicon abstractactionradiomenuitem hasicon hasicon resourceloaderwrapper lookupicon putvalue short_description this action should be enabled when ul li all targets are modelelements that support this radiobutton and li all targets have the radiobutton on the same item mixed is not yet supported but could be if a tri state radiobutton is implemented ul public boolean is enabled boolean result true object common value null only initialized to prevent warning boolean first true iterator i target manager get instance get targets iterator while i has next result object t i next try object value value of target t if first common value value first false result common value equals value catch illegal argument exception e result false not supported for this target return result isenabled commonvalue targetmanager getinstance gettargets hasnext valueoftarget commonvalue commonvalue illegalargumentexception param t the target modelelement return the uml element that represents the radiobutton for this modelelement this action is performed on all targets see java awt event action listener action performed java awt event action event public final void action performed action event e super action performed e iterator i target manager get instance get targets iterator while i has next object t i next toggle value of target t actionlistener actionperformed actionevent actionperformed actionevent actionperformed targetmanager getinstance gettargets hasnext togglevalueoftarget param t the target modelelement abstract void toggle value of target object t togglevalueoftarget default constructor deprecated for 0 27 3 by tfmorris use link argo fig group object diagram settings deprecated public argo fig group super argofiggroup diagramsettings argofiggroup construct an empty fig group with the given diagram settings object param owner owning uml element param render settings render settings to use public argo fig group object owner diagram settings render settings super super set owner owner settings render settings figgroup diagramsettings rendersettings argofiggroup diagramsettings rendersettings setowner rendersettings construct a fig group which contains the listed figs param arg0 the figs that make up the group deprecated for 0 27 3 by tfmorris use link argo fig group list diagram settings deprecated public argo fig group list argo fig arg0 super arg0 figgroup argofiggroup diagramsettings argofiggroup argofig this optional method is not implemented it will throw an link unsupported operation exception if used figs are added to a graph model which is in turn owned by a project p param project the project deprecated suppress warnings deprecation deprecated public void set project project project throw new unsupported operation exception unsupportedoperationexception graphmodel suppresswarnings setproject unsupportedoperationexception deprecated for 0 27 2 by tfmorris implementations should have all the information that they require in the diagram settings object return the owning project see org argouml uml diagram ui argo fig get project suppress warnings deprecation deprecated public project get project return argo fig util get project this diagramsettings argofig getproject suppresswarnings getproject argofigutil getproject public void rendering changed get all our sub figs and hit them with the big stick too for fig fig list fig get figs if fig instanceof argo fig argo fig fig rendering changed else log debug found non argo fig nested renderingchanged getfigs argofig argofig renderingchanged public diagram settings get settings todo this is a temporary crutch to use until all figs are updated to use the constructor that accepts a diagram settings object if settings null project p get project if p null return p get project settings get default diagram settings return settings diagramsettings getsettings diagramsettings getproject getprojectsettings getdefaultdiagramsettings public void set settings diagram settings render settings settings render settings rendering changed setsettings diagramsettings rendersettings rendersettings renderingchanged setting the owner of the fig must be done in the constructor and not changed aftewards for all argouml figs param owner owning uml element see org tigris gef presentation fig set owner java lang object deprecated for 0 27 3 by tfmorris set owner in constructor deprecated public void set owner object owner super set owner owner setowner setowner setowner constructor param name the name of the action param o the diagram public action add all classes from model string name object o super name object o actionaddallclassesfrommodel see javax swing action is enabled public boolean is enabled return object instanceof uml class diagram isenabled isenabled umlclassdiagram action performed finds all of the classes within the same namespace as the uml class diagram that was given to me in my constructor and adds them to the uml class diagram param ae the action event author timothy m lebo oct 2003 smart information flow technologies public void action performed action event ae super action performed ae if object instanceof uml class diagram use diagram interface to add classes to diagram diagram interface diagram new diagram interface globals cur editor diagram set current diagram uml class diagram object object namespace uml class diagram object get namespace iterator elements model get facade get owned elements namespace iterator while elements has next object element elements next if model get facade isa class element model get facade isa association class element diagram add class element false actionperformed umlclassdiagram umlclassdiagram actionevent actionperformed actionevent actionperformed umlclassdiagram diagraminterface diagraminterface diagraminterface cureditor setcurrentdiagram umlclassdiagram umlclassdiagram getnamespace getfacade getownedelements hasnext getfacade isaclass getfacade isaassociationclass addclass constructor for action add existing edge param name the name of the action param edge object the edge the uml model element public action add existing edge string name object edge object super name edge edge object actionaddexistingedge edgeobject modelelement actionaddexistingedge edgeobject edgeobject override public void action performed action event arg0 super action performed arg0 we have an edge the uml modelelement if edge null return let s test which situation we have 3 possibilities 1 the nodes are already on the diagram we can use can add edge for this 2 one of the nodes is already on the diagram the other has to be added 3 both of the nodes are not yet on the diagram for the time being we will only implement situation 1 todo implement situation 2 and 3 mutable graph model gm mutable graph model diagram utils get active diagram get graph model if gm can add edge edge situation 1 gm add edge edge if model get facade isa association class edge mode create association class build in active layer globals cur editor edge actionperformed actionevent actionperformed canaddedge mutablegraphmodel mutablegraphmodel diagramutils getactivediagram getgraphmodel canaddedge addedge getfacade isaassociationclass modecreateassociationclass buildinactivelayer cureditor override public boolean is enabled object target target manager get instance get model target argo diagram dia diagram utils get active diagram if dia null return false mutable graph model gm mutable graph model dia get graph model return gm can add edge target isenabled targetmanager getinstance getmodeltarget argodiagram diagramutils getactivediagram mutablegraphmodel mutablegraphmodel getgraphmodel canaddedge the constructor public fig trace todo why are these different colors tfm get fig set line color color red arrow head triangle end arrow new arrow head triangle end arrow set fill color color red set dest arrow head end arrow set between nearest points true figtrace getfig setlinecolor arrowheadtriangle endarrow arrowheadtriangle endarrow setfillcolor setdestarrowhead endarrow setbetweennearestpoints the constructor param edge the owning uml element public fig trace object edge this set owner edge figtrace setowner override public void mouse pressed mouse event me int x me getx y me gety fig under mouse editor hit x y if under mouse null under mouse editor hit x 16 y 16 32 32 if under mouse null npoints 0 done me consume return if npoints 0 me consume return source fig under mouse if under mouse instanceof fig edge model element under mouse instanceof fig edge note if we re drawing from an edge fig edge model element source edge fig edge model element under mouse source edge make edge port fig edge port edge port source edge get edge port source edge compute route under mouse edge port set source fig node edge port set start port source fig get owner set start port fig edge port else if under mouse instanceof fig node model element if get source fig node null set source fig node fig node under mouse set start port get source fig node deep hit port x y if get start port null done me consume return set start port fig get source fig node get port fig get start port else done me consume return create fig me me consume mousepressed mouseevent undermouse undermouse undermouse undermouse _npoints _npoints sourcefig undermouse undermouse figedgemodelelement undermouse figedgenote figedgemodelelement sourceedge figedgemodelelement undermouse sourceedge makeedgeport figedgeport edgeport sourceedge getedgeport sourceedge computeroute undermouse edgeport setsourcefignode edgeport setstartport sourcefig getowner setstartportfig edgeport undermouse fignodemodelelement getsourcefignode setsourcefignode fignode undermouse setstartport getsourcefignode deephitport getstartport setstartportfig getsourcefignode getportfig getstartport createfig override public void mouse released mouse event me if me is consumed return if get source fig node null done me consume return int x me getx y me gety fig dest fig editor hit x y if dest fig null dest fig editor hit x 16 y 16 32 32 mutable graph model graph model mutable graph model editor get graph model if is connection valid source fig dest fig dest fig null else log info connection valid if dest fig instanceof fig edge model element dest fig instanceof fig edge note fig edge model element dest edge fig edge model element dest fig dest edge make edge port dest fig dest edge get edge port dest edge compute route if dest fig instanceof fig node model element fig node dest fig node fig node dest fig object found port dest fig node get owner if found port get start port npoints 4 user made a false start done me consume return if found port null fig poly p fig poly newitem if found port get start port npoints 4 p set self loop true editor damage all p set complete true log info connecting fig edge fe build connection graph model get meta type source fig dest fig if fe null editor get selection manager select fe editor damage all if the new edge implements the mouse listener interface it has to receive the mouse released event if fe instanceof mouse listener mouse listener fe mouse released me end attached fe done me consume return if near last x y editor damage all point snap pt new point x y editor snap snap pt fig poly newitem add point snap pt x snap pt y npoints editor damage all lastx x lasty y me consume mousereleased mouseevent isconsumed getsourcefignode destfig destfig destfig mutablegraphmodel graphmodel mutablegraphmodel getgraphmodel isconnectionvalid sourcefig destfig destfig destfig figedgemodelelement destfig figedgenote figedgemodelelement destedge figedgemodelelement destfig destedge makeedgeport destfig destedge getedgeport destedge computeroute destfig fignodemodelelement fignode destfignode fignode destfig foundport destfignode getowner foundport getstartport _npoints foundport figpoly figpoly _newitem foundport getstartport _npoints setselfloop damageall setcomplete figedge buildconnection graphmodel getmetatype sourcefig destfig getselectionmanager damageall mouselistener mousereleased mouselistener mouselistener mousereleased endattached nearlast damageall snappt snappt figpoly _newitem addpoint snappt snappt _npoints damageall _lastx _lasty return the meta type of the element that this mode is designed to create return the meta type of the connection required called after the edge has been drawn from a source and dropped to a destination return true if this drop is valid the default is true subclasses should override this with their own logic param source the source fig param dest the dest fig return true if drop on an edge is valid protected boolean is connection valid fig source fig dest return model get uml factory is connection valid get meta type source null null source get owner dest null null dest get owner true isconnectionvalid getumlfactory isconnectionvalid getmetatype getowner getowner create an edge of the given type and connect it to the given nodes param graph model the graph model containing the objects param edge type the uml object type of the connection param from element the fig for the from element param dest fig node the fig for the to element return a newly created fig edge protected fig edge build connection mutable graph model graph model object edge type fig from element fig dest fig node object model element graph model connect from element get owner dest fig node get owner edge type set new edge model element calling connect will add the edge to the graph model and any layer persectives on that graph model will get a edge added event and will add an appropriate fig edge determined by the graph edge renderer if get new edge null get source fig node damage dest fig node damage layer lay editor get layer manager get active layer fig edge fe fig edge lay presentation for get new edge newitem set line color color black fe set fig newitem fe set source port fig get start port fig fe set source fig node get source fig node fe set dest port fig dest fig node fe set dest fig node fig node dest fig node return fe else return null graphmodel graphmodel edgetype fromelement destfignode figedge figedge buildconnection mutablegraphmodel graphmodel edgetype fromelement destfignode modelelement graphmodel fromelement getowner destfignode getowner edgetype setnewedge modelelement graphmodel layerpersectives graphmodel edgeadded figedge graphedgerenderer getnewedge getsourcefignode destfignode getlayermanager getactivelayer figedge figedge presentationfor getnewedge _newitem setlinecolor setfig _newitem setsourceportfig getstartportfig setsourcefignode getsourcefignode setdestportfig destfignode setdestfignode fignode destfignode param x x param y y param w width param h height public fig empty rect int x int y int w int h super x y w h super set filled false figemptyrect setfilled see org tigris gef presentation fig set filled boolean public void set filled boolean filled do nothing this rect will always be transparent setfilled setfilled the constructor param a the aggregation kind object param s src or dest anything else is interpreted as dest protected action aggregation object a string s super translator localize model get facade get name a null set the tooltip string put value action short description translator localize model get facade get name a str s agg a actionaggregation getfacade getname putvalue short_description getfacade getname override public void action performed action event ae super action performed ae list sels globals cur editor get selection manager selections if sels size 1 selection sel selection sels get 0 fig f sel get content object owner fig edge model element f get owner collection asc ends model get facade get connections owner iterator iter asc ends iterator object asc end null if str equals src asc end iter next else while iter has next asc end iter next model get core helper set aggregation asc end agg actionperformed actionevent actionperformed cureditor getselectionmanager getcontent figedgemodelelement getowner ascends getfacade getconnections ascends ascend ascend hasnext ascend getcorehelper setaggregation ascend see org tigris gef undo undoable action is enabled override public boolean is enabled return true undoableaction isenabled isenabled return returns the src agg public static undoable action get src agg return src agg srcagg undoableaction getsrcagg srcagg return returns the dest agg public static undoable action get dest agg return dest agg destagg undoableaction getdestagg destagg return returns the src agg composite public static undoable action get src agg composite return src agg composite srcaggcomposite undoableaction getsrcaggcomposite srcaggcomposite return returns the dest agg composite public static undoable action get dest agg composite return dest agg composite destaggcomposite undoableaction getdestaggcomposite destaggcomposite return returns the src agg none public static undoable action get src agg none return src agg none srcaggnone undoableaction getsrcaggnone srcaggnone return returns the dest agg none public static undoable action get dest agg none return dest agg none destaggnone undoableaction getdestaggnone destaggnone the constructor public dndj graph super make drop target dndjgraph makedroptarget the constructor param cc the connection constrainer public dndj graph connection constrainer cc super cc make drop target connectionconstrainer dndjgraph connectionconstrainer makedroptarget the constructor param d the diagram public dndj graph diagram d super d make drop target dndjgraph makedroptarget the constructor param gm the graph model public dndj graph graph model gm super gm make drop target graphmodel dndjgraph graphmodel makedroptarget the constructor param ed the editor public dndj graph editor ed super ed make drop target dndjgraph makedroptarget private void make drop target new drop target this dnd constants action copy or move this makedroptarget droptarget dndconstants action_copy_or_move public void drag enter drop target drag event dtde try if dtde is data flavor supported transferable model elements uml collection flavor dtde accept drag dtde get drop action return catch null pointer exception e system err println null pointer exception ignored dtde reject drag dragenter droptargetdragevent isdataflavorsupported transferablemodelelements uml_collection_flavor acceptdrag getdropaction nullpointerexception nullpointerexception rejectdrag public void drag over drop target drag event dtde try argo diagram dia diagram utils get active diagram if dia instanceof uml diagram uml diagram dia does accept dtde get source dtde accept drag dtde get drop action return if dtde is data flavor supported transferable model elements uml collection flavor dtde accept drag dtde get drop action return catch null pointer exception e system err println null pointer exception ignored dtde reject drag dragover droptargetdragevent argodiagram diagramutils getactivediagram umldiagram umldiagram doesaccept getsource acceptdrag getdropaction isdataflavorsupported transferablemodelelements uml_collection_flavor acceptdrag getdropaction nullpointerexception nullpointerexception rejectdrag java awt dnd drop target drag event public void drop action changed drop target drag event dtde ignored droptargetdragevent dropactionchanged droptargetdragevent java awt dnd drop target event public void drag exit drop target event dte ignored droptargetevent dragexit droptargetevent public void drop drop target drop event drop target drop event transferable tr drop target drop event get transferable if the flavor is not supported then reject the drop if tr is data flavor supported transferable model elements uml collection flavor drop target drop event reject drop return drop target drop event accept drop drop target drop event get drop action get the model elements that are being transfered collection model elements try argo diagram diagram diagram utils get active diagram model elements collection tr get transfer data transferable model elements uml collection flavor iterator i model elements iterator while i has next fig node fig node uml diagram diagram drop i next drop target drop event get location if fig node null mutable graph model gm mutable graph model diagram get graph model if gm get nodes contains fig node get owner gm get nodes add fig node get owner globals cur editor get layer manager get active layer add fig node gm add node related edges fig node get owner drop target drop event get drop target context drop complete true catch unsupported flavor exception e log debug exception caught e catch io exception e log debug exception caught e droptargetdropevent droptargetdropevent droptargetdropevent gettransferable isdataflavorsupported transferablemodelelements uml_collection_flavor droptargetdropevent rejectdrop droptargetdropevent acceptdrop droptargetdropevent getdropaction modelelements argodiagram diagramutils getactivediagram modelelements gettransferdata transferablemodelelements uml_collection_flavor modelelements hasnext fignode fignode umldiagram droptargetdropevent getlocation fignode mutablegraphmodel mutablegraphmodel getgraphmodel getnodes fignode getowner getnodes fignode getowner cureditor getlayermanager getactivelayer fignode addnoderelatededges fignode getowner droptargetdropevent getdroptargetcontext dropcomplete unsupportedflavorexception ioexception the constructor param name the localized name of the action param o the node uml object to be added public action add existing node string name object o super name object o actionaddexistingnode public boolean is enabled object target target manager get instance get target argo diagram dia diagram utils get active diagram if dia null return false if dia instanceof uml diagram uml diagram dia does accept object return true mutable graph model gm mutable graph model dia get graph model return gm can add node target isenabled targetmanager getinstance gettarget argodiagram diagramutils getactivediagram umldiagram umldiagram doesaccept mutablegraphmodel mutablegraphmodel getgraphmodel canaddnode public void action performed action event ae super action performed ae editor ce globals cur editor graph model gm ce get graph model if gm instanceof mutable graph model return string instructions null if object null instructions translator localize misc message click on diagram to add new object model get facade to string object globals show status instructions final mode add to diagram place mode new mode add to diagram target manager get instance get targets instructions globals mode place mode false actionperformed actionevent actionperformed cureditor graphmodel getgraphmodel mutablegraphmodel getfacade tostring showstatus modeaddtodiagram placemode modeaddtodiagram targetmanager getinstance gettargets placemode the constructor param args arguments public action set mode properties args super args actionsetmode the constructor param mode class the next global editor mode public action set mode class mode class super mode class modeclass actionsetmode modeclass modeclass the constructor param mode class the next global editor mode param name the name of the icon public action set mode class mode class string name super mode class put tool tip name put icon name modeclass actionsetmode modeclass modeclass puttooltip puticon the constructor param mode class the next global editor mode param name the icon name param tooltipkey the key for the tooltip text public action set mode class mode class string name string tooltipkey super mode class name put tool tip tooltipkey put icon name modeclass actionsetmode modeclass modeclass puttooltip puticon the constructor param mode class the next global editor mode param sticky the global sticky mode boolean allows the user to place several nodes rapidly in succession public action set mode class mode class boolean sticky super mode class sticky modeclass actionsetmode modeclass modeclass the constructor param mode class the next global editor mode param mode args arguments for the new mode public action set mode class mode class hashtable mode args super mode class mode args modeclass modeargs actionsetmode modeclass modeargs modeclass modeargs the constructor todo the name parameter is used for the icon and for the tooltip this makes i18n of the tooltip impossible param mode class the next global editor mode param mode args arguments for the new mode param name the name of the command that is the tooltip text public action set mode class mode class hashtable mode args string name super mode class this mode args mode args put tool tip name put icon name modeclass modeargs actionsetmode modeclass modeargs modeclass modeargs modeargs puttooltip puticon the constructor param mode class the next global editor mode param arg the name of a new argument for the new mode param value the value of a new argument for the new mode public action set mode class mode class string arg object value super mode class arg value modeclass actionsetmode modeclass modeclass the constructor todo the name parameter is used for the icon and for the tooltip this makes i18n of the tooltip impossible param mode class the next global editor mode param arg the name of a new argument for the new mode param value the value of a new argument for the new mode param name the name of the command that is the tooltip text public action set mode class mode class string arg object value string name super mode class arg value put tool tip name put icon name modeclass actionsetmode modeclass modeclass puttooltip puticon the constructor param mode class the next global editor mode param arg the name of a new argument for the new mode param value the value of a new argument for the new mode param name the name of the command that is the tooltip text param icon the small icon for the action public action set mode class mode class string arg object value string name image icon icon super mode class arg value name icon put tool tip name modeclass small_icon actionsetmode modeclass imageicon modeclass puttooltip adds tooltip text to the action param key the key to be localized to become the tooltip private void put tool tip string key put value action short description translator localize key puttooltip putvalue short_description private void put icon string key image icon icon resource loader wrapper lookup icon key if icon null put value action small icon icon else log debug failed to find icon for key key puticon imageicon resourceloaderwrapper lookupicon putvalue small_icon construct a new selection move clarifiers for the given fig param f the given fig public selection move clarifiers fig f super f selectionmoveclarifiers selectionmoveclarifiers paint the handles at the four corners and midway along each edge of the bounding box see org tigris gef base selection paint java awt graphics public void paint graphics g clarifiable get content paint clarifiers g super paint g getcontent paintclarifiers construct a new selection edge clarifiers for the given fig param f the given fig selectionedgeclarifiers this extends the standard selection painting to also highlight the editable text labels and their placement strategies should there be only one selected item see org tigris gef base selection paint java awt graphics param g the graphics object override public void paint graphics g super paint g int selection count globals cur editor get selection manager get selections size if selection count 1 fig edge edge fig edge get content if edge instanceof clarifiable clarifiable edge paint clarifiers g for path item placement strategy strategy edge get path item strategies strategy paint g selectioncount cureditor getselectionmanager getselections selectioncount figedge figedge getcontent paintclarifiers pathitemplacementstrategy getpathitemstrategies construct a default fig edge element deprecated for 0 27 2 by tfmorris the default constructor will become private so that it can t be used externally all concrete subclasses must invoke an explicit constructor which passes an owner and render s settings link fig edge model element object diagram settings deprecated public fig edge model element name fig new fig name with abstract x0 y0 20 90 20 false stereotype fig new fig stereotypes group x0 y0 90 15 init figs figedgeelement figedgemodelelement diagramsettings figedgemodelelement namefig fignamewithabstract stereotypefig figstereotypesgroup initfigs construct a new fig edge this method creates the name element that holds the name of the model element and adds itself as a listener also a stereotype is constructed p this constructor is only intended for use by concrete subclasses param element owning uml element param render settings rendering settings protected fig edge model element object element diagram settings render settings super todo we don t have any settings that can change per fig currently so we can just use the default settings settings new diagram settings render settings settings render settings todo it doesn t matter what these get set to because gef can t draw anything except 1 pixel wide lines super set line color line color super set line width line width get fig set line color line color get fig set line width line width name fig new fig name with abstract element new rectangle x0 y0 20 90 20 render settings false stereotype fig new fig stereotypes group element new rectangle x0 y0 90 15 settings init figs init owner element figedge rendersettings figedgemodelelement diagramsettings rendersettings diagramsettings rendersettings rendersettings setlinecolor line_color setlinewidth line_width getfig setlinecolor line_color getfig setlinewidth line_width namefig fignamewithabstract rendersettings stereotypefig figstereotypesgroup initfigs initowner private void init figs name fig set text filled false set between nearest points true initfigs namefig settextfilled setbetweennearestpoints private void init owner object element if element null if model get facade isauml element element throw new illegal argument exception the owner must be a model element got a element get class get name super set owner element name fig set owner element for setting abstract if edge port null edge port set owner get owner stereotype fig set owner element this fixes issue 5414 notation provider name notation provider factory2 get instance get notation provider get notation provider type element this add element listener element remove initowner getfacade isaumlelement illegalargumentexception getclass getname setowner namefig setowner edgeport edgeport setowner getowner stereotypefig setowner notationprovidername notationproviderfactory2 getinstance getnotationprovider getnotationprovidertype addelementlistener the constructor that hooks the fig into the uml model element param edge the uml element deprecated for 0 27 2 by tfmorris use link fig edge model element object diagram settings deprecated public fig edge model element object edge this set owner edge figedgemodelelement diagramsettings figedgemodelelement setowner create a fig comment port if needed public void make edge port if edge port null edge port new fig edge port get owner new rectangle get settings edge port set visible false add path item edge port new path item placement this edge port 50 0 figcommentport makeedgeport edgeport edgeport figedgeport getowner getsettings edgeport setvisible addpathitem edgeport pathitemplacement edgeport return the fig comment port public fig edge port get edge port return edge port figcommentport figedgeport getedgeport edgeport setter for the uid param new id the new uid public void set itemuid itemuid new id item uid new id newid setitemuid newid itemuid newid getter for the uid return the uid public itemuid get itemuid return item uid getitemuid itemuid override public string get tip string mouse event me to do item item hit clarifier me getx me gety string tip if item null globals cur editor get selection manager contains fig this tip item get headline else if get owner null try tip model get facade get tip string get owner catch invalid element exception e we moused over an object just as it was deleted transient condition doesn t require i18n log warn a deleted element still exists on the diagram return translator localize misc name deleted else tip to string if tip null tip length 0 tip ends with tip return tip gettipstring mouseevent todoitem hitclarifier cureditor getselectionmanager containsfig getheadline getowner getfacade gettipstring getowner invalidelementexception tostring endswith param me the mouse event that triggered the popup menu request return a vector containing a combination of these 4 types action j menu j menu item j separator override public vector get pop up actions mouse event me action list pop up actions new action list super get pop up actions me is read only popup add offset should be equal to the number of items added here pop up actions add new j separator popup add offset 1 if remove from diagram pop up actions add project actions get instance get remove from diagram action popup add offset pop up actions add new action delete model elements popup add offset if target manager get instance get targets size 1 to do list list designer the designer get to do list list to do item items list element list for offender get owner if items null items size 0 todo this creates a dependency on the critics subsystem we need a generic way for modules including our internal subsystems to request addition of actions to the popup menu tfm 20080430 argoj menu critiques new argoj menu menu popup critiques to do item item under mouse hit clarifier me getx me gety if item under mouse null critiques add new action go to critique item under mouse critiques add separator for to do item item items if item item under mouse continue critiques add new action go to critique item pop up actions add 0 new j separator pop up actions add 0 critiques add stereotypes submenu action stereo actions get apply stereotype actions if stereo actions null stereo actions length 0 pop up actions add 0 new j separator argoj menu stereotypes new argoj menu menu popup apply stereotypes for int i 0 i stereo actions length i stereotypes add check item stereo actions i pop up actions add 0 stereotypes return pop up actions mouseevent jmenu jmenuitem jseparator getpopupactions mouseevent actionlist popupactions actionlist getpopupactions isreadonly popupaddoffset popupactions jseparator popupaddoffset removefromdiagram popupactions projectactions getinstance getremovefromdiagramaction popupaddoffset popupactions actiondeletemodelelements popupaddoffset targetmanager getinstance gettargets todolist thedesigner gettodolist todoitem elementlistforoffender getowner argojmenu argojmenu todoitem itemundermouse hitclarifier itemundermouse actiongotocritique itemundermouse addseparator todoitem itemundermouse actiongotocritique popupactions jseparator popupactions stereoactions getapplystereotypeactions stereoactions stereoactions popupactions jseparator argojmenu argojmenu stereoactions addcheckitem stereoactions popupactions popupactions get the set of actions which valid for adding removing stereotypes on the model element of this fig s owner return array of actions protected action get apply stereotype actions return stereotype utility get apply stereotype actions get owner modelelement getapplystereotypeactions stereotypeutility getapplystereotypeactions getowner distance formula x h 2 y k 2 distance 2 param p1 point param p2 point return the square of the distance protected int get squared distance point p1 point p2 int x squared p2 x p1 x x squared x squared int y squared p2 y p1 y y squared y squared return x squared y squared getsquareddistance xsquared xsquared xsquared ysquared ysquared ysquared xsquared ysquared param g the code graphics code object public void paint clarifiers graphics g int icon pos 25 gap 1 x off 4 y off 4 point p new point to do list td list designer the designer get to do list owner related todo items list to do item items td list element list for offender get owner for to do item item items icon icon item get clarifier if icon instanceof clarifier clarifier icon set fig this clarifier icon set to do item item if icon null stuff point along perimeter icon pos p icon paint icon null g p x x off p y y off icon pos icon get icon width gap fig related todo items items td list element list for offender this for to do item item items icon icon item get clarifier if icon instanceof clarifier clarifier icon set fig this clarifier icon set to do item item if icon null stuff point along perimeter icon pos p icon paint icon null g p x x off p y y off icon pos icon get icon width gap paintclarifiers iconpos xoff yoff todolist tdlist thedesigner gettodolist todoitem tdlist elementlistforoffender getowner todoitem getclarifier setfig settodoitem stuffpointalongperimeter iconpos painticon xoff yoff iconpos geticonwidth tdlist elementlistforoffender todoitem getclarifier setfig settodoitem stuffpointalongperimeter iconpos painticon xoff yoff iconpos geticonwidth this is used to draw a box round the edge of any editable fig text annotations of the edge when the edge is selected todo this logic probably belongs in our base selection class selection edge clarifiers and could be written to discover what fig text annotations exist rather than hard code in subclasses param f the fig to indicate the bounds of param g the graphics protected void indicate bounds fig text f graphics g no longer necessary see issue 1048 figtext selectionedgeclarifiers figtext indicatebounds figtext the user clicked on the clarifier param x the x of the point clicked param y the y of the point clicked return the todo item clicked public to do item hit clarifier int x int y int icon pos 25 x off 4 y off 4 point p new point to do list td list designer the designer get to do list list to do item items td list element list for offender get owner for to do item item items icon icon item get clarifier stuff point along perimeter icon pos p int width icon get icon width int height icon get icon height if y p y y off y p y height y off x p x x off x p x width x off return item icon pos width for to do item item items icon icon item get clarifier if icon instanceof clarifier clarifier icon set fig this clarifier icon set to do item item if clarifier icon hit x y return item items td list element list for offender this for to do item item items icon icon item get clarifier stuff point along perimeter icon pos p int width icon get icon width int height icon get icon height if y p y y off y p y height y off x p x x off x p x width x off return item icon pos width for to do item item items icon icon item get clarifier if icon instanceof clarifier clarifier icon set fig this clarifier icon set to do item item if clarifier icon hit x y return item return null todoitem hitclarifier iconpos xoff yoff todolist tdlist thedesigner gettodolist todoitem tdlist elementlistforoffender getowner todoitem getclarifier stuffpointalongperimeter iconpos geticonwidth geticonheight yoff yoff xoff xoff iconpos todoitem getclarifier setfig settodoitem tdlist elementlistforoffender todoitem getclarifier stuffpointalongperimeter iconpos geticonwidth geticonheight yoff yoff xoff xoff iconpos todoitem getclarifier setfig settodoitem return a link selection reroute edge object that manages selection and rerouting of the edge see org tigris gef presentation fig make selection override public selection make selection todo there is a cyclic dependency between selection reroute edge and fig edge model element return new selection reroute edge this selectionrerouteedge makeselection makeselection selectionrerouteedge figedgemodelelement selectionrerouteedge getter for name the name fig return the name fig protected fig text get name fig return name fig namefig figtext getnamefig namefig get the rectangle in which the model elements name is displayed return the bounds of the namefig public rectangle get name bounds return name fig get bounds getnamebounds namefig getbounds return the text of the namefig public string get name return name fig get text getname namefig gettext getter for stereo the stereotype fig return the stereo fig protected fig stereotypes group get stereotype fig return stereotype fig figstereotypesgroup getstereotypefig stereotypefig public void vetoable change property change event pce object src pce get source if src get owner delayed change notify delayed notify new delayed change notify this pce swing utilities invoke later delayed notify vetoablechange propertychangeevent getsource getowner delayedchangenotify delayednotify delayedchangenotify swingutilities invokelater delayednotify public void delayed vetoable change property change event pce update any text colors fonts etc rendering changed update the relative sizes and positions of internel figs rectangle bbox get bounds set bounds bbox x bbox y bbox width bbox height end trans delayedvetoablechange propertychangeevent renderingchanged getbounds setbounds endtrans this method gets called when a bound property gets changed this may represent a uml element value from the model subsystem a gef property or something which argouml itself implements param pve the event containing the property change information see java beans property change listener property change java beans property change event override public void property change final property change event pve object src pve get source string p name pve get property name if pve instanceof delete instance event src get owner runnable do work runnable new runnable public void run try remove from diagram catch invalid element exception e log error update layout method accessed deleted element e swing utilities invoke later do work runnable return we handle and consume editing events if p name equals editing boolean false equals pve get new value log debug finished editing parse the text that was edited text edited fig text src calc bounds end trans else if p name equals editing boolean true equals pve get new value text edit started fig text src else pass everything except editing events to superclass super property change pve if model get facade isauml element src get owner null model get uml factory is removed get owner if the source of the event is an uml object then the uml model has been changed model changed pve final uml change event event uml change event pve runnable do work runnable new runnable public void run try update layout event catch invalid element exception e if log is debug enabled log debug update layout method accessed deleted element e swing utilities invoke later do work runnable the following is a possible future improvement of the model changed function michiel propose not to do this to keep architecture stable if pve instanceof attribute change event model attribute changed attribute change event pve else if pve instanceof add association event model association added add association event pve else if pve instanceof remove association event model association removed remove association event pve propertychangelistener propertychange propertychangeevent propertychange propertychangeevent getsource pname getpropertyname deleteinstanceevent getowner doworkrunnable removefromdiagram invalidelementexception updatelayout swingutilities invokelater doworkrunnable pname getnewvalue textedited figtext calcbounds endtrans pname getnewvalue texteditstarted figtext propertychange getfacade isaumlelement getowner getumlfactory isremoved getowner modelchanged umlchangeevent umlchangeevent doworkrunnable updatelayout invalidelementexception isdebugenabled updatelayout swingutilities invokelater doworkrunnable modelchanged attributechangeevent modelattributechanged attributechangeevent addassociationevent modelassociationadded addassociationevent removeassociationevent modelassociationremoved removeassociationevent runnable do work runnable new runnable public void run try remove from diagram catch invalid element exception e log error update layout method accessed deleted element e doworkrunnable removefromdiagram invalidelementexception updatelayout runnable do work runnable new runnable public void run try update layout event catch invalid element exception e if log is debug enabled log debug update layout method accessed deleted element e doworkrunnable updatelayout invalidelementexception isdebugenabled updatelayout called whenever we receive an attribute change event param ace the event protected void model attribute changed attribute change event ace default implementation is to do nothing attributechangeevent modelattributechanged attributechangeevent called whenever we receive an add association event param aae the event protected void model association added add association event aae default implementation is to do nothing addassociationevent modelassociationadded addassociationevent called whenever we receive an remove association event param rae the event protected void model association removed remove association event rae default implementation is to do nothing removeassociationevent modelassociationremoved removeassociationevent this is a template method called by the argouml framework as the result of a change to a model element do not call this method directly yourself p override this in any subclasses in order to restructure the fig node due to change of any model element that this fig node is listening to p p this method is guaranteed by the framework to be running on the swing awt thread p param event the uml change event that caused the change protected void update layout uml change event event fignode fignode umlchangeevent updatelayout umlchangeevent this method is called when the user doubleclicked on the text field and starts editing subclasses should override this method to e g supply help to the user about the used format p it is also possible to alter the text to be edited already here e g by adding the stereotype in front of the name but that seems not user friendly param ft the fig text that will be edited and contains the start text protected void text edit started fig text ft if ft get name fig show help notation provider name get parsing help ft set text notation provider name to string get owner get notation settings figtext texteditstarted figtext getnamefig showhelp notationprovidername getparsinghelp settext notationprovidername tostring getowner getnotationsettings utility function to localize the given string with help text and show it in the status bar of the argouml window this function is used in favour of the inline call to enable later improvements e g it would be possible to show a help balloon todo work this out one matter to possibly improve show multiple lines param s the given string to be localized and shown protected void show help string s argo event pump fire event new argo help event argo event types help changed this translator localize s showhelp argoeventpump fireevent argohelpevent argoeventtypes help_changed this method is called after the user finishes editing a text field that is in the fig edge model element determine which field and update the model this class handles the name subclasses should override to handle other text elements param ft the text fig that has been edited protected void text edited fig text ft if ft name fig if get owner null return notation provider name parse get owner ft get text ft set text notation provider name to string get owner get notation settings figedgemodelelement textedited figtext namefig getowner notationprovidername getowner gettext settext notationprovidername tostring getowner getnotationsettings param f the fig return true if editable protected boolean can edit fig f return true canedit see java awt event mouse listener mouse pressed java awt event mouse event public void mouse pressed mouse event me required for mouse listener interface but we only care about clicks mouselistener mousepressed mouseevent mousepressed mouseevent mouselistener see java awt event mouse listener mouse released java awt event mouse event public void mouse released mouse event me required for mouse listener interface but we only care about clicks mouselistener mousereleased mouseevent mousereleased mouseevent mouselistener see java awt event mouse listener mouse entered java awt event mouse event public void mouse entered mouse event me required for mouse listener interface but we only care about clicks mouselistener mouseentered mouseevent mouseentered mouseevent mouselistener see java awt event mouse listener mouse exited java awt event mouse event public void mouse exited mouse event me required for mouse listener interface but we only care about clicks mouselistener mouseexited mouseevent mouseexited mouseevent mouselistener public void mouse clicked mouse event me if me is consumed is read only me get click count 2 fig f hit fig new rectangle me getx 2 me gety 2 4 4 if f instanceof mouse listener can edit f mouse listener f mouse clicked me me consume mouseclicked mouseevent isconsumed isreadonly getclickcount hitfig mouselistener canedit mouselistener mouseclicked return true if the model element that this fig represents is read only return the model element is read only private boolean is read only object owner get owner if model get facade isauml element owner return model get model management helper is read only owner return false isreadonly getowner getfacade isaumlelement getmodelmanagementhelper isreadonly see java awt event key listener key pressed java awt event key event public void key pressed key event ke required for key listener interface but not used keylistener keypressed keyevent keypressed keyevent keylistener see java awt event key listener key released java awt event key event public void key released key event ke required for key listener interface but not used keylistener keyreleased keyevent keyreleased keyevent keylistener public void key typed key event ke if ke is consumed is read only name fig null can edit name fig name fig key typed ke keytyped keyevent isconsumed isreadonly namefig canedit namefig namefig keytyped rerenders the attached elements of the fig p warning the purpose of this function is not to redraw the whole fig every time something changes that would be inefficient p instead this function should only be called for major changes that require a complete redraw such as change of owner and change of notation language p overrule this function for subclasses that add extra or remove graphical parts public void rendering changed todo this needs to use a different method than that used by the constructor if it wants to allow the method to be overridden init notation providers get owner update name text update stereotype text damage renderingchanged initnotationproviders getowner updatenametext updatestereotypetext this is called after any part of the uml model element has changed this method automatically updates the name fig text subclasses should override and update other parts param e the event protected void model changed property change event e if e instanceof delete instance event no need to update if model element went away return if e instanceof association change event e instanceof attribute change event if notation provider name null notation provider name update listener this get owner e update name text update listeners get owner get owner update attached node figures todo presumably this should only happen on a add or remove event determine fig nodes modelelement figtext modelchanged propertychangeevent deleteinstanceevent associationchangeevent attributechangeevent notationprovidername notationprovidername updatelistener getowner updatenametext updatelisteners getowner getowner determinefignodes generate the notation for the modelelement and stuff it into the text fig protected void update name text if get owner null return if notation provider name null string name str notation provider name to string get owner get notation settings name fig set text name str update font calc bounds set bounds get bounds updatenametext getowner notationprovidername namestr notationprovidername tostring getowner getnotationsettings namefig settext namestr updatefont calcbounds setbounds getbounds generate the notation for the stereotype and stuff it into the text fig protected void update stereotype text if get owner null return object model element get owner stereotype fig populate updatestereotypetext getowner modelelement getowner stereotypefig this method should only be called once for any one fig instance that represents a model element ie not for a fig edge note it is called either by the constructor that takes a model element as an argument or it is called by pgml stack parser after it has created the fig by use of the empty constructor p the assigned model element owner must not change during the lifetime of the fig param owner the model element that this fig represents throws illegal argument exception if the owner given is not a model element see org tigris gef presentation fig set owner java lang object deprecated for 0 27 3 by tfmorris owner must be specified in the constructor and can t be changed afterwards deprecated override public void set owner object owner if owner null throw new illegal argument exception an owner must be supplied if get owner null throw new illegal state exception the owner cannot be changed once set if model get facade isauml element owner throw new illegal argument exception the owner must be a model element got a owner get class get name super set owner owner name fig set owner owner for setting abstract if edge port null edge port set owner get owner stereotype fig set owner owner this fixes issue 5414 init notation providers owner update listeners null owner todo the following is redundant it s done when set layer is called after initialization complete rendering changed figedgenote pgmlstackparser illegalargumentexception setowner setowner illegalargumentexception getowner illegalstateexception getfacade isaumlelement illegalargumentexception getclass getname setowner namefig setowner edgeport edgeport setowner getowner stereotypefig setowner initnotationproviders updatelisteners setlayer renderingchanged replace the notation provider s p this method shall not be used for the initial creation of notation providers but only for replacing them when required initialization must be done in the constructor using methods which can t be overridden p notation providers can not be updated they are lightweight throw away objects hence this method creates a new notation provider whenever needed e g when the notation language is changed by the user then the n ps are to be re created so this method shall not be called from a fig constructor p after the removal of the deprecated method set owner this method shall contain the following statement assert notation provider name null param own the current owner protected void init notation providers object own if notation provider name null notation provider name clean listener this own this should not be looking for a named element since this is not always about the name of this modelelement alone if model get facade isa model element own notation name notation notation find notation get notation settings get notation language notation provider name notation provider factory2 get instance get notation provider get notation provider type own this notation notationprovider notationproviders notationprovider nps setowner notationprovidername initnotationproviders notationprovidername notationprovidername cleanlistener namedelement getfacade isamodelelement notationname findnotation getnotationsettings getnotationlanguage notationprovidername notationproviderfactory2 getinstance getnotationprovider getnotationprovidertype overrule this for subclasses that need a different notation provider return the type of the notation provider protected int get notation provider type return notation provider factory2 type name notationprovider getnotationprovidertype notationproviderfactory2 type_name implementations of this method should register unregister the fig for all model events that may cause a repaint to be necessary in the simplest case the fig should register itself as listening to all events fired by only the owner p but for for example for a fig link the fig must also register for events fired by the association of the owner because the name of the association is shown not the name of the link p in other cases there is no need to register for any event e g when a notation provider is used p this function is called in 2 places at creation load time of this fig i e when the owner changes and in some cases by the model changed function i e when the model changes p this function shall always register for the remove event of the owner otherwise the fig will not be deleted when the owner gets deleted p if this method is called with both the old owner and the new owner equal and not null and we listen only to the owner itself then we can safely ignore the call but else we need to update the listeners of the related elements since the related elements may have been replaced param new owner the new owner for the listeners or null if all listeners have to be removed param old owner the previous owner or null if there was none and all listeners have to be set protected void update listeners object old owner object new owner set object l new hash set object if new owner null l add new object new owner remove update element listeners l figlink notationprovider modelchanged oldowner newowner newowner oldowner updatelisteners oldowner newowner hashset newowner newowner updateelementlisteners override public void set layer layer lay super set layer lay get fig set layer lay todo workaround for gef redraw problem force all child figs into the same layer for fig f list fig get path item figs f set layer lay setlayer setlayer getfig setlayer getpathitemfigs setlayer override public void delete from model object own get owner if own null get project move to trash own todo mvw why is this not done in gef iterator it get path item figs iterator while it has next fig it next delete from model super delete from model deletefrommodel getowner getproject movetotrash getpathitemfigs hasnext deletefrommodel deletefrommodel see org argouml application events argo notation event listener notation changed org argouml application events argo notation event deprecated for 0 27 2 by tfmorris changes to notation provider are now handled by the owning diagram deprecated public void notation changed argo notation event event if get owner null return rendering changed argonotationeventlistener notationchanged argonotationevent notationchanged argonotationevent getowner renderingchanged see org argouml application events argo notation event listener notation added org argouml application events argo notation event deprecated for 0 27 2 by tfmorris deprecated public void notation added argo notation event event default implementation is to do nothing argonotationeventlistener notationadded argonotationevent notationadded argonotationevent see org argouml application events argo notation event listener notation removed org argouml application events argo notation event deprecated for 0 27 2 by tfmorris deprecated public void notation removed argo notation event event default implementation is to do nothing argonotationeventlistener notationremoved argonotationevent notationremoved argonotationevent see org argouml application events argo notation event listener notation provider added org argouml application events argo notation event deprecated for 0 27 2 by tfmorris deprecated public void notation provider added argo notation event event default implementation is to do nothing argonotationeventlistener notationprovideradded argonotationevent notationprovideradded argonotationevent see org argouml application events argo notation event listener notation provider removed org argouml application events argo notation event deprecated for 0 27 2 by tfmorris deprecated public void notation provider removed argo notation event event default implementation is to do nothing argonotationeventlistener notationproviderremoved argonotationevent notationproviderremoved argonotationevent override public boolean hit rectangle r check if labels etc have been hit apparently gef does require path items to be annotations which ours aren t so until that is resolved iterator it get path item figs iterator while it has next fig f fig it next if f hit r return true return super hit r pathitems getpathitemfigs hasnext override public final void remove from diagram fig delegate get remove delegate todo dependency cycle between fig node model element and fig edgeme is this needed if so introduce a removable interface to decouple if delegate instanceof fig node model element fig node model element delegate remove from diagram impl else if delegate instanceof fig edge model element fig edge model element delegate remove from diagram impl else if delegate null remove from diagram impl removefromdiagram getremovedelegate fignodemodelelement figedgeme fignodemodelelement fignodemodelelement removefromdiagramimpl figedgemodelelement figedgemodelelement removefromdiagramimpl removefromdiagramimpl subclasses should override this to redirect a remove request from one fig to another e g fig edge association class uses this to delegate the remove to its attached fig association class return the fig handling the remove protected fig get remove delegate return this figedgeassociationclass figassociationclass getremovedelegate protected void remove from diagram impl object o get owner if o null remove element listener o if notation provider name null notation provider name clean listener this get owner todo mvw why is this not done in gef iterator it get path item figs iterator while it has next fig fig fig it next fig remove from diagram super remove from diagram damage removefromdiagramimpl getowner removeelementlistener notationprovidername notationprovidername cleanlistener getowner getpathitemfigs hasnext removefromdiagram removefromdiagram protected void super remove from diagram super remove from diagram superremovefromdiagram removefromdiagram override public void damage super damage get fig damage getfig p determines if the fig edge is currently connected to the correct fig nodes if not the edges is the correct fig nodes set and the edge rerouted p typically this is used when a user has amended from the property panel a relationship from one model element to another and the graph needs to react to that change p e g if the participant of an association end is changed p calls a helper method layout this to self to avoid this edge disappearing if the new source and dest are the same node return boolean whether or not the update was sucessful protected boolean determine fig nodes object owner get owner if owner null log error the fig edge has no owner return false if get layer null log error the fig edge has no layer return false object new source get source object new dest get destination fig current source fig get source fig node fig current dest fig get dest fig node object current source null object current destination null if current source fig null current dest fig null current source current source fig get owner current destination current dest fig get owner if new source current source new dest current destination fig new source fig get no edge presentation for new source fig new dest fig get no edge presentation for new dest if new source fig current source fig set source fig node fig node new source fig set source port fig new source fig if new dest fig current dest fig set dest fig node fig node new dest fig set dest port fig new dest fig fig node new source fig update edges fig node new dest fig update edges calc bounds adapted from selectionw buttons from line 280 calls a helper method to avoid this edge disappearing if the new source and dest are the same node if new source fig new dest fig layout this to self return true figedge fignodes fignodes layoutthistoself determinefignodes getowner figedge getlayer figedge newsource getsource newdest getdestination currentsourcefig getsourcefignode currentdestfig getdestfignode currentsource currentdestination currentsourcefig currentdestfig currentsource currentsourcefig getowner currentdestination currentdestfig getowner newsource currentsource newdest currentdestination newsourcefig getnoedgepresentationfor newsource newdestfig getnoedgepresentationfor newdest newsourcefig currentsourcefig setsourcefignode fignode newsourcefig setsourceportfig newsourcefig newdestfig currentdestfig setdestfignode fignode newdestfig setdestportfig newdestfig fignode newsourcefig updateedges fignode newdestfig updateedges calcbounds selectionwbuttons newsourcefig newdestfig layoutthistoself a version of gef s presentation for method which param element model element to return presentation for return the fig representing the presentation private fig get no edge presentation for object element if element null throw new illegal argument exception can t search for a null owner list contents pgml utility get contents no edges get layer int fig count contents size for int fig index 0 fig index fig count fig index fig fig fig contents get fig index if fig get owner element return fig throw new illegal state exception can t find a fig node representing model get facade get name element presentationfor modelelement getnoedgepresentationfor illegalargumentexception pgmlutility getcontentsnoedges getlayer figcount figindex figindex figcount figindex figindex getowner illegalstateexception fignode getfacade getname helper method for update classifiers in order to automatically layout an edge that is now from and to the same node type p adapted from selectionw buttons from line 280 private void layout this to self fig poly edge shape new fig poly newfc content point fc center new point get source fig node getx 2 get source fig node gety 2 point center right new point int fc center x get source fig node get size get width 2 fc center y int yoffset int get source fig node get size get height 2 edge shape add point fc center x fc center y edge shape add point center right x center right y edge shape add point center right x 30 center right y edge shape add point center right x 30 center right y yoffset edge shape add point center right x center right y yoffset place the edge on the layer and update the diagram this set between nearest points true edge shape set line color line color edge shape set filled false edge shape set complete true this set fig edge shape updateclassifiers selectionwbuttons layoutthistoself figpoly edgeshape figpoly _content fccenter getsourcefignode getsourcefignode centerright fccenter getsourcefignode getsize getwidth fccenter getsourcefignode getsize getheight edgeshape addpoint fccenter fccenter edgeshape addpoint centerright centerright edgeshape addpoint centerright centerright edgeshape addpoint centerright centerright edgeshape addpoint centerright centerright setbetweennearestpoints edgeshape setlinecolor line_color edgeshape setfilled edgeshape setcomplete setfig edgeshape returns the source of the edge the source is the owner of the node the edge travels from in a binary relationship for instance for a classifierrole this is the sender return a model element protected object get source object owner get owner if owner null return model get core helper get source owner return null getsource getowner getcorehelper getsource returns the destination of the edge the destination is the owner of the node the edge travels to in a binary relationship for instance for a classifierrole this is the receiver return a model element protected object get destination object owner get owner if owner null return model get core helper get destination owner return null getdestination getowner getcorehelper getdestination param allowed true if the function remove from diagram is allowed protected void allow remove from diagram boolean allowed this remove from diagram allowed removefromdiagram allowremovefromdiagram removefromdiagram set the associated diagram interchange element param element the element to be associated with this fig public void set di element di element element this di element element setdielement dielement dielement return the diagram interchange element associated with this fig public di element get di element return di element dielement getdielement dielement return returns the popup add offset protected static int get popup add offset return popup add offset popupaddoffset getpopupaddoffset popupaddoffset add an element listener and remember the registration param element element to listen for changes on see org argouml model model event pump add model event listener property change listener object string protected void add element listener object element listeners add new object element null model get pump add model event listener this element modeleventpump addmodeleventlistener propertychangelistener addelementlistener getpump addmodeleventlistener add a listener and remember the registration param element element to listen for changes on param property name of property to listen for changes of see org argouml model model event pump add model event listener property change listener object string protected void add element listener object element string property listeners add new object element property model get pump add model event listener this element property modeleventpump addmodeleventlistener propertychangelistener addelementlistener getpump addmodeleventlistener add a listener and remember the registration param element element to listen for changes on param property array of property names strings to listen for changes of see org argouml model model event pump add model event listener property change listener object string protected void add element listener object element string property listeners add new object element property model get pump add model event listener this element property modeleventpump addmodeleventlistener propertychangelistener addelementlistener getpump addmodeleventlistener add an element listener and remember the registration param element element to listen for changes on see org argouml model model event pump add model event listener property change listener object string protected void remove element listener object element listeners remove new object element null model get pump remove model event listener this element modeleventpump addmodeleventlistener propertychangelistener removeelementlistener getpump removemodeleventlistener unregister all listeners registered through add element listener see add element listener object string protected void remove all element listeners remove element listeners listeners addelementlistener addelementlistener removeallelementlisteners removeelementlisteners private void remove element listeners set object listener set for object listener listener set object property listener 1 if property null model get pump remove model event listener this listener 0 else if property instanceof string model get pump remove model event listener this listener 0 string property else if property instanceof string model get pump remove model event listener this listener 0 string property else throw new runtime exception internal error in remove all element listeners listeners remove all listener set removeelementlisteners listenerset listenerset getpump removemodeleventlistener getpump removemodeleventlistener getpump removemodeleventlistener runtimeexception removeallelementlisteners removeall listenerset private void add element listeners set object listener set for object listener listener set object property listener 1 if property null add element listener listener 0 else if property instanceof string add element listener listener 0 string property else if property instanceof string add element listener listener 0 string property else throw new runtime exception internal error in add element listeners addelementlisteners listenerset listenerset addelementlistener addelementlistener addelementlistener runtimeexception addelementlisteners update the set of registered listeners to match the given set using a minimal update strategy to remove unneeded listeners and add new listeners param listener set a set of arrays containing a tuple of a uml element to be listened to and a set of property to be listened for protected void update element listeners set object listener set set object removes new hash set object listeners removes remove all listener set remove element listeners removes set object adds new hash set object listener set adds remove all listeners add element listeners adds listenerset updateelementlisteners listenerset hashset removeall listenerset removeelementlisteners hashset listenerset removeall addelementlisteners return the current notation arguments or null if none have been set deprecated for 0 27 3 by tfmorris use link get notation settings deprecated protected hash map string object get notation arguments return np arguments getnotationsettings hashmap getnotationarguments nparguments param key param element deprecated for 0 27 3 by tfmorris use link get notation settings deprecated protected void put notation argument string key object element if notation provider name null lazily initialize if not done yet if np arguments null np arguments new hash map string object np arguments put key element getnotationsettings putnotationargument notationprovidername nparguments nparguments hashmap nparguments this optional method is not implemented it will throw an link unsupported operation exception if used figs are added to a graph model which is in turn owned by a project param project the project deprecated suppress warnings deprecation deprecated public void set project project project throw new unsupported operation exception unsupportedoperationexception graphmodel suppresswarnings setproject unsupportedoperationexception deprecated for 0 27 2 by tfmorris implementations should have all the information that they require in the diagram settings object return the owning project see org argouml uml diagram ui argo fig get project deprecated public project get project return argo fig util get project this diagramsettings argofig getproject getproject argofigutil getproject handles diagram font changing param e the event see org argouml application events argo diagram appearance event listener diagram font changed org argouml application events argo diagram appearance event deprecated for 0 27 2 by tfmorris global rendering changes are now managed at the diagram level deprecated public void diagram font changed argo diagram appearance event e update font calc bounds todo does this help redraw argodiagramappearanceeventlistener diagramfontchanged argodiagramappearanceevent diagramfontchanged argodiagramappearanceevent updatefont calcbounds this function should for all fig texts recalculate the font style plain bold italic bold italic and apply it by calling fig text set font protected void update font int style get name fig font style font f get settings get font style name fig set font f deep update font this figtexts figtext setfont updatefont getnamefigfontstyle getsettings getfont namefig setfont deepupdatefont determines the font style based on the uml model overrule this in figs that have to show bold or italic based on the uml model they represent e g abstract classes show their name in italic return the font style for the name fig protected int get name fig font style return font plain namefig getnamefigfontstyle private void deep update font fig edge fe font f get settings get font font plain for object path fig fe get path item figs deep update font recursive f path fig fe calc bounds deepupdatefont figedge getsettings getfont pathfig getpathitemfigs deepupdatefontrecursive pathfig calcbounds changes the font for all figs contained in the given fig group p todo in fact there is a design error in this method e g for a class if the name is italic since the class is abstract then the classes features should be in plain font this problem can be fixed by implementing the update font method in all subclasses param fg the fig group to change the font of private void deep update font recursive font f object path fig if path fig instanceof argo fig text argo fig text path fig update font else if path fig instanceof fig text fig text path fig set font f else if path fig instanceof fig group for object fge fig group path fig get figs deep update font recursive f fge figgroup updatefont figgroup deepupdatefontrecursive pathfig pathfig argofigtext argofigtext pathfig updatefont pathfig figtext figtext pathfig setfont pathfig figgroup figgroup pathfig getfigs deepupdatefontrecursive public diagram settings get settings todo this is a temporary crutch to use until all figs are updated to use the constructor that accepts a diagram settings object if settings null log debug falling back to project wide settings project p get project if p null return p get project settings get default diagram settings return settings diagramsettings getsettings diagramsettings getproject getprojectsettings getdefaultdiagramsettings public void set settings diagram settings render settings settings render settings rendering changed setsettings diagramsettings rendersettings rendersettings renderingchanged return the current notation settings protected notation settings get notation settings return get settings get notation settings notationsettings getnotationsettings getsettings getnotationsettings public void set line color color c super set line color c setlinecolor setlinecolor public void set fig fig f super set fig f gef sets a different fig than the one that we had at construction time so we need to set its color and width f set line color get line color f set line width get line width setfig setfig setlinecolor getlinecolor setlinewidth getlinewidth the constructor public action add message super translator localize action add message resource loader wrapper lookup icon action add message set the tooltip string put value action short description translator localize action add message actionaddmessage resourceloaderwrapper lookupicon putvalue short_description public static action add message get target follower if target follower null target follower new action add message target manager get instance add target listener new target listener public void target added target event e set target public void target removed target event e set target public void target set target event e set target private void set target target follower set enabled target follower should be enabled target follower set enabled target follower should be enabled return target follower actionaddmessage gettargetfollower targetfollower targetfollower actionaddmessage targetmanager getinstance addtargetlistener targetlistener targetadded targetevent settarget targetremoved targetevent settarget targetset targetevent settarget settarget targetfollower setenabled targetfollower shouldbeenabled targetfollower setenabled targetfollower shouldbeenabled targetfollower target follower new action add message target manager get instance add target listener new target listener public void target added target event e set target targetfollower actionaddmessage targetmanager getinstance addtargetlistener targetlistener targetadded targetevent settarget set target public void target removed target event e set target settarget targetremoved targetevent settarget public void target set target event e set target targetset targetevent settarget set target private void set target target follower set enabled target follower should be enabled settarget settarget targetfollower setenabled targetfollower shouldbeenabled public void action performed action event ae super action performed ae object target target manager get instance get model target if model get facade isa association role target model get facade isa collaboration model get facade get namespace target return so the target is a m association role this add message target actionperformed actionevent actionperformed targetmanager getinstance getmodeltarget getfacade isaassociationrole getfacade isacollaboration getfacade getnamespace massociationrole addmessage add a message to an association role it builds it using the factory method and then it creates the fig and adds it to the diagram param associationrole the association role to which the new message must be added private void add message object associationrole object collaboration model get facade get namespace associationrole object message model get collaborations factory build message collaboration associationrole editor e globals cur editor graph model gm e get graph model layer lay e get layer manager get active layer graph node renderer gr e get graph node renderer fig node fig msg gr get fig node for gm lay message null fig message fig msg add path item to fig association role lay gm get nodes add message mvw this is not the correct way but it allows connecting a comment edge to it see e g action add note for the correct way testcase 1 select the message 2 click the comment tool target manager get instance set target message associationrole associationrole addmessage getfacade getnamespace getcollaborationsfactory buildmessage cureditor graphmodel getgraphmodel getlayermanager getactivelayer graphnoderenderer getgraphnoderenderer fignode figmsg getfignodefor figmessage figmsg addpathitemtofigassociationrole getnodes commentedge actionaddnote targetmanager getinstance settarget see org tigris gef undo undoable action is enabled public boolean should be enabled object target target manager get instance get model target return model get facade isa association role target undoableaction isenabled shouldbeenabled targetmanager getinstance getmodeltarget getfacade isaassociationrole construct a new selection node clarifiers for the given fig param f the given fig public selection node clarifiers2 fig f super f selectionnodeclarifiers selectionnodeclarifiers2 override public void paint graphics g final mode top mode globals cur editor get mode manager top if top mode instanceof mode place if the user has selected mode place either by a diagram tool or add to diagram then we don t want to show the clarifiers clarifiable get content paint clarifiers g super paint g topmode cureditor getmodemanager topmode modeplace modeplace addtodiagram getcontent paintclarifiers public final void paint buttons graphics g final mode top mode globals cur editor get mode manager top if top mode instanceof mode place if the user has selected mode place either by a diagram tool or add to diagram then we don t want to show the toolbelt items icon icons get icons if icons null return int cx get content getx int cy get content gety int cw get content get width int ch get content get height if icons 0 null paint button above icons 0 g cx cw 2 cy offset top if icons 1 null paint button below icons 1 g cx cw 2 cy ch offset bottom if icons 2 null paint button left icons 2 g cx offset cy ch 2 left if icons 3 null paint button right icons 3 g cx cw offset cy ch 2 right if icons 4 null paint button left icons 4 g cx offset cy ch lower left paintbuttons topmode cureditor getmodemanager topmode modeplace modeplace addtodiagram geticons getcontent getcontent getcontent getwidth getcontent getheight paintbuttonabove paintbuttonbelow paintbuttonleft paintbuttonright paintbuttonleft lower_left see org tigris gef base selection buttons get new node int protected object get new node int arg0 return null selectionbuttons getnewnode getnewnode compute handle selection if any from cursor location param cursor cursor point represented by a 0 size rectangle param h handle in which to return selected handle information output parameter a handle index of 1 indicates that the cursor is not over any handle if gef had any api documentation you could see the following see org tigris gef base selection resize hit handle java awt rectangle org tigris gef presentation handle public void hit handle rectangle cursor handle h super hit handle cursor h if h index 1 super implementation found a hit return if is paint buttons return icon icons get icons if icons null return editor ce globals cur editor selection manager sm ce get selection manager if sm size 1 return mode manager mm ce get mode manager if mm includes mode modify class get pressed button 1 return int cx get content getx int cy get content gety int cw get content get width int ch get content get height crazy numbering scheme at work here here s how the handle numbers are laid out values 0 7 are defined by gef and go left to right top to bottom ie not clockwise or counterclockwise values 10 14 zigzag north south west east southwest if you can correctly guess where 15 will go you should buy a lottery ticket immediately pre 10 0 1 2 12 3 4 13 14 5 6 7 11 pre if icons 0 null hit above cx cw 2 cy icons 0 get icon width icons 0 get icon height cursor h index top else if icons 1 null hit below cx cw 2 cy ch icons 1 get icon width icons 1 get icon height cursor h index bottom else if icons 2 null hit left cx cy ch 2 icons 2 get icon width icons 2 get icon height cursor h index left else if icons 3 null hit right cx cw cy ch 2 icons 3 get icon width icons 3 get icon height cursor h index right else if icons 4 null hit left cx cy ch icons 4 get icon width icons 4 get icon height cursor h index lower left else h index 1 if h index 1 h instructions get instructions 15 else h instructions get instructions h index selectionresize hithandle hithandle hithandle ispaintbuttons geticons cureditor selectionmanager getselectionmanager modemanager getmodemanager modemodify getpressedbutton getcontent getcontent getcontent getwidth getcontent getheight hitabove geticonwidth geticonheight hitbelow geticonwidth geticonheight hitleft geticonwidth geticonheight hitright geticonwidth geticonheight hitleft geticonwidth geticonheight lower_left getinstructions getinstructions public void drag handle int mx int my int anx int any handle hand don t allow drag outside of bounds of diagram mx math max mx 0 my math max my 0 if hand index 10 set paint buttons false super drag handle mx my anx any hand return if is draggable handle hand index return int cx get content getx cy get content gety int cw get content get width ch get content get height int bx mx by my remember what handle was clicked for the case where the drag is released over empty space button hand index switch hand index case top by cy bx cx cw 2 break case bottom by cy ch bx cx cw 2 break case left by cy ch 2 bx cx break case right by cy ch 2 bx cx cw break case lower left by cy ch bx cx break default log warn invalid handle number break object node type get new node type hand index object edge type get new edge type hand index boolean reverse is reverse edge hand index if edge type null node type null editor ce globals cur editor mode create edge and node m new mode create edge and node ce edge type is edge post process requested this m setup fig node get content get content get owner bx by reverse ce push mode m draghandle setpaintbuttons draghandle isdraggablehandle getcontent getcontent getcontent getwidth getcontent getheight lower_left nodetype getnewnodetype edgetype getnewedgetype isreverseedge edgetype nodetype cureditor modecreateedgeandnode modecreateedgeandnode edgetype isedgepostprocessrequested fignode getcontent getcontent getowner pushmode override public void button clicked int button code super button clicked button code buttonclicked buttoncode buttonclicked buttoncode protected object create edge above mutable graph model gm object new node return create edge gm new node top createedgeabove mutablegraphmodel newnode createedge newnode protected object create edge under mutable graph model gm object new node return create edge gm new node bottom createedgeunder mutablegraphmodel newnode createedge newnode protected object create edge left mutable graph model gm object new node return create edge gm new node left createedgeleft mutablegraphmodel newnode createedge newnode protected object create edge right mutable graph model gm object new node return create edge gm new node right createedgeright mutablegraphmodel newnode createedge newnode private object create edge mutable graph model gm object new node int index object edge if is reverse edge index edge gm connect new node get content get owner get new edge type index else edge gm connect get content get owner new node get new edge type index return edge createedge mutablegraphmodel newnode isreverseedge newnode getcontent getowner getnewedgetype getcontent getowner newnode getnewedgetype protected object create edge to self mutable graph model gm object edge gm connect get content get owner get content get owner get new edge type lower left return edge createedgetoself mutablegraphmodel getcontent getowner getcontent getowner getnewedgetype lower_left get array of icons to use when drawing handles return icon or null get the instructions string to pass to gef for the given handle number param index handle number that is being dragged from return string or null get the node type to create when dragging from the given handle number param index handle number that is being dragged from return metatype for model element null to disallow drag get the edge type to create when dragging from the given handle number param index handle number that is being dragged from return metatype for model element null to disallow drag get the node type to create when dragging from the given handle number param index handle number that is being dragged from return true to reverse direction of assocation from direction of drag eg specialization instead of generalization default implementation always returns false protected boolean is reverse edge int index return false isreverseedge get the draggability of a particular handle default implementation always returns true override to return false for handles which shouldn t be draggable i e they only support clicks not drags param index handle index to check draggability for return true if this handle is draggable false otherwise protected boolean is draggable handle int index return true isdraggablehandle request post processing of edge by gef after it is created using link mode create edge and node mode create edge and node editor object object boolean return true if postprocessing requested protected boolean is edge post process requested return false modecreateedgeandnode modecreateedgeandnode isedgepostprocessrequested return index of last button handle that was clicked protected int get button return button getbutton default constructor param icon the icon param str the default name todo define a constructor that takes diagram settings public fig profile icon image icon string str image new fig image 0 0 icon label new fig single line text 0 image get height gap 0 0 true label set text str label calc bounds add fig image add fig label image set resizable false image set locked true figprofileicon figimage figsinglelinetext getheight settext calcbounds addfig addfig setresizable setlocked override protected void set bounds impl int x int y int w int h int width math max image get width label get width image set location x width image get width 2 y label set location x width label get width 2 y image get height gap calc bounds update edges setboundsimpl getwidth getwidth setlocation getwidth setlocation getwidth getheight calcbounds updateedges return the fig text that contains the icon name public fig text get label fig return label figtext figtext getlabelfig return the label of the label fig public string get label return label get text getlabel gettext sets the label and updates the figure bounds param txt the label to set public void set label string txt this label set text txt this label calc bounds this calc bounds setlabel settext calcbounds calcbounds override protected void end attached fig edge fe layer lay editor get layer manager get active layer fig association class this fig fig association class lay presentation for get new edge build parts editor this fig lay endattached figedge getlayermanager getactivelayer figassociationclass thisfig figassociationclass presentationfor getnewedge buildparts thisfig build the complex representation of an association class in the active layer of the current editor this is a convenience function which is used when the pseudo edge is added to a diagram via drag and drop or by using the add to diagram menu item param editor the gef editor param element the model element public static void build in active layer editor editor object element layer layer editor get layer manager get active layer fig association class this fig fig association class layer presentation for element if this fig null build parts editor this fig layer associationclass buildinactivelayer getlayermanager getactivelayer figassociationclass thisfig figassociationclass presentationfor thisfig buildparts thisfig private static void build parts editor editor fig association class this fig layer lay this fig remove path item this fig get middle group mutable graph model mutable graph model mutable graph model editor get graph model mutable graph model add node this fig get owner todo this can t depend on project browser it needs to get the current drawing area from the diagram subsystem or gef rectangle drawing area project browser get instance get editor pane get bounds perhaps something like the following would workd if not then traverse up the component hierarchy to a mult editor pane rectangle drawing area globals cur editor getj component get visible rect this fig make edge port fig edge port tee this fig get edge port this fig calc bounds int x tee getx int y tee gety diagram settings settings argo diagram layer perspective lay get diagram get diagram settings log info creating class box for association class fig class association class fig node new fig class association class this fig get owner new rectangle x y 0 0 settings y y distance if y 0 y tee gety fig node get height distance if x fig node get width drawing area get width x tee getx distance fig node set location x y lay add fig node fig edge association class dashed edge new fig edge association class fig node this fig settings lay add dashed edge dashed edge damage fig node damage buildparts figassociationclass thisfig thisfig removepathitem thisfig getmiddlegroup mutablegraphmodel mutablegraphmodel mutablegraphmodel getgraphmodel mutablegraphmodel addnode thisfig getowner projectbrowser drawingarea projectbrowser getinstance geteditorpane getbounds multeditorpane drawingarea cureditor getjcomponent getvisiblerect thisfig makeedgeport figedgeport thisfig getedgeport thisfig calcbounds diagramsettings argodiagram layerperspective getdiagram getdiagramsettings figclassassociationclass fignode figclassassociationclass thisfig getowner fignode getheight fignode getwidth drawingarea getwidth fignode setlocation fignode figedgeassociationclass dashededge figedgeassociationclass fignode thisfig dashededge dashededge fignode constructor public action add concurrent region super translator localize action add concurrent region resource loader wrapper lookup icon action add concurrent region set the tooltip string put value action short description translator localize action add concurrent region actionaddconcurrentregion resourceloaderwrapper lookupicon putvalue short_description public boolean is enabled object target target manager get instance get model target if model get state machines helper is top state target return false return target manager get instance get model targets size 2 isenabled targetmanager getinstance getmodeltarget getstatemachineshelper istopstate targetmanager getinstance getmodeltargets public void action performed action event ae super action performed ae try here the actions to divide a region fig f target manager get instance get fig target if model get facade isa concurrent region f get owner f f get enclosing fig final fig composite state fig composite state fig composite state f final list fig concurrent region region figs list fig concurrent region f get enclosed figs clone final object uml composite state fig composite state get owner editor editor globals cur editor graph model gm editor get graph model layer diagram lay layer diagram editor get layer manager get active layer rectangle r name fig node model element f get name fig get bounds rectangle r fig f get bounds if gm instanceof mutable graph model return state diagram graph model mgm state diagram graph model gm final state machines factory factory model get state machines factory if model get facade is concurrent uml composite state final object uml region1 factory build composite state uml composite state rectangle bounds new rectangle f getx fig concurrent region inset horz f gety r name height fig concurrent region inset vert r fig width 2 fig concurrent region inset horz r fig height r name height 2 fig concurrent region inset vert diagram settings settings fig composite state get settings final fig concurrent region first region fig new fig concurrent region uml region1 bounds settings the 1st region has an invisible divider line the box is always invisible first region fig set line color argo fig invisible line color first region fig set enclosing fig fig composite state first region fig set layer lay lay add first region fig if mgm can add node uml region1 mgm get nodes add uml region1 mgm fire node added uml region1 throw out any previous elements that were enclosed but are not a concurrent region let s move them onto the first region if region figs is empty for int i 0 i region figs size i fig state vertex cur fig region figs get i cur fig set enclosing fig first region fig first region fig add enclosed fig cur fig cur fig redraw enclosed figs final object uml region2 factory build composite state uml composite state todo what are these magic numbers rectangle bounds new rectangle f getx fig concurrent region inset horz f gety r fig height 1 linewidth r fig width 2 fig concurrent region inset horz 126 diagram settings settings fig composite state get settings final fig concurrent region new region fig new fig concurrent region uml region2 bounds settings the divider line should be visible so no need to change its color make the composite state 1 region higher fig composite state set composite state height r fig height new region fig get initial height new region fig set enclosing fig fig composite state fig composite state add enclosed fig new region fig new region fig set layer lay lay add new region fig editor get selection manager select f if mgm can add node uml region2 mgm get nodes add uml region2 mgm fire node added uml region2 todo verify this iiuc then this triggers the compount state fig to draw itself correctly hence there was a reason to wait this long to make the state concurrent model get state machines helper set concurrent uml composite state true catch exception ex log error exception caught ex actionperformed actionevent actionperformed targetmanager getinstance getfigtarget getfacade isaconcurrentregion getowner getenclosingfig figcompositestate figcompositestate figcompositestate figconcurrentregion regionfigs figconcurrentregion getenclosedfigs umlcompositestate figcompositestate getowner cureditor graphmodel getgraphmodel layerdiagram layerdiagram getlayermanager getactivelayer rname fignodemodelelement getnamefig getbounds rfig getbounds mutablegraphmodel statediagramgraphmodel statediagramgraphmodel statemachinesfactory getstatemachinesfactory getfacade isconcurrent umlcompositestate umlregion1 buildcompositestate umlcompositestate figconcurrentregion inset_horz rname figconcurrentregion inset_vert rfig figconcurrentregion inset_horz rfig rname figconcurrentregion inset_vert diagramsettings figcompositestate getsettings figconcurrentregion firstregionfig figconcurrentregion umlregion1 firstregionfig setlinecolor argofig invisible_line_color firstregionfig setenclosingfig figcompositestate firstregionfig setlayer firstregionfig canaddnode umlregion1 getnodes umlregion1 firenodeadded umlregion1 regionfigs isempty regionfigs figstatevertex curfig regionfigs curfig setenclosingfig firstregionfig firstregionfig addenclosedfig curfig curfig redrawenclosedfigs umlregion2 buildcompositestate umlcompositestate figconcurrentregion inset_horz rfig rfig figconcurrentregion inset_horz diagramsettings figcompositestate getsettings figconcurrentregion newregionfig figconcurrentregion umlregion2 figcompositestate setcompositestateheight rfig newregionfig getinitialheight newregionfig setenclosingfig figcompositestate figcompositestate addenclosedfig newregionfig newregionfig setlayer newregionfig getselectionmanager canaddnode umlregion2 getnodes umlregion2 firenodeadded umlregion2 compountstatefig getstatemachineshelper setconcurrent umlcompositestate the main constructor param node the uml package param x the x coordinate of the location param y the y coordinate of the location deprecated for 0 27 3 by tfmorris use link fig package object rectangle diagram settings suppress warnings deprecation deprecated public fig package object node int x int y create a body that reacts to double clicks and jumps to a diagram body new fig package fig text 0 texth width height texth set owner node initialize set location x y figpackage diagramsettings suppresswarnings figpackage figpackagefigtext setowner setlocation private void initialize body set editable false set big port new package port fig rect 0 0 width height indentx tab height get name fig set bounds 0 0 width indentx texth 2 get name fig set justification fig text justify left get big port set filled false get big port set line width 0 set properties of the stereotype box initially not set to be displayed but this will be changed when we try to render it if we find we have a stereotype get stereotype fig set visible false add figs to the fig node in back to front order add fig get big port add fig get name fig add fig get stereotype fig add fig body set blink ports false make port invisible unless mouse enters make all the parts match the main fig set filled true set fill color fill color set line color line color set line width line width update edges seteditable setbigport packageportfigrect tabheight getnamefig setbounds getnamefig setjustification figtext justify_left getbigport setfilled getbigport setlinewidth getstereotypefig setvisible fignode addfig getbigport addfig getnamefig addfig getstereotypefig addfig setblinkports setfilled setfillcolor fill_color setlinecolor line_color setlinewidth line_width updateedges constructor that hooks the fig into the uml element param gm ignored param node the uml element deprecated for 0 27 3 by tfmorris use link fig package object rectangle diagram settings deprecated public fig package suppress warnings unused graph model gm object node this node 0 0 figpackage diagramsettings figpackage suppresswarnings graphmodel construct a package figure with the given owner bounds and rendering settings this constructor is used by the pgml parser param owner owning model element param bounds position and size or null if fig hasn t been placed param settings rendering settings public fig package object owner rectangle bounds diagram settings settings super owner bounds settings create a body that reacts to double clicks and jumps to a diagram body new fig package fig text get owner new rectangle 0 texth width height texth get settings initialize if bounds null set location bounds x bounds y set bounds get bounds figpackage diagramsettings figpackagefigtext getowner getsettings setlocation setbounds getbounds override public object clone fig package fig clone fig package super clone for fig this fig list fig get figs if this fig body fig clone body fig text this fig return fig clone figpackage figclone figpackage thisfig getfigs thisfig figclone figtext thisfig figclone override public void set line color color col super set line color col get stereotype fig set line color null get name fig set line color col body set line color col setlinecolor setlinecolor getstereotypefig setlinecolor getnamefig setlinecolor setlinecolor see org tigris gef presentation fig get line color override public color get line color return body get line color getlinecolor getlinecolor getlinecolor override public void set fill color color col super set fill color col get stereotype fig set fill color null get name fig set fill color col body set fill color col setfillcolor setfillcolor getstereotypefig setfillcolor getnamefig setfillcolor setfillcolor see org tigris gef presentation fig get fill color override public color get fill color return body get fill color getfillcolor getfillcolor getfillcolor override public void set filled boolean f get stereotype fig set filled false get name fig set filled f body set filled f setfilled getstereotypefig setfilled getnamefig setfilled setfilled override public boolean is filled return body is filled isfilled isfilled override public void set line width int w there are 2 boxes showing lines the tab and the body get name fig set line width w body set line width w setlinewidth getnamefig setlinewidth setlinewidth see org tigris gef presentation fig get line width override public int get line width return body get line width getlinewidth getlinewidth getlinewidth override protected void update stereotype text object model element get owner if model element null return rectangle rect get bounds check if any stereotype is defined if model get facade get stereotypes model element is empty if get stereotype fig is visible get name fig set top margin 0 get stereotype fig set visible false else nothing changed else we got at least one stereotype this populates the stereotypes area super update stereotype text if is stereotype visible the user wants to hide them get name fig set top margin 0 get stereotype fig set visible false else if get stereotype fig is visible get name fig set top margin get stereotype fig get minimum size height get stereotype fig set visible true else nothing changed force repaint shadow set bounds rect x rect y rect width rect height updatestereotypetext modelelement getowner modelelement getbounds getfacade getstereotypes modelelement isempty getstereotypefig isvisible getnamefig settopmargin getstereotypefig setvisible updatestereotypetext isstereotypevisible getnamefig settopmargin getstereotypefig setvisible getstereotypefig isvisible getnamefig settopmargin getstereotypefig getminimumsize getstereotypefig setvisible forcerepaintshadow setbounds used by pgml tee return the class name and bounds together with compartment visibility override public string class name and bounds return super class name and bounds stereotype visible is stereotype visible visibility visible is visibility visible classnameandbounds classnameandbounds stereotypevisible isstereotypevisible visibilityvisible isvisibilityvisible see org tigris gef presentation fig get use trap rect override public boolean get use trap rect return true getusetraprect getusetraprect override public dimension get minimum size use a size to build up the minimum size start with the size of the name fig and build up dimension a size new dimension get name fig get minimum size a size height math max a size height min height a size width math max a size width min width if we have any number of stereotypes displayed then allow some space for that only width height is included in name fig if is stereotype visible dimension st get stereotype fig get minimum size a size width math max a size width st width take into account the tab is not as wide as the body a size width indentx 1 we want at least some of the package body to be displayed a size height 30 and now a size has the answer return a size getminimumsize asize asize getnamefig getminimumsize asize asize min_height asize asize min_width namefig isstereotypevisible getstereotypefig getminimumsize asize asize asize asize asize asize sets the bounds but the size will be at least the one returned by link get minimum size p if the required height is bigger then the additional height is not distributed among all figs i e compartments but goes into the body hence the accumulated height of all visible figs equals the demanded height p some of this has magic numbers hardcoded in in particular there is a knowledge that the minimum height of a name compartment is 21 pixels this height is needed to be able to display the clarifier inside the name compartment param xa desired x coordinate of upper left corner param ya desired y coordinate of upper left corner param w desired width of the fig class param h desired height of the fig class override protected void set standard bounds int xa int ya int w int h save our old boundaries needed later and get minimum size info a size will be used to maintain a running calculation of our size at various points rectangle old bounds get bounds the new size can not be smaller than the minimum dimension minimum size get minimum size int neww math max w minimum size width int newh math max h minimum size height now resize all sub figs including not displayed figs start by the name we override the get minimum size if it is less than our view 21 pixels hardcoded add in the shared extra plus in this case the correction dimension name min get name fig get minimum size int min name height math max name min height min height now sort out the stereotype display if the stereotype is displayed move the upper boundary of the name compartment up and set new bounds for the name and the stereotype compartments and the stereo line blinder that blanks out the line between the two int currenty ya int tab width neww indentx if is stereotype visible dimension stereo min get stereotype fig get minimum size get name fig set top margin stereo min height get name fig set bounds xa currenty tab width 1 min name height get stereotype fig set bounds xa ya tab width stereo min height 1 if tab width stereo min width 1 tab width stereo min width 2 else get name fig set bounds xa currenty tab width 1 min name height advance currenty to where the start of the body box is remembering that it overlaps the next box by 1 pixel calculate the size of the body box and update the y pointer past it if it is displayed currenty min name height 1 1 for 1 pixel overlap body set bounds xa currenty neww newh ya currenty tab height currenty ya set bounds of big box get big port set bounds xa ya neww newh now force calculation of the bounds of the figure update the edges and trigger anyone who s listening to see if the bounds property has changed calc bounds update edges fire prop change bounds old bounds get bounds getminimumsize figclass figclass setstandardbounds asize oldbounds getbounds minimumsize getminimumsize minimumsize minimumsize getminimumsize namemin getnamefig getminimumsize minnameheight namemin min_height stereolineblinder tabwidth isstereotypevisible stereomin getstereotypefig getminimumsize getnamefig settopmargin stereomin getnamefig setbounds tabwidth minnameheight getstereotypefig setbounds tabwidth stereomin tabwidth stereomin tabwidth stereomin getnamefig setbounds tabwidth minnameheight minnameheight setbounds tabheight getbigport setbounds calcbounds updateedges firepropchange oldbounds getbounds build a collection of menu items relevant for a right click popup menu on a package param me a mouse event return a collection of menu items override public vector get pop up actions mouse event me vector pop up actions super get pop up actions me modifier pop up actions add pop up actions size get popup add offset build modifier pop up abstract leaf root visibility pop up actions add pop up actions size get popup add offset build visibility pop up return pop up actions getpopupactions mouseevent popupactions getpopupactions popupactions popupactions getpopupaddoffset buildmodifierpopup popupactions popupactions getpopupaddoffset buildvisibilitypopup popupactions override protected argoj menu build show pop up argoj menu show menu super build show pop up only show the menuitems if they make sense editor ce globals cur editor list fig figs ce get selection manager get figs boolean s on false boolean s off false boolean v on false boolean v off false for fig f figs if f instanceof stereotype container boolean v stereotype container f is stereotype visible if v s on true else s off true v visibility container f is visibility visible if v v on true else v off true if s on show menu add new hide stereotype action if s off show menu add new show stereotype action if v on show menu add new hide visibility action if v off show menu add new show visibility action return show menu argojmenu buildshowpopup argojmenu showmenu buildshowpopup cureditor getselectionmanager getfigs son soff von voff stereotypecontainer stereotypecontainer isstereotypevisible son soff visibilitycontainer isvisibilityvisible von voff son showmenu hidestereotypeaction soff showmenu showstereotypeaction von showmenu hidevisibilityaction voff showmenu showvisibilityaction showmenu change the visibility of the stereotypes of all figs param value true if it needs to become visible private void do stereotype boolean value editor ce globals cur editor list fig figs ce get selection manager get figs for fig f figs if f instanceof stereotype container stereotype container f set stereotype visible value if f instanceof fig node model element fig node model element f force repaint shadow argo fig f rendering changed f damage dostereotype cureditor getselectionmanager getfigs stereotypecontainer stereotypecontainer setstereotypevisible fignodemodelelement fignodemodelelement forcerepaintshadow argofig renderingchanged change the visibility of the visibility of all figs param value true if it needs to become visible private void do visibility boolean value editor ce globals cur editor list fig figs ce get selection manager get figs for fig f figs if f instanceof visibility container visibility container f set visibility visible value f damage dovisibility cureditor getselectionmanager getfigs visibilitycontainer visibilitycontainer setvisibilityvisible the constructor param xa param ya param w param h deprecated 0 27 2 by tfmorris use link fig package fig text object rectangle diagram settings suppress warnings deprecation deprecated public fig package fig text int xa int ya int w int h super xa ya w h figpackagefigtext diagramsettings suppresswarnings figpackagefigtext construct a text fig for a package which will jump to diagram for the named package when double clicked param owner owning uml element param bounds position and size param settings render settings public fig package fig text object owner rectangle bounds diagram settings settings super owner bounds settings false figpackagefigtext diagramsettings todo mvw would it not be better if this code would go in start text editor not overruling mouse clicked but we made this fig not editable to stop it from reacting on key presses anyhow this is a hack abusing a fig text gef does not really support double clicking on a fig to trigger some action override public void mouse clicked mouse event me string ls default name main todo this code appears to be designed to jump to the diagram containing the contents of the package that was double clicked but it looks like it s always searching for the name main instead of the package name todo but in any case it should be delegating this work to to something that knows about the diagrams and they contents tfm if me get click count 2 object l pkg fig package this get owner if l pkg null object lns l pkg project lp get project list argo diagram diags lp get diagram list argo diagram l first null for argo diagram l diagram diags object l diagramns l diagram get namespace if lns null l diagramns null lns equals l diagramns save first if l first null l first l diagram if l diagram get name null l diagram get name starts with ls default name me consume super mouse clicked me target manager get instance set target l diagram return while if we get here then we didn t get the default diagram if l first null me consume super mouse clicked me target manager get instance set target l first return try to create a new class diagram me consume super mouse clicked me try create class diagram lns ls default name lp catch exception ex log error ex return if package if doubleclicks super mouse clicked me starttexteditor mouseclicked figtext mouseclicked mouseevent lsdefaultname getclickcount lpkg figpackage getowner lpkg lpkg getproject argodiagram getdiagramlist argodiagram lfirst argodiagram ldiagram ldiagramns ldiagram getnamespace ldiagramns ldiagramns lfirst lfirst ldiagram ldiagram getname ldiagram getname startswith lsdefaultname mouseclicked targetmanager getinstance settarget ldiagram lfirst mouseclicked targetmanager getinstance settarget lfirst mouseclicked createclassdiagram lsdefaultname mouseclicked private void create class diagram object namespace string default name project project throws property veto exception string namespace descr if namespace null model get facade get name namespace null namespace descr model get facade get name namespace else namespace descr translator localize misc name anon string dialog text add new class diagram to namespace descr int option j option pane show confirm dialog null dialog text add new class diagram j option pane yes no option if option j option pane yes option argo diagram class diagram diagram factory get instance create diagram diagram type class namespace null string diagram name default name class diagram get name project add member class diagram target manager get instance set target class diagram change prefix class diagram set name diagram name explorer event adaptor get instance structure changed createclassdiagram defaultname propertyvetoexception namespacedescr getfacade getname namespacedescr getfacade getname namespacedescr dialogtext namespacedescr joptionpane showconfirmdialog dialogtext joptionpane yes_no_option joptionpane yes_option argodiagram classdiagram diagramfactory getinstance creatediagram diagramtype diagramname defaultname _ classdiagram getname addmember classdiagram targetmanager getinstance settarget classdiagram classdiagram setname diagramname explorereventadaptor getinstance structurechanged see org argouml uml diagram ui stereotype container is stereotype visible public boolean is stereotype visible return stereotype visible stereotypecontainer isstereotypevisible isstereotypevisible stereotypevisible public void set stereotype visible boolean is visible stereotype visible is visible rendering changed damage setstereotypevisible isvisible stereotypevisible isvisible renderingchanged see org argouml uml diagram ui visibility container is visibility visible public boolean is visibility visible return get notation settings is show visibilities visibilitycontainer isvisibilityvisible isvisibilityvisible getnotationsettings isshowvisibilities public void set visibility visible boolean is visible get notation settings set show visibilities is visible rendering changed damage setvisibilityvisible isvisible getnotationsettings setshowvisibilities isvisible renderingchanged override protected void text edit started fig text ft if ft get name fig show help parsing help fig package texteditstarted figtext getnamefig showhelp override public point get closest point point another pt rectangle r get bounds int xs r x r x r width indentx r x r width indentx r x r width r x r width r x r x int ys r y r y r y tab height r y tab height r y r height r y r height r y point p geometry pt closest to xs ys 7 another pt return p getclosestpoint anotherpt getbounds tabheight tabheight ptclosestto anotherpt override protected void model changed property change event mee if mee instanceof remove association event owned element equals mee get property name mee get source get owner a model element has been removed from this packages namespace if the fig representing that model element is on the same diagram as this package then make sure it is not enclosed by this package todo in my view the fig representing the model element should be removed from the diagram yet to be agreed bob if log is info enabled mee get new value null log info model get facade get name mee get old value has been removed from the namespace of model get facade get name get owner by notice of mee to string layer perspective layer layer perspective get layer fig f layer presentation for mee get old value if f null f get enclosing fig this remove enclosed fig f f set enclosing fig null super model changed mee modelchanged propertychangeevent removeassociationevent ownedelement getpropertyname getsource getowner isinfoenabled getnewvalue getfacade getname getoldvalue getfacade getname getowner tostring layerperspective layerperspective getlayer presentationfor getoldvalue getenclosingfig removeenclosedfig setenclosingfig modelchanged constructor hide stereotype action super translator localize action key resource loader wrapper lookup icon action key hidestereotypeaction action_key resourceloaderwrapper lookupicon action_key override public void action performed action event ae super action performed ae do stereotype false actionperformed actionevent actionperformed dostereotype constructor show stereotype action super translator localize action key resource loader wrapper lookup icon action key showstereotypeaction action_key resourceloaderwrapper lookupicon action_key override public void action performed action event ae super action performed ae do stereotype true actionperformed actionevent actionperformed dostereotype constructor hide visibility action super translator localize action key resource loader wrapper lookup icon action key hidevisibilityaction action_key resourceloaderwrapper lookupicon action_key override public void action performed action event ae super action performed ae do visibility false actionperformed actionevent actionperformed dovisibility constructor show visibility action super translator localize action key resource loader wrapper lookup icon action key showvisibilityaction action_key resourceloaderwrapper lookupicon action_key override public void action performed action event ae super action performed ae do visibility true actionperformed actionevent actionperformed dovisibility the constructor param x the x param y the y param w the width param h the height param ix the indent param th the tab height public package port fig rect int x int y int w int h int ix int th super x y w h null null this indentx ix tab height th packageportfigrect tabheight override public point get closest point point another pt rectangle r get bounds int xs r x r x r width indentx r x r width indentx r x r width r x r width r x r x int ys r y r y r y tab height r y tab height r y r height r y r height r y point p geometry pt closest to xs ys 7 another pt return p getclosestpoint anotherpt getbounds tabheight tabheight ptclosestto anotherpt param element owning comment edge object this is a special case since it is not a uml element param the settings render settings public fig edge note object element diagram settings the settings element will normally be null when called from pgml parser it will get it s source destination set later in attach edges super settings the settings if element null set owner element else set owner new comment edge set between nearest points true get fig set line width line width get fig set dashed true unfortunately the fig and it s associated comment edge will not be fully initialized yet here if we re being loaded from a pgml file the remainder of the initialization will happen when set dest source fig node are called from pgml stack parser attach edges commentedge thesettings figedgenote diagramsettings thesettings attachedges thesettings setowner setowner commentedge setbetweennearestpoints getfig setlinewidth line_width getfig setdashed commentedge fignode pgmlstackparser attachedges override public void set fig fig f log info setting the internal fig to f super set fig f get fig set dashed true setfig setfig getfig setdashed see java lang object to string override public string to string return translator localize misc comment edge tostring tostring protected void model changed property change event e if e instanceof remove association event e get old value annotated element remove from diagram modelchanged propertychangeevent removeassociationevent getoldvalue annotatedelement removefromdiagram see org tigris gef presentation fig get tip string java awt event mouse event override public string get tip string mouse event me return comment edge todo get tip string from comment gettipstring mouseevent gettipstring mouseevent see java beans property change listener property change java beans property change event override public void property change property change event pve model changed pve propertychangelistener propertychange propertychangeevent propertychange propertychangeevent modelchanged override public final void remove from diagram object o get owner if o null remove element listener o super remove from diagram damage removefromdiagram getowner removeelementlistener removefromdiagram returns the source of the edge the source is the owner of the node the edge travels from in a binary relationship for instance for a classifierrole this is the sender return m model element protected object get source object the owner get owner if the owner null return comment edge the owner get source return null mmodelelement getsource theowner getowner theowner commentedge theowner getsource returns the destination of the edge the destination is the owner of the node the edge travels to in a binary relationship for instance for a classifierrole this is the receiver return object protected object get destination object the owner get owner if the owner null return comment edge the owner get destination return null getdestination theowner getowner theowner commentedge theowner getdestination override public void set dest fig node fig node fn when this is called from pgml stack parser attach edges we finished the initialization of owning pseudo element comment edge if fn null model get facade isa comment fn get owner object old comment comment if old comment null remove element listener old comment comment fn get owner if comment null add element listener comment comment edge get owner set comment comment else if fn null model get facade isa comment fn get owner annotated element fn get owner comment edge get owner set annotated element annotated element super set dest fig node fn setdestfignode fignode pgmlstackparser attachedges commentedge getfacade isacomment getowner oldcomment oldcomment removeelementlistener oldcomment getowner addelementlistener commentedge getowner setcomment getfacade isacomment getowner annotatedelement getowner commentedge getowner setannotatedelement annotatedelement setdestfignode override public void set source fig node fig node fn when this is called from pgml stack parser attach edges we finished the initialization of owning pseudo element comment edge if fn null model get facade isa comment fn get owner object old comment comment if old comment null remove element listener old comment comment fn get owner if comment null add element listener comment comment edge get owner set comment comment else if fn null model get facade isa comment fn get owner annotated element fn get owner comment edge get owner set annotated element annotated element super set source fig node fn setsourcefignode fignode pgmlstackparser attachedges commentedge getfacade isacomment getowner oldcomment oldcomment removeelementlistener oldcomment getowner addelementlistener commentedge getowner setcomment getfacade isacomment getowner annotatedelement getowner commentedge getowner setannotatedelement annotatedelement setsourcefignode private void add element listener object element model get pump add model event listener this element addelementlistener getpump addmodeleventlistener private void remove element listener object element model get pump remove model event listener this element removeelementlistener getpump removemodeleventlistener suppress warnings deprecation deprecated public project get project return argo fig util get project this suppresswarnings getproject argofigutil getproject public diagram settings get settings return settings diagramsettings getsettings public void rendering changed renderingchanged suppress warnings deprecation deprecated public void set project project project unimplemented suppresswarnings setproject public void set settings diagram settings the settings settings the settings setsettings diagramsettings thesettings thesettings setter for the uid param new id the new uid public void set itemuid itemuid new id item uid new id newid setitemuid newid itemuid newid getter for the uid return the uid public itemuid get itemuid return item uid getitemuid itemuid public button action new effect super put value name get key name put value short description translator localize get key name object icon resource loader wrapper lookup icon resource get icon name put value small icon icon target manager get instance add target listener this buttonactionneweffect putvalue getkeyname putvalue short_description getkeyname resourceloaderwrapper lookupiconresource geticonname putvalue small_icon targetmanager getinstance addtargetlistener public void action performed action event e if is enabled return super action performed e object target target manager get instance get model target object model model get facade get model target object ns model get state machines helper find namespace for event target model object event create event ns model get state machines helper set event as trigger target event target manager get instance set target event actionperformed actionevent isenabled actionperformed targetmanager getinstance getmodeltarget getfacade getmodel getstatemachineshelper findnamespaceforevent createevent getstatemachineshelper seteventastrigger targetmanager getinstance settarget public boolean is enabled object target target manager get instance get model target return model get facade isa transition target isenabled targetmanager getinstance getmodeltarget getfacade isatransition protected abstract object create event object ns createevent protected abstract object create event object ns protected abstract string get key name createevent getkeyname protected abstract string get key name protected abstract string get icon name getkeyname geticonname button action new event super put value name get key name put value short description translator localize get key name object icon resource loader wrapper lookup icon resource get icon name put value small icon icon target manager get instance add target listener this buttonactionnewevent putvalue getkeyname putvalue short_description getkeyname resourceloaderwrapper lookupiconresource geticonname putvalue small_icon targetmanager getinstance addtargetlistener public void action performed action event e if is enabled return super action performed e object target target manager get instance get model target object model model get facade get model target object ns model get state machines helper find namespace for event target model object event create event ns model get state machines helper set event as trigger target event target manager get instance set target event actionperformed actionevent isenabled actionperformed targetmanager getinstance getmodeltarget getfacade getmodel getstatemachineshelper findnamespaceforevent createevent getstatemachineshelper seteventastrigger targetmanager getinstance settarget public boolean is enabled object target target manager get instance get model target return model get facade isa transition target isenabled targetmanager getinstance getmodeltarget getfacade isatransition protected abstract object create event object ns createevent protected abstract object create event object ns protected abstract string get key name createevent getkeyname protected abstract string get key name protected abstract string get icon name getkeyname geticonname public void target added target event e set enabled is enabled targetadded targetevent setenabled isenabled public void target removed target event e set enabled is enabled targetremoved targetevent setenabled isenabled public void target set target event e set enabled is enabled targetset targetevent setenabled isenabled fig activation int x int y int w int h super x y w h argo fig line color argo fig fill color set line width argo fig line width set filled true figactivation argofig line_color argofig fill_color setlinewidth argofig line_width setfilled the constructor public mode change height contract set false editor globals cur editor rubberband color globals get prefs get rubberband color modechangeheight contractset cureditor rubberbandcolor getprefs getrubberbandcolor public void mouse pressed mouse event me if me is consumed return starty me gety startx me getx start me consume mousepressed mouseevent isconsumed public void mouse dragged mouse event me if me is consumed return currenty me gety editor damage all me consume mousedragged mouseevent isconsumed damageall public void mouse released mouse event me if me is consumed return sequence diagram layer layer sequence diagram layer globals cur editor get layer manager get active layer int endy me gety if is contract int start offset layer get node index starty int end offset if starty endy end offset start offset start offset layer get node index endy else end offset layer get node index endy int diff end offset start offset if diff 0 layer contract diagram start offset diff else int start offset layer get node index starty if start offset 0 endy starty start offset int diff layer get node index endy start offset if diff 0 diff diff if diff 0 layer expand diagram start offset diff me consume done mousereleased mouseevent isconsumed sequencediagramlayer sequencediagramlayer cureditor getlayermanager getactivelayer iscontract startoffset getnodeindex endoffset endoffset startoffset startoffset getnodeindex endoffset getnodeindex endoffset startoffset contractdiagram startoffset startoffset getnodeindex startoffset startoffset getnodeindex startoffset expanddiagram startoffset see org tigris gef base fig modifying mode paint java awt graphics public void paint graphics g g set color rubberband color g draw line startx starty startx currenty figmodifyingmode setcolor rubberbandcolor drawline public string instructions if is contract return translator localize action sequence contract return translator localize action sequence expand iscontract private boolean is contract if contract set contract get arg name equals button sequence contract contract set true return contract iscontract contractset getarg contractset the constructor public mode create message super modecreatemessage the constructor param par the editor public mode create message editor par super par modecreatemessage public fig create new item mouse event me int snapx int snapy return new fig line snapx snapy me getx snapy globals get prefs get rubberband color createnewitem mouseevent figline getprefs getrubberbandcolor see org tigris gef base fig modifying mode instructions public string instructions return translator localize action sequence new get arg action name figmodifyingmode getarg actionname on mouse pressed determine what port the user is dragging from the mouse pressed event is sent via mode select inherit doc public void mouse pressed mouse event me if me is consumed return int x me getx y me gety editor ce globals cur editor fig under mouse ce hit x y if under mouse null under mouse ce hit x 16 y 16 32 32 if under mouse null done me consume return if under mouse instanceof fig classifier role done me consume return source fig classifier role fig classifier role under mouse start port source fig classifier role deep hit port x y if start port null done me consume return start port fig source fig classifier role get port fig start port start point snap pt new point synchronized snap pt snap pt set location start port fig getx fig classifier role role width 2 start port fig gety editor snap snap pt anchorx snap pt x anchory snap pt y newitem create new item me anchorx anchory me consume set cursor cursor get predefined cursor cursor crosshair cursor mousepressed mousepressed modeselect inheritdoc mousepressed mouseevent isconsumed cureditor undermouse undermouse undermouse undermouse undermouse figclassifierrole sourcefigclassifierrole figclassifierrole undermouse startport sourcefigclassifierrole deephitport startport startportfig sourcefigclassifierrole getportfig startport snappt snappt snappt setlocation startportfig figclassifierrole role_width startportfig snappt snappt snappt _newitem createnewitem setcursor getpredefinedcursor crosshair_cursor on mouse released find the port in the destination node that s on the same height as the source port fig ask the graph model to connect the two ports if that connection is allowed then construct a new fig edge and add it to the layer and send it to the back inherit doc public void mouse released mouse event me if me is consumed return if source fig classifier role null done me consume return int x me getx y me gety editor ce globals cur editor fig f ce hit x y if f null f ce hit x 16 y 16 32 32 graph model gm ce get graph model if gm instanceof mutable graph model f null mutable graph model mgm mutable graph model gm if f instanceof fig classifier role fig classifier role dest fig classifier role fig classifier role f if its a fig node then check within the fig node to see if a port exists object found port null if dest fig classifier role source fig classifier role y start port fig gety found port dest fig classifier role deep hit port x y else found port dest fig classifier role deep hit port x y if found port null found port start port fig dest port fig dest fig classifier role get port fig found port object edge type model get meta types get message message mgm connect start port found port edge type calling connect will add the edge to the graph model and any layer persectives on that graph model will get a edge added event and will add an appropriate fig edge determined by the graph edge renderer if null message ce damaged newitem source fig classifier role damage dest fig classifier role damage newitem null fig message fe fig message ce get layer manager get active layer presentation for message fe set source port fig start port fig fe set source fig node source fig classifier role fe set dest port fig dest port fig fe set dest fig node dest fig classifier role set the new edge in place if source fig classifier role null source fig classifier role update edges if dest fig classifier role null dest fig classifier role update edges if fe null ce get selection manager select fe done me consume return else log debug connection return null source fig classifier role damage ce damaged newitem newitem null done me consume mousereleased graphmodel figedge inheritdoc mousereleased mouseevent isconsumed sourcefigclassifierrole cureditor graphmodel getgraphmodel mutablegraphmodel mutablegraphmodel mutablegraphmodel figclassifierrole figclassifierrole destfigclassifierrole figclassifierrole fignode fignode foundport destfigclassifierrole sourcefigclassifierrole startportfig foundport destfigclassifierrole deephitport foundport destfigclassifierrole deephitport foundport foundport startport destportfig destfigclassifierrole getportfig foundport edgetype getmetatypes getmessage startport foundport edgetype graphmodel layerpersectives graphmodel edgeadded figedge graphedgerenderer _newitem sourcefigclassifierrole destfigclassifierrole _newitem figmessage figmessage getlayermanager getactivelayer presentationfor setsourceportfig startportfig setsourcefignode sourcefigclassifierrole setdestportfig destportfig setdestfignode destfigclassifierrole sourcefigclassifierrole sourcefigclassifierrole updateedges destfigclassifierrole destfigclassifierrole updateedges getselectionmanager sourcefigclassifierrole _newitem _newitem public void mouse dragged mouse event me if me is consumed return if newitem null editor damaged newitem creation drag me getx start port fig gety editor damaged newitem editor scroll to show me getx start port fig gety me consume else super mouse dragged me mousedragged mouseevent isconsumed _newitem _newitem creationdrag startportfig _newitem scrolltoshow startportfig mousedragged the constructor public mode expand editor globals cur editor rubberband color globals get prefs get rubberband color modeexpand cureditor rubberbandcolor getprefs getrubberbandcolor public void mouse pressed mouse event me if me is consumed return starty me gety startx me getx start me consume mousepressed mouseevent isconsumed public void mouse dragged mouse event me if me is consumed return currenty me gety editor damage all me consume mousedragged mouseevent isconsumed damageall public void mouse released mouse event me if me is consumed return sequence diagram layer layer sequence diagram layer globals cur editor get layer manager get active layer int endy me gety int start offset layer get node index starty if start offset 0 endy starty start offset int diff layer get node index endy start offset if diff 0 diff diff if diff 0 layer expand diagram start offset diff me consume done mousereleased mouseevent isconsumed sequencediagramlayer sequencediagramlayer cureditor getlayermanager getactivelayer startoffset getnodeindex startoffset startoffset getnodeindex startoffset expanddiagram startoffset see org tigris gef base fig modifying mode paint java awt graphics public void paint graphics g g set color rubberband color g draw line startx starty startx currenty figmodifyingmode setcolor rubberbandcolor drawline see org tigris gef base fig modifying mode instructions public string instructions return translator localize action sequence expand figmodifyingmode the constructor public mode contract editor globals cur editor rubberband color globals get prefs get rubberband color modecontract cureditor rubberbandcolor getprefs getrubberbandcolor public void mouse pressed mouse event me if me is consumed return starty me gety startx me getx start me consume mousepressed mouseevent isconsumed public void mouse dragged mouse event me if me is consumed return currenty me gety editor damage all me consume mousedragged mouseevent isconsumed damageall public void mouse released mouse event me if me is consumed return sequence diagram layer layer sequence diagram layer globals cur editor get layer manager get active layer int endy me gety int start offset layer get node index starty int end offset if starty endy end offset start offset start offset layer get node index endy else end offset layer get node index endy int diff end offset start offset if diff 0 layer contract diagram start offset diff me consume done mousereleased mouseevent isconsumed sequencediagramlayer sequencediagramlayer cureditor getlayermanager getactivelayer startoffset getnodeindex endoffset endoffset startoffset startoffset getnodeindex endoffset getnodeindex endoffset startoffset contractdiagram startoffset see org tigris gef base fig modifying mode paint java awt graphics public void paint graphics g g set color rubberband color g draw line startx starty startx currenty figmodifyingmode setcolor rubberbandcolor drawline see org tigris gef base fig modifying mode instructions public string instructions return translator localize action sequence contract figmodifyingmode the constructor param f the fig public selection message fig f super f selectionmessage override drag handle so that it no longer allows dragging of handles todo need to figure out how i can get this to drag the fig up and down see org tigris gef base selection drag handle int int int int org tigris gef presentation handle public void drag handle int mx int my int anx int any handle h draghandle draghandle the constructor param name the name param gm the graph model public sequence diagram layer string name mutable graph model gm super name gm sequencediagramlayer mutablegraphmodel public void put in position fig f if f instanceof fig classifier role distribute fig classifier roles fig classifier role f else super put in position f putinposition figclassifierrole distributefigclassifierroles figclassifierrole putinposition distributes the fig objects contained in fig objectsx over the sequencediagram param f private void distribute fig classifier roles fig classifier role f reshuffle fig classifier rolesx f int list position fig objectsx index of f iterator it fig objectsx sub list list position fig objectsx size iterator int positionx list position 0 diagram left margin fig fig objectsx get list position 1 getx fig fig objectsx get list position 1 get width object distance while it has next fig classifier role fig fig classifier role it next rectangle r fig get bounds if r x positionx r x positionx r y diagram top margin fig set bounds r fig update edges positionx fig getx fig get width object distance figobjectsx distributefigclassifierroles figclassifierrole reshufflefigclassifierrolesx listposition figobjectsx indexof figobjectsx sublist listposition figobjectsx listposition diagram_left_margin figobjectsx listposition figobjectsx listposition getwidth object_distance hasnext figclassifierrole figclassifierrole getbounds diagram_top_margin setbounds updateedges getwidth object_distance public void node added graph event ge super node added ge fig fig presentation for ge get arg if fig instanceof fig classifier role fig classifier role fig rendering changed nodeadded graphevent nodeadded presentationfor getarg figclassifierrole figclassifierrole renderingchanged public void add fig f super add f if f instanceof fig classifier role if fig objectsx is empty list iterator it fig objectsx list iterator 0 while it has next fig fig fig it next if fig getx f getx it previous it add f break if it has next it add f else fig objectsx add f distribute fig classifier roles fig classifier role f figclassifierrole figobjectsx isempty listiterator figobjectsx listiterator hasnext hasnext figobjectsx distributefigclassifierroles figclassifierrole return the node index at a certain y point param y the point return the node index public int get node index int y fig classifier role fig classifier role null for object fig get contents no edges if fig instanceof fig classifier role fig classifier role fig classifier role fig if fig classifier role null return 0 y fig classifier role gety fig classifier role get head fig get height y link distance 2 if y 0 y 0 return y link distance getnodeindex figclassifierrole figclassifierrole getcontentsnoedges figclassifierrole figclassifierrole figclassifierrole figclassifierrole figclassifierrole figclassifierrole getheadfig getheight link_distance link_distance makes all the figclassifier roles have uniform size return the number of nodes that the fig classifier role objects have int make uniform node count int max nodes 1 for iterator it fig objectsx iterator it has next object o it next if o instanceof fig classifier role int node count fig classifier role o get node count if node count max nodes max nodes node count for iterator it fig objectsx iterator it has next object o it next if o instanceof fig classifier role fig classifier role o grow to size max nodes return max nodes figclassifierrole makeuniformnodecount maxnodes figobjectsx hasnext figclassifierrole nodecount figclassifierrole getnodecount nodecount maxnodes maxnodes nodecount figobjectsx hasnext figclassifierrole figclassifierrole growtosize maxnodes maxnodes public void contract diagram int start node index int number of nodes if make uniform node count start node index return boolean empty array new boolean number of nodes java util arrays fill empty array true for iterator it fig objectsx iterator it has next fig classifier role it next update empty node array start node index empty array for iterator it fig objectsx iterator it has next fig classifier role it next contract nodes start node index empty array update activations contractdiagram startnodeindex numberofnodes makeuniformnodecount startnodeindex emptyarray numberofnodes emptyarray figobjectsx hasnext figclassifierrole updateemptynodearray startnodeindex emptyarray figobjectsx hasnext figclassifierrole contractnodes startnodeindex emptyarray updateactivations public void expand diagram int start node index int number of nodes if make uniform node count start node index return for iterator it fig objectsx iterator it has next fig classifier role it next grow start node index number of nodes update activations expanddiagram startnodeindex numberofnodes makeuniformnodecount startnodeindex figobjectsx hasnext figclassifierrole startnodeindex numberofnodes updateactivations add nodes to todo linus doesn t understand this comment please elaborate bob doesn t either what hope do we have private void reshuffle fig classifier rolesx fig f fig objectsx remove f int x f getx int i for i 0 i fig objectsx size i fig fig fig fig objectsx get i if fig getx x break fig objectsx add i f reshufflefigclassifierrolesx figobjectsx figobjectsx figobjectsx figobjectsx public void deleted fig f super deleted f fig objectsx remove f if fig objectsx is empty put in position fig fig objectsx get 0 figobjectsx figobjectsx isempty putinposition figobjectsx update activations first removes all current activation boxes then adds new ones to all figobject depending on the state of the nodes public void update activations make uniform node count for iterator it fig objectsx iterator it has next object fig it next if fig instanceof fig classifier role fig classifier role fig update activations fig classifier role fig damage updateactivations makeuniformnodecount figobjectsx hasnext figclassifierrole figclassifierrole updateactivations figclassifierrole public void remove fig f if f instanceof fig message log info removing a fig message fig message fm fig message f fig message port source fig message port fm get source port fig fig message port dest fig message port fm get dest port fig if source null remove fig message port source if dest null remove fig message port dest if source null fig life line source life line fig life line source get group update node states source source life line if dest null fm get source fig node fm get dest fig node fig life line dest life line fig life line dest get group update node states dest dest life line super remove f log info a fig has been removed updating activations update activations figmessage figmessage figmessage figmessage figmessageport figmessageport getsourceportfig figmessageport figmessageport getdestportfig removefigmessageport removefigmessageport figlifeline sourcelifeline figlifeline getgroup updatenodestates sourcelifeline getsourcefignode getdestfignode figlifeline destlifeline figlifeline getgroup updatenodestates destlifeline updateactivations private void remove fig message port fig message port fmp fig parent fmp get group if parent instanceof fig life line fig classifier role parent get group remove fig message port fmp removefigmessageport figmessageport getgroup figlifeline figclassifierrole getgroup removefigmessageport todo get rid of first argument private void update node states fig message port fmp fig life line life line if life line null fig classifier role life line get group update node states updatenodestates figmessageport figlifeline lifeline lifeline figclassifierrole lifeline getgroup updatenodestates returns a list with all link fig message s that intersect with the given y coordinate p param y is the given y coordinate return the list with link fig message s public list get fig messages int y if get contents is empty get contents edges only is empty return collections empty list list ret list new array list iterator it get contents edges only iterator while it has next fig edge fig fig edge it next if fig instanceof fig message fig hit new rectangle fig getx y 8 8 ret list add fig return ret list figmessage figmessage getfigmessages getcontents isempty getcontentsedgesonly isempty empty_list retlist arraylist getcontentsedgesonly hasnext figedge figedge figmessage retlist retlist the constructor param x the x param y the y param w the width param h the height param depth the depth public cube port fig rect int x int y int w int h int depth super x y w h d depth cubeportfigrect public point get closest point point another pt rectangle r get bounds int xs r x r x d r x r width r x r width r x r width d r x r x int ys r y d r y r y r y r height d r y r height r y r height r y d point p geometry pt closest to xs ys 7 another pt return p getclosestpoint anotherpt getbounds ptclosestto anotherpt param gf the command to create the node param instructions help text param activity graph the uml element that contains the partition public mode place partition graph factory gf string instructions object activity graph super gf instructions machine activity graph activitygraph modeplacepartition graphfactory activitygraph activitygraph override public void mouse released mouse event me if me is consumed return fig partition fig fig partition pers super mouse released me fig append to pool machine mousereleased mouseevent isconsumed figpartition figpartition _pers mousereleased appendtopool default constructor used by pgml parser when diagram is first created deprecated for 0 27 2 by tfmorris the 0 arg constructor of our sub classes will get called by the pgml parser but this should not get propagated up the hierarchy the gef diagram constructor implementation is going to provide defaults for all missing args anyway so we should always use the fully specified 3 arg constructor deprecated public argo diagram impl super todo what is this trying to do it s never going to get called tfm really dirty hack to remove unwanted listeners get layer get graph model remove graph event listener get layer constructor init argodiagramimpl getlayer getgraphmodel removegrapheventlistener getlayer constructorinit the constructor param diagram name the name of the diagram deprecated for 0 27 2 by tfmorris use link argo diagram impl string graph model layer perspective deprecated public argo diagram impl string diagram name next line patch to issue 596 hopefully super diagram name try set name diagram name catch property veto exception pve constructor init diagramname argodiagramimpl graphmodel layerperspective argodiagramimpl diagramname diagramname setname diagramname propertyvetoexception constructorinit construct a new argouml diagram this is the preferred form of the constructor if you don t know the name yet make one up because that s what the super classes constructors are going to do anyway param name the name of the new diagram param graph model graph model to associate with diagram param layer layer to associate with diagram use new layer perspective name graph model if you need a default public argo diagram impl string name graph model graph model layer perspective layer super name graph model layer todo do we really need to do this carried over from old behavior try set name name catch property veto exception pve constructor init graphmodel layerperspective graphmodel argodiagramimpl graphmodel graphmodel layerperspective graphmodel setname propertyvetoexception constructorinit finish initialization which is common to multiple constructors which don t invoke each other private void constructor init todo these should get replaced immediately by the creating initialization code but make sure we ve got a default just in case project project project manager get manager get current project if project null settings project get project settings get default diagram settings todo we should be given an undo manager to use rather than looking for a global one if undo manager get instance instanceof diagram undo manager undo manager set instance new diagram undo manager log info setting diagram undo manager else log info diagram undo manager already set register for notification of any global changes that would affect our rendering argo event pump add listener argo event types any notation event this argo event pump add listener argo event types any diagram appearance event this listen for name changes so we can veto them if we don t like them add vetoable change listener this constructorinit projectmanager getmanager getcurrentproject getprojectsettings getdefaultdiagramsettings undomanager getinstance diagramundomanager undomanager setinstance diagramundomanager argoeventpump addlistener argoeventtypes any_notation_event argoeventpump addlistener argoeventtypes any_diagram_appearance_event addvetoablechangelistener public void set name string n throws property veto exception super set name n mutable graph support enable save action setname propertyvetoexception setname mutablegraphsupport enablesaveaction public void set itemuid itemuid i id i setitemuid public itemuid get itemuid return id getitemuid public string get veto message string property name if property name equals name return name of diagram may not exist already return null getvetomessage propertyname propertyname public fig get containing fig object obj fig fig super presentation for obj if fig null model get facade isauml element obj maybe we have a modelelement that is part of some other fig if model get facade isa operation obj model get facade isa reception obj model get facade isa attribute obj get all the classes from the diagram return presentation for model get facade get owner obj return fig getcontainingfig presentationfor getfacade isaumlelement getfacade isaoperation getfacade isareception getfacade isaattribute presentationfor getfacade getowner public void damage if get layer null get layer get editors null iterator it get layer get editors iterator while it has next editor it next damage all getlayer getlayer geteditors getlayer geteditors hasnext damageall public list get edges if get graph model null return get graph model get edges return super get edges getedges getgraphmodel getgraphmodel getedges getedges public list get nodes if get graph model null return get graph model get nodes return super get nodes getnodes getgraphmodel getgraphmodel getnodes getnodes public string to string return diagram get name tostring getname public string repair string buffer report new string buffer 500 boolean fault fixed do fault fixed false list fig figs new array list fig get layer get contents no edges for fig f figs if repair fig f report fault fixed true figs new array list fig get layer get contents edges only for fig f figs if repair fig f report fault fixed true while fault fixed repeat until no faults are fixed return report to string stringbuffer stringbuffer faultfixed faultfixed arraylist getlayer getcontentsnoedges repairfig faultfixed arraylist getlayer getcontentsedgesonly repairfig faultfixed faultfixed tostring private boolean repair fig fig f string buffer report log info checking fig description f f get owner boolean fault fixed false string fig description null 1 make sure all figs in the diagrams layer refer back to that layer if get layer equals f get layer if fig description null fig description fig description f report append fig description the report if f get layer null report append fixed layer was null n else report append fixed refered to wrong layer n fault fixed true the fix f set layer get layer 2 make sure that all figs are visible if f is visible if fig description null fig description fig description f report append fig description the report report append fixed a fig must be visible n fault fixed true the fix f set visible true if f instanceof fig edge 3 make sure all fig edges are attached to a valid fig node the report fig edge fe fig edge f fig node dest fig fe get dest fig node fig node source fig fe get source fig node if dest fig null if fig description null fig description fig description f report append fig description fault fixed true report append removed as it has no dest fig n f remove from diagram else if source fig null if fig description null fig description fig description f report append fig description fault fixed true report append removed as it has no source fig n f remove from diagram else if source fig get owner null if fig description null fig description fig description f report append fig description fault fixed true report append removed as its source fig has no owner n f remove from diagram else if dest fig get owner null if fig description null fig description fig description f report append fig description fault fixed true report append removed as its destination fig has no owner n f remove from diagram else if model get uml factory is removed source fig get owner if fig description null fig description fig description f report append fig description fault fixed true report append removed as its source figs owner is no longer in the repository n f remove from diagram else if model get uml factory is removed dest fig get owner if fig description null fig description fig description f report append fig description fault fixed true report append removed as its destination figs owner is no longer in the repository n f remove from diagram else if f instanceof fig node f instanceof fig edge f get owner null f instanceof fig pool if fig description null fig description fig description f report append fig description 4 make sure all fig nodes and fig edges have an owner the report fault fixed true report append removed owner was null n the fix f remove from diagram else if f instanceof fig node f instanceof fig edge model get facade isauml element f get owner model get uml factory is removed f get owner if fig description null fig description fig description f report append fig description 5 make sure all fig nodes and fig edges have a valid owner the report fault fixed true report append removed model element no longer in the repository n the fix f remove from diagram else if f instanceof fig group f instanceof fig node if fig description null fig description fig description f report append fig description 4 make sure the only fig groups on a diagram are also fig nodes the report fault fixed true report append removed a fig group should not be on the diagram n the fix f remove from diagram return fault fixed repairfig stringbuffer figdescription getowner faultfixed figdescription getlayer getlayer figdescription figdescription figdescription figdescription getlayer faultfixed setlayer getlayer isvisible figdescription figdescription figdescription figdescription faultfixed setvisible figedge figedges fignode figedge figedge fignode destfig getdestfignode fignode sourcefig getsourcefignode destfig figdescription figdescription figdescription figdescription faultfixed removefromdiagram sourcefig figdescription figdescription figdescription figdescription faultfixed removefromdiagram sourcefig getowner figdescription figdescription figdescription figdescription faultfixed removefromdiagram destfig getowner figdescription figdescription figdescription figdescription faultfixed removefromdiagram getumlfactory isremoved sourcefig getowner figdescription figdescription figdescription figdescription faultfixed removefromdiagram getumlfactory isremoved destfig getowner figdescription figdescription figdescription figdescription faultfixed removefromdiagram fignode figedge getowner figpool figdescription figdescription figdescription figdescription fignodes figedges faultfixed removefromdiagram fignode figedge getfacade isaumlelement getowner getumlfactory isremoved getowner figdescription figdescription figdescription figdescription fignodes figedges faultfixed removefromdiagram figgroup fignode figdescription figdescription figdescription figdescription figgroups fignodes faultfixed figgroup removefromdiagram faultfixed generate a description of a fig that would be most meaningful to a developer and the user this is used by the repair routines to describe the fig that was repaired ul li fig comment the text within body compartment of the fig li fig node model element the text within the name compartment of the fig node li fig edge model element the text within name compartment of the fig edge and the descriptions of the adjoining fig nodes ul param f the fig to describe return the description as a string private string fig description fig f string description n f get class get name if f instanceof fig comment description fig comment f get body else if f instanceof fig node model element description fig node model element f get name else if f instanceof fig edge model element fig edge model element fe fig edge model element f description fe get name string source if fe get source fig node null source null else source fig node model element fe get source fig node get name string dest if fe get dest fig node null dest null else dest fig node model element fe get dest fig node get name description source dest return description n figcomment fignodemodelelement fignode figedgemodelelement figedge fignodes figdescription getclass getname figcomment figcomment getbody fignodemodelelement fignodemodelelement getname figedgemodelelement figedgemodelelement figedgemodelelement getname getsourcefignode fignodemodelelement getsourcefignode getname getdestfignode fignodemodelelement getdestfignode getname public list presentations for object obj list fig presentations new array list fig int fig count get layer get contents size for int fig index 0 fig index fig count fig index fig fig fig get layer get contents get fig index if fig get owner obj presentations add fig return presentations presentationsfor arraylist figcount getlayer getcontents figindex figindex figcount figindex getlayer getcontents figindex getowner todo move to gef public void remove list fig contents new array list fig get layer get contents int size contents size for int i 0 i size i fig f contents get i f remove from diagram fire property change remove null null super remove arraylist getlayer getcontents removefromdiagram firepropertychange public void set project project p project p setproject public project get project return project getproject public abstract void encloser changed fig node enclosed fig node old encloser fig node new encloser encloserchanged fignode fignode oldencloser fignode newencloser public object get dependent element return null getdependentelement public object get namespace return namespace getnamespace public void set namespace object ns if model get facade isa namespace ns log error not a namespace log error ns throw new illegal argument exception given object not a namespace if namespace null namespace ns model get pump remove model event listener this namespace object old ns namespace namespace ns fire property change namespace key old ns ns add the diagram as a listener to the namespace so that when the namespace is removed the diagram is deleted also listening only to remove events does not work todo check if this works now with new event pump tfm model get pump add model event listener this namespace remove setnamespace getfacade isanamespace illegalargumentexception getpump removemodeleventlistener oldns firepropertychange namespace_key oldns getpump addmodeleventlistener public void set model element namespace object model element object ns if model element null return if we re not provided a namespace then get it from the diagram or the root if ns null if get namespace null ns get namespace else ns get project get root if we haven t succeeded in getting a namespace then abort if ns null return if we re trying to set the namespace to the existing value then don t do any more work if model get facade get namespace model element ns return core helper core helper model get core helper model management helper model helper model get model management helper if model helper is cyclic ownership ns model element core helper is valid namespace model element ns core helper set model element container model element ns todo move the associations to the correct owner namespace i e issue 2151 setmodelelementnamespace modelelement modelelement getnamespace getnamespace getproject getroot getfacade getnamespace modelelement corehelper corehelper getcorehelper modelmanagementhelper modelhelper getmodelmanagementhelper modelhelper iscyclicownership modelelement corehelper isvalidnamespace modelelement corehelper setmodelelementcontainer modelelement public void property change property change event evt if evt get source namespace evt instanceof delete instance event remove equals evt get property name model get pump remove model event listener this namespace remove if get project null get project move to trash this propertychange propertychangeevent getsource deleteinstanceevent getpropertyname getpump removemodeleventlistener getproject getproject movetotrash public object get owner return get namespace getowner getnamespace public iterator fig get fig iterator return new enumeration iterator elements getfigiterator enumerationiterator public void set diagram settings diagram settings new settings settings new settings setdiagramsettings diagramsettings newsettings newsettings public diagram settings get diagram settings return settings diagramsettings getdiagramsettings handles a global change to the diagram font param e the event see org argouml application events argo diagram appearance event listener diagram font changed org argouml application events argo diagram appearance event public void diagram font changed argo diagram appearance event e rendering changed argodiagramappearanceeventlistener diagramfontchanged argodiagramappearanceevent diagramfontchanged argodiagramappearanceevent renderingchanged rerender the entire diagram based on new global rendering settings p note figs which define their own presentation listeners will get re rendered twice public void rendering changed for object fig get layer get contents try this should always be true but just in case if fig instanceof argo fig argo fig fig rendering changed else log warn diagram get name contains non argo fig fig catch invalid element exception e log error tried to refresh deleted element e damage renderingchanged getlayer getcontents argofig argofig renderingchanged getname argofig invalidelementexception public void notation changed argo notation event e rendering changed notationchanged argonotationevent renderingchanged public void notation added argo notation event e do nothing notationadded argonotationevent public void notation provider added argo notation event e do nothing notationprovideradded argonotationevent public void notation provider removed argo notation event e do nothing notationproviderremoved argonotationevent public void notation removed argo notation event e do nothing notationremoved argonotationevent receive vetoable change event gef will call this method with the name property when it attempts to set the name if this will be a duplicate for the project we can veto the requested change param evt the change event throws property veto exception if the name is illegal usuallly this means a duplicate in the project see java beans vetoable change listener vetoable change java beans property change event public void vetoable change property change event evt throws property veto exception if name equals evt get property name if project null if project is valid diagram name string evt get new value throw new property veto exception invalid name evt propertyvetoexception vetoablechangelistener vetoablechange propertychangeevent vetoablechange propertychangeevent propertyvetoexception getpropertyname isvaliddiagramname getnewvalue propertyvetoexception constructor see org tigris gef graph mutable graph support public uml mutable graph support super mutablegraphsupport umlmutablegraphsupport get all the nodes from the graphmodel diagram see org tigris gef graph mutable graph support get nodes return list of nodes in the graphmodel diagram public list get nodes return nodes mutablegraphsupport getnodes getnodes get all the edges from the graphmodel diagram return list of edges in the graphmodel diagram public list get edges return edges getedges see org tigris gef graph mutable graph model contains node java lang object public boolean contains node object node return nodes contains node mutablegraphmodel containsnode containsnode param edge the candidate edge return true if it is contained public boolean constains edge object edge return edges contains edge constainsedge remove a node from the diagram and notify gef param node node to remove override public void remove node object node if contains node node return nodes remove node fire node removed node removenode containsnode firenoderemoved remove an edge from the graphmodel and notify gef param edge edge to remove override public void remove edge object edge if contains edge edge return edges remove edge fire edge removed edge removeedge containsedge fireedgeremoved assume that anything can be connected to anything unless overridden in a subclass inherit doc public boolean can connect object fromp object top return true inheritdoc canconnect the connect method without specifying a connection type is unavailable in the argouml implmentation inherit doc public object connect object from port object to port throw new unsupported operation exception the connect method is not supported inheritdoc fromport toport unsupportedoperationexception get the namespace also known as homemodel which owns the diagram return the homemodel public object get home model return home model gethomemodel homemodel set the namespace or homemodel of the diagram this will become the default namespace for any model elements which are created on the diagram param ns the namespace public void set home model object ns if model get facade isa namespace ns throw new illegal argument exception home model ns sethomemodel getfacade isanamespace illegalargumentexception homemodel the connect method specifying a connection type by class is unavailable in the argouml implementation todo this should be unsupported use the 3 object version inherit doc public object connect object from port object to port class edge class return connect from port to port object edge class inheritdoc fromport toport edgeclass fromport toport edgeclass construct and add a new edge of the given kind and connect the given ports param from port the originating port to connect param to port the destination port to connect param edge type the type of edge to create this is one of the types returned by the methods of code org argouml model meta types code return the type of edge created the same as code edge class code if we succeeded code null code otherwise public object connect object from port object to port object edge type if this was an association then there will be relevant information to fetch out of the mode arguments if it not an association then these will be passed forward harmlessly as null editor cur editor globals cur editor mode manager mode manager cur editor get mode manager mode mode mode manager top dictionary args mode get args object style args get aggregation m aggregation kind boolean unidirectional boolean args get unidirectional object model get project get model create the uml connection of the given type between the given model elements default aggregation none object connection build connection edge type from port style to port null unidirectional model if connection null if log is debug enabled log debug cannot make a edge type between a from port get class get name and a to port get class get name return null add edge connection if log is debug enabled log debug connection type edge type made between a from port get class get name and a to port get class get name return connection fromport toport edgetype metatypes edgeclass fromport toport edgetype cureditor cureditor modemanager modemanager cureditor getmodemanager modemanager getargs maggregationkind getproject getmodel buildconnection edgetype fromport toport isdebugenabled edgetype fromport getclass getname toport getclass getname addedge isdebugenabled edgetype fromport getclass getname toport getclass getname construct and add a new edge of the given kind and connect the given ports param from port the originating port to connect param to port the destination port to connect param edge type an indicator of the edge type to create param style attributes key value pairs from which to style the edge return the type of edge created the same as code edge class code if we succeeded code null code otherwise public object connect object from port object to port object edge type map style attributes return null fromport toport edgetype styleattributes edgeclass fromport toport edgetype styleattributes public boolean can add node object node if node null return false if model get facade isa comment node return true return false canaddnode getfacade isacomment return the source end of an edge param edge the edge for which we want the source port return the source port for the edge or code null code if the edge given is of the wrong type or has no source defined public object get source port object edge if edge instanceof comment edge return comment edge edge get source else if model get facade isa relationship edge model get facade isa transition edge model get facade isa association end edge return model get uml helper get source edge else if model get facade isa link edge return model get common behavior helper get source edge don t know what to do otherwise log error this get class to string get source port edge to string can t handle return null getsourceport commentedge commentedge getsource getfacade isarelationship getfacade isatransition getfacade isaassociationend getumlhelper getsource getfacade isalink getcommonbehaviorhelper getsource getclass tostring getsourceport tostring return the destination end of an edge param edge the edge for which we want the destination port return the destination port for the edge or code null code if the edge given is otf the wrong type or has no destination defined public object get dest port object edge if edge instanceof comment edge return comment edge edge get destination else if model get facade isa association edge list conns new array list model get facade get connections edge return conns get 1 else if model get facade isa relationship edge model get facade isa transition edge model get facade isa association end edge return model get uml helper get destination edge else if model get facade isa link edge return model get common behavior helper get destination edge don t know what to do otherwise log error this get class to string get dest port edge to string can t handle return null getdestport commentedge commentedge getdestination getfacade isaassociation arraylist getfacade getconnections getfacade isarelationship getfacade isatransition getfacade isaassociationend getumlhelper getdestination getfacade isalink getcommonbehaviorhelper getdestination getclass tostring getdestport tostring public boolean can add edge object edge if edge instanceof comment edge comment edge ce comment edge edge return is connection valid comment edge class ce get source ce get destination else if edge null model get uml factory is connection type edge return is connection valid edge get class model get uml helper get source edge model get uml helper get destination edge return false canaddedge commentedge commentedge commentedge isconnectionvalid commentedge getsource getdestination getumlfactory isconnectiontype isconnectionvalid getclass getumlhelper getsource getumlhelper getdestination public void add node related edges object node if model get facade isa model element node list specs new array list model get facade get client dependencies node specs add all model get facade get supplier dependencies node iterator iter specs iterator while iter has next object dependency iter next if can add edge dependency add edge dependency return commentlinks for comments iterate over all the comment links to find the comment and annotated elements collection cmnt new array list if model get facade isa comment node cmnt add all model get facade get annotated elements node todo comments are on element in uml 2 x if model get facade isa model element node cmnt add all model get facade get comments node iterator iter cmnt iterator while iter has next object ae iter next comment edge ce new comment edge node ae if can add edge ce add edge ce addnoderelatededges getfacade isamodelelement arraylist getfacade getclientdependencies addall getfacade getsupplierdependencies hasnext canaddedge addedge arraylist getfacade isacomment addall getfacade getannotatedelements getfacade isamodelelement addall getfacade getcomments hasnext commentedge commentedge canaddedge addedge create an edge of the given type and connect it to the given nodes param edge type the uml object type of the connection param from element the uml object for the from element param from style the aggregationkind for the connection in case of an association param to element the uml object for the to element param to style the aggregationkind for the connection in case of an association param unidirectional for association and associationrole param namespace the namespace to use if it can t be determined return the newly build connection uml object protected object build connection object edge type object from element object from style object to element object to style object unidirectional object namespace object connection null if edge type comment edge class connection build comment connection from element to element else try connection model get uml factory build connection edge type from element from style to element to style unidirectional namespace log info created connection between from element and to element catch uml exception ex fail silently as we expect users to accidentally drop on to wrong component catch illegal argument exception iae idem e g for a generalization with leaf root object todo but showing the message in the statusbar would help todo illegal argument exception should not be used for events we expect to happen we need a different way of catching well formedness rules log warn illegal argument exception caught iae return connection edgetype fromelement fromstyle toelement tostyle buildconnection edgetype fromelement fromstyle toelement tostyle edgetype commentedge buildcommentconnection fromelement toelement getumlfactory buildconnection edgetype fromelement fromstyle toelement tostyle fromelement toelement umlexception illegalargumentexception illegalargumentexception illegalargumentexception builds the model behind a connection between a comment and the annotated modelelement param from the comment or annotated element param to the comment or annotated element return a comment edge representing the model behind the connection between a comment and an annotated modelelement public comment edge build comment connection object from object to if from null to null throw new illegal argument exception either from node null or to node null object comment null object annotated element null if model get facade isa comment from comment from annotated element to else if model get facade isa comment to comment to annotated element from else return null comment edge connection new comment edge from to model get core helper add annotated element comment annotated element return connection commentedge commentedge buildcommentconnection illegalargumentexception fromnode tonode annotatedelement getfacade isacomment annotatedelement getfacade isacomment annotatedelement commentedge commentedge getcorehelper addannotatedelement annotatedelement checks if some type of edge is valid to connect two types of node param edge type the uml object type of the connection param from element the uml object type of the from param to element the uml object type of the to return true if valid protected boolean is connection valid object edge type object from element object to element if nodes contains from element nodes contains to element the connection is not valid unless both nodes are in this graph model return false if edge type equals comment edge class return model get facade isa comment from element model get facade isa model element to element model get facade isa comment to element model get facade isa model element from element return model get uml factory is connection valid edge type from element to element true edgetype fromelement toelement isconnectionvalid edgetype fromelement toelement fromelement toelement edgetype commentedge getfacade isacomment fromelement getfacade isamodelelement toelement getfacade isacomment toelement getfacade isamodelelement fromelement getumlfactory isconnectionvalid edgetype fromelement toelement package scope only the factory is supposed to set this param dd void set di diagram di diagram dd di diagram dd setdidiagram didiagram didiagram get the object that represents this diagram in the diagram interchange model return the diagram interchange diagram public di diagram get di diagram return di diagram diagraminterchangemodel didiagram getdidiagram didiagram return true if the current targets may be removed from the diagram param figs a collection with the selected figs return true if the targets may be removed public boolean is remove from diagram allowed collection figs return figs is empty isremovefromdiagramallowed isempty set the project that the graph model is inside param p the project public void set project project p project p setproject get the project that the graph model is inside return the project public project get project return project getproject called when a new user interaction starts see org tigris gef undo undo manager start chain override public void start chain start chain true undomanager startchain startchain startchain override public boolean is generate mementos todo this shouldn t depend on the current project but for now just make sure it s defined and that we have an undo manager project p project manager get manager get current project return super is generate mementos p null p get undo manager null isgeneratemementos projectmanager getmanager getcurrentproject isgeneratemementos getundomanager param memento the gef memento see org tigris gef undo undo manager add memento org tigris gef undo memento override public void add memento final memento memento todo this shouldn t be referencing the current project instead the appropriate undo manager should have already been retrieved from the correct project project p project manager get manager get current project if p null org argouml kernel undo manager undo p get undo manager if undo null if start chain todo i18n gef needs to pass us back the description of what is being done undo start interaction diagram interaction todo i presume this would fix issue 5250 but gef would need to be adapted if memento instanceof selection memento undo add command new diagram command memento start chain false undomanager addmemento addmemento undomanager projectmanager getmanager getcurrentproject undomanager getundomanager startchain startinteraction selectionmemento addcommand diagramcommand startchain public void add property change listener property change listener listener log info adding property listener listener super add property change listener listener addpropertychangelistener propertychangelistener addpropertychangelistener private final memento memento diagram command final memento the memento this memento the memento diagramcommand thememento thememento override public object execute memento redo return null override public void undo memento undo override public string to string return memento to string tostring tostring constructor param me the model element param st the stereotype public action add stereotype object me object st super translator localize build string st null set the tooltip string put value action short description translator localize build string st model element me stereotype st actionaddstereotype buildstring putvalue short_description buildstring modelelement private static string build string object st project p project manager get manager get current project project settings ps p get project settings return notation utility uml generate stereotype st ps get notation settings is use guillemets buildstring projectmanager getmanager getcurrentproject projectsettings getprojectsettings notationutilityuml generatestereotype getnotationsettings isuseguillemets override public void action performed action event ae super action performed ae if model get facade get stereotypes model element contains stereotype model get core helper remove stereotype model element stereotype else model get core helper add stereotype model element stereotype actionperformed actionevent actionperformed getfacade getstereotypes modelelement getcorehelper removestereotype modelelement getcorehelper addstereotype modelelement override public object get value string key if selected equals key if model get facade get stereotypes model element contains stereotype return boolean true else return boolean false return super get value key getvalue getfacade getstereotypes modelelement getvalue the constructor public action goto diagram super translator localize action goto diagram null set the tooltip string put value action short description translator localize action goto diagram actiongotodiagram putvalue short_description see java awt event action listener action performed java awt event action event public void action performed action event ae super action performed ae new goto dialog set visible true actionlistener actionperformed actionevent actionperformed actionevent actionperformed gotodialog setvisible public boolean do command string argument project p project manager get manager get current project argo diagram d p get diagram argument if d null target manager get instance set target d return true return false docommand projectmanager getmanager getcurrentproject argodiagram getdiagram targetmanager getinstance settarget the constructor public action select invert this translator localize menu item invert selection actionselectinvert the constructor param name the name of the action action select invert string name super name actionselectinvert the constructor public action find set the name super translator localize action find name action find set the tooltip string put value action short description translator localize name set the icon icon icon resource loader wrapper lookup icon name put value action small icon icon actionfind putvalue short_description resourceloaderwrapper lookupicon putvalue small_icon see java awt event action listener action performed java awt event action event public void action performed action event ae find dialog get instance set visible true actionlistener actionperformed actionevent actionperformed actionevent finddialog getinstance setvisible the constructor public action adjust page breaks this translator localize menu adjust pagebreaks actionadjustpagebreaks the constructor param name the name of the action public action adjust page breaks string name super name actionadjustpagebreaks constructor calling the org tigris gef base zoom action constructor param zf the zoom factor public zoom action proxy double zf super zf zoom factor zf zoomaction zoomactionproxy zoomfactor tests if zoom factor values are ok before zooming param arg0 the action event to be transmitted see org tigris gef base zoom action action performed java awt event action event override public void action performed action event arg0 editor ed globals cur editor if ed null return if zoom factor 0 ed get scale zoom factor zoom slider button minimum zoom 100 0 ed get scale zoom factor zoom slider button maximum zoom 100 0 super action performed arg0 zoomaction actionperformed actionevent actionperformed actionevent cureditor zoomfactor getscale zoomfactor zoomsliderbutton minimum_zoom getscale zoomfactor zoomsliderbutton maximum_zoom actionperformed constructor adds the notation menu public action notation super translator localize menu notation null set the tooltip string put value action short description translator localize menu notation menu new j menu translator localize menu notation menu add this menu add menu listener this actionnotation putvalue short_description jmenu addmenulistener public void action performed action event ae super action performed ae string key ae get action command for notation name nn notation get available notations if key equals nn get title project p project manager get manager get current project p get project settings set notation language nn break actionperformed actionevent actionperformed getactioncommand notationname getavailablenotations gettitle projectmanager getmanager getcurrentproject getprojectsettings setnotationlanguage return the menu for the notation public j menu get menu return menu jmenu getmenu public void menu selected menu event me project p project manager get manager get current project notation name current p get project settings get notation name menu remove all button group b new button group for notation name nn notation get available notations j radio button menu item mi new j radio button menu item nn get title if nn get icon null mi set icon nn get icon mi add action listener this b add mi mi set selected current same notation as nn menu add mi menuselected menuevent projectmanager getmanager getcurrentproject notationname getprojectsettings getnotationname removeall buttongroup buttongroup notationname getavailablenotations jradiobuttonmenuitem jradiobuttonmenuitem gettitle geticon seticon geticon addactionlistener setselected samenotationas see javax swing event menu listener menu deselected javax swing event menu event public void menu deselected menu event me menulistener menudeselected menuevent menudeselected menuevent see javax swing event menu listener menu canceled javax swing event menu event public void menu canceled menu event me menulistener menucanceled menuevent menucanceled menuevent default constructor set minimum size command public cmd set preferred size super translator localize action size to fit contents super translator localize action set minimum size cmdsetpreferredsize set the fig to be resized param f the fig to resize public void set fig to resize fig f list fig figs new array list fig 1 figs add f set arg figs figs setfigtoresize arraylist setarg set the figs to be resized param figs the list of figs to resize public void set fig to resize list figs set arg figs figs setfigtoresize setarg set all the figs in the selection or passed by param figs to the size according to the mode of the command public void do it editor ce globals cur editor list fig figs list fig get arg figs if figs null selection manager sm ce get selection manager if sm get locked globals show status translator localize action locked objects not modify return figs sm get figs if figs null return int size figs size if size 0 return for int i 0 i size i fig fi figs get i only resize elements which the user would also be able to resize if fi is resizable but exclude elements that enclose others since their algorithms to calculate the minimum size does not take enclosed objects into account fi get enclosed figs null fi get enclosed figs size 0 fi set size fi get minimum size todo beautify the 2nd part of this string globals show status translator localize action setting size new object fi fi end trans doit cureditor getarg selectionmanager getselectionmanager getlocked showstatus getfigs isresizable getenclosedfigs getenclosedfigs setsize getminimumsize showstatus endtrans see org tigris gef base cmd undo it public void undo it unsupported undoit undoit the constructor public action select all this translator localize menu item select all actionselectall the constructor param name the name of the action action select all string name super name actionselectall constructs a new zoom slider button public zoom slider button super set action new abstract action public void action performed action event e if action comes in with no modifiers it is a pure keyboard event e g spacebar so do it anything else is probably a mouse event so ignore it mouse events are dealt with by mouse pressed instead see bottom of page if e get modifiers 0 show popup icon icon resource loader wrapper lookup icon resource name my mouse listener my mouse listener new my mouse listener add mouse motion listener my mouse listener add mouse listener my mouse listener set icon icon set tool tip text translator localize button zoom zoomsliderbutton zoomsliderbutton setaction abstractaction actionperformed actionevent mousepressed getmodifiers showpopup resourceloaderwrapper lookupicon resource_name mymouselistener mymouselistener mymouselistener addmousemotionlistener mymouselistener addmouselistener mymouselistener seticon settooltiptext set action new abstract action public void action performed action event e if action comes in with no modifiers it is a pure keyboard event e g spacebar so do it anything else is probably a mouse event so ignore it mouse events are dealt with by mouse pressed instead see bottom of page if e get modifiers 0 show popup setaction abstractaction actionperformed actionevent mousepressed getmodifiers showpopup creates the slider popup component private void create popup component slider new j slider j slider vertical minimum zoom maximum zoom minimum zoom slider set inverted true slider set major tick spacing 25 slider set minor tick spacing 5 slider set paint ticks true slider set paint track true int slider base width slider get preferred size width slider set paint labels true for enumeration components slider get label table elements components has more elements component components next element set font label font slider set tool tip text translator localize button zoom slider tooltip slider add change listener new change listener public void state changed change event e handle slider value change int label width slider get font metrics label font string width string value of maximum zoom 6 slider set preferred size new dimension slider base width label width slider height current value new j text field 5 current value set horizontal alignment j label center current value set font label font current value set tool tip text translator localize button zoom current zoom magnification update current value label current value add action listener new action listener public void action performed action event e handle text entry current value add focus listener new focus adapter override public void focus lost focus event e handle text entry j panel current value panel new j panel new flow layout flow layout center 0 0 current value panel add current value j panel zoom panel new j panel new border layout 0 0 zoom panel add slider border layout center zoom panel add current value panel border layout north set popup component zoom panel createpopupcomponent jslider jslider minimum_zoom maximum_zoom minimum_zoom setinverted setmajortickspacing setminortickspacing setpaintticks setpainttrack sliderbasewidth getpreferredsize setpaintlabels getlabeltable hasmoreelements nextelement setfont label_font settooltiptext addchangelistener changelistener statechanged changeevent handleslidervaluechange labelwidth getfontmetrics label_font stringwidth valueof maximum_zoom setpreferredsize sliderbasewidth labelwidth slider_height currentvalue jtextfield currentvalue sethorizontalalignment jlabel currentvalue setfont label_font currentvalue settooltiptext updatecurrentvaluelabel currentvalue addactionlistener actionlistener actionperformed actionevent handletextentry currentvalue addfocuslistener focusadapter focuslost focusevent handletextentry jpanel currentvaluepanel jpanel flowlayout flowlayout currentvaluepanel currentvalue jpanel zoompanel jpanel borderlayout zoompanel borderlayout zoompanel currentvaluepanel borderlayout setpopupcomponent zoompanel slider add change listener new change listener public void state changed change event e handle slider value change addchangelistener changelistener statechanged changeevent handleslidervaluechange update current value label current value add action listener new action listener public void action performed action event e handle text entry updatecurrentvaluelabel currentvalue addactionlistener actionlistener actionperformed actionevent handletextentry current value add focus listener new focus adapter override public void focus lost focus event e handle text entry currentvalue addfocuslistener focusadapter focuslost focusevent handletextentry update the slider value every time the popup is shown override protected void show popup if slider null create popup component editor ed globals cur editor if ed null slider set value int ed get scale 100d if popup button is active super show popup j popup menu pm j popup menu this get popup component get parent popup menu listener pml new my popup menu listener pm add popup menu listener pml popup menu is showing true slider request focus showpopup createpopupcomponent cureditor setvalue getscale popupbuttonisactive showpopup jpopupmenu jpopupmenu getpopupcomponent getparent popupmenulistener mypopupmenulistener addpopupmenulistener popupmenuisshowing requestfocus called when the slider value changes private void handle slider value change update current value label if source get value is adjusting double zoom percentage slider get value 100d editor ed globals cur editor if ed null zoom percentage 0 0 return if zoom percentage ed get scale ed set scale zoom percentage ed damage all handleslidervaluechange updatecurrentvaluelabel getvalueisadjusting zoompercentage getvalue cureditor zoompercentage zoompercentage getscale setscale zoompercentage damageall called when the text field value changes private void handle text entry string value current value get text if value ends with value value substring 0 value length 1 try int new zoom integer parse int value if new zoom minimum zoom new zoom maximum zoom throw new number format exception slider set value new zoom catch number format exception ex update current value label handletextentry currentvalue gettext endswith newzoom parseint newzoom minimum_zoom newzoom maximum_zoom numberformatexception setvalue newzoom numberformatexception updatecurrentvaluelabel sets the current value label s text to the current slider value private void update current value label current value set text string value of slider get value updatecurrentvaluelabel currentvalue settext valueof getvalue empty method to satisfy interface public void action performed action event e actionperformed actionevent method gets fired when the popup dies conditionally re enable the button depending on where the pointer is public void popup menu canceled popup menu event e if mouse is over popup button popup button is active false else popup button is active true popup menu is showing false popupmenucanceled popupmenuevent mouseisoverpopupbutton popupbuttonisactive popupbuttonisactive popupmenuisshowing public void popup menu will become invisible popup menu event e popupmenuwillbecomeinvisible popupmenuevent public void popup menu will become visible popup menu event e popupmenuwillbecomevisible popupmenuevent keeps track of mouseover status override public void mouse entered mouse event me mouse is over popup button true mouseentered mouseevent mouseisoverpopupbutton keeps track of mouseover status and renables button if necessary override public void mouse exited mouse event me mouse is over popup button false if popup button is active popup menu is showing popup button is active true mouseexited mouseevent mouseisoverpopupbutton popupbuttonisactive popupmenuisshowing popupbuttonisactive catch the down stroke of mouse click to make the popup appear a tiny bit earlier override public void mouse pressed mouse event me if popup button is active show popup else if popup menu is showing popup button is active true mousepressed mouseevent popupbuttonisactive showpopup popupmenuisshowing popupbuttonisactive constructor for cmd create node param node type the type of model element for which to create a fig node param name the i18n key used to generate the tooltip and icon public cmd create node object node type string name super node type name resource loader wrapper lookup icon resource resource loader wrapper get image binding name put tool tip name cmdcreatenode nodetype fignode cmdcreatenode nodetype nodetype resourceloaderwrapper lookupiconresource resourceloaderwrapper getimagebinding puttooltip delegate creation of the node to the uml model subsystem return an object which represents a particular uml element see org tigris gef graph graph factory make node see org tigris gef base cmd create node make node override public object make node todo we need to get the model extent and package associated with the current diagram so that we can create the new element in the right place object new node model get uml factory build node get arg class name return new node graphfactory makenode cmdcreatenode makenode makenode newnode getumlfactory buildnode getarg classname newnode adds tooltip text to the action param name the key to localize as the name private void put tool tip string name put value action short description translator localize name puttooltip putvalue short_description constructor param model element self param mi model interpreter public evaluate expression object model element model interpreter mi reset model element mi modelelement evaluateexpression modelelement modelinterpreter modelelement constructor param variable table the variable table param model interpreter model interpreter public evaluate expression map string object variable table model interpreter model interpreter reset variable table model interpreter variabletable modelinterpreter evaluateexpression variabletable modelinterpreter modelinterpreter variabletable modelinterpreter resets the internal state of this adapter param mi the model interpreter param element the model element public void reset object element model interpreter mi vt new hash map string object vt put self element reset vt mi modelinterpreter hashmap param newvt the variable table param mi the model interpreter public void reset map string object newvt model interpreter mi this interp mi this val null this fwd null this vt newvt modelinterpreter return is the invariant ok public object get value return val getvalue interpreter code see tudresden ocl parser analysis depth first adapter casea if expression tudresden ocl parser node a if expression public void casea if expression a if expression node boolean test false boolean ret false ina if expression node if node gett if null node gett if apply this if node get if branch null node get if branch apply this test as boolean val node get if branch val null if node gett then null node gett then apply this if node get then branch null node get then branch apply this if test ret as boolean val node get then branch val null if node gett else null node gett else apply this if node get else branch null node get else branch apply this if test ret as boolean val node get then branch val null if node get endif null node get endif apply this val ret outa if expression node depthfirstadapter caseaifexpression aifexpression caseaifexpression aifexpression inaifexpression gettif gettif getifbranch getifbranch asboolean getifbranch gettthen gettthen getthenbranch getthenbranch asboolean getthenbranch gettelse gettelse getelsebranch getelsebranch asboolean getthenbranch getendif getendif outaifexpression public void casea logical expression tail a logical expression tail node object left val val null ina logical expression tail node if node get logical operator null node get logical operator apply this if node get relational expression null node get relational expression apply this object op node get logical operator object right val val null if op null if op instanceof a and logical operator if left null left instanceof boolean boolean left boolean value false val false else if right null right instanceof boolean boolean right boolean value false val false else val as boolean left node as boolean right node else if op instanceof a implies logical operator val as boolean left node as boolean right node else if op instanceof a or logical operator if left null left instanceof boolean boolean left boolean value true val true else if right null right instanceof boolean boolean right boolean value true val true else val as boolean left node as boolean right node else if op instanceof a xor logical operator val as boolean left node as boolean right node else error node else error node outa logical expression tail node casealogicalexpressiontail alogicalexpressiontail inalogicalexpressiontail getlogicaloperator getlogicaloperator getrelationalexpression getrelationalexpression getlogicaloperator aandlogicaloperator booleanvalue booleanvalue asboolean asboolean aimplieslogicaloperator asboolean asboolean aorlogicaloperator booleanvalue booleanvalue asboolean asboolean axorlogicaloperator asboolean asboolean outalogicalexpressiontail public void casea relational expression tail a relational expression tail node object left val val null ina relational expression tail node if node get relational operator null node get relational operator apply this if node get additive expression null node get additive expression apply this object op node get relational operator object right val val null if left null op null right null if op instanceof a equal relational operator val left equals right else if op instanceof a gteq relational operator val as integer left node as integer right node else if op instanceof a gt relational operator val as integer left node as integer right node else if op instanceof a lteq relational operator val as integer left node as integer right node else if op instanceof a lt relational operator val as integer left node as integer right node else if op instanceof an equal relational operator val left equals right else error node else if one side is null compare with the equality operator if op instanceof a equal relational operator val left right else if op instanceof an equal relational operator val left right else error node val null outa relational expression tail node casearelationalexpressiontail arelationalexpressiontail inarelationalexpressiontail getrelationaloperator getrelationaloperator getadditiveexpression getadditiveexpression getrelationaloperator aequalrelationaloperator agteqrelationaloperator asinteger asinteger agtrelationaloperator asinteger asinteger alteqrelationaloperator asinteger asinteger altrelationaloperator asinteger asinteger anequalrelationaloperator aequalrelationaloperator anequalrelationaloperator outarelationalexpressiontail override public void casea additive expression tail a additive expression tail node object left val val null ina additive expression tail node if node get add operator null node get add operator apply this if node get multiplicative expression null node get multiplicative expression apply this object op node get add operator object right val val null if left null op null right null if op instanceof a minus add operator val as integer left node as integer right node else if op instanceof a plus add operator val as integer left node as integer right node else error node else error node outa additive expression tail node caseaadditiveexpressiontail aadditiveexpressiontail inaadditiveexpressiontail getaddoperator getaddoperator getmultiplicativeexpression getmultiplicativeexpression getaddoperator aminusaddoperator asinteger asinteger aplusaddoperator asinteger asinteger outaadditiveexpressiontail public void casea multiplicative expression tail a multiplicative expression tail node object left val val null ina multiplicative expression tail node if node get multiply operator null node get multiply operator apply this if node get unary expression null node get unary expression apply this object op node get multiply operator object right val val null if left null op null right null if op instanceof a div multiply operator val as integer left node as integer right node else if op instanceof a mult multiply operator val as integer left node as integer right node else error node else error node outa multiplicative expression tail node caseamultiplicativeexpressiontail amultiplicativeexpressiontail inamultiplicativeexpressiontail getmultiplyoperator getmultiplyoperator getunaryexpression getunaryexpression getmultiplyoperator adivmultiplyoperator asinteger asinteger amultmultiplyoperator asinteger asinteger outamultiplicativeexpressiontail public void casea unary unary expression a unary unary expression node ina unary unary expression node if node get unary operator null node get unary operator apply this if node get postfix expression null val null node get postfix expression apply this object op node get unary operator if op instanceof a minus unary operator val as integer val node else if op instanceof a not unary operator val as boolean val node outa unary unary expression node caseaunaryunaryexpression aunaryunaryexpression inaunaryunaryexpression getunaryoperator getunaryoperator getpostfixexpression getpostfixexpression getunaryoperator aminusunaryoperator asinteger anotunaryoperator asboolean outaunaryunaryexpression public void casea postfix expression tail a postfix expression tail node ina postfix expression tail node if node get postfix expression tail begin null node get postfix expression tail begin apply this if node get feature call null fwd node get postfix expression tail begin node get feature call apply this xxx hypotheses for a feature call fwd op val head outa postfix expression tail node caseapostfixexpressiontail apostfixexpressiontail inapostfixexpressiontail getpostfixexpressiontailbegin getpostfixexpressiontailbegin getfeaturecall getpostfixexpressiontailbegin getfeaturecall afeaturecall outapostfixexpressiontail override public void casea feature primary expression a feature primary expression node object subject val object feature null list parameters null ina feature primary expression node if node get path name null todo support other name kinds node get path name apply this feature node get path name to string trim if node get time expression null hypotheses no time expression only invariants node get time expression apply this if node get qualifiers null xxx hypotheses no qualifiers i don t know node get qualifiers apply this if node get feature call parameters null val null node get feature call parameters apply this parameters list val if subject null val vt get feature if val null val this interp get built in symbol feature to string trim else val run feature call subject feature fwd parameters outa feature primary expression node caseafeatureprimaryexpression afeatureprimaryexpression inafeatureprimaryexpression getpathname getpathname getpathname tostring gettimeexpression gettimeexpression getqualifiers getqualifiers getfeaturecallparameters getfeaturecallparameters getbuiltinsymbol tostring runfeaturecall outafeatureprimaryexpression override public void outa empty feature call parameters a empty feature call parameters node val new array list default out node outaemptyfeaturecallparameters aemptyfeaturecallparameters arraylist defaultout suppress warnings unchecked override public void casea feature call parameters a feature call parameters node ina feature call parameters node if node getl par null node getl par apply this boolean has declarator false if node get declarator null node get declarator apply this has declarator true if node get actual parameter list null list string vars null if has declarator list ret new array list vars list val final p expression exp a actual parameter list node get actual parameter list get expression for a iterator call we should provide a the variables b the expression to be evaluated on each step c the lambda evaluator to evaluate it ret add vars ret add exp ret add new lambda evaluator see org argouml profile internal ocl lambda evaluator evaluate java util map java lang object public object evaluate map string object vti object expi object state evaluate expression this save state evaluate expression this vt vti evaluate expression this val null evaluate expression this fwd null p expression expi apply evaluate expression this object reti evaluate expression this val evaluate expression this load state state return reti val ret else node get actual parameter list apply this if node getr par null node getr par apply this outa feature call parameters node suppresswarnings caseafeaturecallparameters afeaturecallparameters inafeaturecallparameters getlpar getlpar hasdeclarator getdeclarator getdeclarator hasdeclarator getactualparameterlist hasdeclarator arraylist pexpression aactualparameterlist getactualparameterlist getexpression lambdaevaluator lambdaevaluator evaluateexpression savestate evaluateexpression evaluateexpression evaluateexpression pexpression evaluateexpression evaluateexpression evaluateexpression loadstate getactualparameterlist getrpar getrpar outafeaturecallparameters see org argouml profile internal ocl lambda evaluator evaluate java util map java lang object public object evaluate map string object vti object expi object state evaluate expression this save state evaluate expression this vt vti evaluate expression this val null evaluate expression this fwd null p expression expi apply evaluate expression this object reti evaluate expression this val evaluate expression this load state state return reti lambdaevaluator evaluateexpression savestate evaluateexpression evaluateexpression evaluateexpression pexpression evaluateexpression evaluateexpression evaluateexpression loadstate suppress warnings unchecked private void load state object state object state arr object state this vt map string object state arr 0 this val state arr 1 this fwd state arr 2 suppresswarnings loadstate statearr statearr statearr statearr private object save state return new object vt val fwd savestate override public void casea standard declarator a standard declarator node ina standard declarator node list string vars new array list string if node get name null node get name apply this vars add node get name to string trim object temp node get declarator tail to array for int i 0 i temp length i p declarator tail temp i apply this vars add a declarator tail temp i get name to string trim val vars if node get declarator type declaration null todo check types node get declarator type declaration apply this if node get bar null node get bar apply this outa standard declarator node caseastandarddeclarator astandarddeclarator inastandarddeclarator arraylist getname getname getname tostring getdeclaratortail toarray pdeclaratortail adeclaratortail getname tostring getdeclaratortypedeclaration getdeclaratortypedeclaration getbar getbar outastandarddeclarator override public void outa iterate declarator a iterate declarator node todo support iterate declarator val new array list string default out node outaiteratedeclarator aiteratedeclarator arraylist defaultout override public void casea let expression a let expression node todo support nested let expressions object name null object value null ina let expression node if node gett let null node gett let apply this if node get name null node get name apply this name node get name to string trim if node get let expression type declaration null todo check type node get let expression type declaration apply this if node get equal null node get equal apply this if node get expression null node get expression apply this value val if node gett in null node gett in apply this vt put name trim value val null outa let expression node casealetexpression aletexpression inaletexpression gettlet gettlet getname getname getname tostring getletexpressiontypedeclaration getletexpressiontypedeclaration getequal getequal getexpression getexpression gettin gettin outaletexpression public void outa string literal a string literal node string text node get string lit get text val text substring 1 text length 1 default out node outastringliteral astringliteral getstringlit gettext defaultout public void outa real literal a real literal node todo support real types val int double parse double node get real get text default out node outarealliteral arealliteral parsedouble getreal gettext defaultout see tudresden ocl parser analysis depth first adapter outa integer literal tudresden ocl parser node a integer literal public void outa integer literal a integer literal node val integer parse int node get int get text default out node depthfirstadapter outaintegerliteral aintegerliteral outaintegerliteral aintegerliteral parseint getint gettext defaultout see tudresden ocl parser analysis depth first adapter outa boolean literal tudresden ocl parser node a boolean literal public void outa boolean literal a boolean literal node val boolean parse boolean node get bool get text default out node depthfirstadapter outabooleanliteral abooleanliteral outabooleanliteral abooleanliteral parseboolean getbool gettext defaultout see tudresden ocl parser analysis depth first adapter outa enum literal tudresden ocl parser node a enum literal public void outa enum literal a enum literal node val new ocl enum literal node get name to string trim default out node depthfirstadapter outaenumliteral aenumliteral outaenumliteral aenumliteral oclenumliteral getname tostring defaultout suppress warnings unchecked public void casea literal collection a literal collection node collection object col null ina literal collection node if node get collection kind null node get collection kind apply this string kind node get collection kind to string trim if kind equals ignore case set col new hash set object else if kind equals ignore case sequence col new array list object else if kind equals ignore case bag col new hash bag object if node getl brace null node getl brace apply this if node get expression list or range null val null node get expression list or range apply this col add all collection object val if node getr brace null node getr brace apply this val col outa literal collection node suppresswarnings casealiteralcollection aliteralcollection inaliteralcollection getcollectionkind getcollectionkind getcollectionkind tostring equalsignorecase hashset equalsignorecase arraylist equalsignorecase hashbag getlbrace getlbrace getexpressionlistorrange getexpressionlistorrange addall getrbrace getrbrace outaliteralcollection override public void casea expression list or range a expression list or range node list ret new array list ina expression list or range node if node get expression null val null node get expression apply this ret add val if node get expression list or range tail null val null node get expression list or range tail apply this ret add all collection val val ret outa expression list or range node caseaexpressionlistorrange aexpressionlistorrange arraylist inaexpressionlistorrange getexpression getexpression getexpressionlistorrangetail getexpressionlistorrangetail addall outaexpressionlistorrange override public void casea list expression list or range tail a list expression list or range tail node todo support other kinds of tail ina list expression list or range tail node list ret new array list object temp node get expression list tail to array for int i 0 i temp length i val null p expression list tail temp i apply this ret add val val ret outa list expression list or range tail node casealistexpressionlistorrangetail alistexpressionlistorrangetail inalistexpressionlistorrangetail arraylist getexpressionlisttail toarray pexpressionlisttail outalistexpressionlistorrangetail override public void casea feature call a feature call node object subject val object feature null object type fwd list parameters null ina feature call node if node get path name null todo support other name kinds node get path name apply this feature node get path name to string trim if node get time expression null xxx hypothesis no time expression inv node get time expression apply this if node get qualifiers null todo understand qualifiers node get qualifiers apply this if node get feature call parameters null val null node get feature call parameters apply this parameters list val else parameters new array list val run feature call subject feature type parameters outa feature call node caseafeaturecall afeaturecall inafeaturecall getpathname getpathname getpathname tostring gettimeexpression gettimeexpression getqualifiers getqualifiers getfeaturecallparameters getfeaturecallparameters arraylist runfeaturecall outafeaturecall override public void casea actual parameter list a actual parameter list node list list new array list ina actual parameter list node if node get expression null val null node get expression apply this list add val object temp node get actual parameter list tail to array for int i 0 i temp length i val null p actual parameter list tail temp i apply this list add val val list outa actual parameter list node caseaactualparameterlist aactualparameterlist arraylist inaactualparameterlist getexpression getexpression getactualparameterlisttail toarray pactualparameterlisttail outaactualparameterlist helper methods private boolean as boolean object value object node if value instanceof boolean return boolean value else error not type node boolean false return false asboolean errornottype private int as integer object value object node if value instanceof integer return integer value else error not type node integer 0 return 0 asinteger errornottype private object run feature call object subject object feature object type list parameters log debug ocl feature call subject type feature parameters if parameters null parameters new array list object xxx this should be done in collections model interpreter but it can t trigger another invoke feature if subject instanceof collection type to string trim equals collection col collection subject bag res new hash bag for object obj col res add interp invoke feature vt obj feature to string trim parameters to array return res else return interp invoke feature vt subject feature to string trim type to string trim parameters to array runfeaturecall arraylist collectionsmodelinterpreter invokefeature tostring hashbag invokefeature tostring toarray invokefeature tostring tostring toarray error handling private void error not type object node string type object dft log error ocl does not evaluate to a type expression exp node val val val dft todo we need a specific exception type here throw new runtime exception errornottype runtimeexception private void error object node log error unknown error processing ocl exp exp node val val val null todo we need a specific exception type here throw new runtime exception runtimeexception override public void casea classifier context a classifier context node string str node get path type name triggs add str trim to lower case caseaclassifiercontext aclassifiercontext getpathtypename tolowercase return the triggers public list string get triggers return triggs gettriggers constructor param element self param interpreter model interpreter public evaluate invariant object element model interpreter interpreter this model element element this mi interpreter this exp evaluator new evaluate expression element interpreter evaluateinvariant modelinterpreter modelelement expevaluator evaluateexpression return is the invariant ok public boolean isok return ok interpreter code see tudresden ocl parser analysis depth first adapter casea constraint tudresden ocl parser node a constraint override public void casea constraint a constraint node ina constraint node if node get context declaration null node get context declaration apply this boolean local ok true object temp node get constraint body to array for int i 0 i temp length i exp evaluator reset model element mi p constraint body temp i apply exp evaluator object val exp evaluator get value local ok val null val instanceof boolean boolean val ok local ok outa constraint node depthfirstadapter caseaconstraint aconstraint caseaconstraint aconstraint inaconstraint getcontextdeclaration getcontextdeclaration localok getconstraintbody toarray expevaluator modelelement pconstraintbody expevaluator expevaluator getvalue localok localok outaconstraint constructors param element the model element public context applicable object element this model element element contextapplicable modelelement return returns the applicable public boolean is applicable return applicable isapplicable param node see tudresden ocl parser analysis depth first adapter casea classifier context tudresden ocl parser node a classifier context public void casea classifier context a classifier context node string metaclass node get path type name trim applicable model get facade isa metaclass model element depthfirstadapter caseaclassifiercontext aclassifiercontext caseaclassifiercontext aclassifiercontext getpathtypename getfacade modelelement param node see tudresden ocl parser analysis depth first adapter ina pre stereotype tudresden ocl parser node a pre stereotype public void ina pre stereotype a pre stereotype node applicable false depthfirstadapter inaprestereotype aprestereotype inaprestereotype aprestereotype param node see tudresden ocl parser analysis depth first adapter ina post stereotype tudresden ocl parser node a post stereotype public void ina post stereotype a post stereotype node applicable false depthfirstadapter inapoststereotype apoststereotype inapoststereotype apoststereotype override public void casea classifier context a classifier context node string str node get path type name trim todo this appears unused if it s needed the model api should be enhanced to provide a method that does this directly if str equals class dms add model get meta types getuml class else try method m meta types class get declared method get str new class 0 if m null dms add m invoke model get meta types new object 0 catch exception e log error metaclass not found str e caseaclassifiercontext aclassifiercontext getpathtypename getmetatypes getumlclass metatypes getdeclaredmethod getmetatypes return the criticized design materials public set object get criticized design materials return dms getcriticizeddesignmaterials param parser param the edge public fig edge handler pgml stack parser parser fig edge the edge super parser the edge theedge figedgehandler pgmlstackparser figedge theedge theedge incorporates a contained element into this fig edge object p three types of contained elements are supported fig line or fig poly become the fig associated with this fig edge string valued elements i e em private em elements are themselves parsed to determin the source and destination port fig s for this fig edge see org tigris gef persistence pgml container add object java lang object public void add object object o throws sax exception fig edge edge get fig edge if o instanceof fig line o instanceof fig poly edge set fig fig o if o instanceof fig poly fig poly o set complete true edge calc bounds if edge instanceof fig edge poly fig edge poly edge set initially laid out true edge update annotation positions if o instanceof string pgml stack parser parser getpgml stack parser fig spf null fig dpf null fig node sfn null fig node dfn null string body string o string tokenizer st2 new string tokenizer body t n string source port fig null string dest port fig null string source fig node null string dest fig node null while st2 has more elements string attribute st2 next token string value st2 next token if attribute equals source port fig source port fig value if attribute equals dest port fig dest port fig value if attribute equals source fig node source fig node value if attribute equals dest fig node dest fig node value org argouml persistence pgml stack parser parser add fig edge edge source port fig dest port fig source fig node dest fig node figedge figline figpoly figedge portfig figedge addobject addobject saxexception figedge getfigedge figline figpoly setfig figpoly figpoly setcomplete calcbounds figedgepoly figedgepoly setinitiallylaidout updateannotationpositions pgmlstackparser getpgmlstackparser fignode fignode stringtokenizer stringtokenizer sourceportfig destportfig sourcefignode destfignode hasmoreelements nexttoken nexttoken sourceportfig sourceportfig destportfig destportfig sourcefignode sourcefignode destfignode destfignode pgmlstackparser addfigedge sourceportfig destportfig sourcefignode destfignode constructor param model elements by uuid a map of model elements indexed by a unique string identifier deprecated for 0 27 2 by tfmorris use link pgml stack parser map diagram settings deprecated public pgml stack parser map model elements by uuid super model elements by uuid add translations modelelementsbyuuid pgmlstackparser diagramsettings pgmlstackparser modelelementsbyuuid modelelementsbyuuid addtranslations what is the last version that used fig note private void add translations add translation org argouml uml diagram ui fig note org argouml uml diagram static structure ui fig comment add translation org argouml uml diagram static structure ui fig note org argouml uml diagram static structure ui fig comment add translation org argouml uml diagram state ui fig state org argouml uml diagram state ui fig simple state add translation org argouml uml diagram ui fig comment port org argouml uml diagram ui fig edge port add translation org tigris gef presentation fig text org argouml uml diagram ui argo fig text add translation org tigris gef presentation fig line org argouml gefext argo fig line add translation org tigris gef presentation fig poly org argouml gefext argo fig poly add translation org tigris gef presentation fig circle org argouml gefext argo fig circle add translation org tigris gef presentation fig rect org argouml gefext argo fig rect add translation org tigris gef presentation figr rect org argouml gefext argo figr rect add translation org argouml uml diagram deployment ui figm node instance org argouml uml diagram deployment ui fig node instance add translation org argouml uml diagram ui fig realization org argouml uml diagram ui fig abstraction fignote addtranslations addtranslation fignote static_structure figcomment addtranslation static_structure fignote static_structure figcomment addtranslation figstate figsimplestate addtranslation figcommentport figedgeport addtranslation figtext argofigtext addtranslation figline argofigline addtranslation figpoly argofigpoly addtranslation figcircle argofigcircle addtranslation figrect argofigrect addtranslation figrrect argofigrrect addtranslation figmnodeinstance fignodeinstance addtranslation figrealization figabstraction construct a pgml parser with the given href object map and default diagram settings param model elements by uuid map of href ids to objects used to associate figs with their owning model elements param default settings default diagram settings to use for newly created diagram and its contained figs public pgml stack parser map string object model elements by uuid diagram settings default settings super model elements by uuid add translations create a new diagram wide settings block which is backed by the project wide defaults that we were passed diagram settings new diagram settings default settings modelelementsbyuuid defaultsettings pgmlstackparser modelelementsbyuuid diagramsettings defaultsettings modelelementsbyuuid addtranslations diagramsettings diagramsettings defaultsettings override public default handler get handler handler stack stack object container string uri string localname string qname attributes attributes throws sax exception string href attributes get value href object owner null if href null owner find owner href if owner null log warn found href of href with no matching element in model return null ignore non private elements within fig node groups if container instanceof fig group handler fig group group fig group handler container get fig group if group instanceof fig node qname equals private return null handle itemuid in container contents if qname equals private container instanceof container return new private handler this container container default handler handler super get handler stack container uri localname qname attributes if handler instanceof fig edge handler return new org argouml persistence fig edge handler this fig edge handler handler get fig edge return handler defaulthandler gethandler handlerstack saxexception getvalue findowner fignode figgrouphandler figgroup figgrouphandler getfiggroup fignode privatehandler defaulthandler gethandler figedgehandler figedgehandler figedgehandler getfigedge override protected final void set attrs fig f attributes attr list throws sax exception if f instanceof fig group fig group group fig group f string cls name bounds attr list get value description if cls name bounds null string tokenizer st new string tokenizer cls name bounds discard class name x y w h if st has more elements st next token if st has more elements st next token if st has more elements st next token if st has more elements st next token if st has more elements st next token map string string attribute map interpret style st set style attributes group attribute map todo attempt to move the following code to gef string name attr list get value name if name null name equals register fig f name set common attrs f attr list final string href attr list get value href if href null href equals object model element find owner href if model element null log error can t find href of href throw new sax exception found href of href with no matching element in model the owner should always have already been set in the constructor if f get owner model element assign nodes immediately but edges later see issue 4310 if f instanceof fig edge model elements by fig edge put fig edge f model element else f set owner model element else log debug ignoring href on f get class get name as it s already set setattrs attrlist saxexception figgroup figgroup figgroup clsnamebounds attrlist getvalue clsnamebounds stringtokenizer stringtokenizer clsnamebounds hasmoreelements nexttoken hasmoreelements nexttoken hasmoreelements nexttoken hasmoreelements nexttoken hasmoreelements nexttoken attributemap interpretstyle setstyleattributes attributemap attrlist getvalue registerfig setcommonattrs attrlist attrlist getvalue modelelement findowner modelelement saxexception getowner modelelement figedge modelelementsbyfigedge figedge modelelement setowner modelelement getclass getname the string tokenizer is expected to be positioned at the start of a string of style identifiers in the format name value name value name value each name value pair is interpreted and the fig configured accordingly the value is optional and will default to a value applicable for its name the current applicable names are operations visible and attributes visible and are used to show or hide the compartments within class and interface the default values are true param st the strink tokenizer positioned at the first style identifier return a map of attributes private map string string interpret style string tokenizer st map string string map new hash map string string string name string value while st has more elements string namevaluepair st next token int equals pos namevaluepair index of if equals pos 0 name namevaluepair value true else name namevaluepair substring 0 equals pos value namevaluepair substring equals pos 1 map put name value return map stringtokenizer operationsvisible attributesvisible strinktokenizer interpretstyle stringtokenizer hashmap hasmoreelements nexttoken equalspos indexof equalspos equalspos equalspos set the fig style attributes this should move into the render factories as described in issue 859 param fig the fig to style param attribute map a map of name value pairs private void set style attributes fig fig map string string attribute map for map entry string string entry attribute map entry set final string name entry get key final string value entry get value if operations visible equals name operations compartment container fig set operations visible value equals ignore case true else if attributes visible equals name attributes compartment container fig set attributes visible value equals ignore case true else if stereotype visible equals name stereotype container fig set stereotype visible value equals ignore case true else if visibility visible equals name visibility container fig set visibility visible value equals ignore case true else if path visible equals name path container fig set path visible value equals ignore case true else if extension point visible equals name extensions compartment container fig set extension point visible value equals ignore case true attributemap setstyleattributes attributemap attributemap entryset getkey getvalue operationsvisible operationscompartmentcontainer setoperationsvisible equalsignorecase attributesvisible attributescompartmentcontainer setattributesvisible equalsignorecase stereotypevisible stereotypecontainer setstereotypevisible equalsignorecase visibilityvisible visibilitycontainer setvisibilityvisible equalsignorecase pathvisible pathcontainer setpathvisible equalsignorecase extensionpointvisible extensionscompartmentcontainer setextensionpointvisible equalsignorecase read and parse the input stream to create a new diagram and return it param is the input stream param close stream true to close the stream when parsing is complete return the diagram created as a result of the parse throws sax exception public argo diagram read argo diagram input stream is boolean close stream throws sax exception return argo diagram read diagram is close stream closestream saxexception argodiagram readargodiagram inputstream closestream saxexception argodiagram readdiagram closestream override public diagram read diagram input stream is boolean close stream throws sax exception todo we really want to be able replace the initial content handler which is passed to sax but we can t do this without cloning a whole bunch of code because it s private in the super class diagram d super read diagram is close stream attach edges d return d readdiagram inputstream closestream saxexception readdiagram closestream attachedges this is called when all nodes and edges have been read and placed on the diagram this method then attaches the edges to the correct node including the nodes contained within edges allowing edge to edge connections for comment edges association classes and dependencies param d the diagram private void attach edges diagram d for edge data edge data fig edges final fig edge edge edge data get fig edge object model element model elements by fig edge get edge if model element null if edge get owner null edge set owner model element for edge data edge data fig edges final fig edge edge edge data get fig edge fig source port fig find fig edge data get source port fig id fig dest port fig find fig edge data get dest port fig id final fig node source fig node get fig node edge data get source fig node id final fig node dest fig node get fig node edge data get dest fig node id if source fig node instanceof fig edge port source port fig source fig node if dest fig node instanceof fig edge port dest port fig dest fig node if source port fig null source fig node null source port fig get port fig source fig node if dest port fig null dest fig node null dest port fig get port fig dest fig node if source port fig null dest port fig null source fig node null dest fig node null log error can t find nodes for fig edge edge get id edge to string edge remove from diagram else edge set source port fig source port fig edge set dest port fig dest port fig edge set source fig node source fig node edge set dest fig node dest fig node once all edges are connected do a compute route on each to make sure that annotations and the edge port is positioned correctly only do this after all edges are connected as compute route requires all edges to be connected to nodes todo it would be nice not to have to do this and restore annotation positions instead for object edge d get layer get contents edges only fig edge fig edge fig edge edge fig edge compute route impl attachedges edgedata edgedata figedges figedge edgedata getfigedge modelelement modelelementsbyfigedge modelelement getowner setowner modelelement edgedata edgedata figedges figedge edgedata getfigedge sourceportfig findfig edgedata getsourceportfigid destportfig findfig edgedata getdestportfigid fignode sourcefignode getfignode edgedata getsourcefignodeid fignode destfignode getfignode edgedata getdestfignodeid sourcefignode figedgeport sourceportfig sourcefignode destfignode figedgeport destportfig destfignode sourceportfig sourcefignode sourceportfig getportfig sourcefignode destportfig destfignode destportfig getportfig destfignode sourceportfig destportfig sourcefignode destfignode figedge getid tostring removefromdiagram setsourceportfig sourceportfig setdestportfig destportfig setsourcefignode sourcefignode setdestfignode destfignode getlayer getcontentsedgesonly figedge figedge figedge figedge computerouteimpl todo move to gef store data of a fig edge together with the id s of nodes to connect to param fig edge the fig edge param source port fig id the id of the source port param dest port fig id the id of the destination port param source fig node id the id of the source node param dest fig node id the id of the destination node public void add fig edge final fig edge fig edge final string source port fig id final string dest port fig id final string source fig node id final string dest fig node id fig edges add new edge data fig edge source port fig id dest port fig id source fig node id dest fig node id figedge figedge figedge sourceportfigid destportfigid sourcefignodeid destfignodeid addfigedge figedge figedge sourceportfigid destportfigid sourcefignodeid destfignodeid figedges edgedata figedge sourceportfigid destportfigid sourcefignodeid destfignodeid todo move to gef get the fig node that the fig id represents param fig id in the form figx y z return the fig node with the given id throws illegal state exception if the fig id supplied is not of a fig node private fig node get fig node string fig id throws illegal state exception if fig id contains if the id does not look like a top level fig then we can assume that this is an id of a fig edge port inside some fig edge so extract the fig edge port from the fig edge and return that as the fig node fig id fig id substring 0 fig id index of fig edge model element edge fig edge model element find fig fig id if edge null throw new illegal state exception can t find a fig node with id fig id edge make edge port return edge get edge port else if there is no dot then this must be a top level fig and can be assumed to be a fig node fig f find fig fig id if f instanceof fig node return fig node f else log error figid fig id is not a node edge ignored return null fignode figid fignode illegalstateexception figid fignode fignode getfignode figid illegalstateexception figid figedgeport figedge figedgeport figedge fignode figid figid figid indexof figedgemodelelement figedgemodelelement findfig figid illegalstateexception fignode figid makeedgeport getedgeport fignode findfig figid fignode fignode figid todo move to gef get the fig from the fig node that is the port param fig node the fig node return the fig that is the port on the given fig node private fig get port fig fig node fig node if fig node instanceof fig edge port todo can we just do this every time no need for else bob return fig node else return fig fig node get port figs get 0 fignode fignode fignode fignode getportfig fignode fignode fignode figedgeport fignode fignode getportfigs constructor param edge the fig edge param source port id the id of the source port param dest port id the id of the destination port param source node id the id of the source node param dest node id the id of the destination node public edge data fig edge edge string source port id string dest port id string source node id string dest node id if source port id null dest port id null throw new illegal argument exception source port and dest port must not be null source source port id dest dest port id fig edge edge this fig edge edge this source port fig id source port id this dest port fig id dest port id this source fig node id source node id null source node id source port id this dest fig node id dest node id null dest node id dest port id figedge sourceportid destportid sourcenodeid destnodeid edgedata figedge sourceportid destportid sourcenodeid destnodeid sourceportid destportid illegalargumentexception sourceportid destportid figedge figedge sourceportfigid sourceportid destportfigid destportid sourcefignodeid sourcenodeid sourcenodeid sourceportid destfignodeid destnodeid destnodeid destportid get the id of the destination fig node return the id public string get dest fig node id return dest fig node id fignode getdestfignodeid destfignodeid get the id of the destination port return the id public string get dest port fig id return dest port fig id getdestportfigid destportfigid get the fig edge return the fig edge public fig edge get fig edge return fig edge figedge figedge figedge getfigedge figedge get the id of the source fig node return the id public string get source fig node id return source fig node id fignode getsourcefignodeid sourcefignodeid get the id of the source port return the id public string get source port fig id return source port fig id getsourceportfigid sourceportfigid construct a new instance of the named fig with the owner represented by the given href and the bounds parsed from the pgml file we look for constructors of the form fig object owner rectangle bounds diagram settings settings which is typically used for subclasses of fig node model element then fig object owner diagram settings settings which is used for subclasses of fig edge model element p if we fail to find any of the constructors that we know about we ll call gef s version of this method to see if it can find a constructor param class name fully qualified name of class to instantiate param href string representing uuid of owning element param bounds position and size of figure return throws sax exception see org tigris gef persistence pgml pgml stack parser construct fig java lang string java lang string java awt rectangle override protected fig construct fig string class name string href rectangle bounds throws sax exception fig f null try class fig class class for name class name for constructor constructor fig class get constructors class parameter types constructor get parameter types fig node model elements should match here if parameter types length 3 parameter types 0 equals object class parameter types 1 equals rectangle class parameter types 2 equals diagram settings class object parameters new object 3 object owner null if href null owner find owner href parameters 0 owner parameters 1 bounds parameters 2 argo diagram get diagram get diagram settings f fig constructor new instance parameters fig edge model elements should match here they have no bounds if parameter types length 2 parameter types 0 equals object class parameter types 1 equals diagram settings class object parameters new object 2 object owner null if href null owner find owner href parameters 0 owner parameters 1 argo diagram get diagram get diagram settings f fig constructor new instance parameters catch class not found exception e throw new sax exception e catch illegal access exception e throw new sax exception e catch instantiation exception e throw new sax exception e catch invocation target exception e throw new sax exception e fall back to gef s handling if we couldn t find an appropriate constructor if f null todo convert this to a warning or error when all the figs have been upgraded log debug no argouml constructor found for class name falling back to gef s default constructors f super construct fig class name href bounds return f diagramsettings fignodemodelelement diagramsettings figedgemodelelement classname saxexception pgmlstackparser constructfig constructfig classname saxexception figclass forname classname figclass getconstructors parametertypes getparametertypes fignodemodelelements parametertypes parametertypes parametertypes parametertypes diagramsettings findowner argodiagram getdiagram getdiagramsettings newinstance figedgemodelelements parametertypes parametertypes parametertypes diagramsettings findowner argodiagram getdiagram getdiagramsettings newinstance classnotfoundexception saxexception illegalaccessexception saxexception instantiationexception saxexception invocationtargetexception saxexception classname constructfig classname save the newly created diagram for use by the parser we take the opportunity to attach our default diagram settings to it so we ll have them if needed when constructing figs p diagrams are created in gef s pgml handler init diagram which is private and can t be overridden initialization sequence is ul li load diagram class using name in pgml file li instantiate using 0 arg constructor li invoke this method set diagram new diagram instance li invoke diagram s initialize object owner method li diagram set name li diagram set scale li diagram set show single multiplicity why does gef care about multiplicity ul param diagram the new diagram see org tigris gef persistence pgml pgml stack parser set diagram org tigris gef base diagram override public void set diagram diagram diagram todo we could generalize this to initialize more stuff if needed argo diagram diagram set diagram settings get diagram settings super set diagram diagram pgmlhandler initdiagram setdiagram newdiagraminstance setname setscale setshowsinglemultiplicity pgmlstackparser setdiagram setdiagram argodiagram setdiagramsettings getdiagramsettings setdiagram public diagram settings get diagram settings return diagram settings diagramsettings getdiagramsettings diagramsettings the constructor param parser param cont public private handler pgml stack parser parser container cont super parser cont container cont privatehandler pgmlstackparser if the containing object is a type for which the private element might contain an itemuid extract the itemuid if it exists and assign it to the object param contents exception sax exception public void got element string contents throws sax exception if container instanceof pgml handler object o getpgml stack parser get diagram if o instanceof i itemuid itemuid uid get itemuid contents if uid null i itemuid o set itemuid uid no other uses of string in pgml handler return if container instanceof fig group handler object o fig group handler container get fig group if o instanceof i itemuid itemuid uid get itemuid contents if uid null i itemuid o set itemuid uid if container instanceof fig edge handler object o fig edge handler container get fig edge if o instanceof i itemuid itemuid uid get itemuid contents if uid null i itemuid o set itemuid uid handle other uses of private contents super got element contents saxexception gotelement saxexception pgmlhandler getpgmlstackparser getdiagram iitemuid getitemuid iitemuid setitemuid pgmlhandler figgrouphandler figgrouphandler getfiggroup iitemuid getitemuid iitemuid setitemuid figedgehandler figedgehandler getfigedge iitemuid getitemuid iitemuid setitemuid gotelement process starting elements within the private tag this method handles all attributes within tags within private methods the only specific tags we handle here at the moment are pathitems the strategy for handling pathitems is as follows ul li data is saved for each path item using one argouml pathitem tag per path item li the code that defines what is stored is in org argouml persistence pgml tee li each argouml pathitem tag stores ul li the class name of the path item placement strategy li the class name of the fig which it places li the href of the model element which owns the fig being placed li the angle of the placement vector path item placement angle li the distance along the displacement vector to place the fig path item placement vector offset ul li li no specific data is stored to match pathitem tags to the diagram figs which they control li the matching during file load depends entirely on there being a unique figclassname and ownerhref combination for each pathitem on the diagram for example for a fig association the main label is a fig text group and it s owner is assigned to the association this combination is unique and is used to match the parsed pathitem data back to the instantiated path item placement another example is the source multiplicity which is a fig multiplicity and it s owner is assigned to the source model element in each case the combination is unique so there is only one pathitem that matches when rebuilding the diagram ul param uri param localname param qname param attributes throws sax exception see org tigris gef persistence pgml base handler start element java lang string java lang string java lang string org xml sax attributes public void start element string uri string localname string qname attributes attributes throws sax exception if argouml pathitem equals qname container instanceof fig edge handler string classname attributes get value classname string figclassname attributes get value figclassname string ownerhref attributes get value ownerhref string angle attributes get value angle string offset attributes get value offset if classname null figclassname null ownerhref null angle null offset null method 2 assign data immediately see end of file todo if we ever want to extend path item placement we should modify this so that we also recognise any subclass of path item placement is the class name a path item placment todo use class reference to make this dependency obvious if org argouml uml diagram ui path item placement equals classname path item placement strategy pips get pips figclassname ownerhref sanity check the returned path item placement strategy should match the one in the uml if it doesn t it could be that the uml was created with an older argo version and the new argo version use a different placement strategy if they don t match just use the default if pips null classname equals pips get class get name now we re into processing each specific path item strategy at the moment we only know path item placement if pips instanceof path item placement path item placement pip path item placement pips pip set displacement vector double parse double angle integer parse int offset continue future path item placement strategy impl else if if the path item placement was unknown leave the diagram with the default settings else log warn pgml stored pathitem class name does not match the class name on the diagram label position will revert to defaults if any of the values are null ignore the element else log warn could not find all attributes for qname tag ignoring system out println error one of these is null classname classname figclassname figclassname ownerhref ownerhref angle angle offset offset super start element uri localname qname attributes pathitemplacementstrategy pathitemplacement pathitemplacement vectoroffset figassociation figtextgroup pathitemplacement figmultiplicity saxexception basehandler startelement startelement saxexception figedgehandler getvalue getvalue getvalue getvalue getvalue pathitemplacement pathitemplacement pathitemplacment pathitemplacement pathitemplacementstrategy getpips getclass getname pathitemplacement pathitemplacement pathitemplacement pathitemplacement setdisplacementvector parsedouble parseint pathitemplacementstrategy pathitemplacement startelement finds the path item placement strategy for a sub fig by its class name and it s owner href param figclassname the class name of the fig being placed param ownerhref the href of the owner of the fig being placed return the path item placement strategy private path item placement strategy get pips string figclassname string ownerhref if container instanceof fig edge handler fig edge fe fig edge handler container get fig edge object owner getpgml stack parser find owner ownerhref for object o fe get path item figs fig f fig o for a match to be found it has to have the same owner and the same long class name if owner equals f get owner figclassname equals f get class get name system out println matched figclassname return fe get path item placement strategy f log warn could not load path item for fig figclassname using default placement return null pathitemplacementstrategy getpips figedgehandler figedge figedgehandler getfigedge getpgmlstackparser findowner getpathitemfigs getowner getclass getname getpathitemplacementstrategy determine if the string contains an itemuid return a newly created itemuid or code null code private itemuid get itemuid string private contents string tokenizer st new string tokenizer private contents n while st has more elements string str st next token name val nval split name val str if nval null if log is debug enabled log debug private element nval get name nval get value if itemuid equals nval get name nval get value length 0 return new itemuid nval get value return null getitemuid privatecontents stringtokenizer stringtokenizer privatecontents hasmoreelements nexttoken nameval splitnameval isdebugenabled getname getvalue getname getvalue getvalue the constructor param n the name param v the value name val string n string v name n trim value v trim nameval return returns the name string get name return name getname return returns the value string get value return value getvalue splits a name value pair into a name val instance a name value pair is a string on the form lt name value gt param str a string with a name value pair return a name val or null if they could not be split protected name val split name val string str name val rv null int lqpos rqpos int eqpos str index of if eqpos 0 return null lqpos str index of eqpos rqpos str last index of if lqpos 0 rqpos lqpos return null rv new name val str substring 0 eqpos str substring lqpos 1 rqpos return rv nameval nameval nameval splitnameval nameval indexof indexof lastindexof nameval the constructor public ocl evaluator oclevaluator protected synchronized string eval to string object self string expr throws expansion exception if self equals expr expr self name vt clear vt put self self try return value2 string evaluator evaluate vt model interpreter expr catch invalid ocl exception e return ocl invalid expression ocl evaltostring expansionexception value2string modelinterpreter invalidoclexception protected synchronized string eval to string object self string expr string sep throws expansion exception scratchbindings put self self java util list values eval scratchbindings expr strbuf set length 0 iterator iter values iterator while iter has next object v value2 string iter next if equals v strbuf append v if iter has next strbuf append sep return strbuf to string evaltostring expansionexception _scratchbindings _scratchbindings _strbuf setlength hasnext value2string _strbuf hasnext _strbuf _strbuf tostring private string value2 string object v if model get facade isa expression v v model get facade get body v if equals v v unspecified else if model get facade isauml element v v model get facade get name v if equals v v translator localize misc name anon else if v instanceof collection string acc collection collection collection v for object object collection acc value2 string object acc v acc return v value2string getfacade isaexpression getfacade getbody getfacade isaumlelement getfacade getname value2string the constructor param templates the templates public ocl expander map templates super templates oclexpander create the specialist ocl evaluator for argouml protected void create evaluator evaluator new ocl evaluator oclevaluator createevaluator oclevaluator public class argo mode create figr rect extends mode create figr rect override public fig create new item mouse event me int snapx int snapy return new argo figr rect snapx snapy 0 0 argomodecreatefigrrect modecreatefigrrect createnewitem mouseevent argofigrrect override public string instructions return translator localize statusmsg help create rrect public class argo mode create fig circle extends mode create fig circle override public fig create new item mouse event me int snapx int snapy return new argo fig circle snapx snapy 0 0 argomodecreatefigcircle modecreatefigcircle createnewitem mouseevent argofigcircle override public string instructions return translator localize statusmsg help create circle new notification broadcaster support public argo fig poly notificationbroadcastersupport argofigpoly public argo fig poly int x int y super x y argofigpoly override public void delete from model super delete from model fire prop change remove null null notifier send notification new notification remove this 0 deletefrommodel deletefrommodel firepropchange sendnotification public void remove notification listener notification listener listener notification filter filter object handback throws listener not found exception notifier remove notification listener listener filter handback removenotificationlistener notificationlistener notificationfilter listenernotfoundexception removenotificationlistener public void add notification listener notification listener listener notification filter filter object handback throws illegal argument exception notifier add notification listener listener filter handback addnotificationlistener notificationlistener notificationfilter illegalargumentexception addnotificationlistener see javax management notification broadcaster get notification info public m bean notification info get notification info return notifier get notification info notificationbroadcaster getnotificationinfo mbeannotificationinfo getnotificationinfo getnotificationinfo see javax management notification broadcaster remove notification listener javax management notification listener public void remove notification listener notification listener listener throws listener not found exception notifier remove notification listener listener notificationbroadcaster removenotificationlistener notificationlistener removenotificationlistener notificationlistener listenernotfoundexception removenotificationlistener new notification broadcaster support public argo fig rect int x int y int w int h super x y w h notificationbroadcastersupport argofigrect override public void delete from model super delete from model fire prop change remove null null notifier send notification new notification remove this 0 deletefrommodel deletefrommodel firepropchange sendnotification public void remove notification listener notification listener listener notification filter filter object handback throws listener not found exception notifier remove notification listener listener filter handback removenotificationlistener notificationlistener notificationfilter listenernotfoundexception removenotificationlistener public void add notification listener notification listener listener notification filter filter object handback throws illegal argument exception notifier add notification listener listener filter handback addnotificationlistener notificationlistener notificationfilter illegalargumentexception addnotificationlistener see javax management notification broadcaster get notification info public m bean notification info get notification info return notifier get notification info notificationbroadcaster getnotificationinfo mbeannotificationinfo getnotificationinfo getnotificationinfo see javax management notification broadcaster remove notification listener javax management notification listener public void remove notification listener notification listener listener throws listener not found exception notifier remove notification listener listener notificationbroadcaster removenotificationlistener notificationlistener removenotificationlistener notificationlistener listenernotfoundexception removenotificationlistener new notification broadcaster support public argo fig ink notificationbroadcastersupport argofigink public argo fig ink int x int y super x y argofigink override public void delete from model super delete from model fire prop change remove null null notifier send notification new notification remove this 0 deletefrommodel deletefrommodel firepropchange sendnotification public void remove notification listener notification listener listener notification filter filter object handback throws listener not found exception notifier remove notification listener listener filter handback removenotificationlistener notificationlistener notificationfilter listenernotfoundexception removenotificationlistener public void add notification listener notification listener listener notification filter filter object handback throws illegal argument exception notifier add notification listener listener filter handback addnotificationlistener notificationlistener notificationfilter illegalargumentexception addnotificationlistener see javax management notification broadcaster get notification info public m bean notification info get notification info return notifier get notification info notificationbroadcaster getnotificationinfo mbeannotificationinfo getnotificationinfo getnotificationinfo see javax management notification broadcaster remove notification listener javax management notification listener public void remove notification listener notification listener listener throws listener not found exception notifier remove notification listener listener notificationbroadcaster removenotificationlistener notificationlistener removenotificationlistener notificationlistener listenernotfoundexception removenotificationlistener public class argo mode create fig poly extends mode create fig poly public string instructions return translator localize statusmsg help create poly argomodecreatefigpoly modecreatefigpoly override public fig create new item mouse event me int snapx int snapy fig poly p new argo fig poly snapx snapy p add point snapx snapy add the first point twice lastx snapx lasty snapy startx snapx starty snapy npoints 2 return p createnewitem mouseevent figpoly argofigpoly addpoint _lastx _lasty _startx _starty _npoints new notification broadcaster support public argo figr rect int x int y int w int h super x y w h notificationbroadcastersupport argofigrrect override public void delete from model super delete from model fire prop change remove null null notifier send notification new notification remove this 0 deletefrommodel deletefrommodel firepropchange sendnotification public void remove notification listener notification listener listener notification filter filter object handback throws listener not found exception notifier remove notification listener listener filter handback removenotificationlistener notificationlistener notificationfilter listenernotfoundexception removenotificationlistener public void add notification listener notification listener listener notification filter filter object handback throws illegal argument exception notifier add notification listener listener filter handback addnotificationlistener notificationlistener notificationfilter illegalargumentexception addnotificationlistener see javax management notification broadcaster get notification info public m bean notification info get notification info return notifier get notification info notificationbroadcaster getnotificationinfo mbeannotificationinfo getnotificationinfo getnotificationinfo see javax management notification broadcaster remove notification listener javax management notification listener public void remove notification listener notification listener listener throws listener not found exception notifier remove notification listener listener notificationbroadcaster removenotificationlistener notificationlistener removenotificationlistener notificationlistener listenernotfoundexception removenotificationlistener public class argo mode create fig ink extends mode create fig ink public string instructions return translator localize statusmsg help create ink argomodecreatefigink modecreatefigink public fig create new item mouse event me int snapx int snapy fig ink p new argo fig ink snapx snapy lastx snapx lasty snapy return p createnewitem mouseevent figink argofigink _lastx _lasty override public fig create new item mouse event me int snapx int snapy fig line new argo fig line snapx snapy snapx snapy todo we need a way to set the line color and width here but test dependencies thinks this creates a dependency cycle fig line new argo fig line snapx snapy snapx snapy argo fig line color line set line width argo fig line width return line createnewitem mouseevent argofigline testdependencies argofigline argofig line_color setlinewidth argofig line_width override public string instructions return translator localize statusmsg help create line new notification broadcaster support public argo fig spline notificationbroadcastersupport argofigspline public argo fig spline int x int y super x y argofigspline override public void delete from model super delete from model fire prop change remove null null notifier send notification new notification remove this 0 deletefrommodel deletefrommodel firepropchange sendnotification public void remove notification listener notification listener listener notification filter filter object handback throws listener not found exception notifier remove notification listener listener filter handback removenotificationlistener notificationlistener notificationfilter listenernotfoundexception removenotificationlistener public void add notification listener notification listener listener notification filter filter object handback throws illegal argument exception notifier add notification listener listener filter handback addnotificationlistener notificationlistener notificationfilter illegalargumentexception addnotificationlistener see javax management notification broadcaster get notification info public m bean notification info get notification info return notifier get notification info notificationbroadcaster getnotificationinfo mbeannotificationinfo getnotificationinfo getnotificationinfo see javax management notification broadcaster remove notification listener javax management notification listener public void remove notification listener notification listener listener throws listener not found exception notifier remove notification listener listener notificationbroadcaster removenotificationlistener notificationlistener removenotificationlistener notificationlistener listenernotfoundexception removenotificationlistener new notification broadcaster support public argo fig line super notificationbroadcastersupport argofigline public argo fig line int x1 int y1 int x2 int y2 super x1 y1 x2 y2 argofigline create a line from x1 y1 to x2 y2 in the given color param x1 x1 param y1 y1 param x2 x2 param y2 y2 param line color color of line public argo fig line int x1 int y1 int x2 int y2 color line color super x1 y1 x2 y2 line color linecolor argofigline linecolor linecolor override public void delete from model super delete from model fire prop change remove null null notifier send notification new notification remove this 0 deletefrommodel deletefrommodel firepropchange sendnotification public void remove notification listener notification listener listener notification filter filter object handback throws listener not found exception notifier remove notification listener listener filter handback removenotificationlistener notificationlistener notificationfilter listenernotfoundexception removenotificationlistener public void add notification listener notification listener listener notification filter filter object handback throws illegal argument exception notifier add notification listener listener filter handback addnotificationlistener notificationlistener notificationfilter illegalargumentexception addnotificationlistener see javax management notification broadcaster get notification info public m bean notification info get notification info return notifier get notification info notificationbroadcaster getnotificationinfo mbeannotificationinfo getnotificationinfo getnotificationinfo see javax management notification broadcaster remove notification listener javax management notification listener public void remove notification listener notification listener listener throws listener not found exception notifier remove notification listener listener notificationbroadcaster removenotificationlistener notificationlistener removenotificationlistener notificationlistener listenernotfoundexception removenotificationlistener new notification broadcaster support public argo fig circle int x int y int w int h super x y w h notificationbroadcastersupport argofigcircle override public void delete from model super delete from model fire prop change remove null null notifier send notification new notification remove this 0 deletefrommodel deletefrommodel firepropchange sendnotification public void remove notification listener notification listener listener notification filter filter object handback throws listener not found exception notifier remove notification listener listener filter handback removenotificationlistener notificationlistener notificationfilter listenernotfoundexception removenotificationlistener public void add notification listener notification listener listener notification filter filter object handback throws illegal argument exception notifier add notification listener listener filter handback addnotificationlistener notificationlistener notificationfilter illegalargumentexception addnotificationlistener see javax management notification broadcaster get notification info public m bean notification info get notification info return notifier get notification info notificationbroadcaster getnotificationinfo mbeannotificationinfo getnotificationinfo getnotificationinfo see javax management notification broadcaster remove notification listener javax management notification listener public void remove notification listener notification listener listener throws listener not found exception notifier remove notification listener listener notificationbroadcaster removenotificationlistener notificationlistener removenotificationlistener notificationlistener listenernotfoundexception removenotificationlistener public class argo mode create fig rect extends mode create fig rect override public fig create new item mouse event me int snapx int snapy return new argo fig rect snapx snapy 0 0 argomodecreatefigrect modecreatefigrect createnewitem mouseevent argofigrect override public string instructions return translator localize statusmsg help create rect public class argo mode create fig spline extends mode create fig spline public string instructions return translator localize statusmsg help create spline argomodecreatefigspline modecreatefigspline public fig create new item mouse event me int snapx int snapy fig spline p new argo fig spline snapx snapy p add point snapx snapy add the first point twice startx snapx starty snapy lastx snapx lasty snapy npoints 2 return p createnewitem mouseevent figspline argofigspline addpoint _startx _starty _lastx _lasty _npoints the constructor public prop panel operation super label operation lookup icon operation add field translator localize label name get name text field add field translator localize label owner get owner scroll add field translator localize label parameters new j scroll pane new uml linked list new uml classifier parameter list model true false add separator add get visibility panel j panel modifiers panel create border panel translator localize label modifiers modifiers panel add new uml generalizable element abstract check box modifiers panel add new uml generalizable element leaf check box modifiers panel add new uml generalizable element root check box modifiers panel add new uml behavioral feature query check box modifiers panel add new uml feature owner scope check box add modifiers panel add new uml operation concurrency radio button panel translator localize label concurrency true add separator add field translator localize label raisedsignals new j scroll pane new uml linked list new uml operation raised signals list model add field translator localize label methods new j scroll pane new uml linked list new uml operation methods list model uml text area2 osta new uml text area2 new uml operation specification document osta set rows 3 make the field multiline by default add field translator localize label specification new j scroll pane osta add action new action navigate owner add action new action navigate up previous down public list get family object parent return model get facade get operations parent public object get parent object child return model get facade get owner child add action new action navigate up next down public list get family object parent return model get facade get operations parent public object get parent object child return model get facade get owner child add action new action add operation add action new action new parameter add action new action new raised signal add action new action new method add action new action add data type add action new action add enumeration add action new action new stereotype add action get delete action proppaneloperation lookupicon addfield getnametextfield addfield getownerscroll addfield jscrollpane umllinkedlist umlclassifierparameterlistmodel addseparator getvisibilitypanel jpanel modifierspanel createborderpanel modifierspanel umlgeneralizableelementabstractcheckbox modifierspanel umlgeneralizableelementleafcheckbox modifierspanel umlgeneralizableelementrootcheckbox modifierspanel umlbehavioralfeaturequerycheckbox modifierspanel umlfeatureownerscopecheckbox modifierspanel umloperationconcurrencyradiobuttonpanel addseparator addfield jscrollpane umllinkedlist umloperationraisedsignalslistmodel addfield jscrollpane umllinkedlist umloperationmethodslistmodel umltextarea2 umltextarea2 umloperationspecificationdocument setrows addfield jscrollpane addaction actionnavigateowner addaction actionnavigateuppreviousdown getfamily getfacade getoperations getparent getfacade getowner addaction actionnavigateupnextdown getfamily getfacade getoperations getparent getfacade getowner addaction actionaddoperation addaction actionnewparameter addaction actionnewraisedsignal addaction actionnewmethod addaction actionadddatatype addaction actionaddenumeration addaction actionnewstereotype addaction getdeleteaction add action new action navigate owner add action new action navigate up previous down public list get family object parent return model get facade get operations parent addaction actionnavigateowner addaction actionnavigateuppreviousdown getfamily getfacade getoperations public object get parent object child return model get facade get owner child getparent getfacade getowner add action new action navigate up next down public list get family object parent return model get facade get operations parent addaction actionnavigateupnextdown getfamily getfacade getoperations public object get parent object child return model get facade get owner child getparent getfacade getowner add a new raised signal to the current target public void add raised signal object target get target if model get facade isa operation target object oper target object new signal model get common behavior factory create signal model get core helper add owned element model get facade get namespace model get facade get owner oper new signal model get core helper add raised signal oper new signal target manager get instance set target new signal raisedsignal addraisedsignal gettarget getfacade isaoperation newsignal getcommonbehaviorfactory createsignal getcorehelper addownedelement getfacade getnamespace getfacade getowner newsignal getcorehelper addraisedsignal newsignal targetmanager getinstance settarget newsignal add a method to the current target public void add method object target get target if model get facade isa operation target object oper target string name model get facade get name oper object new method model get core factory build method name model get core helper add method oper new method model get core helper add feature model get facade get owner oper new method target manager get instance set target new method addmethod gettarget getfacade isaoperation getfacade getname newmethod getcorefactory buildmethod getcorehelper addmethod newmethod getcorehelper addfeature getfacade getowner newmethod targetmanager getinstance settarget newmethod construct an action to create a new raised signal public action new raised signal super button new raised signal put value action name translator localize button new raised signal icon icon resource loader wrapper lookup icon signal sending put value action small icon icon raisedsignal actionnewraisedsignal putvalue resourceloaderwrapper lookupicon signalsending putvalue small_icon override public void action performed action event e object target target manager get instance get model target if model get facade isa operation target add raised signal super action performed e actionperformed actionevent targetmanager getinstance getmodeltarget getfacade isaoperation addraisedsignal actionperformed construct an action to create a new method public action new method super button new method put value action name translator localize button new method icon icon resource loader wrapper lookup icon method put value action small icon icon actionnewmethod putvalue resourceloaderwrapper lookupicon putvalue small_icon override public boolean is enabled object target target manager get instance get model target boolean result true if model get facade isa operation target object owner model get facade get owner target if owner null model get facade isa interface owner result false return super is enabled result isenabled targetmanager getinstance getmodeltarget getfacade isaoperation getfacade getowner getfacade isainterface isenabled override public void action performed action event e super action performed e object target target manager get instance get model target if model get facade isa operation target add method actionperformed actionevent actionperformed targetmanager getinstance getmodeltarget getfacade isaoperation addmethod appropriate namespace is the namespace of our class not the class itself return the namespace see org argouml uml ui prop panel get display namespace override protected object get display namespace object namespace null object target get target if model get facade isa attribute target if model get facade get owner target null namespace model get facade get namespace model get facade get owner target return namespace proppanel getdisplaynamespace getdisplaynamespace gettarget getfacade isaattribute getfacade getowner getfacade getnamespace getfacade getowner construct a new labelled layout public labelled layout ignore splitters false hgap 0 vgap 0 labelledlayout labelledlayout ignoresplitters construct a new labelled layout public labelled layout boolean ignore splitters this ignore splitters ignore splitters this hgap 0 this vgap 0 labelledlayout labelledlayout ignoresplitters ignoresplitters ignoresplitters construct a new horizontal labelled layout with the specified cell spacing param hgap the horizontal gap between components param vgap the vertical gap between components public labelled layout int hgap int vgap this ignore splitters false this hgap hgap this vgap vgap labelledlayout labelledlayout ignoresplitters adds the specified component with the specified name to the layout this is included to satisfy the layout manager interface but is not actually used in this layout implementation param name the name of the component param comp the component to be added public void add layout component string name component comp layoutmanager addlayoutcomponent removes the specified component from the layout this is included to satisfy the layout manager interface but is not actually used in this layout implementation param comp the component public void remove layout component component comp layoutmanager removelayoutcomponent determines the preferred size of the container argument using this labelled layout the preferred size is that all child components are in one section at their own preferred size with gaps and border indents public dimension preferred layout size container parent synchronized parent get tree lock final insets insets parent get insets int preferred width 0 int preferred height 0 int widest label 0 final int component count parent get component count for int i 0 i component count i component child comp parent get component i if child comp is visible child comp instanceof seperator int child height get preferred height child comp if child comp instanceof j label final j label jlabel j label child comp widest label math max widest label get preferred width jlabel child comp jlabel get label for final int child width get preferred width child comp preferred width math max preferred width child width child height math min child height get preferred height jlabel preferred height child height this vgap preferred width insets left widest label insets right preferred height insets top insets bottom return new dimension insets left widest label preferred width insets right preferred height preferredlayoutsize gettreelock getinsets preferredwidth preferredheight widestlabel componentcount getcomponentcount componentcount childcomp getcomponent childcomp isvisible childcomp childheight getpreferredheight childcomp childcomp jlabel jlabel jlabel childcomp widestlabel widestlabel getpreferredwidth childcomp getlabelfor childwidth getpreferredwidth childcomp preferredwidth preferredwidth childwidth childheight childheight getpreferredheight preferredheight childheight preferredwidth widestlabel preferredheight widestlabel preferredwidth preferredheight required by layout manager see java awt layout manager minimum layout size java awt container public dimension minimum layout size container parent synchronized parent get tree lock final insets insets parent get insets int minimum height insets top insets bottom final int component count parent get component count for int i 0 i component count i component child comp parent get component i if child comp instanceof j label final j label jlabel j label child comp child comp jlabel get label for final int child height math max get minimum height child comp get minimum height jlabel minimum height child height this vgap return new dimension 0 minimum height layoutmanager layoutmanager minimumlayoutsize minimumlayoutsize gettreelock getinsets minimumheight componentcount getcomponentcount componentcount childcomp getcomponent childcomp jlabel jlabel jlabel childcomp childcomp getlabelfor childheight getminimumheight childcomp getminimumheight minimumheight childheight minimumheight see java awt layout manager layout container java awt container public void layout container container parent synchronized parent get tree lock int sectionx parent get insets left final array list component components new array list component final int section count get section count parent final int section width get section width parent section count int section no 0 for int i 0 i parent get component count i final component child comp parent get component i if child comp instanceof seperator if this ignore splitters layout section parent sectionx section width components section no sectionx section width this hgap components clear else components add parent get component i layout section parent sectionx section width components section no layoutmanager layoutcontainer layoutcontainer gettreelock getinsets arraylist arraylist sectioncount getsectioncount sectionwidth getsectionwidth sectioncount sectionno getcomponentcount childcomp getcomponent childcomp ignoresplitters layoutsection sectionwidth sectionno sectionwidth getcomponent layoutsection sectionwidth sectionno determine the number of sections there is only ever one section if oriented vertically if oriented horizontally the number of sections is deduced from the number of splitters in the parent container private int get section count container parent int section count 1 final int component count parent get component count if ignore splitters for int i 0 i component count i if parent get component i instanceof seperator section count return section count getsectioncount sectioncount componentcount getcomponentcount ignoresplitters componentcount getcomponent sectioncount sectioncount determine the width of each section from the section count this is the working width minus the gaps between sections this result is then divided equally by the section count private int get section width container parent int section count return get usable width parent section count 1 this hgap section count getsectionwidth sectioncount getusablewidth sectioncount sectioncount determine the usable width of the parent this is the full width minus any borders private int get usable width container parent final insets insets parent get insets return parent get width insets left insets right getusablewidth getinsets getwidth layout a single section private void layout section final container parent final int sectionx final int section width final array list components final int section no final array list integer row heights new array list integer final int component count components size if component count 0 return int label width 0 int unknown height count 0 int total height 0 build up an array list of the heights of each label component pair heights of zero indicate a proportional height for int i 0 i component count i final component child comp component components get i final int child height if child comp instanceof j label final j label jlabel j label child comp final component labelled comp jlabel get label for label width math max label width get preferred width jlabel if labelled comp null i child height get child height labelled comp if child height 0 unknown height count else child height get preferred height jlabel else to manage the case there are no label component pairs but just one component child height get child height child comp if child height 0 unknown height count total height child height this vgap row heights add new integer child height total height this vgap final insets insets parent get insets final int parent height parent get height insets top insets bottom set the child components to the heights in the array list calculating the height of any proportional component on the fly fixme this assumes that the j label and the component it labels have been added to the parent component consecutively int y insets top int row 0 for int i 0 i component count i component child comp component components get i if child comp is visible int row height int component width section width int componentx sectionx if the component is a j label which has another component assigned then position size the label and calculate the size of the registered component if child comp instanceof j label j label child comp get label for null i assumes the next child is the labelled component final j label jlabel j label child comp child comp jlabel get label for jlabel set bounds sectionx y label width get preferred height jlabel component width section width label width componentx sectionx label width row height row heights get row int value if row height 0 try row height calculate height parent height total height unknown height count child comp catch arithmetic exception e string look and feel ui manager get look and feel get class get name throw new illegal state exception division by zero laying out child comp get class get name on parent get class get name in section section no using look and feel e total height row height make sure the component width isn t any greater than its maximum allowed width if child comp get maximum size null get maximum width child comp component width component width get maximum width child comp child comp set bounds componentx y component width row height y row height this vgap row layoutsection sectionwidth arraylist sectionno arraylist rowheights arraylist componentcount componentcount labelwidth unknownheightcount totalheight componentcount childcomp childheight childcomp jlabel jlabel jlabel childcomp labelledcomp getlabelfor labelwidth labelwidth getpreferredwidth labelledcomp childheight getchildheight labelledcomp childheight unknownheightcount childheight getpreferredheight childheight getchildheight childcomp childheight unknownheightcount totalheight childheight rowheights childheight totalheight getinsets parentheight getheight jlabel componentcount childcomp childcomp isvisible rowheight componentwidth sectionwidth jlabel childcomp jlabel jlabel childcomp getlabelfor jlabel jlabel childcomp childcomp getlabelfor setbounds labelwidth getpreferredheight componentwidth sectionwidth labelwidth labelwidth rowheight rowheights intvalue rowheight rowheight calculateheight parentheight totalheight unknownheightcount childcomp arithmeticexception lookandfeel uimanager getlookandfeel getclass getname illegalstateexception childcomp getclass getname getclass getname sectionno lookandfeel totalheight rowheight childcomp getmaximumsize getmaximumwidth childcomp componentwidth componentwidth getmaximumwidth childcomp childcomp setbounds componentwidth rowheight rowheight param child comp a component return 0 for a resizable component or a positive value for its fixed height private int get child height component child comp if is resizable child comp if the child component is resizable then we don t know it s actual size yet it will be calculated later as a proportion of the available left over space for now this is flagged as zero return 0 else if a preferred height is not given or is the same as the minimum height then fix the height of this row return get minimum height child comp childcomp getchildheight childcomp isresizable childcomp getminimumheight childcomp a component is resizable if its minimum size is less than its preferred size there is a workaround here for a bug introduced in jre5 where j combo box minimum and preferred size now differ j combo box is not resizable anything in a j scroll pane is considered resizable param comp the component to check for resizability return true if the given component should be resized to take u p empty space private boolean is resizable component comp if comp null return false if comp instanceof j combo box return false if comp get preferred size null return false if comp get minimum size null return false return get minimum height comp get preferred height comp jcombobox jcombobox jscrollpane isresizable jcombobox getpreferredsize getminimumsize getminimumheight getpreferredheight private final int calculate height final int parent height final int total height final int unknown heights left final component child comp return math max parent height total height unknown heights left get minimum height child comp calculateheight parentheight totalheight unknownheightsleft childcomp parentheight totalheight unknownheightsleft getminimumheight childcomp private int get preferred height final component comp return int comp get preferred size get height getpreferredheight getpreferredsize getheight private int get preferred width final component comp return int comp get preferred size get width getpreferredwidth getpreferredsize getwidth private int get minimum height final component comp return int comp get minimum size get height getminimumheight getminimumsize getheight private int get maximum width final component comp return int comp get maximum size get width getmaximumwidth getmaximumsize getwidth create a new instance of the separator that splits the layout in columns return the separator public static seperator get separator return new seperator getseparator return the horizontal gaps between components public int get hgap return this hgap gethgap set the horizontal gaps between components param hgap the horizontal gap public void set hgap int hgap this hgap hgap sethgap return the vertical gaps between components public int get vgap return this vgap getvgap set the vertical gaps between components param vgap the horizontal gap public void set vgap int vgap this vgap vgap setvgap private static final long serial versionuid 4143634500959911688l seperator super set visible false serialversionuid setvisible construct a new fig deep history state param owner owning uml element param bounds position and size param settings rendering settings public fig deep history state object owner rectangle bounds diagram settings settings super owner bounds settings figdeephistorystate figdeephistorystate diagramsettings the main constructor deprecated for 0 27 4 by tfmorris use link fig deep history state object rectangle diagram settings suppress warnings deprecation deprecated public fig deep history state super figdeephistorystate diagramsettings suppresswarnings figdeephistorystate the constructor which links the fig into the existing uml element param gm ignored param node the uml element deprecated for 0 27 4 by tfmorris use link fig deep history state object rectangle diagram settings suppress warnings deprecation deprecated public fig deep history state graph model gm object node super gm node figdeephistorystate diagramsettings suppresswarnings figdeephistorystate graphmodel see org argouml uml diagram state ui fig history state geth public string geth return h fighistorystate constructor for uml model element element residence list model public uml model element element residence list model super element residence umlmodelelementelementresidencelistmodel umlmodelelementelementresidencelistmodel elementresidence see org argouml uml ui uml model element list model2 build model list protected void build model list set all elements model get facade get element residences get target umlmodelelementlistmodel2 buildmodellist buildmodellist setallelements getfacade getelementresidences gettarget see org argouml uml ui uml model element list model2 is valid element object protected boolean is valid element object o return model get facade isa element residence o model get facade get element residences get target contains o umlmodelelementlistmodel2 isvalidelement isvalidelement getfacade isaelementresidence getfacade getelementresidences gettarget constructor deprecated for 0 27 3 by tfmorris use link fig compartment box object rectangle diagram settings suppress warnings deprecation deprecated public fig compartment box super initialize figcompartmentbox diagramsettings suppresswarnings figcompartmentbox initialization shared by all constructors private void initialize set properties of the stereotype box make it line width higher than before so it overlaps the name box and the blanking takes out both lines initially not set to be displayed but this will be changed when we try to render it if we find we have a stereotype todo overlapping figs won t work with when the colors have alpha channels get stereotype fig set filled true get stereotype fig set line width line width 1 to have 1 pixel overlap with get name fig get stereotype fig set height stereoheight line width the outside border of the box around all compartments border fig new fig empty rect x0 y0 0 0 border fig set line color line color border fig set line width line width get big port set line width 0 get big port set fill color fill color line_width getstereotypefig setfilled getstereotypefig setlinewidth line_width getnamefig getstereotypefig setheight line_width borderfig figemptyrect borderfig setlinecolor line_color borderfig setlinewidth line_width getbigport setlinewidth getbigport setfillcolor fill_color construct a fig with owner bounds and settings param owner the model element that owns this fig param bounds the rectangle defining the bounds param settings the rendering settings public fig compartment box object owner rectangle bounds diagram settings settings super owner bounds settings initialize figcompartmentbox diagramsettings override public void translate int dx int dy super translate dx dy editor ce globals cur editor if ce null selection sel ce get selection manager find selection for this if sel instanceof selection class selection class sel hide buttons cureditor getselectionmanager findselectionfor selectionclass selectionclass hidebuttons override public void mouse clicked mouse event mouse event if mouse event is consumed return super mouse clicked mouse event if mouse event is shift down target manager get instance get targets size 0 return editor ce globals cur editor if ce null selection sel ce get selection manager find selection for this if sel instanceof selection class selection class sel hide buttons unhighlight rectangle r new rectangle mouse event getx 1 mouse event gety 1 2 2 fig f hit fig r if f instanceof fig editable compartment fig editable compartment fig compartment fig editable compartment f f fig compartment hit fig r if f instanceof compartment fig text if highlighted fig text null highlighted fig text f highlighted fig text set highlighted false if highlighted fig text get group null preventing null pointer exception highlighted fig text get group damage compartment fig text f set highlighted true highlighted fig text compartment fig text f target manager get instance set target f mouseclicked mouseevent mouseevent mouseevent isconsumed mouseclicked mouseevent mouseevent isshiftdown targetmanager getinstance gettargets cureditor getselectionmanager findselectionfor selectionclass selectionclass hidebuttons mouseevent mouseevent hitfig figeditablecompartment figeditablecompartment figcompartment figeditablecompartment figcompartment hitfig compartmentfigtext highlightedfigtext highlightedfigtext highlightedfigtext sethighlighted highlightedfigtext getgroup nullpointerexception highlightedfigtext getgroup compartmentfigtext sethighlighted highlightedfigtext compartmentfigtext targetmanager getinstance settarget remove the highlight from the currently highlit fig text return the fig text that had highlight removed protected compartment fig text unhighlight fig fc search all feature compartments for a text fig to unhighlight for int i 1 i get figs size i fc get fig at i if fc instanceof fig editable compartment compartment fig text ft unhighlight fig editable compartment fc if ft null return ft return null figtext figtext compartmentfigtext getfigs getfigat figeditablecompartment compartmentfigtext figeditablecompartment search the given compartment for a highlighted compartment fig text and unhighlight it param fc compartment to search for highlight item return item that was unhighlighted or null if no action was taken protected final compartment fig text unhighlight fig editable compartment fc fig ft for int i 1 i fc get figs size i ft fc get fig at i if ft instanceof compartment fig text compartment fig text ft is highlighted compartment fig text ft set highlighted false ft get group damage return compartment fig text ft return null compartmentfigtext compartmentfigtext figeditablecompartment getfigs getfigat compartmentfigtext compartmentfigtext ishighlighted compartmentfigtext sethighlighted getgroup compartmentfigtext protected void create contained model element fig group fg input event ie if fg instanceof fig editable compartment return fig editable compartment fg create model element populate the compartment now so that we can put the last one in edit mode this fixes issue 5439 fig editable compartment fg populate todo the above populate works but seems rather heavy here i can see something like this is needed though as events won t manage this quick enough could we make fig editable compartment create model element create the new child fig instance it may also be useful for it to return the new model element rather than the current void return bob list fig list fg get figs if fig list size 0 fig fig fig fig list get fig list size 1 if fig null fig instanceof compartment fig text if highlighted fig text null highlighted fig text set highlighted false if highlighted fig text get group null preventing null pointer exception highlighted fig text get group damage compartment fig text ft compartment fig text fig ft start text editor ie ft set highlighted true highlighted fig text ft ie consume createcontainedmodelelement figgroup inputevent figeditablecompartment figeditablecompartment createmodelelement figeditablecompartment figeditablecompartment createmodelelement figlist getfigs figlist figlist figlist compartmentfigtext highlightedfigtext highlightedfigtext sethighlighted highlightedfigtext getgroup nullpointerexception highlightedfigtext getgroup compartmentfigtext compartmentfigtext starttexteditor sethighlighted highlightedfigtext protected fig get border fig return border fig getborderfig borderfig add size of a child component to overall size width is maximized with child s width and child s height is added to the overall height if the child figure is not visible it s size is not added param size current dimensions param child child figure return new dimension with child size added protected dimension add child dimensions dimension size fig child if child is visible dimension child size child get minimum size size width math max size width child size width size height child size height return size addchilddimensions isvisible childsize getminimumsize childsize childsize param compartment the compartment to be changed param is visible true if the attribute compartment is visible see org argouml uml diagram attributes compartment container set attributes visible boolean protected void set compartment visible fig compartment compartment boolean is visible rectangle rect get bounds if compartment is visible if is visible hide compartment damage for object f compartment get figs fig f set visible false compartment set visible false dimension a size this get minimum size set bounds rect x rect y int a size get width int a size get height else if is visible show compartment for object f compartment get figs fig f set visible true compartment set visible true dimension a size this get minimum size set bounds rect x rect y int a size get width int a size get height damage isvisible attributescompartmentcontainer setattributesvisible setcompartmentvisible figcompartment isvisible getbounds isvisible isvisible getfigs setvisible setvisible asize getminimumsize setbounds asize getwidth asize getheight isvisible getfigs setvisible setvisible asize getminimumsize setbounds asize getwidth asize getheight see org tigris gef presentation fig set line width int public void set line width int w border fig set line width w setlinewidth setlinewidth borderfig setlinewidth construct a property panel for a uml node element public prop panel node super label node lookup icon node add field translator localize label name get name text field add field translator localize label namespace get namespace selector add get modifiers panel add separator add field generalizations get generalization scroll add field specializations get specialization scroll add separator j list res list new uml linked list new uml node deployed component list model add field translator localize label deployedcomponents new j scroll pane res list add action new action navigate container element add action get action new reception add action new action new stereotype add action get delete action proppanelnode lookupicon addfield getnametextfield addfield getnamespaceselector getmodifierspanel addseparator addfield getgeneralizationscroll addfield getspecializationscroll addseparator jlist reslist umllinkedlist umlnodedeployedcomponentlistmodel addfield jscrollpane reslist addaction actionnavigatecontainerelement addaction getactionnewreception addaction actionnewstereotype addaction getdeleteaction construct a list model for the deployed components of a node public uml node deployed component list model super deployed component umlnodedeployedcomponentlistmodel deployedcomponent protected void build model list if model get facade isa node get target set all elements model get facade get deployed components get target buildmodellist getfacade isanode gettarget setallelements getfacade getdeployedcomponents gettarget see org argouml uml ui uml model element list model2 is valid element object protected boolean is valid element object o return model get facade isa component o umlmodelelementlistmodel2 isvalidelement isvalidelement getfacade isacomponent the constructor deprecated for 0 27 3 by tfmorris use link fig usage object diagram settings suppress warnings deprecation deprecated public fig usage super figusage diagramsettings suppresswarnings figusage the constructor param edge the owning uml element deprecated for 0 27 3 by tfmorris use link fig usage object diagram settings suppress warnings deprecation deprecated public fig usage object edge super edge figusage diagramsettings suppresswarnings figusage the constructor param edge the owning uml element param lay the layer deprecated for 0 27 3 by tfmorris use link fig usage object diagram settings suppress warnings deprecation deprecated public fig usage object edge layer lay super edge lay figusage diagramsettings suppresswarnings figusage construct a fig param owner owning uml element param settings render settings public fig usage object owner diagram settings settings super owner settings figusage diagramsettings construct a new agency instance with the given control mech as the main control mechanism for determining which critics should be active param cm the given control mech public agency control mech cm control mech cm controlmech controlmech controlmech controlmech construct a new agency instance and use a standardcm as the main control mechanism for determining which critics should be active public agency control mech new standardcm controlmech since java does not really support classes as first class objects there is one instance of agency that is passed around as needed p the agency is actually stored in code designer the designer code see designer the designer return agency the agency instance public static agency the agency designer dsgr designer the designer if dsgr null return null return dsgr get agency theagency thedesigner thedesigner theagency thedesigner getagency return the registry private static hashtable class list critic get critic registry return critic registry getcriticregistry criticregistry return the critics public static list critic get critic list return critics getcriticlist param cr the critic to add register protected static void add critic critic cr if critics contains cr return if cr instanceof compound critic critics add cr else for critic c compound critic cr get critic list add critic c return addcritic compoundcritic compoundcritic getcriticlist addcritic param cr class name the critic class name param dm class name the design material class name public static void register string cr class name string dm class name class dm class try dm class class for name dm class name catch java lang class not found exception e log error error loading dm dm class name e return critic cr singleton critics get cr class name if cr null class cr class try cr class class for name cr class name catch java lang class not found exception e log error error loading cr cr class name e return try cr critic cr class new instance catch java lang illegal access exception e log error error instancating cr cr class name e return catch java lang instantiation exception e log error error instancating cr cr class name e return singleton critics put cr class name cr add critic cr register cr dm class crclassname dmclassname crclassname dmclassname dmclass dmclass forname dmclassname classnotfoundexception dmclassname singletoncritics crclassname crclass crclass forname crclassname classnotfoundexception crclassname crclass newinstance illegalaccessexception crclassname instantiationexception crclassname singletoncritics crclassname addcritic dmclass register a critic in the global table of critics that have been loaded critics are associated with one or more design material classes one way to do registration is in a static initializer of the design material class but additional after market critics could added through a menu command in some control panel param cr the critic to register param clazz the design material class that is to be criticized public static void register critic cr class clazz list critic the critics get critic registry get clazz if the critics null the critics new array list critic critic registry put clazz the critics if the critics contains cr the critics add cr notify static observers cr log debug registered the critics to string cached critics remove clazz add critic cr thecritics getcriticregistry thecritics thecritics arraylist criticregistry thecritics thecritics thecritics notifystaticobservers thecritics tostring cachedcritics addcritic transitional method for migration purposes don t use param cr the critic to register param clazz the uml class to be criticized public static void register critic cr object clazz register cr class clazz register a critic in the global table of critics that have been loaded param cr the critic to register public static void register critic cr set object metas cr get criticized design materials for object meta metas register cr meta getcriticizeddesignmaterials return a collection of all critics that can be applied to the design material subclass including inherited critics param clazz the design material to criticize return the collection of critics public static collection critic critics for class class clazz collection critic col cached critics get clazz if col null col new array list critic col add all critic list for specific class clazz collection class classes new array list class if clazz get superclass null classes add clazz get superclass if clazz get interfaces null classes add all arrays as list clazz get interfaces for class c classes col add all critics for class c cached critics put clazz col return col criticsforclass cachedcritics arraylist addall criticlistforspecificclass arraylist getsuperclass getsuperclass getinterfaces addall aslist getinterfaces addall criticsforclass cachedcritics return the list of all critics that are directly associated with the given design material subclass p if there aren t any an empty list is returned param clazz the design material return the critics protected static list critic critic list for specific class class clazz list critic the critics get critic registry get clazz if the critics null the critics new array list critic critic registry put clazz the critics return the critics criticlistforspecificclass thecritics getcriticregistry thecritics thecritics arraylist criticregistry thecritics thecritics apply all critics that can be applied to the given design material instance as appropriate for the given designer p i would call this critique but it causes a compilation error because it conflicts with the instance method critique param dm the design material param d the designer param reason code the reason public static void apply all critics object dm designer d long reason code class dm clazz dm get class collection critic c critics for class dm clazz apply critics dm d c reason code reasoncode applyallcritics reasoncode dmclazz getclass criticsforclass dmclazz applycritics reasoncode param dm the design material param d the designer public static void apply all critics object dm designer d class dm clazz dm get class collection critic c critics for class dm clazz apply critics dm d c 1l applyallcritics dmclazz getclass criticsforclass dmclazz applycritics param dm the design material param d the designer param the critics the critics param reason code the reason public static void apply critics object dm designer d collection critic the critics long reason code for critic c the critics if c is active c match reason reason code try c critique dm d catch exception ex log error disabling critique due to exception n c n dm ex c set enabled false thecritics reasoncode applycritics thecritics reasoncode thecritics isactive matchreason reasoncode setenabled compute which critics should be active i e they can be applied by apply all critics for a given designer p note i am setting global data i e the is enabled bit in each critic based on the needs of one designer i don t really support more than one designer which is why each designer if we would support more than one designer has his own agency todo should loop over simpler list of critics not compound critics param d the designer public void determine active critics designer d for critic c critics if control mech is relevant c d c be active else c be inactive applyallcritics isenabled compoundcritics determineactivecritics controlmech isrelevant beactive beinactive let some object receive notifications when the agency changes state static observers are normal observers on the singleton instance of this class param obs the notified object public static void add static observer observer obs agency a the agency if a null return a add observer obs addstaticobserver theagency addobserver when the agency changes notify observers param o the notified object public static void notify static observers object o if the agency null the agency set changed the agency notify observers o notifystaticobservers theagency theagency setchanged theagency notifyobservers constructor for uml use case include list model public uml use case include list model super include umlusecaseincludelistmodel umlusecaseincludelistmodel see org argouml uml ui uml model element list model2 build model list protected void build model list set all elements model get facade get includes get target umlmodelelementlistmodel2 buildmodellist buildmodellist setallelements getfacade getincludes gettarget see org argouml uml ui uml model element list model2 is valid element object protected boolean is valid element object o return model get facade get includes get target contains o umlmodelelementlistmodel2 isvalidelement isvalidelement getfacade getincludes gettarget construct a new selection class for the given fig param f the given fig public selection class fig f super f selectionclass selectionclass override protected icon get icons icon working icons new icon icons length system arraycopy icons 0 working icons 0 icons length no generalizations on deployment diagram if globals cur editor get graph model instanceof deployment diagram graph model working icons top base null working icons bottom base null if use composite working icons left base compos working icons right base compos readonly class no generalization no association to self if model get model management helper is read only get content get owner return new icon null inherit null null null return working icons geticons workingicons workingicons cureditor getgraphmodel deploymentdiagramgraphmodel workingicons workingicons usecomposite workingicons workingicons getmodelmanagementhelper isreadonly getcontent getowner workingicons override protected string get instructions int index return instructions index base getinstructions override protected object get new node type int i return model get meta types getuml class getnewnodetype getmetatypes getumlclass override protected object get new edge type int i if i 0 i get button return edge type i 10 getnewedgetype getbutton edgetype override protected boolean is reverse edge int i if i bottom i left return true return false isreverseedge override protected boolean is draggable handle int index self association isn t draggable if index lower left return false return true isdraggablehandle lower_left override protected boolean is edge post process requested return use composite isedgepostprocessrequested usecomposite override public void mouse entered mouse event me super mouse entered me use composite me is shift down mouseentered mouseevent mouseentered usecomposite isshiftdown override protected object get new node int index return model get core factory build class getnewnode getcorefactory buildclass construct a default property panel for a signal public prop panel signal this label signal title signal sending proppanelsignal signalsending construct a new property panel for a signal with the given name and icon use for subclasses that want the same layout constructor but a different name e g exception param title title of the property panel param icon name name of the image icon to use public prop panel signal string title string icon name super title lookup icon icon name add field translator localize label name get name text field add field translator localize label namespace get namespace selector add get modifiers panel add get visibility panel add separator add field translator localize label generalizations get generalization scroll add field translator localize label specializations get specialization scroll add separator abstract action add model element2 action add context new action add context signal abstract action remove element action remove context new action remove context signal j scroll pane operation scroll new j scroll pane new uml mutable linked list new uml signal context list model action add context null action remove context true add field translator localize label contexts operation scroll abstract action add model element2 action add reception new action add reception signal abstract action remove element action remove reception new action remove reception signal j scroll pane reception scroll new j scroll pane new uml mutable linked list new uml signal reception list model action add reception null action remove reception true add field translator localize label receptions reception scroll add action new action navigate namespace add action new action new signal add action new action new stereotype add action get delete action iconname proppanelsignal iconname lookupicon iconname addfield getnametextfield addfield getnamespaceselector getmodifierspanel getvisibilitypanel addseparator addfield getgeneralizationscroll addfield getspecializationscroll addseparator abstractactionaddmodelelement2 actionaddcontext actionaddcontextsignal abstractactionremoveelement actionremovecontext actionremovecontextsignal jscrollpane operationscroll jscrollpane umlmutablelinkedlist umlsignalcontextlistmodel actionaddcontext actionremovecontext addfield operationscroll abstractactionaddmodelelement2 actionaddreception actionaddreceptionsignal abstractactionremoveelement actionremovereception actionremovereceptionsignal jscrollpane receptionscroll jscrollpane umlmutablelinkedlist umlsignalreceptionlistmodel actionaddreception actionremovereception addfield receptionscroll addaction actionnavigatenamespace addaction actionnewsignal addaction actionnewstereotype addaction getdeleteaction construct a list model showing the receptions of a signal public uml signal reception list model the event to listen to is reception so that model updates get shown in the list reproduce this by adding a new reception and see the result displayed in the list super reception umlsignalreceptionlistmodel protected void build model list if get target null set all elements model get facade get receptions get target buildmodellist gettarget setallelements getfacade getreceptions gettarget see org argouml uml ui uml model element list model2 is valid element java lang object protected boolean is valid element object element return model get facade isa reception element model get facade get receptions get target contains element umlmodelelementlistmodel2 isvalidelement isvalidelement getfacade isareception getfacade getreceptions gettarget construct an action which adds a reception to a signal public action add reception signal super actionaddreceptionsignal protected list get choices list ret new array list object model project manager get manager get current project get model if get target null ret add all model get model management helper get all model elements of kind model model get meta types get reception return ret getchoices arraylist projectmanager getmanager getcurrentproject getmodel gettarget addall getmodelmanagementhelper getallmodelelementsofkind getmetatypes getreception protected list get selected list ret new array list ret add all model get facade get receptions get target return ret getselected arraylist addall getfacade getreceptions gettarget protected string get dialog title return translator localize dialog title add receptions getdialogtitle override protected void do it collection selected model get common behavior helper set reception get target selected doit getcommonbehaviorhelper setreception gettarget construct an action which removes a context from a signal public action remove context signal super translator localize menu popup remove actionremovecontextsignal override public void action performed action event e super action performed e object context get object to remove if context null object signal get target if model get facade isa signal signal model get common behavior helper remove context signal context actionperformed actionevent actionperformed getobjecttoremove gettarget getfacade isasignal getcommonbehaviorhelper removecontext construct an action which removes a reception from a signal public action remove reception signal super translator localize menu popup remove actionremovereceptionsignal override public void action performed action event e super action performed e object reception get object to remove if reception null object signal get target if model get facade isa signal signal todo should we delete the reception a reception without a signal violates the cardinality of 1 in the metamodel tfm 20070308 model get common behavior helper remove reception signal reception actionperformed actionevent actionperformed getobjecttoremove gettarget getfacade isasignal getcommonbehaviorhelper removereception the constructor public action exit super translator localize action exit resource loader wrapper lookup icon action exit actionexit resourceloaderwrapper lookupicon see java awt event action listener action performed java awt event action event public void action performed action event ae project browser get instance try exit actionlistener actionperformed actionevent actionperformed actionevent projectbrowser getinstance tryexit execute this action from the command line param argument is not used return true if it is ok see org argouml application api command line interface do command java lang string public boolean do command string argument system exit 0 return true commandlineinterface docommand docommand the constructor public cr missing class name setup head and desc add supported decision uml decision naming set knowledge types critic kt completeness critic kt syntax add trigger name crmissingclassname setupheadanddesc addsupporteddecision umldecision setknowledgetypes kt_completeness kt_syntax addtrigger public boolean predicate2 object dm designer dsgr if model get facade isa model element dm return no problem object e dm string my name model get facade get name e if my name null my name equals my name length 0 return problem found return no problem getfacade isamodelelement no_problem myname getfacade getname myname myname myname problem_found no_problem see org argouml cognitive poster get clarifier public icon get clarifier return cl class name get the instance getclarifier getclarifier clclassname gettheinstance public void init wizard wizard w if w instanceof wizme name to do item item to do item w get to do item object me item get offenders get 0 string ins super get instructions string sug super get default suggestion int count 1 if model get facade get namespace me null count model get facade get owned elements model get facade get namespace me size sug model get facade getuml class name me count 1 wizme name w set instructions ins wizme name w set suggestion sug initwizard wizmename todoitem todoitem gettodoitem getoffenders getinstructions getdefaultsuggestion getfacade getnamespace getfacade getownedelements getfacade getnamespace getfacade getumlclassname wizmename setinstructions wizmename setsuggestion see org argouml cognitive critics critic get wizard class org argouml cognitive to do item public class get wizard class to do item item return wizme name class getwizardclass todoitem getwizardclass todoitem wizmename public set object get criticized design materials set object ret new hash set object ret add model get meta types getuml class return ret getcriticizeddesignmaterials hashset getmetatypes getumlclass the constructor public prop panel terminate action super label terminate action lookup icon terminate action proppanelterminateaction lookupicon terminateaction the constructor public xmi file persister xmifilepersister see org argouml persistence abstract file persister get extension public string get extension return xmi abstractfilepersister getextension getextension see org argouml persistence abstract file persister get desc protected string get desc return translator localize combobox filefilter xmi abstractfilepersister getdesc getdesc see org argouml persistence abstract file persister is save enabled public boolean is save enabled return false abstractfilepersister issaveenabled issaveenabled save a project to a file in xmi format param project the project to save param file the file to write throws save exception if anything goes wrong throws interrupted exception if the thread is interrupted public void do save project project file file throws save exception interrupted exception progress mgr progress mgr new progress mgr progress mgr set number of phases 4 progress mgr next phase file last archive file new file file get absolute path file temp file null try temp file create temp file file catch file not found exception e throw new save exception failed to archive the previous file version e catch io exception e throw new save exception failed to archive the previous file version e output stream stream null try stream new file output stream file write project project stream progress mgr stream close if save did not raise an exception and name exists move name to name this is the correct backup file if last archive file exists last archive file delete if temp file exists last archive file exists temp file rename to last archive file if temp file exists temp file delete catch interrupted exception exc try stream close catch io exception ex throw exc catch exception e log error exception occured during save attempt e try stream close catch io exception ex frank in case of exception delete name and mv name back to name if name exists this is the rollback to old file file delete temp file rename to file we have to give a message to user and set the system to unsaved throw new save exception e progress mgr next phase saveexception interruptedexception dosave saveexception interruptedexception progressmgr progressmgr progressmgr progressmgr setnumberofphases progressmgr nextphase lastarchivefile getabsolutepath tempfile tempfile createtempfile filenotfoundexception saveexception ioexception saveexception outputstream fileoutputstream writeproject progressmgr lastarchivefile lastarchivefile tempfile lastarchivefile tempfile renameto lastarchivefile tempfile tempfile interruptedexception ioexception ioexception tempfile renameto saveexception progressmgr nextphase write the output for a project on the given stream param project the project to output param stream the stream to write to param progress mgr the progress manager monitor if any if null no progress will be reported throws save exception if something goes wrong throws interrupted exception if the thread is interrupted void write project project project output stream stream progress mgr progress mgr throws save exception interrupted exception int size project get members size for int i 0 i size i project member project member project get members get i if project member get type equals ignore case get extension if log is info enabled log info saving member of type project get members get i get type member file persister persister new model member file persister persister save project member stream if progress mgr null progress mgr next phase progressmgr saveexception interruptedexception writeproject outputstream progressmgr progressmgr saveexception interruptedexception getmembers projectmember projectmember getmembers projectmember gettype equalsignorecase getextension isinfoenabled getmembers gettype memberfilepersister modelmemberfilepersister projectmember progressmgr progressmgr nextphase this method creates a project from the specified url unlike the constructor which forces an argo extension this method will attempt to load a raw xmi file this method can fail in several different ways either by throwing an exception or by having the argo parser singleton get last load status set to not true param file the file to load the project from return the newly loaded project throws open exception if the file can not be opened throws interrupted exception if the thread is interrupted see org argouml persistence project file persister do load java io file public project do load file file throws open exception interrupted exception log info loading with xmi file persister try project p project factory get instance create project long length file length long phase space 100000 int phases int length phase space if phases 10 phase space length 10 phases 10 log info file length is length phase space is phase space phases is phases progress mgr progress mgr new progress mgr progress mgr set number of phases phases thread utils check if interrupted input source source new input source new xmi input stream file touri tourl open stream this phase space progress mgr source set system id file touri tourl to string model member file persister model persister new model member file persister model persister read models source object model model persister get cur model progress mgr next phase model get uml helper add listeners to model model p setuuid refs model persister getuuid refs p add member model parse xmi extensions p model persister register diagrams p p set root model p set roots model persister get elements read file default project file new file file get path zargo make sure the file doesn t exist so the user will get prompted to choose a new name for int i 0 i 99 i if default project file exists break default project file new file file get path i zargo persistence manager get instance set projecturi default project file touri p progress mgr next phase project manager get manager set save enabled false return p catch io exception e throw new open exception e argoparser getlastloadstatus openexception interruptedexception projectfilepersister doload doload openexception interruptedexception xmifilepersister projectfactory getinstance createproject phasespace phasespace phasespace phasespace progressmgr progressmgr progressmgr progressmgr setnumberofphases threadutils checkifinterrupted inputsource inputsource xmiinputstream openstream phasespace progressmgr setsystemid tostring modelmemberfilepersister modelpersister modelmemberfilepersister modelpersister readmodels modelpersister getcurmodel progressmgr nextphase getumlhelper addlistenerstomodel setuuidrefs modelpersister getuuidrefs addmember parsexmiextensions modelpersister registerdiagrams setroot setroots modelpersister getelementsread defaultprojectfile getpath defaultprojectfile defaultprojectfile getpath persistencemanager getinstance setprojecturi defaultprojectfile progressmgr nextphase projectmanager getmanager setsaveenabled ioexception openexception returns true all argo specific files have an icon see org argouml persistence abstract file persister has an icon public boolean has an icon return true abstractfilepersister hasanicon hasanicon parse a string of xml that is the xmi extension contents this implementation simply stores the xml strings to process in one hit after all the standard xmi has been read see org argouml persistence xmi extension parser parse java lang string java lang string public void parse string label string xmi extension string if label equals pgml pgml strings add xmi extension string else if label equals argo argo string xmi extension string else if label equals todo todo string xmi extension string xmiextensionparser xmiextensionstring pgmlstrings xmiextensionstring argostring xmiextensionstring todostring xmiextensionstring parse all the extensions that were found when reading xmi param project exception open exception public void parse xmi extensions project project throws open exception if argo string null log info parsing argo string argo string length string reader input stream new string reader argo string argo parser parser new argo parser try parser read project project input stream catch exception e throw new open exception exception caught e else project add member new project member todo list project for string pgml pgml strings log info parsing pgml pgml length input stream input stream new byte array input stream pgml get bytes member file persister persister todo cyclic dependency between persistance manager and here persistence manager get instance get diagram member file persister possibly use the following instead member file persister persister new diagram member file persister persister load project input stream if todo string null log info parsing todo string todo string length input stream input stream new byte array input stream todo string get bytes member file persister persister null persister new todo list member file persister persister load project input stream else project add member new project member todo list project openexception parsexmiextensions openexception argostring argostring argostring stringreader inputstream stringreader argostring argoparser argoparser readproject inputstream openexception addmember projectmembertodolist pgmlstrings inputstream inputstream bytearrayinputstream getbytes memberfilepersister persistancemanager persistencemanager getinstance getdiagrammemberfilepersister memberfilepersister diagrammemberfilepersister inputstream todostring todostring todostring inputstream inputstream bytearrayinputstream todostring getbytes memberfilepersister todolistmemberfilepersister inputstream addmember projectmembertodolist construct a property panel for a collaboration public prop panel collaboration super label collaboration lookup icon collaboration add field translator localize label name get name text field add field translator localize label namespace get namespace selector the represented classifier uml combo box2 represented classifier combo box new uml combo box2 new uml collaboration represented classifier combo box model new action set represented classifier collaboration add field translator localize label represented classifier new uml combo box navigator translator localize label represented classifier navigate tooltip represented classifier combo box the represented operation uml combo box2 represented operation combo box new uml combo box2 new uml collaboration represented operation combo box model new action set represented operation collaboration add field translator localize label represented operation new uml combo box navigator translator localize label represented operation navigate tooltip represented operation combo box add separator add field translator localize label interaction get single row scroll new uml collaboration interaction list model uml linked list constraining list new uml linked list new uml collaboration constraining element list model add field translator localize label constraining elements new j scroll pane constraining list add separator add the owned elements field with classifier roles and association roles add field translator localize label owned elements get owned elements scroll add action new action navigate container element add action new action new stereotype add action get delete action proppanelcollaboration lookupicon addfield getnametextfield addfield getnamespaceselector umlcombobox2 representedclassifiercombobox umlcombobox2 umlcollaborationrepresentedclassifiercomboboxmodel actionsetrepresentedclassifiercollaboration addfield umlcomboboxnavigator representedclassifiercombobox umlcombobox2 representedoperationcombobox umlcombobox2 umlcollaborationrepresentedoperationcomboboxmodel actionsetrepresentedoperationcollaboration addfield umlcomboboxnavigator representedoperationcombobox addseparator addfield getsinglerowscroll umlcollaborationinteractionlistmodel umllinkedlist constraininglist umllinkedlist umlcollaborationconstrainingelementlistmodel addfield jscrollpane constraininglist addseparator classifierroles associationroles addfield getownedelementsscroll addaction actionnavigatecontainerelement addaction actionnewstereotype addaction getdeleteaction creates a new instance of source path table model public source path table model source path controller src path ctrl super new object new string translator localize misc name translator localize misc type translator localize misc source path string str model translator localize misc model string str package translator localize misc package string str class translator localize misc class string str interface translator localize misc interface collection elems src path ctrl get all model elements with source path iterator iter elems iterator while iter has next object me iter next file path src path ctrl get source path me if path null string type string name model get facade get name me if model get facade isa model me type str model else if model get facade isa package me type str package object parent model get facade get namespace me while parent null ommit root package name it s the model s root if model get facade get namespace parent null name model get facade get name parent name parent model get facade get namespace parent else if model get facade isa class me type str class else if model get facade isa interface me type str interface else log warn can t assign a type to this model element me add row new object me name type path to string else log warn unexpected the source path for me is null sourcepathtablemodel sourcepathtablemodel sourcepathcontroller srcpathctrl strmodel strpackage strclass strinterface srcpathctrl getallmodelelementswithsourcepath hasnext srcpathctrl getsourcepath getfacade getname getfacade isamodel strmodel getfacade isapackage strpackage getfacade getnamespace getfacade getnamespace getfacade getname getfacade getnamespace getfacade isaclass strclass getfacade isainterface strinterface addrow tostring the only editable cells are the ones in the source path column see javax swing table default table model is cell editable int int public boolean is cell editable int row index int column index return column index source path column defaulttablemodel iscelleditable iscelleditable rowindex columnindex columnindex source_path_column for the specified row get the model element me param row index the row index where the me data is located return the me public object get model element int row index return get value at row index model element column rowindex getmodelelement rowindex getvalueat rowindex model_element_column for the specified row get the model element me name param row index the row index where the me data is located return the me name public string getme name int row index return string get value at row index name column rowindex getmename rowindex getvalueat rowindex name_column for the specified row get the me type param row index the row index where the me data is located return the string representation of the me type public string getme type int row index return string get value at row index type column rowindex getmetype rowindex getvalueat rowindex type_column for the specified row get the get the source path param row index the row index where the me data is located return the string representation of the me source path public string getme source path int row index return string get value at row index source path column rowindex getmesourcepath rowindex getvalueat rowindex source_path_column the constructor public cr node instance without classifier setup head and desc add supported decision uml decision patterns crnodeinstancewithoutclassifier setupheadanddesc addsupporteddecision umldecision override public boolean predicate2 object dm designer dsgr if dm instanceof uml deployment diagram return no problem uml deployment diagram dd uml deployment diagram dm list set offs compute offenders dd if offs null return no problem return problem found umldeploymentdiagram no_problem umldeploymentdiagram umldeploymentdiagram listset computeoffenders no_problem problem_found override public to do item to do item object dm designer dsgr uml deployment diagram dd uml deployment diagram dm list set offs compute offenders dd return new uml to do item this offs dsgr todoitem todoitem umldeploymentdiagram umldeploymentdiagram listset computeoffenders umltodoitem override public boolean still valid to do item i designer dsgr if is active return false list set offs i get offenders uml deployment diagram dd uml deployment diagram offs get 0 if predicate dm dsgr return false list set new offs compute offenders dd boolean res offs equals new offs return res stillvalid todoitem isactive listset getoffenders umldeploymentdiagram umldeploymentdiagram listset newoffs computeoffenders newoffs if there are node instances that have an enclosing fig the returned vector set is not null then in the vector set are the uml deployment diagram and all figm node instances with an enclosing fig param dd the diagram to check return the set of offenders public list set compute offenders uml deployment diagram dd collection figs dd get layer get contents list set offs null for object obj figs if obj instanceof fig node instance continue fig node instance fn fig node instance obj if fn null object noi fn get owner if noi null collection col model get facade get classifiers noi if col size 0 continue if offs null offs new list set offs add dd offs add fn return offs umldeploymentdiagram figmnodeinstances listset computeoffenders umldeploymentdiagram getlayer getcontents listset fignodeinstance fignodeinstance fignodeinstance getowner getfacade getclassifiers listset the constructor todo why does this method not handle all settings private notation configuration add listener key show bold names this configuration add listener key use guillemots this configuration add listener key default notation this configuration add listener key show types this configuration add listener key show multiplicity this configuration add listener key show properties this configuration add listener key show association names this configuration add listener key show visibility this configuration add listener key show initial value this configuration add listener key hide bidirectional arrows this addlistener key_show_bold_names addlistener key_use_guillemots addlistener key_default_notation addlistener key_show_types addlistener key_show_multiplicity addlistener key_show_properties addlistener key_show_association_names addlistener key_show_visibility addlistener key_show_initial_value addlistener key_hide_bidirectional_arrows param n the notation name that will become default public static void set default notation notation name n log info default notation set to n get configuration value configuration set string key default notation n get configuration value notationname setdefaultnotation notationname getconfigurationvalue setstring key_default_notation getconfigurationvalue convert a string into a notation name param s the string return the matching notationname public static notation name find notation string s return notation name impl find notation s notationname notationname findnotation notationnameimpl findnotation returns the notation as set in the menu return the default notation name public static notation name get configured notation notation name n notation name impl find notation configuration get string key default notation notation argo get configuration value this is needed for the case when the default notation is not loaded at this point if n null n notation name impl find notation default notation log debug default notation is n get configuration value return n notationname notationname getconfigurednotation notationname notationnameimpl findnotation getstring key_default_notation notationargo getconfigurationvalue notationnameimpl findnotation default_notation getconfigurationvalue return the singleton public static notation get instance return singleton getinstance public void property change property change event pce log info notation change pce get old value to pce get new value argo event pump fire event new argo notation event argo event types notation changed pce propertychange propertychangeevent getoldvalue getnewvalue argoeventpump fireevent argonotationevent argoeventtypes notation_changed get list of available notations of type notation name this returns an immutable list so that the implementation type isn t exposed in the api return list of available notations public static list notation name get available notations return notation name impl get available notations notationname notationname getavailablenotations notationnameimpl getavailablenotations remove a complete notation language this is to be used by plugins that implement their own notation and that are removed p this function fails if the given notation does not exist param the notation the given notation name return true if the notation indeed is removed public static boolean remove notation notation name the notation return notation name impl remove notation the notation thenotation notationname removenotation notationname thenotation notationnameimpl removenotation thenotation create a versioned notation name with an icon param k1 the name e g uml param k2 the version e g 1 3 param icon the icon return the notation name public static notation name make notation string k1 string k2 icon icon notation name nn notation name impl make notation k1 k2 icon return nn notationname makenotation notationname notationnameimpl makenotation see org argouml ui explorer rules abstract perspective rule get rule name public string get rule name return translator localize misc model element contained diagrams abstractperspectiverule getrulename getrulename public collection get children object parent if model get facade isa model element parent project p project manager get manager get current project set argo diagram ret new hash set argo diagram for argo diagram diagram p get diagram list if diagram get namespace parent ret add diagram return ret return collections empty set getchildren getfacade isamodelelement projectmanager getmanager getcurrentproject argodiagram hashset argodiagram argodiagram getdiagramlist getnamespace empty_set public set get dependencies object parent set set new hash set if model get facade isa model element parent set add parent return set getdependencies hashset getfacade isamodelelement the constructor param node instance the uml node instance public node instance notation uml object node instance super node instance nodeinstance nodeinstance nodeinstancenotationuml nodeinstance nodeinstance parse a line of the form name base node p the base node part is a comma separated list of nodes p note that stereotypes are not supported inherit doc public void parse object model element string text strip any trailing semi colons string s text trim if s length 0 return if s char at s length 1 s s substring 0 s length 2 string name string bases string tokenizer tokenizer null if s index of 0 1 name s substring 0 s index of trim bases s substring s index of 1 trim else name s tokenizer new string tokenizer bases list object classifiers new array list object object ns model get facade get namespace model element if ns null while tokenizer has more elements string new base tokenizer next token object cls model get facade lookup in ns new base trim if cls null classifiers add cls model get common behavior helper set classifiers model element classifiers model get core helper set name model element name inheritdoc modelelement charat stringtokenizer indexof indexof indexof stringtokenizer arraylist getfacade getnamespace modelelement hasmoreelements newbase nexttoken getfacade lookupin newbase getcommonbehaviorhelper setclassifiers modelelement getcorehelper setname modelelement see org argouml notation providers notation provider get parsing help public string get parsing help return parsing help fig nodeinstance notationprovider getparsinghelp getparsinghelp suppress warnings deprecation deprecated public string to string object model element map args return to string model element suppresswarnings tostring modelelement tostring modelelement private string to string object model element string name str if model get facade get name model element null name str model get facade get name model element trim construct bases string comma separated string builder base str format name list model get facade get classifiers model element if name str length 0 base str length 0 return string base base str to string trim if base length 1 return name str trim return name str trim base tostring modelelement namestr getfacade getname modelelement namestr getfacade getname modelelement stringbuilder basestr formatnamelist getfacade getclassifiers modelelement namestr basestr basestr tostring namestr namestr override public string to string object model element notation settings settings return to string model element tostring modelelement notationsettings tostring modelelement constructor for uml tag definition combo box model public uml tag definition combo box model stereotypes applied to the target mostly control which t ds but see below for other listeners too super stereotype false umltagdefinitioncomboboxmodel umltagdefinitioncomboboxmodel tds override protected void add other model event listeners object target ask to be notified of any changes to tag definitions so that we can track new ones name changes etc model get pump add class model event listener this model get meta types get tag definition string null addothermodeleventlisteners tagdefinitions getpump addclassmodeleventlistener getmetatypes gettagdefinition override protected void remove other model event listeners object target model get pump add class model event listener this model get meta types get tag definition string null removeothermodeleventlisteners getpump addclassmodeleventlistener getmetatypes gettagdefinition override public void model changed uml change event evt because we re listening for stereotypes being added and removed but we re really interested in their owned tag definitions the default implementation won t work for us if model get facade isa tag definition evt get source log debug got tag definition event evt to string just mark for rebuild next time since we use lazy loading set model invalid else if stereotype equals evt get property name log debug got stereotype event evt to string a stereotype got applied or removed just mark for rebuild next time since we use lazy loading set model invalid else log debug got other event evt to string modelchanged umlchangeevent getfacade isatagdefinition getsource tagdefinition tostring setmodelinvalid getpropertyname tostring setmodelinvalid tostring override public boolean is lazy return true islazy protected boolean is valid element object element object owner model get facade get owner element return model get facade isa tag definition element owner null model get facade get stereotypes get target contains owner isvalidelement getfacade getowner getfacade isatagdefinition getfacade getstereotypes gettarget override public void set selected item object o set fire list events false super set selected item o set fire list events true setselecteditem setfirelistevents setselecteditem setfirelistevents protected void build model list remove all elements object target get target add all get applicable tag definitions target buildmodellist removeallelements gettarget addall getapplicabletagdefinitions see org argouml uml ui uml combo box model2 get selected model element protected object get selected model element return get selected item umlcomboboxmodel2 getselectedmodelelement getselectedmodelelement getselecteditem private collection get applicable tag definitions object element set list string paths new hash set list string set object available tag defs new tree set object new path comparator collection stereotypes model get facade get stereotypes element project project project manager get manager get current project for object model project get models todo won t our use of path comparator take care of uniqueness add all unique model elements from available tag defs paths model get model management helper get all model elements of kind model model get meta types get tag definition todo won t our use of path comparator take care of uniqueness add all unique model elements from available tag defs paths project get profile configuration find by meta type model get meta types get tag definition list not valids new array list for object tag def available tag defs object owner model get facade get owner tag def if owner null stereotypes contains owner not valids add tag def int size available tag defs size available tag defs remove all not valids int delta size available tag defs size return available tag defs getapplicabletagdefinitions hashset availabletagdefs treeset pathcomparator getfacade getstereotypes projectmanager getmanager getcurrentproject getmodels pathcomparator addalluniquemodelelementsfrom availabletagdefs getmodelmanagementhelper getallmodelelementsofkind getmetatypes gettagdefinition pathcomparator addalluniquemodelelementsfrom availabletagdefs getprofileconfiguration findbymetatype getmetatypes gettagdefinition notvalids arraylist tagdef availabletagdefs getfacade getowner tagdef notvalids tagdef availabletagdefs availabletagdefs removeall notvalids availabletagdefs availabletagdefs helper method for build model list p adds those elements from source that do not have the same path as any path in paths to elements and its path to paths thus elements will never contain two objects with the same path unless they are added by other means private static void add all unique model elements from set elements set list string paths collection sources for object source sources list string path model get model management helper get path list source if paths contains path paths add path elements add source buildmodellist addalluniquemodelelementsfrom getmodelmanagementhelper getpathlist construct a new selection state for the given fig param f the given fig public selection state fig f super f selectionstate selectionstate param b true if the buton is enabled public void set incoming button enabled boolean b show incoming b setincomingbuttonenabled showincoming param b true if the buton is enabled public void set outgoing button enabled boolean b show outgoing b setoutgoingbuttonenabled showoutgoing override protected icon get icons icon working icons new icon icons length system arraycopy icons 0 working icons 0 icons length if show outgoing working icons right base null if show incoming working icons left base null return working icons geticons workingicons workingicons showoutgoing workingicons showincoming workingicons workingicons override protected string get instructions int index return instructions index base getinstructions override protected object get new edge type int index return model get meta types get transition getnewedgetype getmetatypes gettransition override protected object get new node int index return model get state machines factory create simple state getnewnode getstatemachinesfactory createsimplestate override protected object get new node type int index return model get meta types get simple state getnewnodetype getmetatypes getsimplestate override protected boolean is reverse edge int index if index left return true return false isreverseedge construct a property panel for constraint elements public prop panel constraint super label constraint lookup icon constraint add field translator localize label name get name text field add field translator localize label language model get facade get language model get facade get body get target add field translator localize label constrained elements new j scroll pane new uml linked list new uml constraint constrained element list model add separator uml text area2 text new uml text area2 new uml constraint body document text set editable false text set line wrap false text set rows 5 j scroll pane pane new j scroll pane text add field translator localize label constraint body pane add action new action navigate container element add action new action new stereotype add action get delete action proppanelconstraint lookupicon addfield getnametextfield addfield getfacade getlanguage getfacade getbody gettarget addfield jscrollpane umllinkedlist umlconstraintconstrainedelementlistmodel addseparator umltextarea2 umltextarea2 umlconstraintbodydocument seteditable setlinewrap setrows jscrollpane jscrollpane addfield addaction actionnavigatecontainerelement addaction actionnewstereotype addaction getdeleteaction construct a document for a constraint body public uml constraint body document super body umlconstraintbodydocument see org argouml uml ui uml plain text document set property java lang string protected void set property string text model get core helper set body get target text umlplaintextdocument setproperty setproperty getcorehelper setbody gettarget see org argouml uml ui uml plain text document get property protected string get property return string model get facade get body model get facade get body get target umlplaintextdocument getproperty getproperty getfacade getbody getfacade getbody gettarget default constructor param type the type name public ocl type string type this name type ocltype return returns the name public string get name return name getname the constructor public cr illegal name setup head and desc add supported decision uml decision naming add trigger name crillegalname setupheadanddesc addsupporteddecision umldecision addtrigger public boolean predicate2 object dm designer dsgr if model get facade isa model element dm return no problem object me dm string me name model get facade get name me if me name null me name equals return no problem string name str me name int len name str length normal model elements are not allowed to have spaces but for states we make an exception for int i 0 i len i char c name str char at i if character is letter or digit c c c model get facade isa state vertex me return problem found return no problem getfacade isamodelelement no_problem mename getfacade getname mename mename no_problem namestr mename namestr namestr charat isletterordigit _ getfacade isastatevertex problem_found no_problem see org argouml cognitive poster get clarifier public icon get clarifier return cl class name get the instance getclarifier getclarifier clclassname gettheinstance public set object get criticized design materials set object ret new hash set object ret add model get meta types getuml class ret add model get meta types get interface ret add model get meta types get association class ret add model get meta types get operation ret add model get meta types get parameter ret add model get meta types get state return ret getcriticizeddesignmaterials hashset getmetatypes getumlclass getmetatypes getinterface getmetatypes getassociationclass getmetatypes getoperation getmetatypes getparameter getmetatypes getstate see org argouml ui explorer rules perspective rule get rule name public string get rule name return translator localize misc diagram node perspectiverule getrulename getrulename public collection get children object parent if parent instanceof diagram return diagram parent get nodes return collections empty set getchildren getnodes empty_set see org argouml ui explorer rules perspective rule get dependencies java lang object public set get dependencies object parent todo what return collections empty set perspectiverule getdependencies getdependencies empty_set the constructor public cr unconventional attr name setup head and desc add supported decision uml decision naming set knowledge types critic kt syntax add trigger feature name crunconventionalattrname setupheadanddesc addsupporteddecision umldecision setknowledgetypes kt_syntax addtrigger feature_name public boolean predicate2 object dm designer dsgr if model get facade isa attribute dm return no problem object attr m attribute dm string name str model get facade get name attr if name str null name str equals return no problem int pos 0 int length name str length for pos length name str char at pos pos if the name is only underscores if pos length return problem found check for all uppercase and or mixed with underscores char inital char name str char at pos boolean all capitals true for pos length pos if character is upper case name str char at pos name str char at pos all capitals false break if all capitals return no problem check whether constant constants are often weird and thus not a problem if model get facade is read only attr return no problem if character is lower case inital char return problem found return no problem getfacade isaattribute no_problem mattribute namestr getfacade getname namestr namestr no_problem namestr namestr charat _ problem_found initalchar namestr charat allcapitals isuppercase namestr charat namestr charat _ allcapitals allcapitals no_problem getfacade isreadonly no_problem islowercase initalchar problem_found no_problem public to do item to do item object dm designer dsgr object f dm list set offs compute offenders f return new uml to do item this offs dsgr todoitem todoitem listset computeoffenders umltodoitem param dm the feature return the set of offenders protected list set compute offenders object dm list set offs new list set dm offs add model get facade get owner dm return offs listset computeoffenders listset listset getfacade getowner public string compute suggestion string name string sug int nu if name null return attr for nu 0 nu name length nu if name char at nu break if nu 0 sug name substring 0 nu else sug if nu name length sug character to lower case name char at nu if nu 1 name length sug name substring nu 1 return sug computesuggestion charat _ tolowercase charat see org argouml cognitive poster get clarifier public icon get clarifier return cl attribute compartment get the instance getclarifier getclarifier clattributecompartment gettheinstance public boolean still valid to do item i designer dsgr if is active return false list set offs i get offenders object f offs get 0 if predicate f dsgr return false list set new offs compute offenders f boolean res offs equals new offs return res stillvalid todoitem isactive listset getoffenders listset newoffs computeoffenders newoffs public void init wizard wizard w if w instanceof wizme name to do item item to do item w get to do item object me item get offenders get 0 string sug compute suggestion model get facade get name me string ins super get instructions wizme name w set instructions ins wizme name w set suggestion sug initwizard wizmename todoitem todoitem gettodoitem getoffenders computesuggestion getfacade getname getinstructions wizmename setinstructions wizmename setsuggestion see org argouml cognitive critics critic get wizard class org argouml cognitive to do item override public class get wizard class to do item item return wizme name class getwizardclass todoitem getwizardclass todoitem wizmename public set object get criticized design materials set object ret new hash set object ret add model get meta types get attribute return ret getcriticizeddesignmaterials hashset getmetatypes getattribute construct a default property panel for an action public prop panel action this label action null proppanelaction construct an action property panel with the given name and icon param name the name of the properties panel param icon the icon to be shown next to the name public prop panel action string name image icon icon super name icon initialize proppanelaction imageicon the initialization of the panel with its fields and stuff public void initialize add field translator localize label name get name text field add new uml action asynchronous check box uml expression model2 script model new uml script expression model this script j panel script panel create border panel translator localize label script script panel add new j scroll pane new uml expression body field script model true script panel add new uml expression language field script model false add script panel uml expression model2 recurrence model new uml recurrence expression model this recurrence j panel recurrence panel create border panel translator localize label recurrence recurrence panel add new j scroll pane new uml expression body field recurrence model true recurrence panel add new uml expression language field recurrence model false add recurrence panel add separator j list arguments list new uml linked list new uml action argument list model arguments list set visible row count 5 arguments scroll new j scroll pane arguments list add field translator localize label arguments arguments scroll add action new action navigate container element add action new action create argument add action new action new stereotype add extra actions add action get delete action addfield getnametextfield umlactionasynchronouscheckbox umlexpressionmodel2 scriptmodel umlscriptexpressionmodel jpanel scriptpanel createborderpanel scriptpanel jscrollpane umlexpressionbodyfield scriptmodel scriptpanel umlexpressionlanguagefield scriptmodel scriptpanel umlexpressionmodel2 recurrencemodel umlrecurrenceexpressionmodel jpanel recurrencepanel createborderpanel recurrencepanel jscrollpane umlexpressionbodyfield recurrencemodel recurrencepanel umlexpressionlanguagefield recurrencemodel recurrencepanel addseparator jlist argumentslist umllinkedlist umlactionargumentlistmodel argumentslist setvisiblerowcount argumentsscroll jscrollpane argumentslist addfield argumentsscroll addaction actionnavigatecontainerelement addaction actioncreateargument addaction actionnewstereotype addextraactions addaction getdeleteaction overrule this to add extra action buttons protected void add extra actions do nothing by default addextraactions constructor for action new argument public action create argument super button new argument put value action name translator localize button new argument put value action small icon resource loader wrapper lookup icon new parameter actionnewargument actioncreateargument putvalue putvalue small_icon resourceloaderwrapper lookupicon newparameter override public void action performed action event e object t target manager get instance get target if model get facade isa action t object argument model get common behavior factory create argument model get common behavior helper add actual argument t argument target manager get instance set target argument actionperformed actionevent targetmanager getinstance gettarget getfacade isaaction getcommonbehaviorfactory createargument getcommonbehaviorhelper addactualargument targetmanager getinstance settarget construct a property panel for submachine state elements with the given params param name the name of the properties panel param icon the icon to be shown next to the name public prop panel submachine state final string name final image icon icon super name icon todo are these constructors organized correctly we aren t providing our own initialize so all the work done in the default constructor will be skipped for our subclasses prop panel subactivity state tfm 20071119 initialize submachinestate proppanelsubmachinestate imageicon proppanelsubactivitystate construct a default property panel submachine state elements public prop panel submachine state super label submachine state lookup icon submachine state add field label name get name text field add field label container get container scroll final j combo box submachine box new uml combo box2 new uml submachine state combo box model action set submachine state submachine get instance add field label submachine new uml combo box navigator translator localize tooltip nav submachine submachine box add field label entry get entry scroll add field label exit get exit scroll add field label do activity get do scroll add separator add field label incoming get incoming scroll add field label outgoing get outgoing scroll add field label internal transitions get internal transitions scroll add separator add field label subvertex new j scroll pane new uml mutable linked list new uml composite state subvertex list model null action new stub state get instance submachinestate proppanelsubmachinestate lookupicon submachinestate addfield getnametextfield addfield getcontainerscroll jcombobox submachinebox umlcombobox2 umlsubmachinestatecomboboxmodel actionsetsubmachinestatesubmachine getinstance addfield umlcomboboxnavigator submachinebox addfield getentryscroll addfield getexitscroll addfield getdoscroll addseparator addfield getincomingscroll addfield getoutgoingscroll addfield getinternaltransitionsscroll addseparator addfield jscrollpane umlmutablelinkedlist umlcompositestatesubvertexlistmodel actionnewstubstate getinstance see org argouml uml ui behavior state machines prop panel state vertex add extra buttons override protected void add extra buttons intentionally do nothing state_machines proppanelstatevertex addextrabuttons addextrabuttons see org argouml uml ui behavior state machines prop panel composite state update extra buttons override protected void update extra buttons intentionally do nothing state_machines proppanelcompositestate updateextrabuttons updateextrabuttons constructs a new popupmenu the given parameter role determines what the purpose is of the actions that can be created via this popupmenu the parameter must comply to the interface roles defined on action new action param role the role param list the list public popup menu new action string role uml mutable linked list list super build menu this role list get target actionnewaction popupmenunewaction umlmutablelinkedlist buildmenu gettarget public static void build menu j popup menu pmenu string role object target j menu new menu new j menu new menu set text translator localize action new new menu add action new call action get instance action new call action get instance set target target action new call action get instance put value action new action role role new menu add action new create action get instance action new create action get instance set target target action new create action get instance put value action new action role role new menu add action new destroy action get instance action new destroy action get instance set target target action new destroy action get instance put value action new action role role new menu add action new return action get instance action new return action get instance set target target action new return action get instance put value action new action role role new menu add action new send action get instance action new send action get instance set target target action new send action get instance put value action new action role role new menu add action new terminate action get instance action new terminate action get instance set target target action new terminate action get instance put value action new action role role new menu add action new uninterpreted action get instance action new uninterpreted action get instance set target target action new uninterpreted action get instance put value action new action role role new menu add action new action sequence get instance action new action sequence get instance set target target action new action sequence get instance put value action new action role role pmenu add new menu pmenu add separator todo this needs to be fixed to work for action sequences tfm action remove model element singleton set object to remove action new action get action role target action remove model element singleton put value action name translator localize action delete from model pmenu add action remove model element singleton buildmenu jpopupmenu jmenu newmenu jmenu newmenu settext newmenu actionnewcallaction getinstance actionnewcallaction getinstance settarget actionnewcallaction getinstance putvalue actionnewaction newmenu actionnewcreateaction getinstance actionnewcreateaction getinstance settarget actionnewcreateaction getinstance putvalue actionnewaction newmenu actionnewdestroyaction getinstance actionnewdestroyaction getinstance settarget actionnewdestroyaction getinstance putvalue actionnewaction newmenu actionnewreturnaction getinstance actionnewreturnaction getinstance settarget actionnewreturnaction getinstance putvalue actionnewaction newmenu actionnewsendaction getinstance actionnewsendaction getinstance settarget actionnewsendaction getinstance putvalue actionnewaction newmenu actionnewterminateaction getinstance actionnewterminateaction getinstance settarget actionnewterminateaction getinstance putvalue actionnewaction newmenu actionnewuninterpretedaction getinstance actionnewuninterpretedaction getinstance settarget actionnewuninterpretedaction getinstance putvalue actionnewaction newmenu actionnewactionsequence getinstance actionnewactionsequence getinstance settarget actionnewactionsequence getinstance putvalue actionnewaction newmenu addseparator actionsequences actionremovemodelelement setobjecttoremove actionnewaction getaction actionremovemodelelement putvalue actionremovemodelelement see org argouml ui explorer rules perspective rule get rule name public string get rule name return translator localize misc profile model perspectiverule getrulename getrulename public collection get children object parent if parent instanceof profile try collection col profile parent get profile packages return col catch profile exception e return collections empty set return collections empty set getchildren getprofilepackages profileexception empty_set empty_set see org argouml ui explorer rules perspective rule get dependencies java lang object public set get dependencies object parent todo what return collections empty set perspectiverule getdependencies getdependencies empty_set public list get ports object node or edge list res new array list if model get facade isa node node or edge res add node or edge if model get facade isa node instance node or edge res add node or edge if model get facade isa component node or edge res add node or edge if model get facade isa component instance node or edge res add node or edge if model get facade isa class node or edge res add node or edge if model get facade isa interface node or edge res add node or edge if model get facade isa object node or edge res add node or edge return res getports nodeoredge arraylist getfacade isanode nodeoredge nodeoredge getfacade isanodeinstance nodeoredge nodeoredge getfacade isacomponent nodeoredge nodeoredge getfacade isacomponentinstance nodeoredge nodeoredge getfacade isaclass nodeoredge nodeoredge getfacade isainterface nodeoredge nodeoredge getfacade isaobject nodeoredge nodeoredge see org tigris gef graph base graph model get owner java lang object public object get owner object port return port basegraphmodel getowner getowner public list get in edges object port list res new array list if model get facade isa node port collection ends model get facade get association ends port if ends null return collections empty list for object end ends res add model get facade get association end if model get facade isa node instance port object noi port collection ends model get facade get link ends noi res add all ends if model get facade isa component port collection ends model get facade get association ends port if ends null return collections empty list for object end ends res add model get facade get association end if model get facade isa component instance port object coi port collection ends model get facade get link ends coi res add all ends if model get facade isa class port collection ends model get facade get association ends port if ends null return collections empty list for object end ends res add model get facade get association end if model get facade isa interface port collection ends model get facade get association ends port if ends null return collections empty list for object end ends res add model get facade get association end if model get facade isa object port object clo port collection ends model get facade get link ends clo res add all ends return res getinedges arraylist getfacade isanode getfacade getassociationends empty_list getfacade getassociation getfacade isanodeinstance getfacade getlinkends addall getfacade isacomponent getfacade getassociationends empty_list getfacade getassociation getfacade isacomponentinstance getfacade getlinkends addall getfacade isaclass getfacade getassociationends empty_list getfacade getassociation getfacade isainterface getfacade getassociationends empty_list getfacade getassociation getfacade isaobject getfacade getlinkends addall see org tigris gef graph graph model get out edges java lang object public list get out edges object port return collections empty list todo graphmodel getoutedges getoutedges empty_list override public boolean can add node object node if node null return false if model get facade isa association node model get facade isa nary association node a binary association is not a node so reject return false if contains node node return false if model get facade isa association node collection ends model get facade get connections node boolean can add true for object end ends object classifier model get facade get classifier end if contains node classifier can add false break return can add return model get facade isa node node model get facade isa component node model get facade isa class node model get facade isa interface node model get facade isa object node model get facade isa node instance node model get facade isa component instance node model get facade isa comment node canaddnode getfacade isaassociation getfacade isanaryassociation containsnode getfacade isaassociation getfacade getconnections canadd getfacade getclassifier containsnode canadd canadd getfacade isanode getfacade isacomponent getfacade isaclass getfacade isainterface getfacade isaobject getfacade isanodeinstance getfacade isacomponentinstance getfacade isacomment override public boolean can add edge object edge if edge null return false if contains edge edge return false object end0 null end1 null if edge instanceof comment edge end0 comment edge edge get source end1 comment edge edge get destination else if model get facade isa association end edge end0 model get facade get association edge end1 model get facade get type edge return end0 null end1 null contains edge end0 contains node end0 contains node end1 else if model get facade isa relationship edge end0 model get core helper get source edge end1 model get core helper get destination edge else if model get facade isa link edge end0 model get common behavior helper get source edge end1 model get common behavior helper get destination edge else if edge instanceof comment edge end0 comment edge edge get source end1 comment edge edge get destination else return false both ends must be defined and nodes that are on the graph already if end0 null end1 null log error edge rejected its ends are not attached to anything return false if contains node end0 contains edge end0 log error edge rejected its source end is attached to end0 but this is not in the graph model return false if contains node end1 contains edge end1 log error edge rejected its destination end is attached to end1 but this is not in the graph model return false return true canaddedge containsedge commentedge commentedge getsource commentedge getdestination getfacade isaassociationend getfacade getassociation getfacade gettype containsedge containsnode containsnode getfacade isarelationship getcorehelper getsource getcorehelper getdestination getfacade isalink getcommonbehaviorhelper getsource getcommonbehaviorhelper getdestination commentedge commentedge getsource commentedge getdestination containsnode containsedge containsnode containsedge override public void add node object node log debug adding class node if can add node node return get nodes add node todo assumes public user pref for default visibility do i have to check the namespace here toby if model get facade isa model element node model get facade get namespace node null model get core helper add owned element get home model node fire node added node addnode canaddnode getnodes getfacade isamodelelement getfacade getnamespace getcorehelper addownedelement gethomemodel firenodeadded override public void add edge object edge log debug adding class edge if can add edge edge return get edges add edge todo assumes public if model get facade isa model element edge model get facade isa association end edge model get core helper add owned element get home model edge fire edge added edge addedge canaddedge getedges getfacade isamodelelement getfacade isaassociationend getcorehelper addownedelement gethomemodel fireedgeadded override public void add node related edges object node super add node related edges node if model get facade isa classifier node collection ends model get facade get association ends node for object ae ends if model get facade isa nary association model get facade get association ae can add edge model get facade get association ae add edge model get facade get association ae return if model get facade isa association node collection ends model get facade get connections node for object association end ends if can add edge association end add edge association end if model get facade isa instance node collection ends model get facade get link ends node for object end ends object link model get facade get link end if can add edge link add edge link return if model get facade isa generalizable element node collection generalizations model get facade get generalizations node for object generalization generalizations if can add edge generalization add edge generalization return collection specializations model get facade get specializations node for object specialization specializations if can add edge specialization add edge specialization return if model get facade isa model element node list dependencies new array list model get facade get client dependencies node dependencies add all model get facade get supplier dependencies node for object dependency dependencies if can add edge dependency add edge dependency return addnoderelatededges addnoderelatededges getfacade isaclassifier getfacade getassociationends getfacade isanaryassociation getfacade getassociation canaddedge getfacade getassociation addedge getfacade getassociation getfacade isaassociation getfacade getconnections associationend canaddedge associationend addedge associationend getfacade isainstance getfacade getlinkends getfacade getlink canaddedge addedge getfacade isageneralizableelement getfacade getgeneralizations canaddedge addedge getfacade getspecializations canaddedge addedge getfacade isamodelelement arraylist getfacade getclientdependencies addall getfacade getsupplierdependencies canaddedge addedge public void vetoable change property change event pce if owned element equals pce get property name list old owned list pce get old value object eo pce get new value object me model get facade get model element eo if old owned contains eo log debug model removed me if model get facade isa node me remove node me if model get facade isa node instance me remove node me if model get facade isa component me remove node me if model get facade isa component instance me remove node me if model get facade isa class me remove node me if model get facade isa interface me remove node me if model get facade isa object me remove node me if model get facade isa association me remove edge me if model get facade isa dependency me remove edge me if model get facade isa link me remove edge me else log debug model added me vetoablechange propertychangeevent ownedelement getpropertyname oldowned getoldvalue getnewvalue getfacade getmodelelement oldowned getfacade isanode removenode getfacade isanodeinstance removenode getfacade isacomponent removenode getfacade isacomponentinstance removenode getfacade isaclass removenode getfacade isainterface removenode getfacade isaobject removenode getfacade isaassociation removeedge getfacade isadependency removeedge getfacade isalink removeedge the constructor since this constructor does not set the necessary instructions it is private private wiz step confirm instructions set editable false instructions set border null instructions set background get main panel get background instructions set wrap style word true get main panel set border new etched border grid bag layout gb new grid bag layout get main panel set layout gb grid bag constraints c new grid bag constraints c ipadx 3 c ipady 3 c weightx 0 0 c weighty 0 0 c anchor grid bag constraints east j label image new j label image set margin new insets 0 0 0 0 image set icon get wizard icon image set border null c gridx 0 c gridheight 4 c gridy 0 gb set constraints image c get main panel add image c weightx 1 0 c gridx 2 c gridheight 1 c gridwidth 3 c gridy 0 c fill grid bag constraints horizontal gb set constraints instructions c get main panel add instructions c gridx 1 c gridy 1 c weightx 0 0 c gridwidth 1 c fill grid bag constraints none spacer panel spacer new spacer panel gb set constraints spacer c get main panel add spacer wizstepconfirm seteditable setborder setbackground getmainpanel getbackground setwrapstyleword getmainpanel setborder etchedborder gridbaglayout gridbaglayout getmainpanel setlayout gridbagconstraints gridbagconstraints gridbagconstraints jlabel jlabel setmargin seticon getwizardicon setborder setconstraints getmainpanel gridbagconstraints setconstraints getmainpanel gridbagconstraints spacerpanel spacerpanel setconstraints getmainpanel the constructor param w the wizard ignored param instr the instructions public wiz step confirm wizard w string instr this store wizard instructions set text instr wizstepconfirm settext construct the proppanel and place all scrollpanes etc on the canvas public prop panel association end role super label association end role lookup icon association end role set association label translator localize label association role create controls position standard controls position controls proppanelassociationendrole lookupicon associationendrole setassociationlabel createcontrols positionstandardcontrols positioncontrols override protected void position controls add field translator localize label base get single row scroll new uml association end role base list model super position controls positioncontrols addfield getsinglerowscroll umlassociationendrolebaselistmodel positioncontrols the constructor param container the container of uml user interface components param property name the name of the property public uml change expression model uml user interface container container string property name super container property name propertyname umlchangeexpressionmodel umluserinterfacecontainer propertyname propertyname see org argouml uml ui uml expression model2 get expression public object get expression return model get facade get change expression target manager get instance get target umlexpressionmodel2 getexpression getexpression getfacade getchangeexpression targetmanager getinstance gettarget public void set expression object expression object target target manager get instance get target if target null throw new illegal state exception there is no target for get container model get state machines helper set change expression target expression setexpression targetmanager getinstance gettarget illegalstateexception getcontainer getstatemachineshelper setchangeexpression see org argouml uml ui uml expression model2 new expression public object new expression log debug new boolean expression return model get data types factory create boolean expression umlexpressionmodel2 newexpression newexpression getdatatypesfactory createbooleanexpression constructor public prop panel partition super label partition title lookup icon partition add field translator localize label name get name text field activity graph scroll get single row scroll new uml partition activity graph list model add field translator localize label activity graph get activity graph field add separator add field translator localize label contents get contents field add action new action navigate container element add action new action new stereotype add action get delete action proppanelpartition lookupicon addfield getnametextfield activitygraphscroll getsinglerowscroll umlpartitionactivitygraphlistmodel addfield getactivitygraphfield addseparator addfield getcontentsfield addaction actionnavigatecontainerelement addaction actionnewstereotype addaction getdeleteaction this field intentionally allows to do far more things than would be possible by dragging elements in or out of the fig partition p e g if you only use dragging then an element belongs to at most one partition a logical presumption the action add partition content however allows modifying the model in such way that elements belong to more than one partition which is not prohibited by the uml standard p these extra possibilities are needed e g to amend a model loaded in xmi format return a textfield for the name protected j component get contents field if contents scroll null j list content list new uml mutable linked list content list model new action add partition content null contents scroll new j scroll pane content list return contents scroll figpartition actionaddpartitioncontent jcomponent getcontentsfield contentsscroll jlist contentlist umlmutablelinkedlist contentlistmodel actionaddpartitioncontent contentsscroll jscrollpane contentlist contentsscroll protected j panel get activity graph field return activity graph scroll jpanel getactivitygraphfield activitygraphscroll class action add partition content extends abstract action add model element2 public action add partition content super set multi select true actionaddpartitioncontent abstractactionaddmodelelement2 actionaddpartitioncontent setmultiselect override protected void do it collection selected object partition get target if model get facade isa partition partition model get activity graphs helper set contents partition selected doit gettarget getfacade isapartition getactivitygraphshelper setcontents protected list get choices list ret new array list if model get facade isa partition get target object partition get target object ag model get facade get activity graph partition if ag null object top model get facade get top ag there are no composite states so this will work ret add all model get facade get subvertices top return ret getchoices arraylist getfacade isapartition gettarget gettarget getfacade getactivitygraph getfacade gettop addall getfacade getsubvertices protected string get dialog title return translator localize dialog title add contents getdialogtitle protected list get selected list ret new array list ret add all model get facade get contents get target return ret getselected arraylist addall getfacade getcontents gettarget class uml partition content list model extends uml model element list model2 public uml partition content list model string name super name umlpartitioncontentlistmodel umlmodelelementlistmodel2 umlpartitioncontentlistmodel protected void build model list object partition get target set all elements model get facade get contents partition buildmodellist gettarget setallelements getfacade getcontents protected boolean is valid element object element if model get facade isa model element element return false object partition get target return model get facade get contents partition contains element isvalidelement getfacade isamodelelement gettarget getfacade getcontents constructor for uml state vertex incoming list model public uml partition activity graph list model super activity graph umlstatevertexincominglistmodel umlpartitionactivitygraphlistmodel activitygraph see org argouml uml ui uml model element list model2 build model list protected void build model list remove all elements add element model get facade get activity graph get target umlmodelelementlistmodel2 buildmodellist buildmodellist removeallelements addelement getfacade getactivitygraph gettarget see org argouml uml ui uml model element list model2 is valid element object protected boolean is valid element object element return model get facade get activity graph get target element umlmodelelementlistmodel2 isvalidelement isvalidelement getfacade getactivitygraph gettarget the constructor param state the state public state body notation object state if model get facade isa state state throw new illegal argument exception this is not a state statebodynotation getfacade isastate illegalargumentexception public void initialise listener property change listener listener object model element add element listener listener model element register for internal transitions iterator it model get facade get internal transitions model element iterator while it has next add listeners for transition listener it next register for the doactivity etc object do activity model get facade get do activity model element add listeners for action listener do activity object entry action model get facade get entry model element add listeners for action listener entry action object exit action model get facade get exit model element add listeners for action listener exit action initialiselistener propertychangelistener modelelement addelementlistener modelelement getfacade getinternaltransitions modelelement hasnext addlistenersfortransition doactivity getfacade getdoactivity modelelement addlistenersforaction doactivity entryaction getfacade getentry modelelement addlistenersforaction entryaction exitaction getfacade getexit modelelement addlistenersforaction exitaction private void add listeners for action property change listener listener object action if action null add element listener listener action new string script actual argument action collection args model get facade get actual arguments action iterator i args iterator while i has next object argument i next add element listener listener argument value if model get facade isa action sequence action collection subactions model get facade get actions action i subactions iterator while i has next object a i next add listeners for action listener a addlistenersforaction propertychangelistener addelementlistener actualargument getfacade getactualarguments hasnext addelementlistener getfacade isaactionsequence getfacade getactions hasnext addlistenersforaction private void add listeners for event property change listener listener object event if event null add element listener listener event new string parameter name collection prms model get facade get parameters event iterator i prms iterator while i has next object parameter i next add element listener listener parameter addlistenersforevent propertychangelistener addelementlistener getfacade getparameters hasnext addelementlistener private void add listeners for transition property change listener listener object transition add element listener listener transition new string guard trigger effect object guard model get facade get guard transition if guard null add element listener listener guard expression object trigger model get facade get trigger transition add listeners for event listener trigger object effect model get facade get effect transition add listeners for action listener effect addlistenersfortransition propertychangelistener addelementlistener getfacade getguard addelementlistener getfacade gettrigger addlistenersforevent getfacade geteffect addlistenersforaction param collaboration the collaboration to be set for this diagram public void set collaboration object collaboration try if collaboration null throw new illegal argument exception a null collaboration was supplied if model get facade isa collaboration collaboration throw new illegal argument exception expected a collaboration the type received was collaboration get class get name catch illegal argument exception e log error illegal argument to set collaboration e throw e set home model collaboration setcollaboration illegalargumentexception getfacade isacollaboration illegalargumentexception getclass getname illegalargumentexception setcollaboration sethomemodel public list get ports object node or edge if model get facade isa classifier role node or edge list result new array list result add node or edge return result return collections empty list getports nodeoredge getfacade isaclassifierrole nodeoredge arraylist nodeoredge empty_list see org tigris gef graph base graph model get owner java lang object public object get owner object port return port basegraphmodel getowner getowner public list get in edges object port if model get facade isa classifier role port object cr port collection ends model get facade get association ends cr if ends null return collections empty list list result new array list for object end ends result add model get facade get association end return collections empty list getinedges getfacade isaclassifierrole getfacade getassociationends empty_list arraylist getfacade getassociation empty_list see org tigris gef graph graph model get out edges java lang object public list get out edges object port return collections empty list todo graphmodel getoutedges getoutedges empty_list override public boolean can add node object node if node null return false if model get facade isa association node model get facade isa nary association node a binary association is not a node so reject return false if contains node node return false return model get facade isa classifier role node model get facade isa message node model get facade isa comment node canaddnode getfacade isaassociation getfacade isanaryassociation containsnode getfacade isaclassifierrole getfacade isamessage getfacade isacomment override public boolean can add edge object edge if edge null return false if contains edge edge return false object end0 null object end1 null if model get facade isa association role edge collection conns model get facade get connections edge iterator iter conns iterator if conns size 2 return false object association end role0 iter next object association end role1 iter next if association end role0 null association end role1 null return false end0 model get facade get type association end role0 end1 model get facade get type association end role1 else if model get facade isa generalization edge object gen m generalization edge end0 model get facade get general gen end1 model get facade get specific gen else if model get facade isa dependency edge collection clients model get facade get clients edge collection suppliers model get facade get suppliers edge if clients null clients is empty suppliers null suppliers is empty return false end0 clients iterator next end1 suppliers iterator next else if edge instanceof comment edge end0 comment edge edge get source end1 comment edge edge get destination else return false both ends must be defined and nodes that are on the graph already if end0 null end1 null log error edge rejected its ends are not attached to anything return false if contains node end0 contains edge end0 log error edge rejected its source end is attached to end0 but this is not in the graph model return false if contains node end1 contains edge end1 log error edge rejected its destination end is attached to end1 but this is not in the graph model return false return true canaddedge containsedge getfacade isaassociationrole getfacade getconnections associationendrole0 associationendrole1 associationendrole0 associationendrole1 getfacade gettype associationendrole0 getfacade gettype associationendrole1 getfacade isageneralization mgeneralization getfacade getgeneral getfacade getspecific getfacade isadependency getfacade getclients getfacade getsuppliers isempty isempty commentedge commentedge getsource commentedge getdestination containsnode containsedge containsnode containsedge override public void add node object node log debug adding m classifier role node if can add node node return get nodes add node todo assumes public user pref for default visibility if model get facade isa classifier node model get core helper add owned element get home model node m classifier node set namespace collab get namespace fire node added node addnode mclassifierrole canaddnode getnodes getfacade isaclassifier getcorehelper addownedelement gethomemodel mclassifier setnamespace _collab getnamespace firenodeadded override public void add edge object edge log debug adding class edge if can add edge edge return get edges add edge todo assumes public if model get facade isa model element edge model get facade get namespace edge null model get core helper add owned element get home model edge fire edge added edge addedge canaddedge getedges getfacade isamodelelement getfacade getnamespace getcorehelper addownedelement gethomemodel fireedgeadded override public void add node related edges object node super add node related edges node if model get facade isa classifier node collection ends model get facade get association ends node for object end ends if can add edge model get facade get association end add edge model get facade get association end if model get facade isa generalizable element node collection generalizations model get facade get generalizations node for object generalization generalizations if can add edge generalization add edge generalization return collection specializations model get facade get specializations node for object specialization specializations if can add edge specialization add edge specialization return if model get facade isa model element node collection dependencies new array list model get facade get client dependencies node dependencies add all model get facade get supplier dependencies node for object dependency dependencies if can add edge dependency add edge dependency return addnoderelatededges addnoderelatededges getfacade isaclassifier getfacade getassociationends canaddedge getfacade getassociation addedge getfacade getassociation getfacade isageneralizableelement getfacade getgeneralizations canaddedge addedge getfacade getspecializations canaddedge addedge getfacade isamodelelement arraylist getfacade getclientdependencies addall getfacade getsupplierdependencies canaddedge addedge override public boolean can connect object fromp object top if model get facade isa classifier role fromp model get facade isa classifier role top return true return false canconnect getfacade isaclassifierrole getfacade isaclassifierrole public void vetoable change property change event pce throws property veto exception if owned element equals pce get property name list old owned list pce get old value object eo m element import pce get new value object me model get facade get model element eo if old owned contains eo log debug model removed me if model get facade isa classifier me remove node me if model get facade isa message me remove node me if model get facade isa association me remove edge me else log debug model added me vetoablechange propertychangeevent propertyvetoexception ownedelement getpropertyname oldowned getoldvalue melementimport getnewvalue getfacade getmodelelement oldowned getfacade isaclassifier removenode getfacade isamessage removenode getfacade isaassociation removeedge constructor for uml tag definition type value list model public uml tag definition typed values list model super typed value umltagdefinitiontypevaluelistmodel umltagdefinitiontypedvalueslistmodel typedvalue protected void build model list if get target null collection typed values model get facade get typed values get target collection tagged values new hash set for iterator i typed values iterator i has next tagged values add model get facade get model element container i next set all elements tagged values buildmodellist gettarget typedvalues getfacade gettypedvalues gettarget taggedvalues hashset typedvalues hasnext taggedvalues getfacade getmodelelementcontainer setallelements taggedvalues protected boolean is valid element object element iterator i model get facade get typed values get target iterator while i has next if element equals model get facade get model element container i next return true return false isvalidelement getfacade gettypedvalues gettarget hasnext getfacade getmodelelementcontainer construct a stereotype properties panel public prop panel stereotype super label stereotype title lookup icon stereotype add field translator localize label name get name text field add field translator localize label namespace get namespace selector j panel modifiers panel create border panel translator localize label modifiers modifiers panel add new uml generalizable element abstract check box modifiers panel add new uml generalizable element leaf check box modifiers panel add new uml generalizable element root check box add modifiers panel add get visibility panel add separator add field translator localize label generalizations get generalization scroll add field translator localize label specializations get specialization scroll add field translator localize label tagdefinitions get tag definition scroll add separator init meta classes uml mutable linked list umll new uml mutable linked list new uml stereotype base class list model new action add stereotype base class null umll set delete action new action delete stereotype base class umll set cell renderer new default list cell renderer add field translator localize label base class new j scroll pane umll add field translator localize label extended elements get extended elements scroll add action new action navigate namespace add action new action new stereotype add action new action new tag definition add action get delete action proppanelstereotype lookupicon addfield getnametextfield addfield getnamespaceselector jpanel modifierspanel createborderpanel modifierspanel umlgeneralizableelementabstractcheckbox modifierspanel umlgeneralizableelementleafcheckbox modifierspanel umlgeneralizableelementrootcheckbox modifierspanel getvisibilitypanel addseparator addfield getgeneralizationscroll addfield getspecializationscroll addfield gettagdefinitionscroll addseparator initmetaclasses umlmutablelinkedlist umlmutablelinkedlist umlstereotypebaseclasslistmodel actionaddstereotypebaseclass setdeleteaction actiondeletestereotypebaseclass setcellrenderer defaultlistcellrenderer addfield jscrollpane addfield getextendedelementsscroll addaction actionnavigatenamespace addaction actionnewstereotype addaction actionnewtagdefinition addaction getdeleteaction returns the generalization scroll return j scroll pane protected j scroll pane get generalization scroll if generalization scroll null j list list new uml linked list generalization list model generalization scroll new j scroll pane list return generalization scroll generalizationscroll jscrollpane jscrollpane getgeneralizationscroll generalizationscroll jlist umllinkedlist generalizationlistmodel generalizationscroll jscrollpane generalizationscroll returns the specialization scroll return j scroll pane protected j scroll pane get specialization scroll if specialization scroll null j list list new uml linked list specialization list model specialization scroll new j scroll pane list return specialization scroll specializationscroll jscrollpane jscrollpane getspecializationscroll specializationscroll jlist umllinkedlist specializationlistmodel specializationscroll jscrollpane specializationscroll returns the tag definition scroll return j scroll pane protected j scroll pane get tag definition scroll if tag definition scroll null j list list new uml linked list tag definition list model tag definition scroll new j scroll pane list return tag definition scroll tagdefinitionscroll jscrollpane jscrollpane gettagdefinitionscroll tagdefinitionscroll jlist umllinkedlist tagdefinitionlistmodel tagdefinitionscroll jscrollpane tagdefinitionscroll protected j scroll pane get extended elements scroll if extended elements scroll null j list list new uml linked list extended elements list model extended elements scroll new j scroll pane list return extended elements scroll jscrollpane getextendedelementsscroll extendedelementsscroll jlist umllinkedlist extendedelementslistmodel extendedelementsscroll jscrollpane extendedelementsscroll initialise the meta classes list p all this code is necessary to be independent of model repository implementation i e to ensure that we have a sorted list of strings void init meta classes collection string tmp meta classes model get core helper get all metatype names if tmp meta classes instanceof list meta classes list string tmp meta classes else meta classes new linked list string tmp meta classes try collections sort meta classes catch unsupported operation exception e we got passed an unmodifiable list copy it and sort the result meta classes new linked list string tmp meta classes collections sort meta classes initmetaclasses tmpmetaclasses getcorehelper getallmetatypenames tmpmetaclasses metaclasses tmpmetaclasses metaclasses linkedlist tmpmetaclasses metaclasses unsupportedoperationexception metaclasses linkedlist tmpmetaclasses metaclasses construct the model listen to changes of base class uml stereotype base class list model super base class baseclass umlstereotypebaseclasslistmodel baseclass override protected void build model list remove all elements if model get facade isa stereotype get target keep them sorted linked list string lst new linked list string model get facade get base classes get target collections sort lst add all lst buildmodellist removeallelements getfacade isastereotype gettarget linkedlist linkedlist getfacade getbaseclasses gettarget addall override protected boolean is valid element object element if model get facade isa stereotype element return true return false isvalidelement getfacade isastereotype class action add stereotype base class extends abstract action add model element2 override protected list string get choices return collections unmodifiable list meta classes actionaddstereotypebaseclass abstractactionaddmodelelement2 getchoices unmodifiablelist metaclasses override protected string get dialog title return translator localize dialog title add baseclasses getdialogtitle override protected list string get selected list string result new array list string if model get facade isa stereotype get target collection string bases model get facade get base classes get target result add all bases return result getselected arraylist getfacade isastereotype gettarget getfacade getbaseclasses gettarget addall override protected void do it collection selected object stereo get target set object old set new hash set object get selected set to be removed new hash set object old set for object o selected if old set contains o to be removed remove o else model get extension mechanisms helper add base class stereo o for object o to be removed model get extension mechanisms helper remove base class stereo o doit gettarget oldset hashset getselected toberemoved hashset oldset oldset toberemoved getextensionmechanismshelper addbaseclass toberemoved getextensionmechanismshelper removebaseclass class action delete stereotype base class extends abstract action remove element public action delete stereotype base class super translator localize menu popup remove actiondeletestereotypebaseclass abstractactionremoveelement actiondeletestereotypebaseclass override public void action performed action event e todo use per project undo manager not global undo manager get instance start chain object baseclass get object to remove if baseclass null object st get target if model get facade isa stereotype st model get extension mechanisms helper remove base class st baseclass actionperformed actionevent undomanager getinstance startchain getobjecttoremove gettarget getfacade isastereotype getextensionmechanismshelper removebaseclass construct a new selection interface for the given fig param f the given fig public selection interface fig f super f selectioninterface selectioninterface override protected object get new node int index if index 0 index get button if index top return model get core factory build interface else return model get core factory build class getnewnode getbutton getcorefactory buildinterface getcorefactory buildclass override protected object get new edge type int index if index top return model get meta types get generalization else if index bottom return model get meta types get abstraction return null getnewedgetype getmetatypes getgeneralization getmetatypes getabstraction override protected object get new node type int index if index top return model get meta types get interface else if index bottom return model get meta types getuml class return null getnewnodetype getmetatypes getinterface getmetatypes getumlclass override protected icon get icons if model get model management helper is read only get content get owner return new icon null realiz null null null return icons geticons getmodelmanagementhelper isreadonly getcontent getowner override protected string get instructions int index return instructions index base getinstructions override protected boolean is reverse edge int index if index 11 return true return false isreverseedge constructor public action set tag definition multiplicity super actionsettagdefinitionmultiplicity public void set selected item object item object target if target null model get facade isa tag definition target if model get facade isa multiplicity item if item equals model get facade get multiplicity target model get core helper set multiplicity target item else if item instanceof string if item equals model get facade to string model get facade get multiplicity target model get core helper set multiplicity target model get data types factory create multiplicity string item else model get core helper set multiplicity target null setselecteditem getfacade isatagdefinition getfacade isamultiplicity getfacade getmultiplicity getcorehelper setmultiplicity getfacade tostring getfacade getmultiplicity getcorehelper setmultiplicity getdatatypesfactory createmultiplicity getcorehelper setmultiplicity construct a property panel for a feature with the given name and icon param name name of property which contains string to use for property panel name this will be localized by the super constructor param icon icon protected prop panel feature string name image icon icon super name icon proppanelfeature imageicon returns the owner scroll return j scroll pane public j panel get owner scroll if owner scroll null if owner list model null owner list model new uml feature owner list model owner scroll get single row scroll owner list model return owner scroll ownerscroll jscrollpane jpanel getownerscroll ownerscroll ownerlistmodel ownerlistmodel umlfeatureownerlistmodel ownerscroll getsinglerowscroll ownerlistmodel ownerscroll returns the owner scope checkbox return uml feature owner scope check box public uml feature owner scope check box get owner scope checkbox if owner scope checkbox null owner scope checkbox new uml feature owner scope check box return owner scope checkbox ownerscopecheckbox umlfeatureownerscopecheckbox umlfeatureownerscopecheckbox getownerscopecheckbox ownerscopecheckbox ownerscopecheckbox umlfeatureownerscopecheckbox ownerscopecheckbox return the panel for the visibility protected j panel get visibility panel if visibility panel null visibility panel new uml model element visibility radio button panel translator localize label visibility true return visibility panel jpanel getvisibilitypanel visibilitypanel visibilitypanel umlmodelelementvisibilityradiobuttonpanel visibilitypanel default constructor constructs a model and a collaboration in the root of the current project public sequence diagram graph model sequencediagramgraphmodel public list get ports object node or edge list ports new array list if model get facade isa classifier role node or edge ports add all model get facade get received messages node or edge ports add all model get facade get sent messages node or edge else if model get facade isa message node or edge ports add model get facade get sender node or edge ports add model get facade get receiver node or edge return ports getports nodeoredge arraylist getfacade isaclassifierrole nodeoredge addall getfacade getreceivedmessages nodeoredge addall getfacade getsentmessages nodeoredge getfacade isamessage nodeoredge getfacade getsender nodeoredge getfacade getreceiver nodeoredge see org tigris gef graph base graph model get owner java lang object public object get owner object port return port basegraphmodel getowner getowner public list get in edges object port list res new array list if model get facade isa classifier role port res add all model get facade get sent messages port return res getinedges arraylist getfacade isaclassifierrole addall getfacade getsentmessages public list get out edges object port list res new array list if model get facade isa classifier role port res add all model get facade get received messages port return res getoutedges arraylist getfacade isaclassifierrole addall getfacade getreceivedmessages public boolean can add node object node if node null return false return get nodes contains node model get facade isa model element node model get facade get namespace node get collaboration canaddnode getnodes getfacade isamodelelement getfacade getnamespace getcollaboration public boolean can add edge object edge if edge null return false if get edges contains edge return false object end0 null object end1 null if model get facade isa message edge end0 model get facade get sender edge end1 model get facade get receiver edge else if edge instanceof comment edge end0 comment edge edge get source end1 comment edge edge get destination else return false both ends must be defined and nodes that are on the graph already if end0 null end1 null log error edge rejected its ends are not attached to anything return false if contains node end0 contains edge end0 log error edge rejected its source end is attached to end0 but this is not in the graph model return false if contains node end1 contains edge end1 log error edge rejected its destination end is attached to end1 but this is not in the graph model return false return true canaddedge getedges getfacade isamessage getfacade getsender getfacade getreceiver commentedge commentedge getsource commentedge getdestination containsnode containsedge containsnode containsedge public void add node object node if can add node node get nodes add node fire node added node addnode canaddnode getnodes firenodeadded public void add edge object edge if can add edge edge get edges add edge fire edge added edge addedge canaddedge getedges fireedgeadded public boolean can connect object fromp object top object edge type if edge type comment edge class model get facade isa comment fromp model get facade isa comment top model get facade isa comment fromp model get facade isa comment top we can connect if we get a comment edge and one only one node that is a comment return true if fromp instanceof message node top instanceof message node return false if fromp top return false message node node from message node fromp message node node to message node top if node from get fig classifier role node to get fig classifier role fig classifier role fig node from get fig classifier role if fig get index of node from fig get index of node to return false editor cur editor globals cur editor mode manager mode manager cur editor get mode manager mode mode mode manager top hashtable args mode get args object action type args get action if model get meta types get call action equals action type return node from can call node to can be called else if model get meta types get return action equals action type return node to can be returned to node from can return node to get classifier role else if model get meta types get create action equals action type if node from get fig classifier role node to get fig classifier role return false return node from can create node to can be created else if model get meta types get destroy action equals action type return node from can destroy node to can be destroyed not supported action return false canconnect edgetype edgetype commentedge getfacade isacomment getfacade isacomment getfacade isacomment getfacade isacomment messagenode messagenode messagenode nodefrom messagenode messagenode nodeto messagenode nodefrom getfigclassifierrole nodeto getfigclassifierrole figclassifierrole nodefrom getfigclassifierrole getindexof nodefrom getindexof nodeto cureditor cureditor modemanager modemanager cureditor getmodemanager modemanager getargs actiontype getmetatypes getcallaction actiontype nodefrom cancall nodeto canbecalled getmetatypes getreturnaction actiontype nodeto canbereturnedto nodefrom canreturn nodeto getclassifierrole getmetatypes getcreateaction actiontype nodefrom getfigclassifierrole nodeto getfigclassifierrole nodefrom cancreate nodeto canbecreated getmetatypes getdestroyaction actiontype nodefrom candestroy nodeto canbedestroyed creates a link based on the given from and to port the from port should always point to a message coordinates instance the to port can point to a message coordinates instance or to a object instance on a sequence diagram you can only draw messages so other edge classes then links are not supported inherit doc see org tigris gef graph mutable graph model connect object object class override public object connect object from port object to port object edge type if can connect from port to port edge type return null if edge type comment edge class return super connect from port to port edge type object edge null object from object null object to object null object action null if model get meta types get message equals edge type editor cur editor globals cur editor mode manager mode manager cur editor get mode manager mode mode mode manager top hashtable args mode get args object action type args get action if model get meta types get call action equals action type if from port instanceof message node to port instanceof message node from object message node from port get classifier role to object message node to port get classifier role action model get common behavior factory create call action else if model get meta types get create action equals action type if from port instanceof message node to port instanceof message node from object message node from port get classifier role to object message node to port get classifier role action model get common behavior factory create create action else if model get meta types get return action equals action type if from port instanceof message node to port instanceof message node from object message node from port get classifier role to object message node to port get classifier role action model get common behavior factory create return action else if model get meta types get destroy action equals action type if from port instanceof message node to port instanceof message node from object message node from port get classifier role to object message node from port get classifier role action model get common behavior factory create destroy action else if model get meta types get send action equals action type no implementation not of importance to sequence diagrams else if model get meta types get terminate action equals action type not implemented yet if from object null to object null action null object association role model get collaborations helper get association role from object to object if association role null association role model get collaborations factory build association role from object to object object message model get collaborations factory build message get interaction association role if action null model get collaborations helper set action message action model get core helper set namespace action get collaboration model get collaborations helper set sender message from object model get common behavior helper set receiver message to object add edge message edge message if edge null log debug incorrect edge return edge toport fromport messagecoordinates toport messagecoordinates edgeclasses inheritdoc mutablegraphmodel fromport toport edgetype canconnect fromport toport edgetype edgetype commentedge fromport toport edgetype fromobject toobject getmetatypes getmessage edgetype cureditor cureditor modemanager modemanager cureditor getmodemanager modemanager getargs actiontype getmetatypes getcallaction actiontype fromport messagenode toport messagenode fromobject messagenode fromport getclassifierrole toobject messagenode toport getclassifierrole getcommonbehaviorfactory createcallaction getmetatypes getcreateaction actiontype fromport messagenode toport messagenode fromobject messagenode fromport getclassifierrole toobject messagenode toport getclassifierrole getcommonbehaviorfactory createcreateaction getmetatypes getreturnaction actiontype fromport messagenode toport messagenode fromobject messagenode fromport getclassifierrole toobject messagenode toport getclassifierrole getcommonbehaviorfactory createreturnaction getmetatypes getdestroyaction actiontype fromport messagenode toport messagenode fromobject messagenode fromport getclassifierrole toobject messagenode fromport getclassifierrole getcommonbehaviorfactory createdestroyaction getmetatypes getsendaction actiontype getmetatypes getterminateaction actiontype fromobject toobject associationrole getcollaborationshelper getassociationrole fromobject toobject associationrole associationrole getcollaborationsfactory buildassociationrole fromobject toobject getcollaborationsfactory buildmessage getinteraction associationrole getcollaborationshelper setaction getcorehelper setnamespace getcollaboration getcollaborationshelper setsender fromobject getcommonbehaviorhelper setreceiver toobject addedge public void vetoable change property change event pce throws property veto exception if owned element equals pce get property name list old owned list pce get old value object eo pce get new value object me model get facade get model element eo if old owned contains eo log debug model removed me if model get facade isa classifier role me remove node me if model get facade isa message me remove edge me else log debug model added me vetoablechange propertychangeevent propertyvetoexception ownedelement getpropertyname oldowned getoldvalue getnewvalue getfacade getmodelelement oldowned getfacade isaclassifierrole removenode getfacade isamessage removeedge gets the collaboration that is shown on the sequence diagram p return the collaboration of the diagram public object get collaboration if collaboration null collaboration model get collaborations factory build collaboration get project get root return collaboration getcollaboration getcollaborationsfactory buildcollaboration getproject getroot sets the collaboration that is shown at the sequence diagram param c the collaboration public void set collaboration object c collaboration c collection interactions model get facade get interactions c if interactions is empty interaction interactions iterator next setcollaboration getfacade getinteractions isempty private object get interaction if interaction null interaction model get collaborations factory build interaction collaboration model get pump add model event listener this interaction return interaction getinteraction getcollaborationsfactory buildinteraction getpump addmodeleventlistener see org argouml uml diagram uml mutable graph support get home model public object get home model return get collaboration umlmutablegraphsupport gethomemodel gethomemodel getcollaboration public void set home model object namespace if model get facade isa namespace namespace throw new illegal argument exception a sequence diagram home model must be a namespace received a namespace set collaboration namespace super set home model namespace sethomemodel getfacade isanamespace illegalargumentexception setcollaboration sethomemodel public void property change property change event evt if evt instanceof delete instance event evt get source interaction model get pump remove model event listener this interaction interaction null todo auto generated method stub propertychange propertychangeevent deleteinstanceevent getsource getpump removemodeleventlistener the default constructor but should never be called directly use link fig include object diagram settings however we can t mark it as private since gef expects to be able to call this when creating the diagram deprecated only for use by pgml parser suppress warnings deprecation deprecated public fig include label new fig single line text x0 y0 20 90 20 false initialize figinclude diagramsettings suppresswarnings figinclude figsinglelinetext private void initialize the include label it s not a true stereotype so don t use the stereotype support label set text color text color label set text filled false label set filled false label set line width 0 label set editable false label set text include add path item label new path item placement this label 50 10 make the line dashed set dashed true add an arrow with an open arrow head set dest arrow head end arrow make the edge go between nearest points set between nearest points true settextcolor text_color settextfilled setfilled setlinewidth seteditable settext addpathitem pathitemplacement setdashed setdestarrowhead endarrow setbetweennearestpoints p the main constructor builds the fig edge required and makes the given edge object its owner p param edge the edge that will own the fig deprecated for 0 27 3 by tfmorris use link fig include object diagram settings suppress warnings deprecation deprecated public fig include object edge this set owner edge figedge figinclude diagramsettings suppresswarnings figinclude setowner construct a fig owned by the given uml element with the provided render settings param edge owning uml element param settings rendering settings public fig include object edge diagram settings settings super edge settings label new fig single line text edge new rectangle x0 y0 20 90 20 settings false initialize figinclude diagramsettings figsinglelinetext p set a new fig to represent this edge p p we invoke the superclass accessor then change aspects of the new fig that are not as we want in this case to use dashed lines p param f the fig to use override public void set fig fig f super set fig f set dashed true setfig setfig setdashed p define whether the given fig can be edited it can t p param f the fig about which the enquiry is being made ignored in this implementation return code false code under all circumstances override protected boolean can edit fig f return false canedit override public void paint graphics g end arrow set line color get line color super paint g endarrow setlinecolor getlinecolor constructor for the critic p sets up the resource name which will allow headline and description to found for the current locale provides a design issue category containment a knowledge type semantics and add triggers for connection and end aggregation public crn way agg setup head and desc add supported decision uml decision containment set knowledge types critic kt semantics these may not actually make any difference at present the code behind add trigger needs more work add trigger connection add trigger end aggregation end_aggregation crnwayagg setupheadanddesc addsupporteddecision umldecision setknowledgetypes kt_semantics addtrigger addtrigger addtrigger end_aggregation the trigger for the critic p check that the number of ends more than two otherwise this should be handled by the critic for 2 way assocations see link org argouml uml cognitive critics cr multiple agg p we do not handle association roles which are a subclass of association an association role should be fine if its parent is ok since it must be more tightly constrained than its parent p em note em argouml does not currently have a constructor to check that an association role is more tightly constrained than its parent p then loop through the ends looking for aggregate ends note that we look for aggregation explicitly rather than just absence of no aggregation so we don t trigger if the aggregation is just undefined param dm the link java lang object object to be checked against the critic param dsgr the link org argouml cognitive designer designer creating the model not used this is for future development of argouml return link problem found problem found if the critic is triggered otherwise link no problem no problem public boolean predicate2 object dm designer dsgr only work for associatins if model get facade isa association dm return no problem get the assocations and connections no problem there is a separate critic if this is a binary association or is an association role object asc m association dm if model get facade isa association role asc return no problem collection conns model get facade get connections asc if conns null conns size 2 return no problem loop through the associations looking for one with aggregation iterator assoc ends conns iterator while assoc ends has next object ae m association end assoc ends next if model get facade is aggregate ae model get facade is composite ae return problem found if drop out we re ok return no problem crmultipleagg problem_found problem_found no_problem no_problem getfacade isaassociation no_problem massociation getfacade isaassociationrole no_problem getfacade getconnections no_problem assocends assocends hasnext massociationend assocends getfacade isaggregate getfacade iscomposite problem_found no_problem public set object get criticized design materials set object ret new hash set object ret add model get meta types get association class return ret getcriticizeddesignmaterials hashset getmetatypes getassociationclass construct a new selection class for the given fig param f the given fig public selection signal fig f super f selectionclass selectionsignal protected object get new node int index return model get common behavior factory create signal getnewnode getcommonbehaviorfactory createsignal protected object get new node type int index return model get meta types get signal getnewnodetype getmetatypes getsignal the constructor param objectflowstate the object flow state represented by this notation public object flow state state notation uml object objectflowstate super objectflowstate objectflowstate objectflowstatestatenotationuml see org argouml notation providers notation provider get parsing help public string get parsing help return parsing help fig objectflowstate2 notationprovider getparsinghelp getparsinghelp public void parse object model element string text try parse object flow state2 model element text catch parse exception pe string msg statusmsg bar error parsing objectflowstate object args pe get localized message integer value of pe get error offset argo event pump fire event new argo help event argo event types help changed this translator message format msg args modelelement parseobjectflowstate2 modelelement parseexception getlocalizedmessage valueof geterroroffset argoeventpump fireevent argohelpevent argoeventtypes help_changed messageformat do the actual parsing param object flow state the given element to be altered param s the new string return the altered object flow state throws parse exception when the given text was rejected protected object parse object flow state2 object object flow state string s throws parse exception s s trim let s not be picky about the brackets just remove them if s starts with s s substring 1 if s ends with s s substring 0 s length 1 s s trim object c model get facade get type object flow state get the classifier if c null if model get facade isa classifier in state c object classifier model get facade get type c if s null equals s the state of a classifier in state is removed so let s reduce it to a classifier model get core helper set type object flow state classifier delete c model get core helper set type object flow state classifier return object flow state the model is changed job done collection states new array list model get facade get in states c collection states to be removed new array list states collection names to be added new array list strings string tokenizer tokenizer new string tokenizer s while tokenizer has more tokens string next token tokenizer next token trim boolean found false iterator i states iterator while i has next object state i next if model get facade get name state next token found true states to be removed remove state if found names to be added add next token remove the states that did not match states remove all states to be removed iterator i names to be added iterator while i has next string name string i next now we have to see if any state in any statemachine of classifier is named name if so then we only have to link the state to c object state model get activity graphs helper find state by name classifier name if state null states add state the model is changed our job is done else no state named s is found so we have to reject the user s input string msg parsing error object flow state state not found object args s throw new parse exception translator localize msg args 0 finally do the adaptations model get activity graphs helper set in states c states else then c is a normal classifier collection states to be added new array list uml states string tokenizer tokenizer new string tokenizer s while tokenizer has more tokens string next token tokenizer next token trim object state model get activity graphs helper find state by name c next token if state null states to be added add state else no state with the given name is found so we have to reject the complete user s input string msg parsing error object flow state state not found object args s throw new parse exception translator localize msg args 0 let s create a new classifier in state with the correct links object cis model get activity graphs factory build classifier in state c states to be added model get core helper set type object flow state cis the model is changed our job is done else if no classifier has been set then entering a state is not useful so the user s input has to be rejected string msg parsing error object flow state classifier not found throw new parse exception translator localize msg 0 return object flow state objectflowstate objectflowstate parseexception parseobjectflowstate2 objectflowstate parseexception startswith endswith getfacade gettype objectflowstate getfacade isaclassifierinstate getfacade gettype classifierinstate getcorehelper settype objectflowstate getcorehelper settype objectflowstate objectflowstate arraylist getfacade getinstates statestoberemoved arraylist namestobeadded arraylist stringtokenizer stringtokenizer hasmoretokens nexttoken nexttoken hasnext getfacade getname nexttoken statestoberemoved namestobeadded nexttoken removeall statestoberemoved namestobeadded hasnext getactivitygraphshelper findstatebyname parseexception getactivitygraphshelper setinstates statestobeadded arraylist stringtokenizer stringtokenizer hasmoretokens nexttoken nexttoken getactivitygraphshelper findstatebyname nexttoken statestobeadded parseexception classifierinstate getactivitygraphsfactory buildclassifierinstate statestobeadded getcorehelper settype objectflowstate parseexception objectflowstate this deletes modelelements and swallows null without barking author mvw tigris org param obj the modelelement to be deleted private void delete object obj if obj null project manager get manager get current project move to trash obj projectmanager getmanager getcurrentproject movetotrash suppress warnings deprecation deprecated public string to string object model element map args return to string model element suppresswarnings tostring modelelement tostring modelelement private string to string object model element string builder the new text new string builder object cis model get facade get type model element if model get facade isa classifier in state cis the new text append the new text append format name list model get facade get in states cis the new text append return the new text to string tostring modelelement stringbuilder thenewtext stringbuilder getfacade gettype modelelement getfacade isaclassifierinstate thenewtext thenewtext formatnamelist getfacade getinstates thenewtext thenewtext tostring override public string to string object model element notation settings settings return to string model element tostring modelelement notationsettings tostring modelelement private constructor so it cannot be instantiated private configuration don t allow instantiation returns the instance of the configuration singleton return the configuration handler public static configuration handler get configuration handler return config configurationhandler getconfigurationhandler returns the configuration factory instance p this is equivalent to configuration factory get instance but using configuration get factory is shorter to type and allows us not to have to deal with configuration factory at all if we don t need to modify or configure it return the configuration factory public static i configuration factory get factory return configuration factory get instance configurationfactory getinstance getfactory configurationfactory iconfigurationfactory getfactory configurationfactory getinstance load the configuration from the default location the configuration will be automatically loaded from the default location the first time a value is queried or modified if it had not been previously loaded only the first load request will be honored so if the configuration is to be loaded from a non default location load name must be used prior to any other call the configuration can be loaded only one time implementations must ignore load requests once a load is already successful and must return false for each of those ignored requests return true if the load is successful otherwise false public static boolean load return config load default loaddefault load the configuration from a specified file param file the file to load return true if the load is successful otherwise false public static boolean load file file return config load file load the configuration from a specified url param url the url to load return true if the load is successful otherwise false public static boolean load url url return config load url save the configuration to the default location implementations do not have to handle this method if the method is not allowed or it fails the implementation must return false return true if the save is successful otherwise false public static boolean save return configuration save false save the configuration to the default location implementations do not have to handle this method if the method is not allowed or it fails the implementation must return false param force the file to save even if it would not normally be saved return true if the save is successful otherwise false public static boolean save boolean force return config save default force savedefault returns the string value of a configuration property param key the key to retrieve the value of return the string value of the parameter if it exists otherwise a zero length string public static string get string configuration key key return get string key getstring configurationkey getstring returns the string value of a configuration property param key the key to retrieve the value of param default value the value to return if the key does not exist return the string value of the parameter if it exists otherwise the default value public static string get string configuration key key string default value return config get string key default value defaultvalue getstring configurationkey defaultvalue getstring defaultvalue returns the numeric value of a configuration property param key the key to retrieve the value of return the string value of the parameter if it exists otherwise zero public static int get integer configuration key key return get integer key 0 getinteger configurationkey getinteger returns the numeric value of a configuration property param key the key to retrieve the value of param default value if the key is not found return the string value of the parameter if it exists otherwise the default value public static double get double configuration key key double default value return config get double key default value defaultvalue getdouble configurationkey defaultvalue getdouble defaultvalue returns the numeric value of a configuration property param key the key to retrieve the value of return the string value of the parameter if it exists otherwise zero public static double get double configuration key key return get double key 0 getdouble configurationkey getdouble returns the numeric value of a configuration property param key the key to retrieve the value of param default value the value to return if the key does not exist return the numeric value of the parameter if it exists otherwise the default value public static int get integer configuration key key int default value return config get integer key default value defaultvalue getinteger configurationkey defaultvalue getinteger defaultvalue returns the boolean value of a configuration property param key the key to retrieve the value of return the boolean value of the parameter if it exists otherwise false public static boolean get boolean configuration key key return get boolean key false getboolean configurationkey getboolean returns the boolean value of a configuration property param key the key to retrieve the value of param default value the value to return if the key does not exist return the boolean value of the parameter if it exists otherwise the default value public static boolean get boolean configuration key key boolean default value return config get boolean key default value defaultvalue getboolean configurationkey defaultvalue getboolean defaultvalue sets the string value of a configuration property param key the key to set param new value the value to set the key to public static void set string configuration key key string new value config set string key new value newvalue setstring configurationkey newvalue setstring newvalue sets the numeric value of a configuration property param key the key to set param new value the value to set the key to public static void set integer configuration key key int new value config set integer key new value newvalue setinteger configurationkey newvalue setinteger newvalue sets the numeric value of a configuration property param key the key to set param new value the value to set the key to public static void set double configuration key key double new value config set double key new value newvalue setdouble configurationkey newvalue setdouble newvalue sets the boolean value of a configuration property param key the key to set param new value the value to set the key to public static void set boolean configuration key key boolean new value config set boolean key new value newvalue setboolean configurationkey newvalue setboolean newvalue adds a property change listener param pcl the property change listener to add public static void add listener property change listener pcl config add listener pcl addlistener propertychangelistener addlistener removes a property change listener param pcl the property change listener to remove public static void remove listener property change listener pcl config remove listener pcl removelistener propertychangelistener removelistener adds a property change listener static for simplicity of use param key the key to listen for changes of param pcl the property change listener to add public static void add listener configuration key key property change listener pcl config add listener key pcl addlistener configurationkey propertychangelistener addlistener removes a property change listener param key the key to listen for changes of param pcl the property change listener to remove public static void remove listener configuration key key property change listener pcl config remove listener key pcl removelistener configurationkey propertychangelistener removelistener param key the key to remove public static void remove key configuration key key config remove key get key removekey configurationkey getkey create a single component configuration key param k1 key component 1 return the new link configuration key public static configuration key make key string k1 return new configuration key impl k1 configurationkey configurationkey makekey configurationkeyimpl create a sub component of an existing configuration key param ck existing key to extend param k1 key component 1 return the new link configuration key public static configuration key make key configuration key ck string k1 return new configuration key impl ck k1 configurationkey configurationkey makekey configurationkey configurationkeyimpl create a two component configuration key param k1 key component 1 param k2 key component 2 return the new link configuration key public static configuration key make key string k1 string k2 return new configuration key impl k1 k2 configurationkey configurationkey makekey configurationkeyimpl create a three component configuration key param k1 key component 1 param k2 key component 2 param k3 key component 3 return the new link configuration key public static configuration key make key string k1 string k2 string k3 return new configuration key impl k1 k2 k3 configurationkey configurationkey makekey configurationkeyimpl create a four component configuration key param k1 key component 1 param k2 key component 2 param k3 key component 3 param k4 key component 4 return the new link configuration key public static configuration key make key string k1 string k2 string k3 string k4 return new configuration key impl k1 k2 k3 k4 configurationkey configurationkey makekey configurationkeyimpl create a five component configuration key param k1 key component 1 param k2 key component 2 param k3 key component 3 param k4 key component 4 param k5 key component 5 return the new link configuration key public static configuration key make key string k1 string k2 string k3 string k4 string k5 return new configuration key impl k1 k2 k3 k4 k5 configurationkey configurationkey makekey configurationkeyimpl construct a new action add association p param aggregation kind the required aggregation for the association param unidirectional true if this is to create a unidirectional association param name the action description public action set add association mode object aggregation kind boolean unidirectional string name super mode create poly edge class edge class model get meta types get association name mode args put aggregation aggregation kind mode args put unidirectional boolean value of unidirectional actionaddassociation aggregationkind actionsetaddassociationmode aggregationkind modecreatepolyedge edgeclass getmetatypes getassociation modeargs aggregationkind modeargs valueof construct the to do pane param splash if not null then we have to show progress in the splash todo this should take a progress monitor or something more generic or nothing at all since it doesn t do that much work public to do pane splash screen splash set layout new border layout combo new j combo box tree new display text tree perspectives new array list to do perspective count label new j label format count label 999 count label set border border factory create empty border 0 4 0 4 j panel toolbar panel new j panel new border layout toolbar panel add count label border layout east toolbar panel add combo border layout center add toolbar panel border layout north add new j scroll pane tree border layout center combo add item listener this tree add tree selection listener this tree set cell renderer new to do tree renderer tree add mouse listener this next line coming from projectbrowser set root designer the designer get to do list designer the designer get to do list add to do list listener this if splash null splash get status bar show status translator localize statusmsg bar making todopane splash get status bar show progress 25 set perspectives build perspectives set minimum size new dimension 120 100 dimension preferred size get preferred size preferred size height 120 set preferred size preferred size todopane progressmonitor todopane splashscreen setlayout borderlayout jcombobox displaytexttree arraylist todoperspective countlabel jlabel formatcountlabel countlabel setborder borderfactory createemptyborder jpanel toolbarpanel jpanel borderlayout toolbarpanel countlabel borderlayout toolbarpanel borderlayout toolbarpanel borderlayout jscrollpane borderlayout additemlistener addtreeselectionlistener setcellrenderer todotreerenderer addmouselistener setroot thedesigner gettodolist thedesigner gettodolist addtodolistlistener getstatusbar showstatus getstatusbar showprogress setperspectives buildperspectives setminimumsize preferredsize getpreferredsize preferredsize setpreferredsize preferredsize param r the root public void set root to do list r root r update tree setroot todolist updatetree return the root public to do list get root return root todolist getroot return the perspectives treemodels public list to do perspective get perspective list return perspectives todoperspective getperspectivelist param pers the perspectives public void set perspectives list to do perspective pers perspectives pers if pers is empty cur perspective null else cur perspective pers get 0 for to do perspective tdp perspectives combo add item tdp if pers is empty cur perspective null else if pers contains cur perspective set cur perspective cur perspective else set cur perspective perspectives get 0 update tree setperspectives todoperspective isempty curperspective curperspective todoperspective additem isempty curperspective curperspective setcurperspective curperspective setcurperspective updatetree return the current perspectives public to do perspective get cur perspective return cur perspective todoperspective getcurperspective curperspective param per the current perspective public void set cur perspective tree model per if perspectives null perspectives contains per return combo set selected item per to do perspectives changed setcurperspective treemodel setselecteditem todoperspectiveschanged return the last code object code in the first selected node s code tree path code or code null code if nothing is selected public object get selected object return tree get last selected path component treepath getselectedobject getlastselectedpathcomponent param item the item to be selected public void select item to do item item object path new object 3 object category null int size cur perspective get child count root for int i 0 i size i category cur perspective get child root i if cur perspective get index of child category item 1 break if category null return path 0 root path 1 category path 2 item tree path tr path new tree path path tree expand path tr path tree scroll path to visible tr path tree set selection path tr path selectitem todoitem curperspective getchildcount curperspective getchild curperspective getindexofchild treepath trpath treepath expandpath trpath scrollpathtovisible trpath setselectionpath trpath called when the user selects a perspective from the perspective combo p inherit doc public void item state changed item event e if e get source combo update tree inheritdoc itemstatechanged itemevent getsource updatetree public void value changed tree selection event e log debug to do pane value changed todo should fire its own event and project browser should register a listener tfm object sel get selected object project browser get instance set to do item sel log debug lastselection last sel log debug sel sel if last sel instanceof to do item to do item last sel deselect if sel instanceof to do item to do item sel select last sel sel valuechanged treeselectionevent todopane valuechanged projectbrowser getselectedobject projectbrowser getinstance settodoitem lastsel lastsel todoitem todoitem lastsel todoitem todoitem lastsel see java awt event mouse listener mouse pressed java awt event mouse event public void mouse pressed mouse event e empty implementation mouselistener mousepressed mouseevent mousepressed mouseevent see java awt event mouse listener mouse released java awt event mouse event public void mouse released mouse event e empty implementation mouselistener mousereleased mouseevent mousereleased mouseevent see java awt event mouse listener mouse entered java awt event mouse event public void mouse entered mouse event e empty implementation mouselistener mouseentered mouseevent mouseentered mouseevent see java awt event mouse listener mouse exited java awt event mouse event public void mouse exited mouse event e empty implementation mouselistener mouseexited mouseevent mouseexited mouseevent public void mouse clicked mouse event e int row tree get row for location e getx e gety tree path path tree get path for location e getx e gety if row 1 if e get click count 2 my double click row path else my single click row path e consume mouseclicked mouseevent getrowforlocation treepath getpathforlocation getclickcount mydoubleclick mysingleclick invoke a task on the swing thread if we are running on the swing thread this happens immediately otherwise the task is queued for later execution using swing utilities invoke later actually for the moment invoke and wait but this should be resolved in future p this is necessary because event notification of to do listener events is likely to be coming from the to do validity checker thread running in the background param task a runnable task who s run method will be invoked private void swing invoke runnable task if swing utilities is event dispatch thread task run else swing utilities invoke later task swingutilities invokelater invokeandwait todolistener todo swinginvoke swingutilities iseventdispatchthread swingutilities invokelater public void to do items changed final to do list event tde swing invoke new runnable public void run if cur perspective instanceof to do list listener to do list listener cur perspective to do items changed tde todoitemschanged todolistevent swinginvoke curperspective todolistlistener todolistlistener curperspective todoitemschanged swing invoke new runnable public void run if cur perspective instanceof to do list listener to do list listener cur perspective to do items changed tde swinginvoke curperspective todolistlistener todolistlistener curperspective todoitemschanged public void to do items added final to do list event tde swing invoke new runnable public void run if cur perspective instanceof to do list listener to do list listener cur perspective to do items added tde list to do item items tde get to do item list for to do item todo items if todo get priority to do item interruptive priority keep nagging until the user solves the problem this seems a nice way to nag select item todo break only interrupt for one todoitem update count label todoitemsadded todolistevent swinginvoke curperspective todolistlistener todolistlistener curperspective todoitemsadded todoitem gettodoitemlist todoitem getpriority todoitem interruptive_priority selectitem updatecountlabel swing invoke new runnable public void run if cur perspective instanceof to do list listener to do list listener cur perspective to do items added tde list to do item items tde get to do item list for to do item todo items if todo get priority to do item interruptive priority keep nagging until the user solves the problem this seems a nice way to nag select item todo break only interrupt for one todoitem update count label swinginvoke curperspective todolistlistener todolistlistener curperspective todoitemsadded todoitem gettodoitemlist todoitem getpriority todoitem interruptive_priority selectitem updatecountlabel public void to do items removed final to do list event tde swing invoke new runnable public void run if cur perspective instanceof to do list listener to do list listener cur perspective to do items removed tde update count label todoitemsremoved todolistevent swinginvoke curperspective todolistlistener todolistlistener curperspective todoitemsremoved updatecountlabel swing invoke new runnable public void run if cur perspective instanceof to do list listener to do list listener cur perspective to do items removed tde update count label swinginvoke curperspective todolistlistener todolistlistener curperspective todoitemsremoved updatecountlabel public void to do list changed final to do list event tde swing invoke new runnable public void run if cur perspective instanceof to do list listener to do list listener cur perspective to do list changed tde update count label todolistchanged todolistevent swinginvoke curperspective todolistlistener todolistlistener curperspective todolistchanged updatecountlabel swing invoke new runnable public void run if cur perspective instanceof to do list listener to do list listener cur perspective to do list changed tde update count label swinginvoke curperspective todolistlistener todolistlistener curperspective todolistchanged updatecountlabel todo indicate the direction private static string format count label int size switch size case 0 return translator localize label todopane no items case 1 return message format format translator localize label todopane item new object integer value of size default return message format format translator localize label todopane items new object integer value of size formatcountlabel messageformat valueof messageformat valueof update the count label public void update count label int size designer the designer get to do list size count label set text format count label size count label set opaque size warn threshold count label set background size alarm threshold alarm color warn color updatecountlabel thedesigner gettodolist countlabel settext formatcountlabel countlabel setopaque warn_threshold countlabel setbackground alarm_threshold alarm_color warn_color update the todo tree protected void update tree to do perspective tm to do perspective combo get selected item cur perspective tm if cur perspective null tree set visible false else log debug to do pane setting tree model cur perspective set root root tree set shows root handles true tree set model cur perspective tree set visible true blinks updatetree todoperspective todoperspective getselecteditem curperspective curperspective setvisible todopane curperspective setroot setshowsroothandles setmodel curperspective setvisible called when the user clicks once on an item in the tree p q what should the difference be between a single and double click p a a single click selects the todo item in the tree shows the red indication on the diagram and selects the todo tab in the details panel a double click additionally selects the offender in the explorer and selects the offender in the diagram blue selection and selects the properties tab in the details panel in both cases the focus for keyboard actions remains in the todo tree param row the selected row in the tree param path the path in the tree of the selected item public static void my single click suppress warnings unused int row suppress warnings unused tree path path clicks in to do pane mysingleclick suppresswarnings suppresswarnings treepath clicksintodopane called when the user clicks twice on an item in the tree my double click will invoke the action on the to do item param row the selected row in the tree param path the path in the tree of the selected item public void my double click suppress warnings unused int row suppress warnings unused tree path path dbl clicks in to do pane if get selected object null return object sel get selected object if sel instanceof to do item to do item sel action todo should fire its own event and project browser todo should register a listener log debug 2 get selected object to string mydoubleclick todoitem mydoubleclick suppresswarnings suppresswarnings treepath dblclicksintodopane getselectedobject getselectedobject todoitem todoitem projectbrowser getselectedobject tostring the perspectives to be chosen in the combobox are built here private static list to do perspective build perspectives to do perspective priority new to do by priority to do perspective decision new to do by decision to do perspective goal new to do by goal to do perspective offender new to do by offender to do perspective poster new to do by poster to do perspective type new to do by type add the perspectives to a list for the combobox list to do perspective perspectives new array list to do perspective perspectives add priority perspectives add decision perspectives add goal perspectives add offender perspectives add poster perspectives add type perspective support register rule new go list to decisions to items perspective support register rule new go list to goals to items perspective support register rule new go list to priority to item perspective support register rule new go list to type to item perspective support register rule new go list to offender to item perspective support register rule new go list to poster to item return perspectives todoperspective buildperspectives todoperspective todobypriority todoperspective todobydecision todoperspective todobygoal todoperspective todobyoffender todoperspective todobyposter todoperspective todobytype todoperspective arraylist todoperspective perspectivesupport registerrule golisttodecisionstoitems perspectivesupport registerrule golisttogoalstoitems perspectivesupport registerrule golisttoprioritytoitem perspectivesupport registerrule golisttotypetoitem perspectivesupport registerrule golisttooffendertoitem perspectivesupport registerrule golisttopostertoitem constructor for prop panel composite state param name the name of the properties panel param icon the icon to be shown next to the name public prop panel composite state final string name final image icon icon super name icon initialize proppanelcompositestate proppanelcompositestate imageicon construct a new property panel for a composite state public prop panel composite state super label composite state lookup icon composite state initialize add field label name get name text field add field label container get container scroll add field label modifiers new uml composite state concurrent check box add field label entry get entry scroll add field label exit get exit scroll add field label do activity get do scroll add separator add field label incoming get incoming scroll add field label outgoing get outgoing scroll add field label internal transitions get internal transitions scroll add separator add field label subvertex new j scroll pane subvertices list compositestate proppanelcompositestate lookupicon compositestate addfield getnametextfield addfield getcontainerscroll addfield umlcompositestateconcurrentcheckbox addfield getentryscroll addfield getexitscroll addfield getdoscroll addseparator addfield getincomingscroll addfield getoutgoingscroll addfield getinternaltransitionsscroll addseparator addfield jscrollpane subverticeslist override protected void add extra buttons super add extra buttons add concurrent region new action add concurrent region add action add concurrent region addextrabuttons addextrabuttons addconcurrentregion actionaddconcurrentregion addaction addconcurrentregion protected void update extra buttons add concurrent region set enabled add concurrent region is enabled updateextrabuttons addconcurrentregion setenabled addconcurrentregion isenabled initialize the panel with its specific fields in casu the substate vertex list protected void initialize subvertices list new uml composite state subvertex list new uml composite state subvertex list model subverticeslist umlcompositestatesubvertexlist umlcompositestatesubvertexlistmodel override public void set target final object t super set target t update extra buttons final object target target manager get instance get model target if model get facade isa concurrent region target get title label set text translator localize label concurrent region else if model get facade is concurrent target get title label set text translator localize label concurrent composite state else if model get facade isa submachine state target prop panel submachine is a subclass that handles its own title get title label set text translator localize label composite state settarget settarget updateextrabuttons targetmanager getinstance getmodeltarget getfacade isaconcurrentregion gettitlelabel settext getfacade isconcurrent gettitlelabel settext getfacade isasubmachinestate proppanelsubmachine gettitlelabel settext public class classdiagram note extends classdiagram node param f the fig public classdiagram note fig node f super f classdiagramnote classdiagramnode classdiagramnote fignode public int get type order numer return first null super get type order numer first get type order numer gettypeordernumer gettypeordernumer gettypeordernumer override public float calculate weight set weight get weight return get weight calculateweight setweight getweight getweight see org argouml uml diagram static structure layout classdiagram node get rank override public int get rank return first null 0 first get rank static_structure classdiagramnode getrank getrank getrank see org argouml uml diagram static structure layout classdiagram node get weight override public float get weight return first null 0 first get weight 0 9999999f static_structure classdiagramnode getweight getweight getweight see org argouml uml diagram static structure layout classdiagram node is standalone override public boolean is standalone return first null true first is standalone static_structure classdiagramnode isstandalone isstandalone isstandalone return the first node to which this note is attached to return a classdiagram node private classdiagram node first return get up nodes is empty null get up nodes get 0 classdiagramnode classdiagramnode getupnodes isempty getupnodes constructor for uml association end association list model public uml association end association list model super association umlassociationendassociationlistmodel umlassociationendassociationlistmodel protected void build model list remove all elements if get target null add element model get facade get association get target buildmodellist removeallelements gettarget addelement getfacade getassociation gettarget see org argouml uml ui uml model element list model2 is valid element object protected boolean is valid element object element return model get facade isa association element model get facade get association get target equals element umlmodelelementlistmodel2 isvalidelement isvalidelement getfacade isaassociation getfacade getassociation gettarget constructor for uml reception signal combo box model public uml reception signal combo box model super signal false model get pump add class model event listener this model get meta types get namespace owned element umlreceptionsignalcomboboxmodel umlreceptionsignalcomboboxmodel getpump addclassmodeleventlistener getmetatypes getnamespace ownedelement protected void build model list object target get target if model get facade isa reception target object rec m reception target remove all elements project p project manager get manager get current project object model p get root set elements model get model management helper get all model elements of kind with model model model get meta types get signal set selected item model get facade get signal rec buildmodellist gettarget getfacade isareception mreception removeallelements projectmanager getmanager getcurrentproject getroot setelements getmodelmanagementhelper getallmodelelementsofkindwithmodel getmetatypes getsignal setselecteditem getfacade getsignal see org argouml uml ui uml combo box model2 is valid element object protected boolean is valid element object m return model get facade isa signal m umlcomboboxmodel2 isvalidelement isvalidelement getfacade isasignal protected object get selected model element if get target null return model get facade get signal get target return null getselectedmodelelement gettarget getfacade getsignal gettarget override uml combo box model2 s default handling of remove association we get this from mdr for the previous signal when a different signal is selected don t let that remove it from the combo box only remove it if the signal was removed from the namespace p param evt the event describing the property change public void model changed uml change event evt if evt instanceof remove association event if owned element equals evt get property name object o get changed element evt if contains o building model true if o instanceof collection remove all collection o else remove element o building model false else super property change evt umlcomboboxmodel2 removeassociation modelchanged umlchangeevent removeassociationevent ownedelement getpropertyname getchangedelement buildingmodel removeall removeelement buildingmodel propertychange constructor for uml association association role list model public uml association association role list model super association role umlassociationassociationrolelistmodel umlassociationassociationrolelistmodel associationrole protected void build model list if get target null set all elements model get facade get association roles get target buildmodellist gettarget setallelements getfacade getassociationroles gettarget see org argouml uml ui uml model element list model2 is valid element object protected boolean is valid element object o return model get facade isa association role o model get facade get association roles get target contains o umlmodelelementlistmodel2 isvalidelement isvalidelement getfacade isaassociationrole getfacade getassociationroles gettarget param x location x param y location y param w width param h height param expand only impacts behavior deprecated for 0 27 3 by tfmorris use link fig name with abstract object rectangle diagram settings boolean suppress warnings deprecation deprecated public fig name with abstract int x int y int w int h boolean expand only super x y w h expand only expandonly fignamewithabstract diagramsettings suppresswarnings fignamewithabstract expandonly expandonly construct a name fig that shows whether associated item is abstract italics or bold param owner owning uml element param bounds position and size param settings rendering settings param expand only true if fig should never contract public fig name with abstract object owner rectangle bounds diagram settings settings boolean expand only super owner bounds settings expand only expandonly fignamewithabstract diagramsettings expandonly expandonly override protected int get fig font style int style 0 if get owner null style model get facade is abstract get owner font italic font plain return super get fig font style style getfigfontstyle getowner getfacade isabstract getowner getfigfontstyle public void set line width int w super set line width w setlinewidth setlinewidth constructor for prop paneluml use case diagram public prop paneluml use case diagram super translator localize label usecase diagram lookup icon use case diagram proppanelumlusecasediagram proppanelumlusecasediagram lookupicon usecasediagram constructor for action new transition public action new transition super actionnewtransition actionnewtransition public void action performed action event e super action performed e if get value source null get value destination null object target target manager get instance get model target model get state machines factory build internal transition target else model get state machines factory build transition get value source get value destination actionperformed actionevent actionperformed getvalue getvalue targetmanager getinstance getmodeltarget getstatemachinesfactory buildinternaltransition getstatemachinesfactory buildtransition getvalue getvalue public boolean is enabled object target target manager get instance get model target return super is enabled model get state machines helper is top state target isenabled targetmanager getinstance getmodeltarget isenabled getstatemachineshelper istopstate see org argouml ui explorer rules perspective rule get rule name public string get rule name return translator localize misc summary inheritance perspectiverule getrulename getrulename public collection get children object parent if parent instanceof inheritance node list list new array list iterator it model get facade get supplier dependencies inheritance node parent get parent iterator while it has next object next it next if model get facade isa abstraction next list add next it model get facade get client dependencies inheritance node parent get parent iterator while it has next object next it next if model get facade isa abstraction next list add next iterator generalizations it model get facade get generalizations inheritance node parent get parent iterator iterator specializations it model get facade get specializations inheritance node parent get parent iterator while generalizations it has next list add generalizations it next while specializations it has next list add specializations it next return list return collections empty set getchildren inheritancenode arraylist getfacade getsupplierdependencies inheritancenode getparent hasnext getfacade isaabstraction getfacade getclientdependencies inheritancenode getparent hasnext getfacade isaabstraction generalizationsit getfacade getgeneralizations inheritancenode getparent specializationsit getfacade getspecializations inheritancenode getparent generalizationsit hasnext generalizationsit specializationsit hasnext specializationsit empty_set public set get dependencies object parent if parent instanceof inheritance node set set new hash set set add inheritance node parent get parent return set return collections empty set getdependencies inheritancenode hashset inheritancenode getparent empty_set public collection get children object parent if model get facade isa state parent model get facade get do activity parent null collection children new array list children add model get facade get do activity parent return children return collections empty set getchildren getfacade isastate getfacade getdoactivity arraylist getfacade getdoactivity empty_set public set get dependencies object parent if model get facade isa state parent set set new hash set set add parent return set return collections empty set getdependencies getfacade isastate hashset empty_set see org argouml ui explorer rules perspective rule get rule name public string get rule name return translator localize misc state do activity perspectiverule getrulename getrulename return the meta type of the element that this mode is designed to create in the case the dependency metatype return the dependency meta type protected final object get meta type return model get meta types get generalization getmetatype getmetatypes getgeneralization constructor for uml classifier create action list model public uml classifier create action list model super create action umlclassifiercreateactionlistmodel umlclassifiercreateactionlistmodel createaction protected void build model list if get target null set all elements model get facade get create actions get target buildmodellist gettarget setallelements getfacade getcreateactions gettarget see org argouml uml ui uml model element list model2 is valid element object protected boolean is valid element object element return model get facade get create actions get target contains element umlmodelelementlistmodel2 isvalidelement isvalidelement getfacade getcreateactions gettarget the constructor private diagram appearance configuration add listener diagram appearance key font name this configuration add listener diagram appearance key font size this configuration add listener diagram appearance key font bold this configuration add listener diagram appearance key font itallic this diagramappearance addlistener diagramappearance key_font_name addlistener diagramappearance key_font_size addlistener diagramappearance key_font_bold addlistener diagramappearance key_font_itallic return the singleton public static diagram appearance get instance return singleton diagramappearance getinstance see java beans property change listener property change java beans property change event public void property change property change event pce log info diagram appearance change pce get old value to pce get new value propertychangelistener propertychange propertychangeevent propertychange propertychangeevent getoldvalue getnewvalue gets font name if it doesn t exist in configuration it creates new entries in configuration for appearance todo why create in a getter return the name of the configured font public string get configured font name string font name configuration get string diagram appearance key font name if font name equals font f get standard font font name f get name configuration set string diagram appearance key font name f get name configuration set integer diagram appearance key font size f get size return font name getconfiguredfontname fontname getstring diagramappearance key_font_name fontname getstandardfont fontname getname setstring diagramappearance key_font_name getname setinteger diagramappearance key_font_size getsize fontname this is the same function as look and feel mgr get instance get standard font but used for a totally different puropose here it determines a default font when none is set in the look and feel mgr it determines the looks of the ui return the standard textfield font private font get standard font font font ui manager get defaults get font text field font if font null font new javax swing j text field get font return font lookandfeelmgr getinstance getstandardfont lookandfeelmgr getstandardfont uimanager getdefaults getfont textfield jtextfield getfont construct a new xml input stream param input stream the input stream to wrap param ext parser the parser to call to read any xmi extension elements param spacing the number of characters to read before firing a progress event param prgrss mgr the progress manager public xmi input stream input stream input stream xmi extension parser ext parser long spacing progress mgr prgrss mgr super input stream event spacing spacing xmi extension parser ext parser progress mgr prgrss mgr xmlinputstream inputstream extparser prgrssmgr xmiinputstream inputstream inputstream xmiextensionparser extparser progressmgr prgrssmgr inputstream eventspacing xmiextensionparser extparser progressmgr prgrssmgr override public synchronized int read throws io exception if end found extension found false parsing extension false end found false reading name false tag name null end tag name null int ch super read if parsing extension string buffer append char ch else todo only progress when reading standard xmi extension parsers will continue progression read count if progress mgr null read count event spacing try read count 0 progress mgr next phase catch interrupted exception e throw new interruptedio exception e if xmi extension parser null if reading name if is name terminator char ch reading name false if parsing extension end tag name null end tag name tag name else if tag name equals xmi extension extension found true else if tag name equals end tag name end found true xmi extension parser parse type string buffer to string string buffer delete 0 string buffer length else tag name char ch if extension found if ch extension found false call extension parser else attributes char ch if ch reading name true tag name return ch ioexception endfound extensionfound parsingextension endfound readingname tagname endtagname parsingextension stringbuffer readcount progressmgr readcount eventspacing readcount progressmgr nextphase interruptedexception interruptedioexception xmiextensionparser readingname isnameterminator readingname parsingextension endtagname endtagname tagname tagname extensionfound tagname endtagname endfound xmiextensionparser stringbuffer tostring stringbuffer stringbuffer tagname extensionfound extensionfound callextensionparser readingname tagname private void call extension parser string label null string extender null for string tokenizer st new string tokenizer attributes st has more tokens string attribute type st next token if attribute type equals xmi extender extender st next token extender extender substring 1 extender length 1 if attribute type equals xmi label label st next token label label substring 1 label length 1 if argouml equals extender type label string buffer new string buffer parsing extension true end tag name null callextensionparser stringtokenizer stringtokenizer hasmoretokens attributetype nexttoken attributetype nexttoken attributetype nexttoken stringbuffer stringbuffer parsingextension endtagname override public synchronized int read byte b int off int len throws io exception int cnt for cnt 0 cnt len cnt int read read if read 1 break b cnt off byte read if cnt 0 return cnt return 1 ioexception private boolean is name terminator char ch return ch character is whitespace ch isnameterminator iswhitespace the close method is overridden to prevent some class out of our control from closing the stream such as a sax parser use real close to finally close the stream for real throws io exception to satisfy ancestor but will never happen override public void close throws io exception realclose ioexception ioexception really close the input throws io exception if an i o error occurs public void real close throws io exception super close ioexception realclose ioexception private interrupted exception cause public interruptedio exception interrupted exception the cause cause the cause interruptedexception interruptedioexception interruptedexception thecause thecause public interrupted exception get interrupted exception return cause interruptedexception getinterruptedexception constructor for uml model element target flow list model public uml model element target flow list model super target flow umlmodelelementtargetflowlistmodel umlmodelelementtargetflowlistmodel targetflow protected void build model list if get target null set all elements model get facade get target flows get target buildmodellist gettarget setallelements getfacade gettargetflows gettarget see org argouml uml ui uml model element list model2 is valid element object protected boolean is valid element object o return model get facade isa flow o model get facade get target flows get target contains o umlmodelelementlistmodel2 isvalidelement isvalidelement getfacade isaflow getfacade gettargetflows gettarget create a temporary directory return a newly created empty temporary directory public static file create temp dir file tmpdir null try tmpdir file create temp file argouml null tmpdir delete if tmpdir mkdir return null return tmpdir catch io exception ioe log error error while creating a temporary directory ioe return null createtempdir createtempfile ioexception private interface file action execute some action on the specified file param file the file on which to perform the action throws io exception fileaction ioexception visit directory in post order fashion private static void traverse dir file dir file action action throws io exception if dir exists file files dir list files for int i 0 i files length i if files i is directory traverse dir files i action else action act files i action act dir traversedir fileaction ioexception listfiles isdirectory traversedir reads all files in a directory in memory param dir directory to read files from return a collection of source unit objects public static collection source unit read all files file dir try final list source unit ret new array list source unit final int prefix dir get path length 1 traverse dir dir new file action public void act file f throws io exception skip backup files this is actually a workaround for the cpp generator which always creates backup files it s a bug if f is directory f get name ends with bak todo this is using the default platform character encoding specifying an encoding will produce more predictable results file reader fr new file reader f buffered reader bfr new buffered reader fr try string buffer result new string buffer int f length string line bfr read line do result append line line bfr read line if line null result append n while line null ret add new source unit f to string substring prefix result to string finally bfr close fr close return ret catch io exception ioe log error exception reading files ioe return null sourceunit sourceunit readallfiles sourceunit arraylist sourceunit getpath traversedir fileaction ioexception isdirectory getname endswith filereader filereader bufferedreader bufferedreader stringbuffer stringbuffer readline readline sourceunit tostring tostring ioexception public void act file f throws io exception skip backup files this is actually a workaround for the cpp generator which always creates backup files it s a bug if f is directory f get name ends with bak todo this is using the default platform character encoding specifying an encoding will produce more predictable results file reader fr new file reader f buffered reader bfr new buffered reader fr try string buffer result new string buffer int f length string line bfr read line do result append line line bfr read line if line null result append n while line null ret add new source unit f to string substring prefix result to string finally bfr close fr close ioexception isdirectory getname endswith filereader filereader bufferedreader bufferedreader stringbuffer stringbuffer readline readline sourceunit tostring tostring deletes a directory and all of its contents param dir the directory to delete public static void delete dir file dir try traverse dir dir new file action public void act file f f delete catch io exception ioe log error exception deleting directory ioe deletedir traversedir fileaction ioexception try traverse dir dir new file action public void act file f f delete traversedir fileaction reads all the files within a directory tree param dir the base directory return the collection of files public static collection string read file names file dir final list string ret new array list string final int prefix dir get path length 1 try traverse dir dir new file action public void act file f if f is directory ret add f to string substring prefix catch io exception ioe log error exception reading file names ioe return ret readfilenames arraylist getpath traversedir fileaction isdirectory tostring ioexception traverse dir dir new file action public void act file f if f is directory ret add f to string substring prefix traversedir fileaction isdirectory tostring public class button action new change event extends button action new event protected object create event object ns return model get state machines factory build change event ns buttonactionnewchangeevent buttonactionnewevent createevent getstatemachinesfactory buildchangeevent protected string get key name return button new changeevent getkeyname protected string get icon name return change event geticonname changeevent the constructor public cr illegal generalization setup head and desc add supported decision uml decision inheritance add trigger supertype add trigger subtype crillegalgeneralization setupheadanddesc addsupporteddecision umldecision addtrigger addtrigger override public boolean predicate2 object dm designer dsgr if model get facade isa generalization dm return no problem object gen dm object cls1 model get facade get general gen object cls2 model get facade get specific gen if cls1 null cls2 null return no problem java lang class java class1 cls1 get class java lang class java class2 cls2 get class if java class1 java class2 return problem found return no problem getfacade isageneralization no_problem getfacade getgeneral getfacade getspecific no_problem javaclass1 getclass javaclass2 getclass javaclass1 javaclass2 problem_found no_problem public set object get criticized design materials set object ret new hash set object ret add model get meta types get generalizable element return ret getcriticizeddesignmaterials hashset getmetatypes getgeneralizableelement private object selected asc null the constructor public wiz break circular comp selectedasc wizbreakcircularcomp see org argouml cognitive ui wizard get num steps override public int get num steps return 3 getnumsteps getnumsteps return the choices for this step protected list string get options1 list string result new array list string if get to do item null to do item item to do item get to do item for object me item get offenders string s model get facade get name me result add s return result getoptions1 arraylist gettodoitem todoitem todoitem gettodoitem getoffenders getfacade getname return the choices for this step protected list string get options2 list string result new array list string if selected cls null collection aes model get facade get association ends selected cls object from type selected cls string from name model get facade get name from type for iterator iter aes iterator iter has next object from end iter next object asc model get facade get association from end object to end new array list model get facade get connections asc get 0 if to end from end to end new array list model get facade get connections asc get 1 object to type model get facade get type to end string asc name model get facade get name asc string to name model get facade get name to type string s asc name translator localize critics wiz break circular comp from from name translator localize critics wiz break circular comp to to name result add s return result getoptions2 arraylist selectedcls getfacade getassociationends selectedcls fromtype selectedcls fromname getfacade getname fromtype hasnext fromend getfacade getassociation fromend toend arraylist getfacade getconnections toend fromend toend arraylist getfacade getconnections totype getfacade gettype toend ascname getfacade getname toname getfacade getname totype ascname wizbreakcircularcomp fromname wizbreakcircularcomp toname public j panel make panel int new step switch new step case 1 if step1 null step1 new wiz step choice this instructions1 get options1 step1 set target get to do item return step1 case 2 if step2 null step2 new wiz step choice this instructions2 get options2 step2 set target get to do item return step2 case 3 if step3 null step3 new wiz step confirm this instructions3 return step3 return null jpanel makepanel newstep newstep wizstepchoice getoptions1 settarget gettodoitem wizstepchoice getoptions2 settarget gettodoitem wizstepconfirm public void do action int old step log debug do action old step int choice 1 to do item item to do item get to do item list set offs item get offenders switch old step case 1 if step1 null choice step1 get selected index if choice 1 throw new error nothing selected should not get here selected cls offs get choice break case 2 if step2 null choice step2 get selected index if choice 1 throw new error nothing selected should not get here object ae null iterator iter model get facade get association ends selected cls iterator for int n 0 n choice n ae iter next selected asc model get facade get association ae break case 3 if selected asc null list conns new array list model get facade get connections selected asc object ae0 conns get 0 object ae1 conns get 1 try model get core helper set aggregation ae0 model get aggregation kind get none model get core helper set aggregation ae1 model get aggregation kind get none catch exception pve log error could not set aggregation pve break doaction oldstep doaction oldstep todoitem todoitem gettodoitem listset getoffenders oldstep getselectedindex selectedcls getselectedindex getfacade getassociationends selectedcls selectedasc getfacade getassociation selectedasc arraylist getfacade getconnections selectedasc getcorehelper setaggregation getaggregationkind getnone getcorehelper setaggregation getaggregationkind getnone see org argouml cognitive ui wizard can go next override public boolean can go next return can finish cangonext cangonext canfinish override public boolean can finish if super can finish return false if get step 0 return true if get step 1 step1 null step1 get selected index 1 return true if get step 2 step2 null step2 get selected index 1 return true return false canfinish canfinish getstep getstep getselectedindex getstep getselectedindex constructor for uml interaction collaboration list model2 public uml collaboration interaction list model super interaction umlinteractioncollaborationlistmodel2 umlcollaborationinteractionlistmodel see org argouml uml ui uml model element list model2 build model list protected void build model list set all elements model get facade get interactions get target umlmodelelementlistmodel2 buildmodellist buildmodellist setallelements getfacade getinteractions gettarget see org argouml uml ui uml model element list model2 is valid element object protected boolean is valid element object elem return model get facade isa interaction elem model get facade get context elem get target umlmodelelementlistmodel2 isvalidelement isvalidelement getfacade isainteraction getfacade getcontext gettarget see org argouml ui explorer rules perspective rule get rule name public string get rule name return translator localize misc namespace owned element perspectiverule getrulename getrulename public collection get children object parent if model get facade isa namespace parent return collections empty list collection owned elements model get facade get owned elements parent iterator it owned elements iterator collection ret new array list while it has next object o it next if model get facade isa collaboration o if model get facade get represented classifier o null model get facade get represented operation o null continue if model get facade isa state machine o model get facade get context o parent continue if model get facade isa comment o if model get facade get annotated elements o size 0 continue ret add o return ret getchildren getfacade isanamespace empty_list ownedelements getfacade getownedelements ownedelements arraylist hasnext getfacade isacollaboration getfacade getrepresentedclassifier getfacade getrepresentedoperation getfacade isastatemachine getfacade getcontext getfacade isacomment getfacade getannotatedelements public set get dependencies object parent if model get facade isa namespace parent set set new hash set set add parent return set return collections empty set getdependencies getfacade isanamespace hashset empty_set creates a new instance of explorer tree node param user obj the object in the tree param m the tree model public explorer tree node object user obj explorer tree model m super user obj this model m if user obj instanceof diagram diagram user obj add property change listener this explorertreenode userobj explorertreenode userobj explorertreemodel userobj userobj userobj addpropertychangelistener override public boolean is leaf if expanded model update children new tree path model get path to root this expanded true return super is leaf isleaf updatechildren treepath getpathtoroot isleaf boolean get pending return pending getpending void set pending boolean value pending value setpending param set the given set public void set modify set set set if set null set size 0 modify set collections empty set else modify set set setmodifyset modifyset empty_set modifyset param node the modified node in the tree public void node modified object node if modify set contains node model get node updater schedule this if node get user object model node changed this nodemodified modifyset getnodeupdater getuserobject nodechanged cleans up for gc public void remove this user object null if children null iterator children it children iterator while children it has next explorer tree node children it next remove children clear children null userobject childrenit childrenit hasnext explorertreenode childrenit public void property change property change event evt if evt get source instanceof diagram if name equals evt get property name the name of the uml diagram represented by this node has changed model node changed this if namespace equals evt get property name todo update the old and new node above this this is issue 5079 the old and new uml namespaces are in the event but how do we know which nodes to refresh and how to refresh not necessarily the namespaces depending on the perspective propertychange propertychangeevent getsource getpropertyname umldiagram nodechanged getpropertyname constructor for uml list cell renderer2 param show the icon true if the list should show icons public uml list cell renderer2 boolean show the icon this show the icon true umllistcellrenderer2 showtheicon umllistcellrenderer2 showtheicon showtheicon constructor for uml list cell renderer2 param show the icon true if the list should show icons param show the path true if the list should show containment path public uml list cell renderer2 boolean show the icon boolean show the path only need to this from super updateui set alignmentx left alignment show icon show the icon show path show the path umllistcellrenderer2 showtheicon showthepath umllistcellrenderer2 showtheicon showthepath setalignmentx left_alignment showicon showtheicon showpath showthepath public component get list cell renderer component j list list object value int index boolean is selected boolean cell has focus leave logging commented out by default for efficiency log debug determine rendering for value log debug show icon show icon if model get facade isauml element value log debug is a base or multiplicity string text make text value set text text if show icon setup similar to the super implementation set component orientation list get component orientation if is selected set foreground list get selection foreground set background list get selection background else set foreground list get foreground set background list get background set enabled list is enabled set font list get font set border cell has focus ui manager get border list focus cell highlight border no focus border set icon resource loader wrapper get instance lookup icon value else hack to make sure that the right height is applied when no icon is used return super get list cell renderer component list text index is selected cell has focus else if value instanceof string return super get list cell renderer component list value index is selected cell has focus else if value null value equals j label label new j label label set icon null return label return this getlistcellrenderercomponent jlist isselected cellhasfocus showicon getfacade isaumlelement maketext settext showicon setcomponentorientation getcomponentorientation isselected setforeground getselectionforeground setbackground getselectionbackground setforeground getforeground setbackground getbackground setenabled isenabled setfont getfont setborder cellhasfocus uimanager getborder focuscellhighlightborder nofocusborder seticon resourceloaderwrapper getinstance lookupicon getlistcellrenderercomponent isselected cellhasfocus getlistcellrenderercomponent isselected cellhasfocus jlabel jlabel seticon makes the text that must be placed on the label that is returned if there is no name for the given modelelement then anon xxx is shown with xxx the type name param value the given modelelement return string the text to be shown todo i18n needed public string make text object value if value instanceof string return string value string name null if model get facade isa parameter value object type model get facade get type value name get name value string type name null if type null type name model get facade get name type if type name null equals type name name translator localize misc name with type new object name type name return name if model get facade isauml element value try name get name value if model get facade isa stereotype value string base string iterator bases model get facade get base classes value iterator if bases has next base string make text bases next while bases has next base string translator localize misc name base class separator new object base string make text bases next name translator localize misc name with base classes new object name base string else if show path list path list model get model management helper get path list value string path if path list size 1 path string path list get 0 for int i 1 i path list size 1 i string n string path list get i path translator localize misc name path separator new object path n name translator localize misc name with path new object name path catch invalid element exception e name translator localize misc name deleted else if model get facade isa multiplicity value name model get facade get name value else name make type name value return name maketext getfacade isaparameter getfacade gettype getname typename typename getfacade getname typename typename withtype typename getfacade isaumlelement getname getfacade isastereotype basestring getfacade getbaseclasses hasnext basestring maketext hasnext basestring baseclassseparator basestring maketext withbaseclasses basestring showpath pathlist getmodelmanagementhelper getpathlist pathlist pathlist pathlist pathlist pathseparator withpath invalidelementexception getfacade isamultiplicity getfacade getname maketypename private string get name object value string name model get facade get name value if name null name equals name translator localize misc name unnamed new object make type name value return name getname getfacade getname maketypename private string make type name object elem if model get facade isauml element elem return model get facade getuml class name elem return null maketypename getfacade isaumlelement getfacade getumlclassname see org argouml ui explorer rules perspective rule get rule name public string get rule name return translator localize misc transition source state perspectiverule getrulename getrulename public collection get children object parent if model get facade isa transition parent collection col new array list col add model get facade get source parent return col return collections empty set getchildren getfacade isatransition arraylist getfacade getsource empty_set public set get dependencies object parent if model get facade isa transition parent set set new hash set set add parent return set return collections empty set getdependencies getfacade isatransition hashset empty_set the constructor public generic argo menu bar init actions init menus init modulesui register for mac events genericargomenubar initactions initmenus initmodulesui registerformacevents private void init actions navigate target forward action new navigate target forward action disableable actions add navigate target forward action navigate target back action new navigate target back action disableable actions add navigate target back action target manager get instance add target listener this initactions navigatetargetforwardaction navigatetargetforwardaction disableableactions navigatetargetforwardaction navigatetargetbackaction navigatetargetbackaction disableableactions navigatetargetbackaction targetmanager getinstance addtargetlistener this should be a user specified option new laws for handicapped people who cannot use the mouse require software developers in us to make all components of user interface accessible through keyboard param item is the j menu item to do this for param key is the key that we do this for protected static final void set mnemonic j menu item item string key string propertykey if item instanceof j menu propertykey menu prepare key key mnemonic else propertykey menuitem prepare key key mnemonic string local mnemonic translator localize propertykey char mnemonic if local mnemonic null local mnemonic length 1 mnemonic local mnemonic char at 0 item set mnemonic mnemonic jmenuitem setmnemonic jmenuitem jmenu preparekey preparekey localmnemonic localmnemonic localmnemonic localmnemonic charat setmnemonic param key the key to localize return the localized string protected static final string menu localize string key return translator localize menu prepare key key menulocalize preparekey param key the key to localize return the localized string static final string menu item localize string key return translator localize menuitem prepare key key menuitemlocalize preparekey construct the ordinary all purpose argo menu bar protected void init menus init menu file init menu edit init menu view init menu create init menu arrange init menu generation init menu critique init menu tools init menu help initmenus initmenufile initmenuedit initmenuview initmenucreate initmenuarrange initmenugeneration initmenucritique initmenutools initmenuhelp private void init modulesui init modules menus init modules actions initmodulesui initmodulesmenus initmodulesactions build the menu file private void init menu file collection action toolbar tools new array list action j menu file new j menu menu localize file add file set mnemonic file file j menu item new item file add new action new set mnemonic new item new shortcut mgr assign accelerator new item shortcut mgr action new project toolbar tools add new action new open action new action open project j menu item open project item file add open action set mnemonic open project item open shortcut mgr assign accelerator open project item shortcut mgr action open project toolbar tools add new action open project file add separator j menu item save project item file add project browser get instance get save action set mnemonic save project item save shortcut mgr assign accelerator save project item shortcut mgr action save project toolbar tools add project browser get instance get save action j menu item save project as item file add new action save project as set mnemonic save project as item save as shortcut mgr assign accelerator save project as item shortcut mgr action save project as j menu item revert to saved item file add new action revert to saved set mnemonic revert to saved item revert to saved shortcut mgr assign accelerator revert to saved item shortcut mgr action revert to saved file add separator shortcut mgr assign accelerator file add new action importxmi shortcut mgr action import xmi shortcut mgr assign accelerator file add new action exportxmi shortcut mgr action export xmi j menu item import from sources file add action import from sources get instance set mnemonic import from sources import shortcut mgr assign accelerator import from sources shortcut mgr action import from sources file add separator action a new action project settings toolbar tools add a j menu item page setup item file add new action page setup set mnemonic page setup item page setup shortcut mgr assign accelerator page setup item shortcut mgr action page setup j menu item print item file add new action print set mnemonic print item print shortcut mgr assign accelerator print item shortcut mgr action print toolbar tools add new action print j menu item save graphics item file add new action save graphics set mnemonic save graphics item save graphics shortcut mgr assign accelerator save graphics item shortcut mgr action save graphics shortcut mgr assign accelerator file add new action save all graphics shortcut mgr action save all graphics file add separator j menu notation j menu file add new action notation get menu set mnemonic notation notation j menu item properties item file add new action project settings set mnemonic properties item properties shortcut mgr assign accelerator properties item shortcut mgr action project settings file add separator add last recently used list before exit menu mru list new last recently used menu list file and exit menu entry starting with separator exit action new action exit if os util is macosx file add separator j menu item exit item file add exit action set mnemonic exit item exit the close window shortcut alt f4 actually can t be registered as a shortcut because it closes the configuration dialog exit item set accelerator key stroke get key stroke key event vk f4 input event alt mask file toolbar new tool bar factory toolbar tools create tool bar file toolbar set name translator localize misc toolbar file file toolbar set floatable true initmenufile toolbartools arraylist jmenu jmenu menulocalize setmnemonic jmenuitem newitem actionnew setmnemonic newitem shortcutmgr assignaccelerator newitem shortcutmgr action_new_project toolbartools actionnew openaction actionopenproject jmenuitem openprojectitem openaction setmnemonic openprojectitem shortcutmgr assignaccelerator openprojectitem shortcutmgr action_open_project toolbartools actionopenproject addseparator jmenuitem saveprojectitem projectbrowser getinstance getsaveaction setmnemonic saveprojectitem shortcutmgr assignaccelerator saveprojectitem shortcutmgr action_save_project toolbartools projectbrowser getinstance getsaveaction jmenuitem saveprojectasitem actionsaveprojectas setmnemonic saveprojectasitem saveas shortcutmgr assignaccelerator saveprojectasitem shortcutmgr action_save_project_as jmenuitem reverttosaveditem actionreverttosaved setmnemonic reverttosaveditem shortcutmgr assignaccelerator reverttosaveditem shortcutmgr action_revert_to_saved addseparator shortcutmgr assignaccelerator actionimportxmi shortcutmgr action_import_xmi shortcutmgr assignaccelerator actionexportxmi shortcutmgr action_export_xmi jmenuitem importfromsources actionimportfromsources getinstance setmnemonic importfromsources shortcutmgr assignaccelerator importfromsources shortcutmgr action_import_from_sources addseparator actionprojectsettings toolbartools jmenuitem pagesetupitem actionpagesetup setmnemonic pagesetupitem pagesetup shortcutmgr assignaccelerator pagesetupitem shortcutmgr action_page_setup jmenuitem printitem actionprint setmnemonic printitem shortcutmgr assignaccelerator printitem shortcutmgr action_print toolbartools actionprint jmenuitem savegraphicsitem actionsavegraphics setmnemonic savegraphicsitem savegraphics shortcutmgr assignaccelerator savegraphicsitem shortcutmgr action_save_graphics shortcutmgr assignaccelerator actionsaveallgraphics shortcutmgr action_save_all_graphics addseparator jmenu jmenu actionnotation getmenu setmnemonic jmenuitem propertiesitem actionprojectsettings setmnemonic propertiesitem shortcutmgr assignaccelerator propertiesitem shortcutmgr action_project_settings addseparator _before_ mrulist lastrecentlyusedmenulist exitaction actionexit osutil ismacosx addseparator jmenuitem exititem exitaction setmnemonic exititem exititem setaccelerator keystroke getkeystroke keyevent vk_f4 inputevent alt_mask filetoolbar toolbarfactory toolbartools createtoolbar filetoolbar setname filetoolbar setfloatable build the menu edit private void init menu edit edit add new j menu menu localize edit set mnemonic edit edit comment out when we are ready to release undo redo j menu item undo item edit add project actions get instance get undo action set mnemonic undo item undo shortcut mgr assign accelerator undo item shortcut mgr action undo j menu item redo item edit add project actions get instance get redo action set mnemonic redo item redo shortcut mgr assign accelerator redo item shortcut mgr action redo edit add separator select new j menu menu localize select set mnemonic select select edit add select j menu item select all item select add new action select all set mnemonic select all item select all shortcut mgr assign accelerator select all item shortcut mgr action select all select add separator j menu item back item select add navigate target back action set mnemonic back item navigate back shortcut mgr assign accelerator back item shortcut mgr action navigate back j menu item forward item select add navigate target forward action set mnemonic forward item navigate forward shortcut mgr assign accelerator forward item shortcut mgr action navigate forward select add separator j menu item select invert select add new action select invert set mnemonic select invert invert selection shortcut mgr assign accelerator select invert shortcut mgr action select invert edit add separator j menu item cut item edit add action cut get instance set mnemonic cut item cut set accelerator cut item ctrlx j menu item copy item edit add action copy get instance set mnemonic copy item copy set accelerator copy item ctrlc j menu item paste item edit add action paste get instance set mnemonic paste item paste set accelerator paste item ctrlv edit add separator action remove from diagram project actions get instance get remove from diagram action j menu item remove item edit add remove from diagram set mnemonic remove item remove from diagram shortcut mgr assign accelerator remove item shortcut mgr action remove from diagram j menu item delete item edit add action delete model elements get target follower set mnemonic delete item delete from model shortcut mgr assign accelerator delete item shortcut mgr action delete model elements edit add separator shortcut mgr assign accelerator edit add new action perspective config shortcut mgr action perspective config settings action new action settings if os util is macosx j menu item settings item edit add settings action set mnemonic settings item settings shortcut mgr assign accelerator settings item shortcut mgr action settings initmenuedit jmenu menulocalize setmnemonic jmenuitem undoitem projectactions getinstance getundoaction setmnemonic undoitem shortcutmgr assignaccelerator undoitem shortcutmgr action_undo jmenuitem redoitem projectactions getinstance getredoaction setmnemonic redoitem shortcutmgr assignaccelerator redoitem shortcutmgr action_redo addseparator jmenu menulocalize setmnemonic jmenuitem selectallitem actionselectall setmnemonic selectallitem shortcutmgr assignaccelerator selectallitem shortcutmgr action_select_all addseparator jmenuitem backitem navigatetargetbackaction setmnemonic backitem shortcutmgr assignaccelerator backitem shortcutmgr action_navigate_back jmenuitem forwarditem navigatetargetforwardaction setmnemonic forwarditem shortcutmgr assignaccelerator forwarditem shortcutmgr action_navigate_forward addseparator jmenuitem selectinvert actionselectinvert setmnemonic selectinvert shortcutmgr assignaccelerator selectinvert shortcutmgr action_select_invert addseparator jmenuitem cutitem actioncut getinstance setmnemonic cutitem setaccelerator cutitem jmenuitem copyitem actioncopy getinstance setmnemonic copyitem setaccelerator copyitem jmenuitem pasteitem actionpaste getinstance setmnemonic pasteitem setaccelerator pasteitem addseparator removefromdiagram projectactions getinstance getremovefromdiagramaction jmenuitem removeitem removefromdiagram setmnemonic removeitem shortcutmgr assignaccelerator removeitem shortcutmgr action_remove_from_diagram jmenuitem deleteitem actiondeletemodelelements gettargetfollower setmnemonic deleteitem shortcutmgr assignaccelerator deleteitem shortcutmgr action_delete_model_elements addseparator shortcutmgr assignaccelerator actionperspectiveconfig shortcutmgr action_perspective_config settingsaction actionsettings osutil ismacosx jmenuitem settingsitem settingsaction setmnemonic settingsitem shortcutmgr assignaccelerator settingsitem shortcutmgr action_settings build the menu view private void init menu view view argoj menu add new argoj menu menu prepare key view set mnemonic view view j menu item goto diagram view add new action goto diagram set mnemonic goto diagram goto diagram shortcut mgr assign accelerator goto diagram shortcut mgr action go to diagram j menu item find item view add new action find set mnemonic find item find shortcut mgr assign accelerator find item shortcut mgr action find view add separator j menu zoom j menu view add new j menu menu localize zoom set mnemonic zoom zoom zoom action proxy zoom out action new zoom action proxy zoom factor j menu item zoom out zoom add zoom out action set mnemonic zoom out zoom out shortcut mgr assign accelerator zoom out shortcut mgr action zoom out j menu item zoom reset zoom add new zoom action proxy 0 0 set mnemonic zoom reset zoom reset shortcut mgr assign accelerator zoom reset shortcut mgr action zoom reset zoom action proxy zoom in action new zoom action proxy 1 0 zoom factor j menu item zoom in zoom add zoom in action set mnemonic zoom in zoom in shortcut mgr assign accelerator zoom in shortcut mgr action zoom in view add separator j menu grid j menu view add new j menu menu localize adjust grid set mnemonic grid grid list action grid actions action adjust grid create adjust grid actions false button group group grid new button group action adjust grid set group group grid for action cmdag grid actions j radio button menu item mi new j radio button menu item cmdag group grid add mi j menu item adjust grid grid add mi set mnemonic adjust grid string cmdag get value action name shortcut mgr assign accelerator adjust grid shortcut mgr action adjust grid cmdag get value id j menu snap j menu view add new j menu menu localize adjust snap set mnemonic snap snap list action snap actions action adjust snap create adjust snap actions button group group snap new button group action adjust snap set group group snap for action cmdas snap actions j radio button menu item mi new j radio button menu item cmdas group snap add mi j menu item adjust snap snap add mi set mnemonic adjust snap string cmdas get value action name shortcut mgr assign accelerator adjust snap shortcut mgr action adjust guide cmdas get value id action pba new action adjust page breaks j menu item adjust page breaks view add pba set mnemonic adjust page breaks adjust pagebreaks shortcut mgr assign accelerator adjust page breaks shortcut mgr action adjust page breaks view add separator j menu menu toolbars argo toolbar manager get instance get menu menu toolbars set text menu localize toolbars set mnemonic menu toolbars toolbars view add menu toolbars view add separator j menu item show saved view add new action showxml dump set mnemonic show saved show saved shortcut mgr assign accelerator show saved shortcut mgr action show xml dump initmenuview argojmenu argojmenu preparekey setmnemonic jmenuitem gotodiagram actiongotodiagram setmnemonic gotodiagram shortcutmgr assignaccelerator gotodiagram shortcutmgr action_go_to_diagram jmenuitem finditem actionfind setmnemonic finditem shortcutmgr assignaccelerator finditem shortcutmgr action_find addseparator jmenu jmenu jmenu menulocalize setmnemonic zoomactionproxy zoomoutaction zoomactionproxy zoom_factor jmenuitem zoomout zoomoutaction setmnemonic zoomout shortcutmgr assignaccelerator zoomout shortcutmgr action_zoom_out jmenuitem zoomreset zoomactionproxy setmnemonic zoomreset shortcutmgr assignaccelerator zoomreset shortcutmgr action_zoom_reset zoomactionproxy zoominaction zoomactionproxy zoom_factor jmenuitem zoomin zoominaction setmnemonic zoomin shortcutmgr assignaccelerator zoomin shortcutmgr action_zoom_in addseparator jmenu jmenu jmenu menulocalize setmnemonic gridactions actionadjustgrid createadjustgridactions buttongroup groupgrid buttongroup actionadjustgrid setgroup groupgrid gridactions jradiobuttonmenuitem jradiobuttonmenuitem groupgrid jmenuitem adjustgrid setmnemonic adjustgrid getvalue shortcutmgr assignaccelerator adjustgrid shortcutmgr action_adjust_grid getvalue jmenu jmenu jmenu menulocalize setmnemonic snapactions actionadjustsnap createadjustsnapactions buttongroup groupsnap buttongroup actionadjustsnap setgroup groupsnap snapactions jradiobuttonmenuitem jradiobuttonmenuitem groupsnap jmenuitem adjustsnap setmnemonic adjustsnap getvalue shortcutmgr assignaccelerator adjustsnap shortcutmgr action_adjust_guide getvalue actionadjustpagebreaks jmenuitem adjustpagebreaks setmnemonic adjustpagebreaks shortcutmgr assignaccelerator adjustpagebreaks shortcutmgr action_adjust_page_breaks addseparator jmenu menutoolbars argotoolbarmanager getinstance getmenu menutoolbars settext menulocalize setmnemonic menutoolbars menutoolbars addseparator jmenuitem showsaved actionshowxmldump setmnemonic showsaved shortcutmgr assignaccelerator showsaved shortcutmgr action_show_xml_dump build the menu create and the toolbar for diagram creation these are build together to guarantee that the same items are present in both and in the same sequence p the sequence of these items was determined by issue 1821 private void init menu create collection action toolbar tools new array list action create diagram menu add new j menu menu localize create diagram set mnemonic create diagram menu create diagram j menu item usecase diagram create diagram menu add new action use case diagram set mnemonic usecase diagram usecase diagram toolbar tools add new action use case diagram shortcut mgr assign accelerator usecase diagram shortcut mgr action use case diagram j menu item class diagram create diagram menu add new action class diagram set mnemonic class diagram class diagram toolbar tools add new action class diagram shortcut mgr assign accelerator class diagram shortcut mgr action class diagram j menu item sequenz diagram create diagram menu add new action sequence diagram set mnemonic sequenz diagram sequenz diagram toolbar tools add new action sequence diagram shortcut mgr assign accelerator sequenz diagram shortcut mgr action sequence diagram j menu item collaboration diagram create diagram menu add new action collaboration diagram set mnemonic collaboration diagram collaboration diagram toolbar tools add new action collaboration diagram shortcut mgr assign accelerator collaboration diagram shortcut mgr action collaboration diagram j menu item state diagram create diagram menu add new action state diagram set mnemonic state diagram statechart diagram toolbar tools add new action state diagram shortcut mgr assign accelerator state diagram shortcut mgr action state diagram j menu item activity diagram create diagram menu add new action activity diagram set mnemonic activity diagram activity diagram toolbar tools add new action activity diagram shortcut mgr assign accelerator activity diagram shortcut mgr action activity diagram j menu item deployment diagram create diagram menu add new action deployment diagram set mnemonic deployment diagram deployment diagram toolbar tools add new action deployment diagram shortcut mgr assign accelerator deployment diagram shortcut mgr action deployment diagram create diagram toolbar new tool bar factory toolbar tools create tool bar create diagram toolbar set name translator localize misc toolbar create diagram create diagram toolbar set floatable true initmenucreate toolbartools arraylist creatediagrammenu jmenu menulocalize setmnemonic creatediagrammenu jmenuitem usecasediagram creatediagrammenu actionusecasediagram setmnemonic usecasediagram toolbartools actionusecasediagram shortcutmgr assignaccelerator usecasediagram shortcutmgr action_use_case_diagram jmenuitem classdiagram creatediagrammenu actionclassdiagram setmnemonic classdiagram toolbartools actionclassdiagram shortcutmgr assignaccelerator classdiagram shortcutmgr action_class_diagram jmenuitem sequenzdiagram creatediagrammenu actionsequencediagram setmnemonic sequenzdiagram toolbartools actionsequencediagram shortcutmgr assignaccelerator sequenzdiagram shortcutmgr action_sequence_diagram jmenuitem collaborationdiagram creatediagrammenu actioncollaborationdiagram setmnemonic collaborationdiagram toolbartools actioncollaborationdiagram shortcutmgr assignaccelerator collaborationdiagram shortcutmgr action_collaboration_diagram jmenuitem statediagram creatediagrammenu actionstatediagram setmnemonic statediagram toolbartools actionstatediagram shortcutmgr assignaccelerator statediagram shortcutmgr action_state_diagram jmenuitem activitydiagram creatediagrammenu actionactivitydiagram setmnemonic activitydiagram toolbartools actionactivitydiagram shortcutmgr assignaccelerator activitydiagram shortcutmgr action_activity_diagram jmenuitem deploymentdiagram creatediagrammenu actiondeploymentdiagram setmnemonic deploymentdiagram toolbartools actiondeploymentdiagram shortcutmgr assignaccelerator deploymentdiagram shortcutmgr action_deployment_diagram creatediagramtoolbar toolbarfactory toolbartools createtoolbar creatediagramtoolbar setname creatediagramtoolbar setfloatable build the menu arrange private void init menu arrange arrange argoj menu add new argoj menu menu prepare key arrange set mnemonic arrange arrange j menu align j menu arrange add new j menu menu localize align set mnemonic align align j menu distribute j menu arrange add new j menu menu localize distribute set mnemonic distribute distribute j menu reorder j menu arrange add new j menu menu localize reorder set mnemonic reorder reorder j menu item preferred size arrange add new cmd set preferred size set mnemonic preferred size preferred size shortcut mgr assign accelerator preferred size shortcut mgr action preferred size action layout new action layout disableable actions add layout arrange add layout this used to be deferred but it s only 30 40 msec of work init align menu align init distribute menu distribute init reorder menu reorder initmenuarrange argojmenu argojmenu preparekey setmnemonic jmenu jmenu jmenu menulocalize setmnemonic jmenu jmenu jmenu menulocalize setmnemonic jmenu jmenu jmenu menulocalize setmnemonic jmenuitem preferredsize cmdsetpreferredsize setmnemonic preferredsize shortcutmgr assignaccelerator preferredsize shortcutmgr action_preferred_size actionlayout disableableactions initalignmenu initdistributemenu initreordermenu initialize submenus of the align menu param align the align menu private static void init align menu j menu align align action a new align action align action align tops a put value action small icon resource loader wrapper lookup icon align tops j menu item align tops align add a set mnemonic align tops align tops shortcut mgr assign accelerator align tops shortcut mgr action align tops a new align action align action align bottoms a put value action small icon resource loader wrapper lookup icon align bottoms j menu item align bottoms align add a set mnemonic align bottoms align bottoms shortcut mgr assign accelerator align bottoms shortcut mgr action align bottoms a new align action align action align rights a put value action small icon resource loader wrapper lookup icon align rights j menu item align rights align add a set mnemonic align rights align rights shortcut mgr assign accelerator align rights shortcut mgr action align rights a new align action align action align lefts a put value action small icon resource loader wrapper lookup icon align lefts j menu item align lefts align add a set mnemonic align lefts align lefts shortcut mgr assign accelerator align lefts shortcut mgr action align lefts a new align action align action align h centers a put value action small icon resource loader wrapper lookup icon align horizontal centers j menu item alignh centers align add a set mnemonic alignh centers align horizontal centers shortcut mgr assign accelerator alignh centers shortcut mgr action align h centers a new align action align action align v centers a put value action small icon resource loader wrapper lookup icon align vertical centers j menu item alignv centers align add a set mnemonic alignv centers align vertical centers shortcut mgr assign accelerator alignv centers shortcut mgr action align v centers a new align action align action align to grid a put value action small icon resource loader wrapper lookup icon align to grid j menu item align to grid align add a set mnemonic align to grid align to grid shortcut mgr assign accelerator align to grid shortcut mgr action align to grid initalignmenu jmenu alignaction alignaction alignaction align_tops putvalue small_icon resourceloaderwrapper lookupicon aligntops jmenuitem aligntops setmnemonic aligntops shortcutmgr assignaccelerator aligntops shortcutmgr action_align_tops alignaction alignaction align_bottoms putvalue small_icon resourceloaderwrapper lookupicon alignbottoms jmenuitem alignbottoms setmnemonic alignbottoms shortcutmgr assignaccelerator alignbottoms shortcutmgr action_align_bottoms alignaction alignaction align_rights putvalue small_icon resourceloaderwrapper lookupicon alignrights jmenuitem alignrights setmnemonic alignrights shortcutmgr assignaccelerator alignrights shortcutmgr action_align_rights alignaction alignaction align_lefts putvalue small_icon resourceloaderwrapper lookupicon alignlefts jmenuitem alignlefts setmnemonic alignlefts shortcutmgr assignaccelerator alignlefts shortcutmgr action_align_lefts alignaction alignaction align_h_centers putvalue small_icon resourceloaderwrapper lookupicon alignhorizontalcenters jmenuitem alignhcenters setmnemonic alignhcenters shortcutmgr assignaccelerator alignhcenters shortcutmgr action_align_h_centers alignaction alignaction align_v_centers putvalue small_icon resourceloaderwrapper lookupicon alignverticalcenters jmenuitem alignvcenters setmnemonic alignvcenters shortcutmgr assignaccelerator alignvcenters shortcutmgr action_align_v_centers alignaction alignaction align_to_grid putvalue small_icon resourceloaderwrapper lookupicon aligntogrid jmenuitem aligntogrid setmnemonic aligntogrid shortcutmgr assignaccelerator aligntogrid shortcutmgr action_align_to_grid initialize submenus of the distribute menu param distribute the distribute menu private static void init distribute menu j menu distribute distribute action a new distribute action distribute action h spacing a put value action small icon resource loader wrapper lookup icon distribute horizontal spacing j menu item distributeh spacing distribute add a set mnemonic distributeh spacing distribute horizontal spacing shortcut mgr assign accelerator distributeh spacing shortcut mgr action distribute h spacing a new distribute action distribute action h centers a put value action small icon resource loader wrapper lookup icon distribute horizontal centers j menu item distributeh centers distribute add a set mnemonic distributeh centers distribute horizontal centers shortcut mgr assign accelerator distributeh centers shortcut mgr action distribute h centers a new distribute action distribute action v spacing a put value action small icon resource loader wrapper lookup icon distribute vertical spacing j menu item distributev spacing distribute add a set mnemonic distributev spacing distribute vertical spacing shortcut mgr assign accelerator distributev spacing shortcut mgr action distribute v spacing a new distribute action distribute action v centers a put value action small icon resource loader wrapper lookup icon distribute vertical centers j menu item distributev centers distribute add a set mnemonic distributev centers distribute vertical centers shortcut mgr assign accelerator distributev centers shortcut mgr action distribute v centers initdistributemenu jmenu distributeaction distributeaction distributeaction h_spacing putvalue small_icon resourceloaderwrapper lookupicon distributehorizontalspacing jmenuitem distributehspacing setmnemonic distributehspacing shortcutmgr assignaccelerator distributehspacing shortcutmgr action_distribute_h_spacing distributeaction distributeaction h_centers putvalue small_icon resourceloaderwrapper lookupicon distributehorizontalcenters jmenuitem distributehcenters setmnemonic distributehcenters shortcutmgr assignaccelerator distributehcenters shortcutmgr action_distribute_h_centers distributeaction distributeaction v_spacing putvalue small_icon resourceloaderwrapper lookupicon distributeverticalspacing jmenuitem distributevspacing setmnemonic distributevspacing shortcutmgr assignaccelerator distributevspacing shortcutmgr action_distribute_v_spacing distributeaction distributeaction v_centers putvalue small_icon resourceloaderwrapper lookupicon distributeverticalcenters jmenuitem distributevcenters setmnemonic distributevcenters shortcutmgr assignaccelerator distributevcenters shortcutmgr action_distribute_v_centers initialize the submenus for the reorder menu param reorder the main reorder menu private static void init reorder menu j menu reorder j menu item reorder bring forward reorder add new reorder action translator localize action bring forward resource loader wrapper lookup icon forward reorder action bring forward set mnemonic reorder bring forward reorder bring forward shortcut mgr assign accelerator reorder bring forward shortcut mgr action reorder forward j menu item reorder send backward reorder add new reorder action translator localize action send backward resource loader wrapper lookup icon backward reorder action send backward set mnemonic reorder send backward reorder send backward shortcut mgr assign accelerator reorder send backward shortcut mgr action reorder backward j menu item reorder bring to front reorder add new reorder action translator localize action bring to front resource loader wrapper lookup icon to front reorder action bring to front set mnemonic reorder bring to front reorder bring to front shortcut mgr assign accelerator reorder bring to front shortcut mgr action reorder to front j menu item reorder send to back reorder add new reorder action translator localize action send to back resource loader wrapper lookup icon to back reorder action send to back set mnemonic reorder send to back reorder send to back shortcut mgr assign accelerator reorder send to back shortcut mgr action reorder to back initreordermenu jmenu jmenuitem reorderbringforward reorderaction resourceloaderwrapper lookupicon reorderaction bring_forward setmnemonic reorderbringforward shortcutmgr assignaccelerator reorderbringforward shortcutmgr action_reorder_forward jmenuitem reordersendbackward reorderaction resourceloaderwrapper lookupicon reorderaction send_backward setmnemonic reordersendbackward shortcutmgr assignaccelerator reordersendbackward shortcutmgr action_reorder_backward jmenuitem reorderbringtofront reorderaction resourceloaderwrapper lookupicon tofront reorderaction bring_to_front setmnemonic reorderbringtofront shortcutmgr assignaccelerator reorderbringtofront shortcutmgr action_reorder_to_front jmenuitem reordersendtoback reorderaction resourceloaderwrapper lookupicon toback reorderaction send_to_back setmnemonic reordersendtoback shortcutmgr assignaccelerator reordersendtoback shortcutmgr action_reorder_to_back build the menu generation private void init menu generation key stroke f7 key stroke get key stroke key event vk f7 0 generate add new j menu menu localize generation set mnemonic generate generation j menu item gen one generate add new action generate one set mnemonic gen one generate selected classes shortcut mgr assign accelerator gen one shortcut mgr action generate one j menu item gen all item generate add new action generate all set mnemonic gen all item generate all classes shortcut mgr assign accelerator gen all item shortcut mgr action generate all classes generate add separator j menu item gen project generate add new action generate project code set mnemonic gen project generate code for project shortcut mgr assign accelerator gen project shortcut mgr action generate project code j menu item generation settings generate add new action generation settings set mnemonic generation settings settings for project code generation shortcut mgr assign accelerator generation settings shortcut mgr action generation settings generate add actions generate web initmenugeneration keystroke keystroke getkeystroke keyevent vk_f7 jmenu menulocalize setmnemonic jmenuitem genone actiongenerateone setmnemonic genone shortcutmgr assignaccelerator genone shortcutmgr action_generate_one jmenuitem genallitem actiongenerateall setmnemonic genallitem shortcutmgr assignaccelerator genallitem shortcutmgr action_generate_all_classes addseparator jmenuitem genproject actiongenerateprojectcode setmnemonic genproject shortcutmgr assignaccelerator genproject shortcutmgr action_generate_project_code jmenuitem generationsettings actiongenerationsettings setmnemonic generationsettings shortcutmgr assignaccelerator generationsettings shortcutmgr action_generation_settings generateweb build the menu critique private void init menu critique todo this creates a dependency on the critics subsystem instead that subsystem should register its desired menus and actions critique argoj menu add new argoj menu menu prepare key critique set mnemonic critique critique j menu item toggle auto critique critique add check item new action auto critique set mnemonic toggle auto critique toggle auto critique shortcut mgr assign accelerator toggle auto critique shortcut mgr action auto critique critique add separator j menu item design issues critique add new action open decisions set mnemonic design issues design issues shortcut mgr assign accelerator design issues shortcut mgr action open decisions j menu item design goals critique add new action open goals set mnemonic design goals design goals shortcut mgr assign accelerator design goals shortcut mgr action open goals j menu item browse critics critique add new action open critics set mnemonic browse critics browse critics shortcut mgr assign accelerator design issues shortcut mgr action open critics initmenucritique argojmenu argojmenu preparekey setmnemonic jmenuitem toggleautocritique addcheckitem actionautocritique setmnemonic toggleautocritique shortcutmgr assignaccelerator toggleautocritique shortcutmgr action_auto_critique addseparator jmenuitem designissues actionopendecisions setmnemonic designissues shortcutmgr assignaccelerator designissues shortcutmgr action_open_decisions jmenuitem designgoals actionopengoals setmnemonic designgoals shortcutmgr assignaccelerator designgoals shortcutmgr action_open_goals jmenuitem browsecritics actionopencritics setmnemonic browsecritics shortcutmgr assignaccelerator designissues shortcutmgr action_open_critics build the menu tools private void init menu tools tools new j menu menu localize tools set mnemonic tools tools todo add empty placeholder here add tools initmenutools jmenu menulocalize setmnemonic build the menu help private void init menu help help new j menu menu localize help set mnemonic help help if help get item count 0 help insert separator 0 add the help menu item j menu item argo help help add new action help set mnemonic argo help argouml help shortcut mgr assign accelerator argo help shortcut mgr action help help add separator j menu item system info help add new action system info set mnemonic system info system information shortcut mgr assign accelerator system info shortcut mgr action system information about action new action about argouml if os util is macosx help add separator j menu item about argouml help add about action set mnemonic about argouml about argouml shortcut mgr assign accelerator about argouml shortcut mgr action about argouml set help menu help add help initmenuhelp jmenu menulocalize setmnemonic getitemcount insertseparator jmenuitem argohelp actionhelp setmnemonic argohelp shortcutmgr assignaccelerator argohelp shortcutmgr action_help addseparator jmenuitem systeminfo actionsysteminfo setmnemonic systeminfo shortcutmgr assignaccelerator systeminfo shortcutmgr action_system_information aboutaction actionaboutargouml osutil ismacosx addseparator jmenuitem aboutargouml aboutaction setmnemonic aboutargouml shortcutmgr assignaccelerator aboutargouml shortcutmgr action_about_argouml sethelpmenu private void init modules menus for j menu menu module menus add menu initmodulesmenus jmenu modulemenus private void init modules actions for action action module create diagram actions create diagram toolbar add action initmodulesactions modulecreatediagramactions creatediagramtoolbar get the create diagram toolbar return value of property creatediagramtoolbar public j tool bar get create diagram toolbar return create diagram toolbar _creatediagramtoolbar jtoolbar getcreatediagramtoolbar creatediagramtoolbar get the create diagram menu provided to allow plugins to appeand their own actions to this menu return value of property create diagram menu public j menu get create diagram menu return create diagram menu creatediagrammenu jmenu getcreatediagrammenu creatediagrammenu get the edit toolbar return the edit toolbar public j tool bar get edit toolbar if edit toolbar null create the edit toolbar based on the menu all menu items that have an icon are presumed to be based upon an action and these actions are used in the toolbar collection action c new array list action for object mi edit get menu components if mi instanceof j menu item if j menu item mi get icon null c add j menu item mi get action edit toolbar new tool bar factory c create tool bar edit toolbar set name translator localize misc toolbar edit edit toolbar set floatable true return edit toolbar jtoolbar getedittoolbar edittoolbar menuitems arraylist getmenucomponents jmenuitem jmenuitem geticon jmenuitem getaction edittoolbar toolbarfactory createtoolbar edittoolbar setname edittoolbar setfloatable edittoolbar getter for the file toolbar return the file toolbar public j tool bar get file toolbar return file toolbar jtoolbar getfiletoolbar filetoolbar getter for the view toolbar return the view toolbar public j tool bar get view toolbar if view toolbar null collection object c new array list object component or action c add new action find c add new zoom slider button view toolbar new tool bar factory c create tool bar view toolbar set name translator localize misc toolbar view view toolbar set floatable true return view toolbar jtoolbar getviewtoolbar viewtoolbar arraylist actionfind zoomsliderbutton viewtoolbar toolbarfactory createtoolbar viewtoolbar setname viewtoolbar setfloatable viewtoolbar prepares one part of the key for menu or and menuitem mnemonics used in menu properties the method changes the parameter str to lower cases spaces in the parameter str are changed to hyphens param str return the prepared str private static string prepare key string str return str to lower case replace preparekey tolowercase adds the entry to the mru list param filename of the project todo this should listen for file save events rather than being called directly tfm public void add file saved string filename mru list add entry filename addfilesaved mrulist addentry getter for the tools menu return the tools menu public j menu get tools return tools jmenu gettools target changed update the actions that depend on the target private void set target swing utilities invoke later new runnable public void run for action action disableable actions action set enabled action is enabled settarget swingutilities invokelater disableableactions setenabled isenabled swing utilities invoke later new runnable public void run for action action disableable actions action set enabled action is enabled swingutilities invokelater disableableactions setenabled isenabled public void target added target event e set target targetadded targetevent settarget public void target removed target event e set target targetremoved targetevent settarget public void target set target event e set target targetset targetevent settarget add a new menu to the main toolbar param menu the menu to be added public static void register menu item j menu menu module menus add menu registermenuitem jmenu modulemenus add a new action to the create diagram toolbar this can be used to register create actions for new diagram types by plugin modules param action the create action to be registered public static void register create diagram action action action module create diagram actions add action registercreatediagramaction modulecreatediagramactions private void register for mac events if os util is macosx try generate and register the osx adapter passing the methods we wish to use as delegates for various com apple eawt application listener methods osx adapter set quit handler this get class get declared method mac quit class null osx adapter set about handler this get class get declared method mac about class null osx adapter set preferences handler this get class get declared method mac preferences class null osx adapter set file handler this get class get declared method mac open file new class string class catch exception e log error error while loading the osx adapter e registerformacevents osutil ismacosx osxadapter applicationlistener osxadapter setquithandler getclass getdeclaredmethod macquit osxadapter setabouthandler getclass getdeclaredmethod macabout osxadapter setpreferenceshandler getclass getdeclaredmethod macpreferences osxadapter setfilehandler getclass getdeclaredmethod macopenfile osxadapter internal use only do not use public void mac quit exit action action performed null macquit exitaction actionperformed internal use only do not use public void mac about about action action performed null macabout aboutaction actionperformed internal use only do not use public void mac preferences settings action action performed null macpreferences settingsaction actionperformed internal use only do not use param filename name of file to be opened public void mac open file string filename open action do command filename macopenfile openaction docommand see org argouml ui explorer rules perspective rule get rule name public string get rule name return translator localize misc classifier sequence diagram perspectiverule getrulename getrulename public collection get children object parent if model get facade isa classifier parent collection col model get facade get collaborations parent set argo diagram ret new hash set argo diagram project p project manager get manager get current project for argo diagram diagram p get diagram list if diagram instanceof uml sequence diagram col contains sequence diagram graph model uml sequence diagram diagram get graph model get collaboration ret add diagram return ret return collections empty set getchildren getfacade isaclassifier getfacade getcollaborations argodiagram hashset argodiagram projectmanager getmanager getcurrentproject argodiagram getdiagramlist umlsequencediagram sequencediagramgraphmodel umlsequencediagram getgraphmodel getcollaboration empty_set see org argouml ui explorer rules perspective rule get dependencies java lang object public set get dependencies object parent todo what return collections empty set perspectiverule getdependencies getdependencies empty_set the constructor public action layout super translator localize action layout null set the tooltip string put value action short description translator localize action layout actionlayout putvalue short_description check whether we deal with a supported diagram type currently only class and activity diagrams p note this is only called at initialization time by swing so the application is responsible for checking when the current diagram changes currently done in link org argouml ui cmd generic argo menu bar set target return true if the action is enabled override public boolean is enabled argo diagram d object target target manager get instance get target if target instanceof argo diagram d argo diagram target else d diagram utils get active diagram if d instanceof uml class diagram d instanceof uml activity diagram return true return false genericargomenubar settarget isenabled argodiagram targetmanager getinstance gettarget argodiagram argodiagram diagramutils getactivediagram umlclassdiagram umlactivitydiagram override public void action performed action event ae super action performed ae argo diagram diagram diagram utils get active diagram layouter layouter if diagram instanceof uml class diagram layouter new classdiagram layouter diagram else if diagram instanceof uml activity diagram layouter new activity diagram layouter diagram else return rearrange the diagram layout layouter layout diagram damage actionperformed actionevent actionperformed argodiagram diagramutils getactivediagram umlclassdiagram classdiagramlayouter umlactivitydiagram activitydiagramlayouter the constructor param o the target public action modifier active object o super checkbox active uc put value selected boolean value of value of target o actionmodifieractive putvalue valueof valueoftarget see org argouml uml diagram ui abstract action check box menu item toggle value of target java lang object void toggle value of target object t model get core helper set active t model get facade is active t abstractactioncheckboxmenuitem togglevalueoftarget togglevalueoftarget getcorehelper setactive getfacade isactive see org argouml uml diagram ui abstract action check box menu item value of target java lang object boolean value of target object t return model get facade is active t abstractactioncheckboxmenuitem valueoftarget valueoftarget getfacade isactive constructor param model element subsystem model element for which fig is to be created param x initial x coordinate param y initial y coordinate deprecated for 0 27 3 by tfmorris use link fig subsystem object rectangle diagram settings suppress warnings deprecation deprecated public fig subsystem object model element int x int y super model element x y construct figs modelelement figsubsystem diagramsettings suppresswarnings figsubsystem modelelement modelelement constructfigs private void construct figs int xpoints 125 125 130 130 130 135 135 int ypoints 45 40 40 35 40 40 45 polygon polygon new polygon xpoints ypoints 7 fig poly set polygon polygon fig poly set filled false add fig fig poly rectangle r get bounds set bounds r x r y r width r height update edges constructfigs figpoly setpolygon figpoly setfilled addfig figpoly getbounds setbounds updateedges constructor that hooks the fig to a uml element param gm ignored param node the uml element deprecated for 0 27 3 by tfmorris use link fig subsystem object rectangle diagram settings deprecated public fig subsystem suppress warnings unused graph model gm object node this node 0 0 figsubsystem diagramsettings figsubsystem suppresswarnings graphmodel construct a subsystem fig param owner owning uml element param bounds position and size param settings render settings public fig subsystem object owner rectangle bounds diagram settings settings super owner bounds settings construct figs figsubsystem diagramsettings constructfigs override protected void set standard bounds int x int y int w int h if fig poly null rectangle old bounds get bounds fig poly translate x old bounds x w old bounds width y old bounds y super set standard bounds x y w h setstandardbounds figpoly oldbounds getbounds figpoly oldbounds oldbounds oldbounds setstandardbounds see org argouml ui explorer rules perspective rule get rule name public string get rule name return translator localize misc profile critics perspectiverule getrulename getrulename public collection get children final object parent if parent instanceof profile object critics new array list critic add all profile parent get critics override public string to string return translator localize misc profile explorer critic collection ret new array list object ret add critics return ret return collections empty set getchildren arraylist addall getcritics tostring arraylist emptyset override public string to string return translator localize misc profile explorer critic tostring see org argouml ui explorer rules perspective rule get dependencies java lang object public set get dependencies object parent todo what return collections empty set perspectiverule getdependencies getdependencies emptyset public class status bar adapter implements i status bar public void show status string status text argo event pump fire event new argo status event argo event types status text this status text statusbaradapter istatusbar showstatus statustext argoeventpump fireevent argostatusevent argoeventtypes status_text statustext construct a property panel for a uml model element public prop panel model super label model lookup icon model proppanelmodel lookupicon override protected void place elements add field translator localize label name get name text field add field translator localize label namespace get namespace selector add get visibility panel add get modifiers panel add separator add field translator localize label generalizations get generalization scroll add field translator localize label specializations get specialization scroll add separator add field translator localize label owned elements get owned elements scroll j list import list new uml mutable linked list new uml classifier package imports list model new action add package import null new action remove package import true add field translator localize label imported elements new j scroll pane import list add action new action navigate namespace add action new action add package add action new action add data type add action new action add enumeration add action new action new stereotype add action new action new tag definition add action get delete action placeelements addfield getnametextfield addfield getnamespaceselector getvisibilitypanel getmodifierspanel addseparator addfield getgeneralizationscroll addfield getspecializationscroll addseparator addfield getownedelementsscroll jlist importlist umlmutablelinkedlist umlclassifierpackageimportslistmodel actionaddpackageimport actionremovepackageimport addfield jscrollpane importlist addaction actionnavigatenamespace addaction actionaddpackage addaction actionadddatatype addaction actionaddenumeration addaction actionnewstereotype addaction actionnewtagdefinition addaction getdeleteaction override public component get tree cell renderer component j tree tree object value boolean sel boolean expanded boolean leaf int row boolean has focus param if value instanceof default mutable tree node value default mutable tree node value get user object component r super get tree cell renderer component tree value sel expanded leaf row has focus param if value null r instanceof j label j label lab j label r setting the icon icon icon resource loader wrapper get instance lookup icon value if icon null lab set icon icon setting the tooltip to type and name string type null if model get facade isa model element value type model get facade getuml class name value else if value instanceof uml diagram type uml diagram value get label name if type null string buffer buf new string buffer buf append html buf append name buf append buf append lab get text buf append br buf append type name buf append buf append type lab set tool tip text buf to string else lab set tool tip text lab get text return r gettreecellrenderercomponent jtree hasfocusparam defaultmutabletreenode defaultmutabletreenode getuserobject gettreecellrenderercomponent hasfocusparam jlabel jlabel jlabel resourceloaderwrapper getinstance lookupicon seticon getfacade isamodelelement getfacade getumlclassname umldiagram umldiagram getlabelname stringbuffer stringbuffer gettext typename settooltiptext tostring settooltiptext gettext construct a path comparator public path comparator collator collator get instance collator set strength collator primary pathcomparator pathcomparator getinstance setstrength compare two uml elements names ignoring case using names from the path as tie breakers as a convenience we also compare simple strings using the same primary strength collator param o1 first model element param o2 second model element return 1 0 1 see java util comparator compare java lang object java lang object public int compare object o1 object o2 if o1 null if o2 null return 0 return 1 if o2 null return 1 if o1 equals o2 return 0 if o1 instanceof string if o2 instanceof string return collator compare string o1 string o2 else if model get facade isauml element o2 all strings collate before all uml elements return 1 if o2 instanceof string model get facade isauml element o1 all strings collate before all uml elements return 1 elements are collated first by name hoping for a quick solution string name1 name2 try name1 model get facade get name o1 name2 model get facade get name o2 catch illegal argument exception e throw new class cast exception model element or string required n o1 o1 null null o1 to string n o2 o2 null null o2 to string if name1 null name2 null int comparison collator compare name1 name2 if comparison 0 return comparison and then by their enclosing path to fully distinguish them return compare paths o1 o2 getfacade isaumlelement getfacade isaumlelement getfacade getname getfacade getname illegalargumentexception classcastexception tostring tostring comparepaths private int compare paths object o1 object o2 list string path1 model get model management helper get path list o1 collections reverse path1 list string path2 model get model management helper get path list o2 collections reverse path2 iterator string i2 path2 iterator iterator string i1 path1 iterator int case sensitive comparison 0 while i2 has next string name2 i2 next if i1 has next return 1 string name1 i1 next int comparison if name1 null if name2 null comparison 0 else comparison 1 else if name2 null comparison 1 else comparison collator compare name1 name2 if comparison 0 return comparison keep track of first non equal comparison to use in case the case insensitive comparisons all end up equal if case sensitive comparison 0 if name1 null if name2 null case sensitive comparison 0 else case sensitive comparison 1 else if name2 null case sensitive comparison 1 else case sensitive comparison name1 compare to name2 if i2 has next return 1 if the strings differed only in non primary characteristics at some point case accent etc pick an arbitrary but stable collating order if case sensitive comparison 0 return case sensitive comparison it s illegal in uml to have multiple elements in a namespace with the same name but if it happens keep them distinct so the user has a chance of catching the error pick an arbitrary but stable collating order we don t call them equal because otherwise one will get eliminated from the tree set where this comparator is used return o1 to string compare to o2 to string comparepaths getmodelmanagementhelper getpathlist getmodelmanagementhelper getpathlist casesensitivecomparison hasnext hasnext casesensitivecomparison casesensitivecomparison casesensitivecomparison casesensitivecomparison casesensitivecomparison compareto hasnext casesensitivecomparison casesensitivecomparison treeset tostring compareto tostring the constructor public action importxmi super translator localize action import xmi actionimportxmi public void action performed action event e most of this code originates from action open project project browser pb project browser get instance project p project manager get manager get current project persistence manager pm persistence manager get instance if project browser get instance ask confirmation and save return j file chooser chooser null if p null p geturi null file file new file p geturi if file get parent file null chooser new j file chooser file get parent else chooser new j file chooser if chooser null chooser new j file chooser chooser set dialog title translator localize filechooser import xmi chooser set file view project file view get instance chooser set accept all file filter used true pm set xmi file chooser filter chooser string fn configuration get string persistence manager key import xmi path if fn length 0 chooser set selected file new file fn int retval chooser show open dialog pb if retval j file chooser approve option file the file chooser get selected file if the file can read try adding the extension from the chosen filter file filter ffilter chooser get file filter if ffilter instanceof abstract file persister abstract file persister afp abstract file persister ffilter file m new file the file get path afp get extension if m can read the file m configuration set string persistence manager key import xmi path the file get path project browser get instance load project with progress monitor the file true actionperformed actionevent actionopenproject projectbrowser projectbrowser getinstance projectmanager getmanager getcurrentproject persistencemanager persistencemanager getinstance projectbrowser getinstance askconfirmationandsave jfilechooser getparentfile jfilechooser getparent jfilechooser jfilechooser setdialogtitle setfileview projectfileview getinstance setacceptallfilefilterused setxmifilechooserfilter getstring persistencemanager key_import_xmi_path setselectedfile showopendialog jfilechooser approve_option thefile getselectedfile thefile canread filefilter getfilefilter abstractfilepersister abstractfilepersister abstractfilepersister thefile getpath getextension canread thefile setstring persistencemanager key_import_xmi_path thefile getpath projectbrowser getinstance loadprojectwithprogressmonitor thefile construct a new selection actor for the given fig param f the given fig public selection actor fig f super f selectionactor selectionactor override protected icon get icons if model get model management helper is read only get content get owner return new icon null generalization icon null null null return icons geticons getmodelmanagementhelper isreadonly getcontent getowner generalizationicon override protected string get instructions int index return instructions index base getinstructions override protected object get new edge type int index return edge type index base getnewedgetype edgetype override protected object get new node type int index if index top index bottom return model get meta types get actor else return model get meta types get use case getnewnodetype getmetatypes getactor getmetatypes getusecase override protected object get new node int index if index 0 index get button if index top index bottom return model get use cases factory create actor else return model get use cases factory create use case getnewnode getbutton getusecasesfactory createactor getusecasesfactory createusecase override protected boolean is reverse edge int index if index bottom index left return true return false isreverseedge the constructor public cr invalid history setup head and desc add supported decision uml decision state machines add trigger outgoing crinvalidhistory setupheadanddesc addsupporteddecision umldecision state_machines addtrigger public boolean predicate2 object dm designer dsgr if model get facade isa pseudostate dm return no problem object k model get facade get kind dm if model get facade equals pseudostate kind k model get pseudostate kind get deep history model get facade equals pseudostate kind k model get pseudostate kind get shallow history return no problem collection outgoing model get facade get outgoings dm int n outgoing outgoing null 0 outgoing size if n outgoing 1 return problem found return no problem getfacade isapseudostate no_problem getfacade getkind getfacade equalspseudostatekind getpseudostatekind getdeephistory getfacade equalspseudostatekind getpseudostatekind getshallowhistory no_problem getfacade getoutgoings noutgoing noutgoing problem_found no_problem public set object get criticized design materials set object ret new hash set object ret add model get meta types get pseudostate return ret getcriticizeddesignmaterials hashset getmetatypes getpseudostate constructor param r the bounds for the pool deprecated for 0 28 by tfmorris use link fig pool object rectangle diagram settings suppress warnings deprecation deprecated public fig pool rectangle r initialize r figpool diagramsettings suppresswarnings figpool private void initialize rectangle r set big port new fig empty rect r x r y r width r height get big port set filled false get big port set line width 0 add fig get big port set bounds r setbigport figemptyrect getbigport setfilled getbigport setlinewidth addfig getbigport setbounds constructor used by pgml parser when loading param owner owning uml element param bounds bounding box rectangle param settings ignored since this is just an empty rectangle public fig pool object owner rectangle bounds diagram settings settings super null bounds settings initialize bounds figpool diagramsettings get the fig containing the stereotype s as there is no stereotype display for this fig we return null return the stereotype fig group protected fig stereotypes group get stereotype fig return null figgroup figstereotypesgroup getstereotypefig override public object clone fig pool fig clone fig pool super clone iterator it fig clone get figs iterator fig clone set big port fig rect it next return fig clone figpool figclone figpool figclone getfigs figclone setbigport figrect figclone override public void add enclosed fig fig fig state super add enclosed fig fig state iterator it get layer get contents no edges iterator while it has next fig f fig it next if f instanceof fig partition f get bounds intersects fig state get bounds model get core helper set model element container fig state get owner f get owner addenclosedfig figstate addenclosedfig figstate getlayer getcontentsnoedges hasnext figpartition getbounds figstate getbounds getcorehelper setmodelelementcontainer figstate getowner getowner override public void set fill color color col get big port set fill color col get name fig set fill color col setfillcolor getbigport setfillcolor getnamefig setfillcolor see org tigris gef presentation fig get fill color override public color get fill color return get big port get fill color getfillcolor getfillcolor getbigport getfillcolor see org tigris gef presentation fig set filled boolean override public void set filled boolean f get big port set filled f setfilled setfilled getbigport setfilled override public boolean is filled return get big port is filled isfilled getbigport isfilled override public dimension get minimum size dimension name dim get name fig get minimum size int w name dim width int h name dim height we want to maintain a minimum size for the partition w math max 64 w h math max 256 h return new dimension w h getminimumsize namedim getnamefig getminimumsize namedim namedim using a traprect enables us to move containing figs easily return code true code see org tigris gef presentation fig get use trap rect override public boolean get use trap rect return true getusetraprect getusetraprect override protected void set standard bounds int x int y int w int h rectangle old bounds get bounds get big port set bounds x y w h fire prop change bounds old bounds get bounds calc bounds x x y y w w h h setstandardbounds oldbounds getbounds getbigport setbounds firepropchange oldbounds getbounds calcbounds _x _y _w _h a fig pool can t be selected instead it is dragged or resized whenever one of its swimlanes is dragged or resized return false at all times override public boolean is selectable return false figpool isselectable return the singleton public static argo event pump get instance return singleton argoeventpump getinstance constructor private argo event pump argoeventpump param listener the listener to be added public static void add listener argo event listener listener singleton do add listener argo event types any event listener addlistener argoeventlistener doaddlistener argoeventtypes any_event param event the event type to what the listener will listen param listener the listener to be added public static void add listener int event argo event listener listener singleton do add listener event listener addlistener argoeventlistener doaddlistener param listener the listener to be removed public static void remove listener argo event listener listener singleton do remove listener argo event types any event listener removelistener argoeventlistener doremovelistener argoeventtypes any_event param event the event to which the listener will not listen any more param listener the listener to be removed public static void remove listener int event argo event listener listener singleton do remove listener event listener removelistener argoeventlistener doremovelistener param event the event to what the listener will listen param listener the listener to be added protected void do add listener int event argo event listener listener if listeners null listeners new array list pair synchronized listeners listeners add new pair event listener doaddlistener argoeventlistener arraylist removes a listener eventtype pair from the listener list todo replace the listener implementation with a event listener list for better performance param event the event to which the listener will not listen any more param listener the listener to be removed protected void do remove listener int event argo event listener listener if listeners null return synchronized listeners list pair remove list new array list pair if event argo event types any event todo this is a linear search of a list that contain many thousands of items one for every fig in the entire project for pair p listeners if p listener listener remove list add p else pair test new pair event listener todo this is a linear search of a list that contain many thousands of items one for every fig in the entire project for pair p listeners if p equals test remove list add p listeners remove all remove list eventlistenerlist doremovelistener argoeventlistener removelist arraylist argoeventtypes any_event removelist removelist removeall removelist handle firing a notation event p todo this needs to be managed on a per diagram or per project basis param event the event to be fired param listener the listener private void handle fire notation event final argo notation event event final argo notation event listener listener notation events are likely to cause gef swing operations so we dispatch them on the swing event thread as a convenience so that the receiving notation changed methods don t need to deal with it if swing utilities is event dispatch thread fire notation event internal event listener else swing utilities invoke later new runnable public void run fire notation event internal event listener handlefirenotationevent argonotationevent argonotationeventlistener notationchanged swingutilities iseventdispatchthread firenotationeventinternal swingutilities invokelater firenotationeventinternal else swing utilities invoke later new runnable public void run fire notation event internal event listener swingutilities invokelater firenotationeventinternal private void fire notation event internal argo notation event event argo notation event listener listener switch event get event type case argo event types notation changed listener notation changed event remark the code in project settings init currently presumes that nobody is using this event break case argo event types notation added listener notation added event break case argo event types notation removed listener notation removed event break case argo event types notation provider added listener notation provider added event break case argo event types notation provider removed listener notation provider removed event break default log error invalid event event get event type break firenotationeventinternal argonotationevent argonotationeventlistener geteventtype argoeventtypes notation_changed notationchanged projectsettings argoeventtypes notation_added notationadded argoeventtypes notation_removed notationremoved argoeventtypes notation_provider_added notationprovideradded argoeventtypes notation_provider_removed notationproviderremoved geteventtype handle firing a diagram appearance event p todo this needs to be managed on a per diagram or per project basis param event the event to be fired param listener the listener private void handle fire diagram appearance event final argo diagram appearance event event final argo diagram appearance event listener listener if swing utilities is event dispatch thread fire diagram appearance event internal event listener else swing utilities invoke later new runnable public void run fire diagram appearance event internal event listener handlefirediagramappearanceevent argodiagramappearanceevent argodiagramappearanceeventlistener swingutilities iseventdispatchthread firediagramappearanceeventinternal swingutilities invokelater firediagramappearanceeventinternal else swing utilities invoke later new runnable public void run fire diagram appearance event internal event listener swingutilities invokelater firediagramappearanceeventinternal private void fire diagram appearance event internal final argo diagram appearance event event final argo diagram appearance event listener listener switch event get event type case argo event types diagram font changed listener diagram font changed event break default log error invalid event event get event type break firediagramappearanceeventinternal argodiagramappearanceevent argodiagramappearanceeventlistener geteventtype argoeventtypes diagram_font_changed diagramfontchanged geteventtype handle firing a help text event param event the event to be fired param listener the listener private void handle fire help event argo help event event argo help event listener listener switch event get event type case argo event types help changed listener help changed event break case argo event types help removed listener help removed event break default log error invalid event event get event type break handlefirehelpevent argohelpevent argohelpeventlistener geteventtype argoeventtypes help_changed helpchanged argoeventtypes help_removed helpremoved geteventtype handle firing a status text event param event the event to be fired param listener the listener private void handle fire status event argo status event event argo status event listener listener switch event get event type case argo event types status text listener status text event break case argo event types status cleared listener status cleared event break case argo event types status project saved listener project saved event break case argo event types status project loaded listener project loaded event break case argo event types status project modified listener project modified event break default log error invalid event event get event type break handlefirestatusevent argostatusevent argostatuseventlistener geteventtype argoeventtypes status_text statustext argoeventtypes status_cleared statuscleared argoeventtypes status_project_saved projectsaved argoeventtypes status_project_loaded projectloaded argoeventtypes status_project_modified projectmodified geteventtype handle firing a profile event param event the event to be fired param listener the listener private void handle fire profile event argo profile event event argo profile event listener listener switch event get event type case argo event types profile added listener profile added event break case argo event types profile removed listener profile removed event break default log error invalid event event get event type break handlefireprofileevent argoprofileevent argoprofileeventlistener geteventtype argoeventtypes profile_added profileadded argoeventtypes profile_removed profileremoved geteventtype handle firing a generator event param event the event to be fired param listener the listener private void handle fire generator event argo generator event event argo generator event listener listener switch event get event type case argo event types generator changed listener generator changed event break case argo event types generator added listener generator added event break case argo event types generator removed listener generator removed event break default log error invalid event event get event type break handlefiregeneratorevent argogeneratorevent argogeneratoreventlistener geteventtype argoeventtypes generator_changed generatorchanged argoeventtypes generator_added generatoradded argoeventtypes generator_removed generatorremoved geteventtype private void handle fire event argo event event argo event listener listener if event get event type argo event types any event if listener instanceof argo notation event listener handle fire notation event argo notation event event argo notation event listener listener if listener instanceof argo help event listener handle fire help event argo help event event argo help event listener listener if listener instanceof argo status event listener handle fire status event argo status event event argo status event listener listener else if event get event type argo event types any notation event event get event type argo event types last notation event if listener instanceof argo notation event listener handle fire notation event argo notation event event argo notation event listener listener if event get event type argo event types any diagram appearance event event get event type argo event types last diagram appearance event if listener instanceof argo diagram appearance event listener handle fire diagram appearance event argo diagram appearance event event argo diagram appearance event listener listener if event get event type argo event types any help event event get event type argo event types last help event if listener instanceof argo help event listener handle fire help event argo help event event argo help event listener listener if event get event type argo event types any generator event event get event type argo event types last generator event if listener instanceof argo generator event listener handle fire generator event argo generator event event argo generator event listener listener if event get event type argo event types any status event event get event type argo event types last status event if listener instanceof argo status event listener handle fire status event argo status event event argo status event listener listener if event get event type argo event types any profile event event get event type argo event types last profile event if listener instanceof argo profile event listener handle fire profile event argo profile event event argo profile event listener listener handlefireevent argoevent argoeventlistener geteventtype argoeventtypes any_event argonotationeventlistener handlefirenotationevent argonotationevent argonotationeventlistener argohelpeventlistener handlefirehelpevent argohelpevent argohelpeventlistener argostatuseventlistener handlefirestatusevent argostatusevent argostatuseventlistener geteventtype argoeventtypes any_notation_event geteventtype argoeventtypes last_notation_event argonotationeventlistener handlefirenotationevent argonotationevent argonotationeventlistener geteventtype argoeventtypes any_diagram_appearance_event geteventtype argoeventtypes last_diagram_appearance_event argodiagramappearanceeventlistener handlefirediagramappearanceevent argodiagramappearanceevent argodiagramappearanceeventlistener geteventtype argoeventtypes any_help_event geteventtype argoeventtypes last_help_event argohelpeventlistener handlefirehelpevent argohelpevent argohelpeventlistener geteventtype argoeventtypes any_generator_event geteventtype argoeventtypes last_generator_event argogeneratoreventlistener handlefiregeneratorevent argogeneratorevent argogeneratoreventlistener geteventtype argoeventtypes any_status_event geteventtype argoeventtypes last_status_event argostatuseventlistener handlefirestatusevent argostatusevent argostatuseventlistener geteventtype argoeventtypes any_profile_event geteventtype argoeventtypes last_profile_event argoprofileeventlistener handlefireprofileevent argoprofileevent argoprofileeventlistener param event the event to be fired public static void fire event argo event event singleton do fire event event fireevent argoevent dofireevent param event the event to be fired protected void do fire event argo event event if listeners null return make a read only copy of the listeners list so that reentrant calls back to add remove listener won t mess us up todo potential performance issue but we need the correctness tfm list pair read only listeners synchronized listeners read only listeners new array list pair listeners for pair pair read only listeners if pair get event type argo event types any event handle fire event event pair get listener else if pair get event type event get event start range pair get event type event get event type handle fire event event pair get listener dofireevent argoevent removelistener readonlylisteners readonlylisteners arraylist readonlylisteners geteventtype argoeventtypes any_event handlefireevent getlistener geteventtype geteventstartrange geteventtype geteventtype handlefireevent getlistener constructor param my event type the event type param my listener the listener pair int my event type argo event listener my listener event type my event type listener my listener myeventtype mylistener myeventtype argoeventlistener mylistener eventtype myeventtype mylistener return the event type int get event type return event type geteventtype eventtype return the listener argo event listener get listener return listener argoeventlistener getlistener override public string to string return pair event type listener tostring eventtype override public int hash code if listener null return event type listener hash code return event type hashcode eventtype hashcode eventtype override public boolean equals object o if o instanceof pair pair p pair o if p event type event type p listener listener return true return false eventtype eventtype constructor for uml model element namespace list model public uml model element stereotype list model super stereotype umlmodelelementnamespacelistmodel umlmodelelementstereotypelistmodel protected void build model list remove all elements if model get facade isa model element get target add all model get facade get stereotypes get target buildmodellist removeallelements getfacade isamodelelement gettarget addall getfacade getstereotypes gettarget see org argouml uml ui uml model element list model2 is valid element object protected boolean is valid element object element return model get facade isa stereotype element umlmodelelementlistmodel2 isvalidelement isvalidelement getfacade isastereotype public boolean build popup j popup menu popup int index add stereotypes submenu action stereo actions stereotype utility get apply stereotype actions get target if stereo actions null for int i 0 i stereo actions length i popup add get check item stereo actions i return true buildpopup jpopupmenu stereoactions stereotypeutility getapplystereotypeactions gettarget stereoactions stereoactions getcheckitem stereoactions creates a new checkbox menu item attached to the specified action object and appends it to the end of this menu todo this is almost a duplicate of argoj menu add check item must find a way to merge param a the action for the checkbox menu item to be added return the new checkbox menu item private static j check box menu item get check item action a string name string a get value action name icon icon icon a get value action small icon boolean selected boolean a get value selected j check box menu item mi new j check box menu item name icon selected null selected boolean value mi set horizontal text position swing constants right mi set vertical text position swing constants center mi set enabled a is enabled mi add action listener a return mi argojmenu addcheckitem jcheckboxmenuitem getcheckitem getvalue getvalue small_icon getvalue jcheckboxmenuitem jcheckboxmenuitem booleanvalue sethorizontaltextposition swingconstants setverticaltextposition swingconstants setenabled isenabled addactionlistener public prop panel create prop panel object object if model get facade isa expression object return get expression prop panel object if model get facade isa multiplicity object return get multiplicity prop panel object if model get facade isa element import object return new prop panel element import if model get facade isa element residence object return new prop panel element residence if model get facade isa template parameter object return new prop panel template parameter return null proppanel createproppanel getfacade isaexpression getexpressionproppanel getfacade isamultiplicity getmultiplicityproppanel getfacade isaelementimport proppanelelementimport getfacade isaelementresidence proppanelelementresidence getfacade isatemplateparameter proppaneltemplateparameter private prop panel get expression prop panel object object return null proppanel getexpressionproppanel private prop panel get multiplicity prop panel object object return null proppanel getmultiplicityproppanel the constructor public action new reception super button new reception put value action name translator localize button new reception actionnewreception putvalue public void action performed action event e super action performed e object classifier target manager get instance get model target if model get facade isa classifier classifier throw new illegal argument exception argument classifier is null or not a classifier got classifier object reception model get common behavior factory build reception classifier target manager get instance set target reception actionperformed actionevent actionperformed targetmanager getinstance getmodeltarget getfacade isaclassifier illegalargumentexception getcommonbehaviorfactory buildreception targetmanager getinstance settarget return the statemachine of this diagram public object get machine return machine getmachine param sm the statemachine of this diagram public void set machine object sm if model get facade isa state machine sm throw new illegal argument exception if sm null machine sm setmachine getfacade isastatemachine illegalargumentexception public list get ports object node or edge list res new array list if model get facade isa state node or edge res add node or edge if model get facade isa pseudostate node or edge res add node or edge return res getports nodeoredge arraylist getfacade isastate nodeoredge nodeoredge getfacade isapseudostate nodeoredge nodeoredge see org tigris gef graph base graph model get owner java lang object public object get owner object port return port basegraphmodel getowner getowner public list get in edges object port if model get facade isa state vertex port return new array list model get facade get incomings port log debug todo get in edges of m state return collections empty list getinedges getfacade isastatevertex arraylist getfacade getincomings getinedges mstate empty_list public list get out edges object port if model get facade isa state vertex port return new array list model get facade get outgoings port log debug todo get out edges of m state return collections empty list getoutedges getfacade isastatevertex arraylist getfacade getoutgoings getoutedges mstate empty_list public boolean can add node object node if node null model get facade isa model element node contains node node return false if model get facade isa comment node return true if model get facade isa state vertex node model get facade isa partition node the next solves issue 3665 do not allow addition of an element to a statemachine that is contained by a statemachine other than the one represented by this diagram object node machine model get state machines helper get state machine node if node machine null node machine get machine return true return false canaddnode getfacade isamodelelement containsnode getfacade isacomment getfacade isastatevertex getfacade isapartition nodemachine getstatemachineshelper getstatemachine nodemachine nodemachine getmachine public boolean can add edge object edge if super can add edge edge return true if edge null return false if contains edge edge return false object end0 null object end1 null if model get facade isa transition edge end0 model get facade get source edge end1 model get facade get target edge it s not allowed to directly draw a transition from a composite state to one of it s substates if model get facade isa composite state end0 model get state machines helper get all sub states end0 contains end1 return false else if edge instanceof comment edge end0 comment edge edge get source end1 comment edge edge get destination else return false both ends must be defined and nodes that are on the graph already if end0 null end1 null log error edge rejected its ends are not attached to anything return false if contains node end0 contains edge end0 log error edge rejected its source end is attached to end0 but this is not in the graph model return false if contains node end1 contains edge end1 log error edge rejected its destination end is attached to end1 but this is not in the graph model return false return true canaddedge canaddedge containsedge getfacade isatransition getfacade getsource getfacade gettarget getfacade isacompositestate getstatemachineshelper getallsubstates commentedge commentedge getsource commentedge getdestination containsnode containsedge containsnode containsedge public void add node object node log debug adding statechart activity diagram node node if can add node node return if contains node node return get nodes add node if model get facade isa state vertex node object top model get state machines helper get top get machine model get state machines helper add subvertex top node fire node added node addnode canaddnode containsnode getnodes getfacade isastatevertex getstatemachineshelper gettop getmachine getstatemachineshelper addsubvertex firenodeadded public void add edge object edge log debug adding statechart activity diagram edge if can add edge edge return get edges add edge fire edge added edge addedge canaddedge getedges fireedgeadded public void add node related edges object node super add node related edges node if model get facade isa state vertex node collection transen new array list model get facade get outgoings node transen add all model get facade get incomings node iterator iter transen iterator while iter has next object dep m transition iter next if can add edge dep add edge dep addnoderelatededges addnoderelatededges getfacade isastatevertex arraylist getfacade getoutgoings addall getfacade getincomings hasnext mtransition canaddedge addedge public boolean can connect object from port object to port if model get facade isa state vertex from port log error internal error not from sv return false if model get facade isa state vertex to port log error internal error not to sv return false if model get facade isa final state from port return false if model get facade isa pseudostate to port if model get pseudostate kind get initial equals model get facade get kind to port return false return true canconnect fromport toport getfacade isastatevertex fromport getfacade isastatevertex toport getfacade isafinalstate fromport getfacade isapseudostate toport getpseudostatekind getinitial getfacade getkind toport public object connect object from port object to port object edge class if model get facade isa final state from port return null if model get facade isa pseudostate to port model get pseudostate kind get initial equals model get facade get kind to port return null if model get meta types get transition equals edge class object tr null tr model get state machines factory build transition from port to port if can add edge tr add edge tr else project manager get manager get current project move to trash tr tr null return tr else if edge class comment edge class try object connection build connection edge class from port null to port null null project manager get manager get current project get model add edge connection return connection catch exception ex log error build connection failed ex return null else log debug wrong kind of edge in state diagram connect3 edge class return null fromport toport edgeclass getfacade isafinalstate fromport getfacade isapseudostate toport getpseudostatekind getinitial getfacade getkind toport getmetatypes gettransition edgeclass getstatemachinesfactory buildtransition fromport toport canaddedge addedge projectmanager getmanager getcurrentproject movetotrash edgeclass commentedge buildconnection edgeclass fromport toport projectmanager getmanager getcurrentproject getmodel addedge buildconnection statediagram edgeclass public void vetoable change property change event pce throws property veto exception if owned element equals pce get property name collection old owned collection pce get old value object eo m element import pce get new value object me model get facade get model element eo if old owned contains eo log debug model removed me if model get facade isa state me remove node me if model get facade isa pseudostate me remove node me if model get facade isa transition me remove edge me else log debug model added me vetoablechange propertychangeevent propertyvetoexception ownedelement getpropertyname oldowned getoldvalue melementimport getnewvalue getfacade getmodelelement oldowned getfacade isastate removenode getfacade isapseudostate removenode getfacade isatransition removeedge param new node this is the new node that one of the ends is dragged to param old node this is the existing node that is already connected param edge this is the edge that is being dragged rerouted return true if a transition is being rerouted between two states public boolean can change connected node object new node object old node object edge prevent no changes if new node old node return false check parameter types if model get facade isa state new node model get facade isa state old node model get facade isa transition edge return false it s not allowed to move a transition so that it will go from a composite to its substate nor vice versa see issue 2865 object other side node model get facade get source edge if other side node old node other side node model get facade get target edge if model get facade isa composite state new node model get state machines helper get all sub states new node contains other side node return false return true newnode oldnode canchangeconnectednode newnode oldnode newnode oldnode getfacade isastate newnode getfacade isastate oldnode getfacade isatransition othersidenode getfacade getsource othersidenode oldnode othersidenode getfacade gettarget getfacade isacompositestate newnode getstatemachineshelper getallsubstates newnode othersidenode reroutes the connection to the old node to be connected to the new node param new node this is the new node that one of the ends is dragged to param old node this is the existing node that is already connected param edge this is the edge that is being dragged rerouted param is source tells us which end is being rerouted public void change connected node object new node object old node object edge boolean is source if is source model get state machines helper set source edge new node else model get common behavior helper set target edge new node newnode oldnode issource changeconnectednode newnode oldnode issource issource getstatemachineshelper setsource newnode getcommonbehaviorhelper settarget newnode public boolean is remove from diagram allowed collection figs if nothing is selected then not allowed to remove it if figs is empty return false iterator i figs iterator while i has next object obj i next if obj instanceof fig return false object uml fig obj get owner if a uml object is found you can not remove selected elms if uml null return false if only figs without owner are selected then you can remove them return true isremovefromdiagramallowed isempty hasnext getowner constructor public uml stimulus receiver list model super receiver umlstimulusreceiverlistmodel protected void build model list remove all elements add element model get facade get receiver get target buildmodellist removeallelements addelement getfacade getreceiver gettarget see org argouml uml ui uml model element list model2 is valid element object protected boolean is valid element object element return model get facade get receiver get target element umlmodelelementlistmodel2 isvalidelement isvalidelement getfacade getreceiver gettarget register a profile in the link profile manager param profile the profile to be registered public static void register profile profile get manager register profile profile profilemanager getmanager registerprofile remove or unregister the profile from the link profile manager param profile the profile to be removed public static void remove profile profile get manager remove profile profile profilemanager getmanager removeprofile return the profile manager public static profile manager get manager if manager null not initialized manager return manager profilemanager getmanager notinitialized private static void not initialized string string throw new runtime exception profile facade s string isn t initialized notinitialized runtimeexception profilefacade param profile manager the manager of the profiles to be used public static void set manager profile manager profile manager manager profile manager profilemanager setmanager profilemanager profilemanager profilemanager static void reset manager null return true is subsystem is initialized or false otherwise public static boolean is initiated return manager null isinitiated applies the given profile configuration to argouml param pc the profile configuration public static void apply configuration profile configuration pc get manager apply configuration pc profileconfiguration applyconfiguration profileconfiguration getmanager applyconfiguration the constructor param node instance the node instance of which we handle the text public node instance notation object node instance if model get facade isa node instance node instance throw new illegal argument exception this is not a node instance nodeinstance nodeinstance nodeinstancenotation nodeinstance getfacade isanodeinstance nodeinstance illegalargumentexception nodeinstance constructor public action page setup super translator localize action page setup resource loader wrapper lookup icon action page setup actionpagesetup resourceloaderwrapper lookupicon see java awt event action listener action performed java awt event action event public void action performed action event ae print manager get instance show page setup dialog actionlistener actionperformed actionevent actionperformed actionevent printmanager getinstance showpagesetupdialog see org argouml ui explorer rules perspective rule get rule name public string get rule name return translator localize misc classifier behavioralfeature perspectiverule getrulename getrulename public collection get children object parent if model get facade isa classifier parent return model get core helper get behavioral features parent return collections empty set getchildren getfacade isaclassifier getcorehelper getbehavioralfeatures empty_set public set get dependencies object parent if model get facade isa classifier parent set set new hash set set add parent return set return collections empty set getdependencies getfacade isaclassifier hashset empty_set construct a property panel for uml class elements public prop panel class super label class lookup icon class add field label name get name text field add field label namespace get namespace selector get modifiers panel add new uml class active check box add get modifiers panel add get visibility panel add separator add field label client dependencies get client dependency scroll add field label supplier dependencies get supplier dependency scroll add field label generalizations get generalization scroll add field label specializations get specialization scroll add separator add field label attributes get attribute scroll add field label association ends get association end scroll add field label operations get operation scroll add field label owned elements get owned elements scroll add field label template parameters get template parameter scroll add action new action navigate namespace add action new action add attribute add action new action add operation add action get action new reception add action new action new inner class add action new action new class add action new action new stereotype add action new action add template parameter add action get delete action proppanelclass lookupicon addfield getnametextfield addfield getnamespaceselector getmodifierspanel umlclassactivecheckbox getmodifierspanel getvisibilitypanel addseparator addfield getclientdependencyscroll addfield getsupplierdependencyscroll addfield getgeneralizationscroll addfield getspecializationscroll addseparator addfield getattributescroll addfield getassociationendscroll addfield getoperationscroll addfield getownedelementsscroll addfield gettemplateparameterscroll addaction actionnavigatenamespace addaction actionaddattribute addaction actionaddoperation addaction getactionnewreception addaction actionnewinnerclass addaction actionnewclass addaction actionnewstereotype addaction actionaddtemplateparameter addaction getdeleteaction the constructor public zargo file persister zargofilepersister see org argouml persistence abstract file persister get extension override public string get extension return zargo abstractfilepersister getextension getextension see org argouml persistence abstract file persister get desc override protected string get desc return translator localize combobox filefilter zargo abstractfilepersister getdesc getdesc it is being considered to save out individual xmi s from individuals diagrams to make it easier to modularize the output of argo param file the file to write param project the project to save throws save exception when anything goes wrong throws interrupted exception if the thread is interrupted see org argouml persistence project file persister save org argouml kernel project java io file override public void do save project project file file throws save exception interrupted exception log info saving progress mgr progress mgr new progress mgr progress mgr set number of phases 4 progress mgr next phase file last archive file new file file get absolute path file temp file null try temp file create temp file file catch file not found exception e throw new save exception failed to archive the previous file version e catch io exception e throw new save exception failed to archive the previous file version e zip output stream stream null try project set file file project set version application version get version project set persistence version persistence version stream new zip output stream new file output stream file for project member project member project get members if project member get type equals ignore case xmi if log is info enabled log info saving member of type project member get type stream put next entry new zip entry project member get zip name member file persister persister get member file persister project member persister save project member stream if save did not raise an exception and name exists move name to name this is the correct backup file if last archive file exists last archive file delete if temp file exists last archive file exists temp file rename to last archive file if temp file exists temp file delete progress mgr next phase catch exception e log error exception occured during save attempt e try if stream null stream close catch exception ex do nothing frank in case of exception delete name and mv name back to name if name exists this is the rollback to old file file delete temp file rename to file we have to give a message to user and set the system to unsaved throw new save exception e try stream close catch io exception ex log error failed to close save output writer ex saveexception interruptedexception projectfilepersister dosave saveexception interruptedexception progressmgr progressmgr progressmgr progressmgr setnumberofphases progressmgr nextphase lastarchivefile getabsolutepath tempfile tempfile createtempfile filenotfoundexception saveexception ioexception saveexception zipoutputstream setfile setversion applicationversion getversion setpersistenceversion persistence_version zipoutputstream fileoutputstream projectmember projectmember getmembers projectmember gettype equalsignorecase isinfoenabled projectmember gettype putnextentry zipentry projectmember getzipname memberfilepersister getmemberfilepersister projectmember projectmember lastarchivefile lastarchivefile tempfile lastarchivefile tempfile renameto lastarchivefile tempfile tempfile progressmgr nextphase tempfile renameto saveexception ioexception see org argouml persistence abstract file persister is save enabled override public boolean is save enabled return false abstractfilepersister issaveenabled issaveenabled override public project do load file file throws open exception interrupted exception progress mgr progress mgr new progress mgr progress mgr set number of phases 3 uml phases load thread utils check if interrupted int file version string release version try string argo entry get entry names file argo iterator next url argo url make zip entry url tourl file argo entry file version get persistence version argo url open stream release version get release version argo url open stream catch malformedurl exception e throw new open exception e catch io exception e throw new open exception e todo the commented code below was commented out by bob tarling in order to resolve bugs 4845 and 4857 hopefully we can determine the cause and reintroduce boolean upgrade required check version file version release version boolean upgrade required true log info loading zargo file of version file version final project p if upgrade required file combined file zargo to uml file progress mgr p super do load file combined file progress mgr else p load from zargo file progress mgr progress mgr next phase persistence manager get instance set projecturi file touri p return p doload openexception interruptedexception progressmgr progressmgr progressmgr progressmgr setnumberofphases uml_phases_load threadutils checkifinterrupted fileversion releaseversion argoentry getentrynames argourl makezipentryurl argoentry fileversion getpersistenceversion argourl openstream releaseversion getreleaseversion argourl openstream malformedurlexception openexception ioexception openexception upgraderequired checkversion fileversion releaseversion upgraderequired fileversion upgraderequired combinedfile zargotouml progressmgr doload combinedfile progressmgr loadfromzargo progressmgr progressmgr nextphase persistencemanager getinstance setprojecturi private project load from zargo file file progress mgr progress mgr throws open exception project p project factory get instance create project file touri try progress mgr next phase load argo project descriptor argo parser parser new argo parser string argo entry get entry names file argo iterator next parser read project p new input source make zip entry url tourl file argo entry to external form list member list parser get member list log info member list size members load xmi file before any pgml files fixme the following is loading the model before anything else due to the zargo containing the profiles currently we have removed this hack in uml file persister and i think it should be removed from here also string xmi entry get entry names file xmi iterator next member file persister persister get member file persister xmi persister load p make zip entry url tourl file xmi entry load the rest list string entries get entry names file null for string name entries string ext name substring name last index of 1 if argo equals ext xmi equals ext persister get member file persister ext log info loading member with persister get class get name persister load p open zip entry tourl file name progress mgr next phase thread utils check if interrupted p post load return p catch interrupted exception e return null catch malformedurl exception e throw new open exception e catch io exception e throw new open exception e catch sax exception e throw new open exception e loadfromzargo progressmgr progressmgr openexception projectfactory getinstance createproject progressmgr nextphase argoparser argoparser argoentry getentrynames readproject inputsource makezipentryurl argoentry toexternalform memberlist getmemberlist memberlist umlfilepersister xmientry getentrynames memberfilepersister getmemberfilepersister makezipentryurl xmientry getentrynames lastindexof getmemberfilepersister getclass getname openzipentry progressmgr nextphase threadutils checkifinterrupted postload interruptedexception malformedurlexception openexception ioexception openexception saxexception openexception private url tourl file file throws malformedurl exception return file touri tourl malformedurlexception private file zargo to uml file file progress mgr progress mgr throws open exception interrupted exception file combined file null try combined file file create temp file combinedzargo uml log info combining old style zargo sub files into new style uml file combined file get absolute path combined file delete on exit string encoding argo get encoding file output stream stream new file output stream combined file print writer writer new print writer new buffered writer new output stream writer stream encoding writer println xml version 1 0 encoding encoding copy argo file encoding writer progress mgr next phase copy member file profile encoding writer copy xmi file encoding writer copy diagrams file encoding writer copy the todo items after the model and diagrams so that any model elements or figs that the todo items refer to will exist before creating critics copy member file todo encoding writer progress mgr next phase writer println uml writer close log info completed combining files catch io exception e throw new open exception e return combined file zargotouml progressmgr progressmgr openexception interruptedexception combinedfile combinedfile createtempfile combinedzargo_ combinedfile getabsolutepath combinedfile deleteonexit getencoding fileoutputstream fileoutputstream combinedfile printwriter printwriter bufferedwriter outputstreamwriter copyargo progressmgr nextphase copymember copyxmi copydiagrams copymember progressmgr nextphase ioexception openexception combinedfile private void copy argo file file string encoding print writer writer throws io exception malformedurl exception open exception unsupported encoding exception int pgml count get pgml count file boolean contains to do contains todo file boolean contains profile contains profile file first read the argo file from zip zip input stream zis open zip stream at tourl file file constants project file ext if zis null throw new open exception there is no argo file in the zargo string line buffered reader reader new buffered reader new input stream reader zis encoding keep reading till we hit the argo tag string root line do root line reader read line if root line null throw new open exception can t find an argo tag in the argo file while root line starts with argo get the version from the tag string version get version root line writer println uml version version writer println root line log info transfering argo contents int member count 0 while line reader read line null if line trim starts with member member count if line trim equals argo member count 0 log info inserting member info writer println member type xmi name xmi for int i 0 i pgml count i writer println member type pgml name pgml if contains to do writer println member type todo name todo if contains profile string type profile configuration extension writer println member type type name type writer println line if log is info enabled log info member count member count zis close reader close copyargo printwriter ioexception malformedurlexception openexception unsupportedencodingexception pgmlcount getpgmlcount containstodo containstodo containsprofile containsprofile zipinputstream openzipstreamat fileconstants project_file_ext openexception bufferedreader bufferedreader inputstreamreader rootline rootline readline rootline openexception rootline startswith getversion rootline rootline membercount readline startswith membercount membercount pgmlcount containstodo containsprofile profileconfiguration isinfoenabled membercount private void copy xmi file file string encoding print writer writer throws io exception malformedurl exception unsupported encoding exception zip input stream zis open zip stream at tourl file xmi buffered reader reader new buffered reader new input stream reader zis encoding skip 1 lines reader read line reader to writer reader writer zis close reader close copyxmi printwriter ioexception malformedurlexception unsupportedencodingexception zipinputstream openzipstreamat bufferedreader bufferedreader inputstreamreader readline readertowriter private void copy diagrams file file string encoding print writer writer throws io exception loop round loading the diagrams zip input stream zis new zip input stream tourl file open stream sub input stream sub new sub input stream zis zip entry current entry null while current entry sub get next entry null if current entry get name ends with pgml buffered reader reader new buffered reader new input stream reader sub encoding string first line reader read line if first line starts with xml skip the 2 lines xml version 1 0 encoding utf 8 doctype pgml system pgml dtd reader read line else writer println first line reader to writer reader writer sub close reader close zis close copydiagrams printwriter ioexception zipinputstream zipinputstream openstream subinputstream subinputstream zipentry currententry currententry getnextentry currententry getname endswith bufferedreader bufferedreader inputstreamreader firstline readline firstline startswith readline firstline readertowriter private void copy member file file string tag string output encoding print writer writer throws io exception malformedurl exception unsupported encoding exception zip input stream zis open zip stream at tourl file tag if zis null input stream reader isr new input stream reader zis output encoding buffered reader reader new buffered reader isr string first line reader read line if first line starts with xml skip the 2 lines xml version 1 0 encoding utf 8 doctype todo system todo dtd reader read line else writer println first line reader to writer reader writer zis close reader close copymember outputencoding printwriter ioexception malformedurlexception unsupportedencodingexception zipinputstream openzipstreamat inputstreamreader inputstreamreader outputencoding bufferedreader bufferedreader firstline readline firstline startswith readline firstline readertowriter private void reader to writer reader reader writer writer throws io exception int ch while ch reader read 1 if ch 0xffff log info stripping out 0xffff from save file else if ch 8 log info stripping out 0x8 from save file else writer write ch readertowriter ioexception open a zip input stream to the first file found with a given extension param url the url of the zip file param ext the required extension return the zip stream positioned at the required location or null if the requested extension is not found throws io exception if there is a problem opening the file private zip input stream open zip stream at url url string ext throws io exception zip input stream zis new zip input stream url open stream zip entry entry zis get next entry while entry null entry get name ends with ext entry zis get next entry if entry null zis close return null return zis zipinputstream ioexception zipinputstream openzipstreamat ioexception zipinputstream zipinputstream openstream zipentry getnextentry getname endswith getnextentry private input stream open zip entry url url string entry name throws malformedurl exception io exception return make zip entry url url entry name open stream inputstream openzipentry entryname malformedurlexception ioexception makezipentryurl entryname openstream private url make zip entry url url url string entry name throws malformedurl exception string entryurl jar url entry name return new url entryurl makezipentryurl entryname malformedurlexception entryname the constructor param z the zip input stream public sub input stream zip input stream z super z in z subinputstream zipinputstream see java io input stream close override public void close throws io exception in close entry inputstream ioexception closeentry reads the next zip file entry and positions stream at the beginning of the entry data return the zip entry just read throws io exception if an i o error has occurred public zip entry get next entry throws io exception return in get next entry zipentry ioexception zipentry getnextentry ioexception getnextentry private int get pgml count file file throws io exception return get entry names file pgml size getpgmlcount ioexception getentrynames private boolean contains todo file file throws io exception return get entry names file todo is empty containstodo ioexception getentrynames isempty private boolean contains profile file file throws io exception return get entry names file profile configuration extension is empty containsprofile ioexception getentrynames profileconfiguration isempty get a list of zip file entries which end with the given extension if the extension is null all entries are returned private list string get entry names file file string extension throws io exception malformedurl exception zip input stream zis new zip input stream tourl file open stream list string result new array list string zip entry entry zis get next entry while entry null string name entry get name if extension null name ends with extension result add name entry zis get next entry zis close return result getentrynames ioexception malformedurlexception zipinputstream zipinputstream openstream arraylist zipentry getnextentry getname endswith getnextentry the constructor public action navigate up next down super button go up next down true put value action small icon resource loader wrapper lookup icon resource navigate up next actionnavigateupnextdown putvalue small_icon resourceloaderwrapper lookupiconresource navigateupnext protected object navigate to object source object up get parent source list family get family up assert family contains source iterator it family iterator while it has next object child it next if child source if it has next return it next else return null return null navigateto getparent getfamily hasnext hasnext get the list of elements that we are navigating through param parent the parent element that owns all elements in the list return the list get the parent of the list of elements that we are navigating through param child the childelement of which we seek the previous element return the parent element the constructor public cr multiple deep history states setup head and desc add supported decision uml decision state machines add trigger parent add trigger kind crmultipledeephistorystates setupheadanddesc addsupporteddecision umldecision state_machines addtrigger addtrigger public boolean predicate2 object dm designer dsgr if model get facade isa pseudostate dm return no problem object k model get facade get kind dm if model get facade equals pseudostate kind k model get pseudostate kind get deep history return no problem container state composite state object cs model get facade get container dm if cs null log debug null parent state return no problem collection peers model get facade get subvertices cs int initial state count 0 for iterator iter peers iterator iter has next object sv iter next if model get facade isa pseudostate sv model get facade equals pseudostate kind model get facade get kind sv model get pseudostate kind get deep history initial state count if initial state count 1 return problem found return no problem getfacade isapseudostate no_problem getfacade getkind getfacade equalspseudostatekind getpseudostatekind getdeephistory no_problem getfacade getcontainer no_problem getfacade getsubvertices initialstatecount hasnext getfacade isapseudostate getfacade equalspseudostatekind getfacade getkind getpseudostatekind getdeephistory initialstatecount initialstatecount problem_found no_problem org argouml cognitive designer public to do item to do item object dm designer dsgr list set offs compute offenders dm return new uml to do item this offs dsgr todoitem todoitem listset computeoffenders umltodoitem param ps the design material return the offenders protected list set compute offenders object ps list set offs new list set ps object cs model get facade get container ps if cs null log debug null parent in still valid return offs collection peers model get facade get subvertices cs for iterator iter peers iterator iter has next object sv iter next if model get facade isa pseudostate sv model get facade equals pseudostate kind model get facade get kind sv model get pseudostate kind get deep history offs add sv return offs listset computeoffenders listset listset getfacade getcontainer getfacade getsubvertices hasnext getfacade isapseudostate getfacade equalspseudostatekind getfacade getkind getpseudostatekind getdeephistory public boolean still valid to do item i designer dsgr if is active return false list set offs i get offenders object dm offs get 0 list set new offs compute offenders dm boolean res offs equals new offs return res stillvalid todoitem isactive listset getoffenders listset newoffs computeoffenders newoffs public set object get criticized design materials set object ret new hash set object ret add model get meta types get pseudostate return ret getcriticizeddesignmaterials hashset getmetatypes getpseudostate construct a new action set add message mode p param action the uml meta type of the uml action to associate to the new message param name the i18n code for the action name public action set add message mode object action string name super mode create message class edge class model get meta types get message name mode args put action action actionsetaddmessagemode actionsetaddmessagemode modecreatemessage edgeclass getmetatypes getmessage modeargs public uml tagged value check box string name super translator localize checkbox name lc new action boolean tagged value name name tag name name umltaggedvaluecheckbox actionbooleantaggedvalue tagname set the checkbox according to the tagged values of the target see org argouml uml ui uml check box2 build model public void build model object tv model get facade get tagged value get target tag name if tv null string tag model get facade get value of tag tv if true equals tag set selected true return set selected false umlcheckbox2 buildmodel buildmodel getfacade gettaggedvalue gettarget tagname getfacade getvalueoftag setselected setselected class persistence exception extends exception constructor public persistence exception super persistenceexception persistenceexception constructor param message the message public persistence exception string message super message persistenceexception param message the message param c the cause of the exception public persistence exception string message throwable c super message c persistenceexception param c the cause of the exception public persistence exception throwable c super c persistenceexception construct a new action set add association end mode p param name the action description public action set add association class mode string name super mode create association class class edge class model get meta types get association class name actionsetaddassociationendmode actionsetaddassociationclassmode modecreateassociationclass edgeclass getmetatypes getassociationclass construct a new cmd with the given classes for the net node and its fig node param kind the pseudostatekind param name the name of this kind of pseudostate public action create pseudostate object kind string name super kind name if model get facade isa pseudostate kind kind throw new illegal argument exception set arg class name model get meta types get pseudostate set arg kind kind netnode fignode actioncreatepseudostate getfacade isapseudostatekind illegalargumentexception setarg classname getmetatypes getpseudostate setarg actually instanciate the net node and fig node objects and set the global next mode to mode place todo should call super reduce code volume see org tigris gef graph graph factory make node public object make node object new node super make node object kind get arg kind model get core helper set kind new node kind return new node netnode fignode modeplace graphfactory makenode makenode newnode makenode getarg getcorehelper setkind newnode newnode see org argouml ui explorer rules perspective rule get rule name public string get rule name return translator localize misc message action perspectiverule getrulename getrulename public collection get children object parent if model get facade isa message parent object action model get facade get action parent if action null list children new array list children add action return children return collections empty set getchildren getfacade isamessage getfacade getaction arraylist empty_set public set get dependencies object parent if model get facade isa message parent set set new hash set set add parent return set return collections empty set getdependencies getfacade isamessage hashset empty_set construct a new property panel for an abstraction public prop panel abstraction super label abstraction lookup icon abstraction add field translator localize label name get name text field add field translator localize label namespace get namespace selector add separator add field translator localize label suppliers get supplier scroll add field translator localize label clients get client scroll add action new action navigate namespace add action get delete action proppanelabstraction lookupicon addfield getnametextfield addfield getnamespaceselector addseparator addfield getsupplierscroll addfield getclientscroll addaction actionnavigatenamespace addaction getdeleteaction the constructor public action add enumeration super button new enumeration put value action name translator localize button new enumeration icon icon resource loader wrapper lookup icon enumeration put value action small icon icon actionaddenumeration putvalue resourceloaderwrapper lookupicon putvalue small_icon public void action performed action event e object target target manager get instance get model target object ns null if model get facade isa namespace target ns target if model get facade isa parameter target if model get facade get behavioral feature target null target model get facade get behavioral feature target if model get facade isa feature target if model get facade get owner target null target model get facade get owner target if model get facade isa event target ns model get facade get namespace target if model get facade isa classifier target ns model get facade get namespace target if model get facade isa association end target target model get facade get association target ns model get facade get namespace target object new enum model get core factory build enumeration ns target manager get instance set target new enum super action performed e actionperformed actionevent targetmanager getinstance getmodeltarget getfacade isanamespace getfacade isaparameter getfacade getbehavioralfeature getfacade getbehavioralfeature getfacade isafeature getfacade getowner getfacade getowner getfacade isaevent getfacade getnamespace getfacade isaclassifier getfacade getnamespace getfacade isaassociationend getfacade getassociation getfacade getnamespace newenum getcorefactory buildenumeration targetmanager getinstance settarget newenum actionperformed default constructor param profile good practices the instance of the required profile public profile code generation profile good practices profile good practices cr missing class name profile good practices get cr missing class name cr compound constructor needed new compound critic cr missing class name new cr constructor needed cls naming new compound critic cr missing class name cr disambig class name critics add cr compound constructor needed code generation critics add cls naming critics add new cr disambig state name critics add cr disambig class name critics add new cr illegal name critics add new cr reserved name critics add new cr no initial state critics add new cr no trigger or guard critics add new cr no guard critics add new cr oper name conflict critics add new cr no instance variables critics add new cr no associations critics add new cr no operations critics add new cr useless abstract critics add new cr useless interface critics add new cr nav from interface critics add new cr unnavigable assoc critics add new cr already realizes critics add new cr multiple initial states critics add new cr unconventional oper name critics add new cr unconventional attr name critics add new cr unconventional class name critics add new cr unconventional pack name critics add new cr node inside element critics add new cr node instance inside element critics add new cr component without node critics add new cr comp instance without node critics add new cr class without component critics add new cr interface without component critics add new cr object without component critics add new cr instance without classifier critics add no trans1 critics add no trans2 this set critics critics add profile dependency good practices profilegoodpractices profilecodegeneration profilegoodpractices profilegoodpractices crmissingclassname profilegoodpractices getcrmissingclassname crcompoundconstructorneeded compoundcritic crmissingclassname crconstructorneeded clsnaming compoundcritic crmissingclassname crdisambigclassname crcompoundconstructorneeded clsnaming crdisambigstatename crdisambigclassname crillegalname crreservedname crnoinitialstate crnotriggerorguard crnoguard cropernameconflict crnoinstancevariables crnoassociations crnooperations cruselessabstract cruselessinterface crnavfrominterface crunnavigableassoc cralreadyrealizes crmultipleinitialstates crunconventionalopername crunconventionalattrname crunconventionalclassname crunconventionalpackname crnodeinsideelement crnodeinstanceinsideelement crcomponentwithoutnode crcompinstancewithoutnode crclasswithoutcomponent crinterfacewithoutcomponent crobjectwithoutcomponent crinstancewithoutclassifier notrans1 notrans2 setcritics addprofiledependency goodpractices override public string get display name return critics for code generation getdisplayname see org argouml profile profile get profile identifier public string get profile identifier return code generation getprofileidentifier getprofileidentifier codegeneration private uml tree cell renderer tree cell renderer new uml tree cell renderer private static image icon lookup icon resource string name return resource loader wrapper lookup icon resource name umltreecellrenderer treecellrenderer umltreecellrenderer imageicon lookupiconresource resourceloaderwrapper lookupiconresource public component get tree cell renderer component j tree tree object value boolean sel boolean expanded boolean leaf int row boolean has the focus component r super get tree cell renderer component tree value sel expanded leaf row has the focus if r instanceof j label j label lab j label r if value instanceof to do item to do item item to do item value poster post item get poster if post instanceof designer if item get progress 0 lab set icon post itd0 else if item get progress 25 lab set icon post itd25 else if item get progress 50 lab set icon post itd50 else if item get progress 75 lab set icon post itd75 else if item get progress 100 lab set icon post itd99 else lab set icon post itd100 else if item get progress 0 lab set icon post it0 else if item get progress 25 lab set icon post it25 else if item get progress 50 lab set icon post it50 else if item get progress 75 lab set icon post it75 else if item get progress 100 lab set icon post it99 else lab set icon post it100 else if value instanceof decision lab set icon metal icon factory get tree folder icon else if value instanceof goal lab set icon metal icon factory get tree folder icon else if value instanceof poster lab set icon metal icon factory get tree folder icon else if value instanceof priority node lab set icon metal icon factory get tree folder icon else if value instanceof knowledge type node lab set icon metal icon factory get tree folder icon else if value instanceof diagram return tree cell renderer get tree cell renderer component tree value sel expanded leaf row has the focus else object new value value if new value instanceof fig new value fig value get owner if model get facade isauml element new value return tree cell renderer get tree cell renderer component tree new value sel expanded leaf row has the focus string tip lab get text lab set tool tip text tip tree set tool tip text tip if sel lab set background get background non selection color else color high globals get prefs get highlight color high high brighter brighter lab set background high lab set opaque sel return r gettreecellrenderercomponent jtree hasthefocus gettreecellrenderercomponent hasthefocus jlabel jlabel jlabel todoitem todoitem todoitem getposter getprogress seticon postitd0 getprogress seticon postitd25 getprogress seticon postitd50 getprogress seticon postitd75 getprogress seticon postitd99 seticon postitd100 getprogress seticon postit0 getprogress seticon postit25 getprogress seticon postit50 getprogress seticon postit75 getprogress seticon postit99 seticon postit100 seticon metaliconfactory gettreefoldericon seticon metaliconfactory gettreefoldericon seticon metaliconfactory gettreefoldericon prioritynode seticon metaliconfactory gettreefoldericon knowledgetypenode seticon metaliconfactory gettreefoldericon treecellrenderer gettreecellrenderercomponent hasthefocus newvalue newvalue newvalue getowner getfacade isaumlelement newvalue treecellrenderer gettreecellrenderercomponent newvalue hasthefocus gettext settooltiptext settooltiptext setbackground getbackgroundnonselectioncolor getprefs gethighlightcolor setbackground setopaque constructor for action new destroy action protected action new destroy action super put value action name translator localize button new destroyaction actionnewdestroyaction actionnewdestroyaction putvalue see org argouml uml ui behavior common behavior action new action create action protected object create action return model get common behavior factory create destroy action common_behavior actionnewaction createaction createaction getcommonbehaviorfactory createdestroyaction return returns the singleton public static action new destroy action get instance return singleton actionnewdestroyaction getinstance public static action new action get button instance action new action a new action new destroy action public void action performed action event e object target target manager get instance get model target if model get facade isa transition target return set target target super action performed e a put value short description a get value action name object icon resource loader wrapper lookup icon resource destroy action a put value small icon icon a put value role roles effect return a actionnewaction getbuttoninstance actionnewaction actionnewdestroyaction actionperformed actionevent targetmanager getinstance getmodeltarget getfacade isatransition settarget actionperformed putvalue short_description getvalue resourceloaderwrapper lookupiconresource destroyaction putvalue small_icon putvalue public void action performed action event e object target target manager get instance get model target if model get facade isa transition target return set target target super action performed e actionperformed actionevent targetmanager getinstance getmodeltarget getfacade isatransition settarget actionperformed constructor param n the name of the element param a the attributes public xml element string n attributes a name n attributes new attributes impl a xmlelement attributesimpl accessors return the name of this element public string get name return name getname public string get name return name param n the name of this element public void set name string n name n getname setname public void set name string n name n param t the text to be appended public void add text string t text text append t setname addtext append text to the end of the element param c character array containing the text to be appended param offset starting offset of text param len length of text to append public void add text char c int offset int len text text append c offset len addtext param t the new text public void set text string t text new string buffer t settext stringbuffer public void set text string t text new string buffer t erase the text of this element public void reset text text set length 0 settext stringbuffer resettext setlength public void reset text text set length 0 return the text of this element public string get text return text to string resettext setlength gettext tostring get the length of the text in the element return the length of the text in this element change the attributes for this element param a the new list of attributes public void set attributes attributes a attributes new attributes impl a setattributes attributesimpl param attribute the attribute name return the attribute value public string get attribute string attribute return attributes get value attribute getattribute getvalue param i the index for the list of attributes return the attribute name for the attribute at the given index public string get attribute name int i return attributes get local name i getattributename getlocalname param i the index for the list of attributes return the attribute value for the attribute at the given index public string get attribute value int i return attributes get value i getattributevalue getvalue return the number of attributes public int get num attributes return attributes get length getnumattributes getlength the constructor public cr missing oper name setup head and desc add supported decision uml decision naming set knowledge types critic kt syntax add trigger name crmissingopername setupheadanddesc addsupporteddecision umldecision setknowledgetypes kt_syntax addtrigger override public boolean predicate2 object dm designer dsgr if model get facade isa operation dm return no problem object oper dm string my name model get facade get name oper if my name null my name equals return problem found if my name length 0 return problem found return no problem getfacade isaoperation no_problem myname getfacade getname myname myname problem_found myname problem_found no_problem override public void init wizard wizard w if w instanceof wizme name to do item item to do item w get to do item object me item get offenders get 0 string ins super get instructions string sug super get default suggestion if model get facade isa operation me object a me int count 1 if model get facade get owner a null count model get facade get features model get facade get owner a size sug oper count 1 wizme name w set instructions ins wizme name w set suggestion sug initwizard wizmename todoitem todoitem gettodoitem getoffenders getinstructions getdefaultsuggestion getfacade isaoperation getfacade getowner getfacade getfeatures getfacade getowner wizmename setinstructions wizmename setsuggestion see org argouml cognitive critics critic get wizard class org argouml cognitive to do item override public class get wizard class to do item item return wizme name class getwizardclass todoitem getwizardclass todoitem wizmename public set object get criticized design materials set object ret new hash set object ret add model get meta types get operation return ret getcriticizeddesignmaterials hashset getmetatypes getoperation public class init static initializer register all appropriate critics public static void init create checklists createchecklists creat a check item an uml check item corresponding to the given key and add it to the given checklist param category to add the item to param key to get the localized string param checklist to add the item to private static void new check item string category string key checklist checklist check item checkitem new uml check item category translator localize key checklist add checkitem umlcheckitem newcheckitem checkitem umlcheckitem create all check lists p this is the new implementation and a change from the old implementation in that the source code i e this function contains knowledge on what to check p the purpose of this is to allow the argouml project to jointly develop the knowledge database and let the internationalizations be just internationalizations p when adding a new check list or an item to an existing check list you will have to ol li add the lines in this function li add the tags for the new items to the i18n property file checklist properties li notify the localization teams ol private static void create checklists this function will by design contain long lists of i18n keys it might be tempting to shorten these by constructing them from the parts but please then consider that we might loose the possibility to build tools to statically check the property files against this file checklist cl string cat class cl new checklist cat translator localize checklist class naming new check item cat checklist class naming describe clearly cl new check item cat checklist class naming is noun cl new check item cat checklist class naming misinterpret cl cat translator localize checklist class encoding new check item cat checklist class encoding convert to attribute cl new check item cat checklist class encoding do just one thing cl new check item cat checklist class encoding break into parts cl cat translator localize checklist class value new check item cat checklist class value start with meaningful values cl new check item cat checklist class value convert to invariant cl new check item cat checklist class value establish invariant in constructors cl new check item cat checklist class value maintain invariant cl cat translator localize checklist class location new check item cat checklist class location move somewhere cl new check item cat checklist class location planned subclasses cl new check item cat checklist class location eliminate from model cl new check item cat checklist class location eliminates or affects something else cl cat translator localize checklist class updates new check item cat checklist class updates reasons for update cl new check item cat checklist class updates affects something else cl check manager register model get meta types getuml class cl attribute cl new checklist cat translator localize checklist attribute naming new check item cat checklist attribute naming describe clearly cl new check item cat checklist attribute naming is noun cl new check item cat checklist attribute naming misinterpret cl cat translator localize checklist attribute encoding new check item cat checklist attribute encoding is too restrictive cl new check item cat checklist attribute encoding allow impossible values cl new check item cat checklist attribute encoding combine with other cl new check item cat checklist attribute encoding break into parts cl new check item cat checklist attribute encoding is computable cl cat translator localize checklist attribute value new check item cat checklist attribute value default value cl new check item cat checklist attribute value correct default value cl new check item cat checklist attribute value is correctness checkable cl cat translator localize checklist attribute location new check item cat checklist attribute location move somewhere cl new check item cat checklist attribute location move up hierarchy cl new check item cat checklist attribute location include all cl new check item cat checklist attribute location could be eliminated cl new check item cat checklist attribute location eliminates or affects something else cl cat translator localize checklist attribute updates new check item cat checklist attribute updates reasons for update cl new check item cat checklist attribute updates affects something else cl new check item cat checklist attribute updates exists method for update cl new check item cat checklist attribute updates exists method for specific value cl check manager register model get meta types get attribute cl operation cl new checklist cat translator localize checklist operation naming new check item cat checklist operation naming describe clearly cl new check item cat checklist operation naming is verb cl new check item cat checklist operation naming misinterpret cl new check item cat checklist operation naming do just one thing cl cat translator localize checklist operation encoding new check item cat checklist operation encoding is returntype too restrictive cl new check item cat checklist operation encoding does returntype allow impossible values cl new check item cat checklist operation encoding combine with other cl new check item cat checklist operation encoding break into parts cl new check item cat checklist operation encoding break into series cl new check item cat checklist operation encoding reduce number of calls cl cat translator localize checklist operation value new check item cat checklist operation value handle all inputs cl new check item cat checklist operation value are special cases cl new check item cat checklist operation value is correctness checkable cl new check item cat checklist operation value express preconditions possible cl new check item cat checklist operation value express postconditions possible cl new check item cat checklist operation value how behave preconditions violated cl new check item cat checklist operation value how behave postconditions not achieved cl cat translator localize checklist operation location new check item cat checklist operation location move somewhere cl new check item cat checklist operation location move up hierarchy cl new check item cat checklist operation location include all cl new check item cat checklist operation location could be eliminated cl new check item cat checklist operation location eliminates or affects something else cl check manager register model get meta types get operation cl association cl new checklist cat translator localize checklist association naming new check item cat checklist association naming describe clearly cl new check item cat checklist association naming is noun cl new check item cat checklist association naming misinterpret cl cat translator localize checklist association encoding new check item cat checklist association encoding convert to attribute cl new check item cat checklist association encoding do just one thing cl new check item cat checklist association encoding break into parts cl cat translator localize checklist association value new check item cat checklist association value start with meaningful values cl new check item cat checklist association value convert to invariant cl new check item cat checklist association value establish invariant in constructors cl new check item cat checklist association value maintain invariant cl cat translator localize checklist association location new check item cat checklist association location move somewhere cl new check item cat checklist association location planned subclasses cl new check item cat checklist association location eliminate from model cl new check item cat checklist association location eliminates or affects something else cl cat translator localize checklist association updates new check item cat checklist association updates reasons for update cl new check item cat checklist association updates affects something else cl check manager register model get meta types get association cl interface cl new checklist cat translator localize checklist interface naming new check item cat checklist interface naming describe clearly cl new check item cat checklist interface naming is noun cl new check item cat checklist interface naming misinterpret cl cat translator localize checklist interface encoding new check item cat checklist interface encoding convert to attribute cl new check item cat checklist interface encoding do just one thing cl new check item cat checklist interface encoding break into parts cl cat translator localize checklist interface value new check item cat checklist interface value start with meaningful values cl new check item cat checklist interface value convert to invariant cl new check item cat checklist interface value establish invariant in constructors cl new check item cat checklist interface value maintain invariant cl cat translator localize checklist interface location new check item cat checklist interface location move somewhere cl new check item cat checklist interface location planned subclasses cl new check item cat checklist interface location eliminate from model cl new check item cat checklist interface location eliminates or affects something else cl cat tr createchecklists newcheckitem newcheckitem newcheckitem newcheckitem newcheckitem newcheckitem newcheckitem newcheckitem newcheckitem newcheckitem newcheckitem newcheckitem newcheckitem newcheckitem newcheckitem newcheckitem checkmanager getmetatypes getumlclass newcheckitem newcheckitem newcheckitem newcheckitem newcheckitem newcheckitem newcheckitem newcheckitem newcheckitem newcheckitem newcheckitem newcheckitem newcheckitem newcheckitem newcheckitem newcheckitem newcheckitem newcheckitem newcheckitem newcheckitem checkmanager getmetatypes getattribute newcheckitem newcheckitem newcheckitem newcheckitem newcheckitem newcheckitem newcheckitem newcheckitem newcheckitem newcheckitem newcheckitem newcheckitem newcheckitem newcheckitem newcheckitem newcheckitem newcheckitem newcheckitem newcheckitem newcheckitem newcheckitem newcheckitem checkmanager getmetatypes getoperation newcheckitem newcheckitem newcheckitem newcheckitem newcheckitem newcheckitem newcheckitem newcheckitem newcheckitem newcheckitem newcheckitem newcheckitem newcheckitem newcheckitem newcheckitem newcheckitem checkmanager getmetatypes getassociation newcheckitem newcheckitem newcheckitem newcheckitem newcheckitem newcheckitem newcheckitem newcheckitem newcheckitem newcheckitem newcheckitem newcheckitem newcheckitem newcheckitem create a notation settings value object with all default values p todo this class only has partial undo support basically just those members that had it as part of a previous implementation public notation settings super parent get default settings notationsettings getdefaultsettings create a notation settings object which uses the given settings as its default values note that there can be multiple levels of settings in the hierarchy public notation settings notation settings parent settings this parent parent settings notationsettings notationsettings parentsettings parentsettings todo these defaults need to be checked against historical ones private static notation settings initialize default settings notation settings settings new notation settings settings parent null settings set notation language notation default notation settings set fully handle stereotypes false settings set show association names true settings set show initial values false settings set show multiplicities false settings set show paths false settings set show properties false settings set show singular multiplicities true settings set show types true settings set show visibilities false settings set use guillemets false return settings notationsettings initializedefaultsettings notationsettings notationsettings setnotationlanguage default_notation setfullyhandlestereotypes setshowassociationnames setshowinitialvalues setshowmultiplicities setshowpaths setshowproperties setshowsingularmultiplicities setshowtypes setshowvisibilities setuseguillemets return the default settings public static notation settings get default settings return default settings notationsettings getdefaultsettings default_settings return return the notation language public string get notation language if notation language null if parent null return parent get notation language else return notation default notation return notation language getnotationlanguage notationlanguage getnotationlanguage default_notation notationlanguage param new language the notation language return true if the notation is set false if it does not exist public boolean set notation language final string new language if notation language null notation language equals new language return true todo do we care if notation find notation new language null this notation is not available return false final string old language notation language memento memento new memento public void redo notation language new language todo we can t have a global current language notation provider factory2 set current language new language public void undo notation language old language todo we can t have a global current language notation provider factory2 set current language old language do undoable memento return true newlanguage setnotationlanguage newlanguage notationlanguage notationlanguage newlanguage findnotation newlanguage oldlanguage notationlanguage notationlanguage newlanguage notationproviderfactory2 setcurrentlanguage newlanguage notationlanguage oldlanguage notationproviderfactory2 setcurrentlanguage oldlanguage doundoable memento memento new memento public void redo notation language new language todo we can t have a global current language notation provider factory2 set current language new language notationlanguage newlanguage notationproviderfactory2 setcurrentlanguage newlanguage public void undo notation language old language todo we can t have a global current language notation provider factory2 set current language old language notationlanguage oldlanguage notationproviderfactory2 setcurrentlanguage oldlanguage return returns the fully handle stereotypes setting if true it will cause notation providers to include the names of the stereotypes for an element in the editable string presented to the user public boolean is fully handle stereotypes if fully handle stereotypes set return fully handle stereotypes else if parent null return parent fully handle stereotypes else return get default settings is fully handle stereotypes fullyhandlestereotypes isfullyhandlestereotypes fullyhandlestereotypesset fullyhandlestereotypes fullyhandlestereotypes getdefaultsettings isfullyhandlestereotypes param new value the fully handle stereotypes to set if true it will cause notation providers to include the names of the stereotypes for an element in the editable string presented to the user public void set fully handle stereotypes boolean new value fully handle stereotypes new value fully handle stereotypes set true newvalue fullyhandlestereotypes setfullyhandlestereotypes newvalue fullyhandlestereotypes newvalue fullyhandlestereotypesset return returns the show singular multiplicities public boolean is show singular multiplicities if show singular multiplicities set return show singular multiplicities else if parent null return parent is show singular multiplicities return get default settings is show singular multiplicities showsingularmultiplicities isshowsingularmultiplicities showsingularmultiplicitiesset showsingularmultiplicities isshowsingularmultiplicities getdefaultsettings isshowsingularmultiplicities param showem code true code if 1 multiplicities are to be shown public void set show singular multiplicities final boolean showem if show singular multiplicities showem show singular multiplicities set return final boolean old valid show singular multiplicities set memento memento new memento public void redo show singular multiplicities showem show singular multiplicities set true public void undo show singular multiplicities showem show singular multiplicities set old valid do undoable memento setshowsingularmultiplicities showsingularmultiplicities showsingularmultiplicitiesset oldvalid showsingularmultiplicitiesset showsingularmultiplicities showsingularmultiplicitiesset showsingularmultiplicities showsingularmultiplicitiesset oldvalid doundoable final boolean old valid show singular multiplicities set memento memento new memento public void redo show singular multiplicities showem show singular multiplicities set true oldvalid showsingularmultiplicitiesset showsingularmultiplicities showsingularmultiplicitiesset public void undo show singular multiplicities showem show singular multiplicities set old valid showsingularmultiplicities showsingularmultiplicitiesset oldvalid return returns the use guillemets public boolean is use guillemets if use guillemets set return use guillemets else if parent null return parent is use guillemets return get default settings is use guillemets useguillemets isuseguillemets useguillemetsset useguillemets isuseguillemets getdefaultsettings isuseguillemets param showem code true code if guillemets are to be shown public void set use guillemets final boolean showem if use guillemets showem use guillemets set return final boolean old valid use guillemets set memento memento new memento public void redo use guillemets showem use guillemets set true public void undo use guillemets showem use guillemets set old valid do undoable memento setuseguillemets useguillemets useguillemetsset oldvalid useguillemetsset useguillemets useguillemetsset useguillemets useguillemetsset oldvalid doundoable memento memento new memento public void redo use guillemets showem use guillemets set true useguillemets useguillemetsset public void undo use guillemets showem use guillemets set old valid useguillemets useguillemetsset oldvalid return returns the show types public boolean is show types if show types set return show types else if parent null return parent is show types return get default settings is show types showtypes isshowtypes showtypesset showtypes isshowtypes getdefaultsettings isshowtypes param showem code true code if types are to be shown public void set show types final boolean showem if show types showem show types set return final boolean old valid show types set memento memento new memento public void redo show types showem show types set true public void undo show types showem show types set old valid do undoable memento setshowtypes showtypes showtypesset oldvalid showtypesset showtypes showtypesset showtypes showtypesset oldvalid doundoable memento memento new memento public void redo show types showem show types set true showtypes showtypesset public void undo show types showem show types set old valid showtypes showtypesset oldvalid return returns the show properties public boolean is show properties if show properties set return show properties else if parent null return parent is show properties return get default settings is show properties showproperties isshowproperties showpropertiesset showproperties isshowproperties getdefaultsettings isshowproperties param showem code true code if properties are to be shown public void set show properties final boolean showem if show properties showem show properties set return final boolean old valid show properties set memento memento new memento public void redo show properties showem show properties set true public void undo show properties showem show properties set old valid do undoable memento setshowproperties showproperties showpropertiesset oldvalid showpropertiesset showproperties showpropertiesset showproperties showpropertiesset oldvalid doundoable memento memento new memento public void redo show properties showem show properties set true showproperties showpropertiesset public void undo show properties showem show properties set old valid showproperties showpropertiesset oldvalid return returns the show initial values public boolean is show initial values if show initial values set return show initial values else if parent null return parent is show initial values return get default settings is show initial values showinitialvalues isshowinitialvalues showinitialvaluesset showinitialvalues isshowinitialvalues getdefaultsettings isshowinitialvalues param showem code true code if initial values are to be shown public void set show initial values final boolean showem if show initial values showem show initial values set return final boolean old valid show initial values set memento memento new memento public void redo show initial values showem show initial values set true public void undo show initial values showem show initial values set old valid do undoable memento setshowinitialvalues showinitialvalues showinitialvaluesset oldvalid showinitialvaluesset showinitialvalues showinitialvaluesset showinitialvalues showinitialvaluesset oldvalid doundoable memento memento new memento public void redo show initial values showem show initial values set true showinitialvalues showinitialvaluesset public void undo show initial values showem show initial values set old valid showinitialvalues showinitialvaluesset oldvalid return returns the show multiplicities public boolean is show multiplicities if show multiplicities set return show multiplicities else if parent null return parent is show multiplicities return get default settings is show multiplicities showmultiplicities isshowmultiplicities showmultiplicitiesset showmultiplicities isshowmultiplicities getdefaultsettings isshowmultiplicities param showem code true code if the multiplicity is to be shown public void set show multiplicities final boolean showem if show multiplicities showem show multiplicities set return final boolean old valid show multiplicities set memento memento new memento public void redo show multiplicities showem show multiplicities set true public void undo show multiplicities showem show multiplicities set old valid do undoable memento setshowmultiplicities showmultiplicities showmultiplicitiesset oldvalid showmultiplicitiesset showmultiplicities showmultiplicitiesset showmultiplicities showmultiplicitiesset oldvalid doundoable memento memento new memento public void redo show multiplicities showem show multiplicities set true showmultiplicities showmultiplicitiesset public void undo show multiplicities showem show multiplicities set old valid showmultiplicities showmultiplicitiesset oldvalid return returns the show association names public boolean is show association names if show association names set return show association names else if parent null return parent is show association names return get default settings is show association names showassociationnames isshowassociationnames showassociationnamesset showassociationnames isshowassociationnames getdefaultsettings isshowassociationnames param showem code true code if association names are to be shown public void set show association names final boolean showem if show association names showem show association names set return final boolean old valid show association names set memento memento new memento public void redo show association names showem show association names set true public void undo show association names showem show association names set old valid do undoable memento setshowassociationnames showassociationnames showassociationnamesset oldvalid showassociationnamesset showassociationnames showassociationnamesset showassociationnames showassociationnamesset oldvalid doundoable memento memento new memento public void redo show association names showem show association names set true showassociationnames showassociationnamesset public void undo show association names showem show association names set old valid showassociationnames showassociationnamesset oldvalid return returns the show visibilities public boolean is show visibilities if show visibilities set return show visibilities else if parent null return parent is show visibilities return get default settings is show visibilities showvisibilities isshowvisibilities showvisibilitiesset showvisibilities isshowvisibilities getdefaultsettings isshowvisibilities param showem code true code if visibilities are to be shown public void set show visibilities final boolean showem if show visibilities showem show visibilities set return final boolean old valid show visibilities set memento memento new memento public void redo show visibilities showem show visibilities set true public void undo show visibilities showem show visibilities set old valid do undoable memento setshowvisibilities showvisibilities showvisibilitiesset oldvalid showvisibilitiesset showvisibilities showvisibilitiesset showvisibilities showvisibilitiesset oldvalid doundoable memento memento new memento public void redo show visibilities showem show visibilities set true showvisibilities showvisibilitiesset public void undo show visibilities showem show visibilities set old valid showvisibilities showvisibilitiesset oldvalid return returns the show paths public boolean is show paths if show paths set return show paths else if parent null return parent is show paths return get default settings is show paths showpaths isshowpaths showpathsset showpaths isshowpaths getdefaultsettings isshowpaths param show paths the show paths to set public void set show paths boolean show paths this show paths show paths show paths set true showpaths showpaths setshowpaths showpaths showpaths showpaths showpathsset private void do undoable memento memento todo undo should be managed externally or we should be given an undo manager to use the project s rather than using a global one if diagram undo manager get instance is generate mementos diagram undo manager get instance add memento memento memento redo todo mark diagram project as dirty doundoable diagramundomanager getinstance isgeneratemementos diagramundomanager getinstance addmemento the constructor public spacer panel no initialization required spacerpanel the constructor param width the width param height the height see java awt component get minimum size public dimension get minimum size return new dimension w h getminimumsize getminimumsize see java awt component get preferred size public dimension get preferred size return new dimension w h getpreferredsize getpreferredsize see java awt component get size public dimension get size return new dimension w h getsize getsize see org argouml ui explorer rules perspective rule get rule name public string get rule name return translator localize misc transition target state perspectiverule getrulename getrulename public collection get children object parent if model get facade isa transition parent collection col new array list col add model get facade get target parent return col return collections empty set getchildren getfacade isatransition arraylist getfacade gettarget empty_set public set get dependencies object parent if model get facade isa transition parent set set new hash set set add parent return set return collections empty set getdependencies getfacade isatransition hashset empty_set constructor for uml extend extension combo box model public uml extend extension list model super extension umlextendextensioncomboboxmodel umlextendextensionlistmodel protected void build model list if is empty remove all elements add element model get facade get extension get target buildmodellist isempty removeallelements addelement getfacade getextension gettarget see org argouml uml ui uml combo box model2 is valid element object protected boolean is valid element object element return model get facade isa use case element umlcomboboxmodel2 isvalidelement isvalidelement getfacade isausecase the constructor public action new inner class super button new inner class put value action name translator localize button new inner class actionnewinnerclass putvalue public void action performed action event e object target target manager get instance get model target if model get facade isa classifier target object classifier m classifier target object inner model get core factory build class classifier target manager get instance set target inner super action performed e actionperformed actionevent targetmanager getinstance getmodeltarget getfacade isaclassifier mclassifier getcorefactory buildclass targetmanager getinstance settarget actionperformed construct a property panel for a comment public prop panel comment super label comment lookup icon comment add field translator localize label name get name text field uml mutable linked list umll new uml mutable linked list new uml comment annotated element list model null null umll set delete action new action delete annotated element add field translator localize label annotated elements new j scroll pane umll add separator uml text area2 text new uml text area2 new uml comment body document text set line wrap true text set rows 5 j scroll pane pane new j scroll pane text add field translator localize label comment body pane add action new action navigate container element add action new action new stereotype add action get delete action proppanelcomment lookupicon addfield getnametextfield umlmutablelinkedlist umlmutablelinkedlist umlcommentannotatedelementlistmodel setdeleteaction actiondeleteannotatedelement addfield jscrollpane addseparator umltextarea2 umltextarea2 umlcommentbodydocument setlinewrap setrows jscrollpane jscrollpane addfield addaction actionnavigatecontainerelement addaction actionnewstereotype addaction getdeleteaction constructor for uml comment body document public uml comment body document super body todo this is probably not the right location for switching off the filter newlines the setting gets lost after selecting a different model element in the diagram btw see how it is used in javax swing text plain document see issue 1812 put property filter newlines boolean false umlcommentbodydocument umlcommentbodydocument filternewlines modelelement plaindocument putproperty filternewlines see org argouml uml ui uml plain text document set property java lang string protected void set property string text model get core helper set body get target text umlplaintextdocument setproperty setproperty getcorehelper setbody gettarget see org argouml uml ui uml plain text document get property protected string get property return string model get facade get body get target umlplaintextdocument getproperty getproperty getfacade getbody gettarget class action delete annotated element extends abstract action remove element constructor public action delete annotated element super translator localize menu popup remove actiondeleteannotatedelement abstractactionremoveelement actiondeleteannotatedelement override public void action performed action event arg0 super action performed arg0 model get core helper remove annotated element get target get object to remove actionperformed actionevent actionperformed getcorehelper removeannotatedelement gettarget getobjecttoremove constructor for uml transition trigger list param data model the model public uml transition effect list uml model element list model2 data model super data model umltransitiontriggerlist datamodel umltransitioneffectlist umlmodelelementlistmodel2 datamodel datamodel see org argouml uml ui uml mutable linked list get popup menu public j popup menu get popup menu return new popup menu new action action new action roles effect this umlmutablelinkedlist getpopupmenu jpopupmenu getpopupmenu popupmenunewaction actionnewaction see org argouml ui explorer rules perspective rule get rule name public string get rule name return translator localize misc class summary perspectiverule getrulename getrulename public collection get children object parent if model get facade isa class parent array list list new array list if model get facade get attributes parent size 0 list add new attributes node parent if model get facade get association ends parent size 0 list add new associations node parent if model get facade get operations parent size 0 list add new operations node parent if has incoming dependencies parent list add new incoming dependency node parent if has out going dependencies parent list add new outgoing dependency node parent if has inheritance parent list add new inheritance node parent return list return collections empty set getchildren getfacade isaclass arraylist arraylist getfacade getattributes attributesnode getfacade getassociationends associationsnode getfacade getoperations operationsnode hasincomingdependencies incomingdependencynode hasoutgoingdependencies outgoingdependencynode hasinheritance inheritancenode empty_set public set get dependencies object parent if model get facade isa class parent set set new hash set set add parent set add all model get facade get attributes parent set add all model get facade get operations parent set add all model get facade get association ends parent set add all model get facade get supplier dependencies parent set add all model get facade get client dependencies parent set add all model get facade get generalizations parent set add all model get facade get specializations parent return set return collections empty set getdependencies getfacade isaclass hashset addall getfacade getattributes addall getfacade getoperations addall getfacade getassociationends addall getfacade getsupplierdependencies addall getfacade getclientdependencies addall getfacade getgeneralizations addall getfacade getspecializations empty_set private boolean has incoming dependencies object parent iterator incoming it model get facade get supplier dependencies parent iterator while incoming it has next abstractions are represented in the inheritance node if model get facade isa abstraction incoming it next return true return false hasincomingdependencies incomingit getfacade getsupplierdependencies incomingit hasnext getfacade isaabstraction incomingit private boolean has out going dependencies object parent iterator incoming it model get facade get client dependencies parent iterator while incoming it has next abstractions are represented in the inheritance node if model get facade isa abstraction incoming it next return true return false hasoutgoingdependencies incomingit getfacade getclientdependencies incomingit hasnext getfacade isaabstraction incomingit private boolean has inheritance object parent iterator incoming it model get facade get supplier dependencies parent iterator iterator outgoing it model get facade get client dependencies parent iterator iterator generalizations it model get facade get generalizations parent iterator iterator specializations it model get facade get specializations parent iterator if generalizations it has next return true if specializations it has next return true while incoming it has next abstractions are represented in the inheritance node if model get facade isa abstraction incoming it next return true while outgoing it has next abstractions are represented in the inheritance node if model get facade isa abstraction outgoing it next return true return false hasinheritance incomingit getfacade getsupplierdependencies outgoingit getfacade getclientdependencies generalizationsit getfacade getgeneralizations specializationsit getfacade getspecializations generalizationsit hasnext specializationsit hasnext incomingit hasnext getfacade isaabstraction incomingit outgoingit hasnext getfacade isaabstraction outgoingit the constructor deprecated by for 0 27 4 by tfmorris use link fig node association object rectangle diagram settings suppress warnings deprecation deprecated public fig node association super init figs fignodeassociation diagramsettings suppresswarnings fignodeassociation initfigs private void init figs set editable false set big port new fig diamond 0 0 70 70 debug color debug color head new fig diamond 0 0 70 70 line color fill color get name fig set filled false get name fig set line width 0 the following does not seem to work centered the fig instead get name fig set justification by name center get stereotype fig set bounds x 10 y name fig height 1 0 name fig height get stereotype fig set filled false get stereotype fig set line width 0 add figs to the fig node in back to front order add fig get big port add fig head if model get facade isa association class get owner add fig get name fig add fig get stereotype fig set blink ports false make port invisible unless mouse enters rectangle r get bounds set bounds r set resizable true initfigs seteditable setbigport figdiamond debug_color debug_color figdiamond line_color fill_color getnamefig setfilled getnamefig setlinewidth getnamefig setjustificationbyname getstereotypefig setbounds name_fig_height name_fig_height getstereotypefig setfilled getstereotypefig setlinewidth fignode addfig getbigport addfig getfacade isaassociationclass getowner addfig getnamefig addfig getstereotypefig setblinkports getbounds setbounds setresizable the constructor param gm the graphmodel param node the owner uml association deprecated by for 0 27 4 by tfmorris use link fig node association object rectangle diagram settings suppress warnings deprecation deprecated public fig node association suppress warnings unused graph model gm object node this set owner node fignodeassociation diagramsettings suppresswarnings fignodeassociation suppresswarnings graphmodel setowner construct a new fig node association param owner owning uml element param bounds position and size param settings render settings public fig node association object owner rectangle bounds diagram settings settings super owner bounds settings init figs fignodeassociation fignodeassociation diagramsettings initfigs override public object clone fig node association fig clone fig node association super clone iterator it fig clone get figs iterator fig clone set big port fig diamond it next fig clone head fig diamond it next fig clone set name fig fig text it next return fig clone fignodeassociation figclone fignodeassociation figclone getfigs figclone setbigport figdiamond figclone figdiamond figclone setnamefig figtext figclone called when a model event is received from model subsystem handles when a n ary association becomes a binary association param mee the event override protected void update layout uml change event mee super update layout mee if mee get source get owner mee instanceof remove association event connection equals mee get property name model get facade get connections get owner size 2 reduce to binary updatelayout umlchangeevent updatelayout getsource getowner removeassociationevent getpropertyname getfacade getconnections getowner reducetobinary called when deletion of an association end reduces the number of ends of an association down to only two this fig which represent the diamond node of a n ary association needs to be replaced by a fig association representing the binary relationship private void reduce to binary final object association get owner assert model get facade get connections association size 2 detach any non associationend edges such as comment edges already attached before this association node is removed they ll later be re attached to the new fig association final collection fig edge existing edges get edges for iterator fig edge it existing edges iterator it has next fig edge edge it next if edge instanceof fig association end it remove else remove fig edge edge now we can remove ourself which will also remove the attached association ends edges final layer perspective lay layer perspective get layer final mutable graph model gm mutable graph model lay get graph model gm remove node association remove from diagram create the new fig association edge to replace the node final graph edge renderer renderer lay get graph edge renderer final fig association fig edge fig association renderer get fig edge for gm lay association null lay add fig edge gm add edge association add the non associationend edges such as comment edges that were originally attached to this and attach them to the new fig association and make sure they are positioned correctly for fig edge edge existing edges fig edge make edge port if edge get dest fig node this edge set dest fig node fig edge get edge port edge set dest port fig fig edge get edge port if edge get source fig node this edge set source fig node fig edge get edge port edge set source port fig fig edge get edge port fig edge compute route figassociation reducetobinary getowner getfacade getconnections figassociation figedge existingedges getedges figedge existingedges hasnext figedge figassociationend removefigedge layerperspective layerperspective getlayer mutablegraphmodel mutablegraphmodel getgraphmodel removenode removefromdiagram figassociation graphedgerenderer getgraphedgerenderer figassociation figedge figassociation getfigedgefor figedge addedge figassociation figedge existingedges figedge makeedgeport getdestfignode setdestfignode figedge getedgeport setdestportfig figedge getedgeport getsourcefignode setsourcefignode figedge getedgeport setsourceportfig figedge getedgeport figedge computeroute see org tigris gef presentation fig get gravity points override public list get gravity points return get big port get gravity points getgravitypoints getgravitypoints getbigport getgravitypoints see org tigris gef presentation fig set line color java awt color override public void set line color color col head set line color col setlinecolor setlinecolor setlinecolor see org tigris gef presentation fig get line color override public color get line color return head get line color getlinecolor getlinecolor getlinecolor see org tigris gef presentation fig set fill color java awt color override public void set fill color color col head set fill color col setfillcolor setfillcolor setfillcolor see org tigris gef presentation fig get fill color override public color get fill color return head get fill color getfillcolor getfillcolor getfillcolor see org tigris gef presentation fig set filled boolean override public void set filled boolean f setfilled setfilled override public boolean is filled return true isfilled see org tigris gef presentation fig set line width int override public void set line width int w head set line width w setlinewidth setlinewidth setlinewidth see org tigris gef presentation fig get line width override public int get line width return head get line width getlinewidth getlinewidth getlinewidth override protected void set standard bounds int x int y int w int h rectangle old bounds get bounds rectangle nm get name fig get bounds center the name fig since center justification does not seem to work get name fig set bounds x w nm width 2 y h 2 nm height 2 nm width nm height todo replace magic numbers with constants if get stereotype fig is visible todo test this get stereotype fig set bounds x y h 2 20 w 15 int stereotype height get stereotype fig get minimum size height get stereotype fig set bounds x y w stereotype height head set bounds x y w h get big port set bounds x y w h calc bounds x x y y w w h h fire prop change bounds old bounds get bounds update edges setstandardbounds oldbounds getbounds getnamefig getbounds namefig getnamefig setbounds getstereotypefig isvisible getstereotypefig setbounds stereotypeheight getstereotypefig getminimumsize getstereotypefig setbounds stereotypeheight setbounds getbigport setbounds calcbounds _x _y _w _h firepropchange oldbounds getbounds updateedges override public dimension get minimum size dimension a size get name fig get minimum size if get stereotype fig is visible dimension stereo min get stereotype fig get minimum size a size width math max a size width stereo min width a size height stereo min height a size width math max 70 a size width int size math max a size width a size height a size width size a size height size return a size getminimumsize asize getnamefig getminimumsize getstereotypefig isvisible stereomin getstereotypefig getminimumsize asize asize stereomin asize stereomin asize asize asize asize asize asize asize remove entire composite fig from diagram discover the attached fig edge association class and the fig class association class attached to that remove them from the diagram before removing this override protected void remove from diagram impl fig edge association class fig edge link null final list edges get fig edges if edges null for iterator it edges iterator it has next fig edge link null object o it next if o instanceof fig edge association class fig edge link fig edge association class o if fig edge link null fig node fig class box fig edge link get dest fig node if fig class box instanceof fig class association class fig class box fig edge link get source fig node fig edge link remove from diagram impl fig class association class fig class box remove from diagram impl super remove from diagram impl figedgeassociationclass figclassassociationclass removefromdiagramimpl figedgeassociationclass figedgelink getfigedges hasnext figedgelink figedgeassociationclass figedgelink figedgeassociationclass figedgelink fignode figclassbox figedgelink getdestfignode figclassbox figclassassociationclass figclassbox figedgelink getsourcefignode figedgelink removefromdiagramimpl figclassassociationclass figclassbox removefromdiagramimpl removefromdiagramimpl constructor for uml classifier association end list model public uml classifier association end list model super association model get meta types get association umlclassifierassociationendlistmodel umlclassifierassociationendlistmodel getmetatypes getassociation protected void build model list if get target null set all elements model get facade get association ends get target buildmodellist gettarget setallelements getfacade getassociationends gettarget see org argouml uml ui uml model element list model2 is valid element object protected boolean is valid element object element return model get facade get association ends get target contains element umlmodelelementlistmodel2 isvalidelement isvalidelement getfacade getassociationends gettarget param uml message the uml message object public abstract message notation uml object uml message super uml message parameter custom sep init parameter separators umlmessage abstractmessagenotationuml umlmessage umlmessage parametercustomsep initparameterseparators protected string to string final object uml message boolean show sequence numbers iterator it collection uml predecessors object uml action object uml activator this is a message uml object msg ptr ptr int lpn supported format predecessors number action the 3 parts of the string to generate string builder predecessors new string builder includes the string number the seq expr from the header javadoc the is not included in number it is always present string action if uml message null return ptr new msg ptr lpn rec count predecessors uml message ptr 1 uml activator model get facade get activator uml message uml predecessors model get facade get predecessors uml message it uml predecessors null uml predecessors iterator null if it null it has next msg ptr ptr2 new msg ptr int precnt 0 while it has next object msg m message it next int mpn rec count predecessors msg ptr2 1 if mpn lpn 1 uml activator model get facade get activator msg model get facade get predecessors msg size 2 ptr2 message null count successors ptr2 message 2 continue if predecessors length 0 predecessors append predecessors append generate message number msg ptr2 message mpn precnt if precnt 0 predecessors append number generate message number uml message ptr message lpn uml action model get facade get action uml message if uml action null if model get facade get recurrence uml action null number generate recurrence model get facade get recurrence uml action number todo the recurrence goes in front of the action does this not contradict the header java doc action notation utility uml generate action sequence uml action if equals action action trim starts with if the script of the action is empty or only specifies arguments and no method name then we generate a string based on a different model element action get initiator of action uml action if equals action this may return null string n model get facade get name uml message if n null action n else if action ends with dirty fix for issue 1758 needs to be amended when we start supporting parameters action action if show sequence numbers return action return predecessors number action tostring umlmessage showsequencenumbers umlpredecessors umlaction umlactivator msgptr stringbuilder stringbuilder seq_expr umlmessage msgptr reccountpredecessors umlmessage umlactivator getfacade getactivator umlmessage umlpredecessors getfacade getpredecessors umlmessage umlpredecessors umlpredecessors hasnext msgptr msgptr hasnext mmessage reccountpredecessors umlactivator getfacade getactivator getfacade getpredecessors countsuccessors generatemessagenumber generatemessagenumber umlmessage umlaction getfacade getaction umlmessage umlaction getfacade getrecurrence umlaction generaterecurrence getfacade getrecurrence umlaction javadoc notationutilityuml generateactionsequence umlaction startswith getinitiatorofaction umlaction getfacade getname umlmessage endswith showsequencenumbers protected string get initiator of action object uml action string result if model get facade isa call action uml action object uml operation model get facade get operation uml action if model get facade isa operation uml operation string builder sb new string builder model get facade get name uml operation if sb length 0 sb append result sb to string else if model get facade isa send action uml action object uml signal model get facade get signal uml action if model get facade isa signal uml signal string n model get facade get name uml signal if n null result n return result getinitiatorofaction umlaction getfacade isacallaction umlaction umloperation getfacade getoperation umlaction getfacade isaoperation umloperation stringbuilder stringbuilder getfacade getname umloperation tostring getfacade isasendaction umlaction umlsignal getfacade getsignal umlaction getfacade isasignal umlsignal getfacade getname umlsignal protected list custom separator init parameter separators list custom separator separators new array list custom separator separators add my tokenizer single quoted separator separators add my tokenizer double quoted separator separators add my tokenizer paren expr string separator return separators customseparator initparameterseparators customseparator arraylist customseparator mytokenizer single_quoted_separator mytokenizer double_quoted_separator mytokenizer paren_expr_string_separator public void parse final object uml message final string text try parse message uml message text catch parse exception pe final string msg statusmsg bar error parsing message final object args pe get localized message integer value of pe get error offset argo event pump fire event new argo help event argo event types help changed this translator message format msg args umlmessage parsemessage umlmessage parseexception getlocalizedmessage valueof geterroroffset argoeventpump fireevent argohelpevent argoeventtypes help_changed messageformat public string get parsing help return parsing help fig message getparsinghelp generate the intno of the given message p if the predecessor of the given message has only one successor then we return the string representation of the given integer p if the predecessor of the given message has more than one successor then this is a case of parallel execution of messages e g message 3 1a and message 3 1b are concurrent within activation 3 1 hence in this case we use a syntax like 1a 1b 1c this means that the first successor in the ordered list of successors that has more than one entry will get the postfix a the second b etc todo document exceptional behaviour param uml message the uml message object to generate the sequence number for param uml predecessor the immediate predecessor message uml object that has the given message as successor param position the integer position of the given message within its sequence return the generated sequence expression string or null if the given message was null protected string generate message number object uml message object uml predecessor int position iterator it string activator int no object uml activator int subpos 0 submax 1 if uml message null return null uml activator model get facade get activator uml message if uml activator null activator int no generate message number uml activator activator int no is now guaranteed not null if uml predecessor null get the ordered list of immediate successors collection c model get facade get successors uml predecessor submax c size it c iterator while it has next it next uml message subpos string builder result new string builder activator int no if activator int no length 0 result append result append position if submax 1 result append char a subpos return result to string umlmessage umlpredecessor generatemessagenumber umlmessage umlpredecessor activatorintno umlactivator umlmessage umlactivator getfacade getactivator umlmessage umlactivator activatorintno generatemessagenumber umlactivator activatorintno umlpredecessor getfacade getsuccessors umlpredecessor hasnext umlmessage stringbuilder stringbuilder activatorintno activatorintno tostring finds the break between message number and possibly message order return the position of the end of the number private static int find msg order break string s int i t t s length for i 0 i t i char c s char at i if c 0 c 9 break return i findmsgorderbreak charat generates the textual number of a given message called seq expr the seq expr is a string of numbers separated by points which describes the message s order and level in a collaboration p if you plan to modify this seq expr make sure that the parsing of the message is adapted accordingly to the change param message a message to generate the seq expr for return a string with the seq expr of the given message or null if the given message was null private string generate message number object message msg ptr ptr new msg ptr int pos rec count predecessors message ptr 1 return generate message number message ptr message pos seq_expr seq_expr seq_expr seq_expr seq_expr generatemessagenumber msgptr msgptr reccountpredecessors generatemessagenumber count the number of successors of the given message p successors have the same activator as the given message this activator may be null param message the uml message object return the number of successors 0 n protected int count successors object message int count 0 final object activator model get facade get activator message final collection successors model get facade get successors message if successors null for object suc successors if model get facade get activator suc activator continue count return count countsuccessors getfacade getactivator getfacade getsuccessors getfacade getactivator generates a textual description of an iteration expression param expr the given uml expression object or null return the string protected string generate recurrence object expr if expr null return return model get facade get body expr to string iterationexpression generaterecurrence getfacade getbody tostring parse a message textual description p todo this method is too complex lets break it up p param uml message the uml message object to apply any changes to param s the string to parse throws parse exception when it detects an error in the attribute string see also parse error get error offset protected void parse message object uml message string s throws parse exception string fname null the condition or iteration expression recurrence string builder guard null string param expr null string token string builder varname null list list predecessors new array list list list integer seqno null list integer currentseq new array list integer list string args null boolean must be pre false boolean must be seq false boolean parallell false boolean iterative false boolean may delete expr false boolean refind operation false boolean has predecessors false currentseq add null currentseq add null try my tokenizer st new my tokenizer s t my tokenizer paren expr string separator while st has more tokens token st next token if equals token t equals token if currentseq null if varname null fname null varname append token else if equals token if must be pre string msg parsing error message pred unqualified throw new parse exception translator localize msg st get token index must be seq true if guard null string msg parsing error message several specs throw new parse exception translator localize msg st get token index guard new string builder while true token st next token if equals token break guard append token else if equals token if must be pre string msg parsing error message pred unqualified throw new parse exception translator localize msg st get token index must be seq true if currentseq null iterative true else if equals token if currentseq null string msg parsing error message unexpected dot throw new parse exception translator localize msg st get token index if currentseq get currentseq size 2 null currentseq get currentseq size 1 null currentseq add null currentseq add null else if equals token if st has more tokens string t st next token if equals t st put token continue st put token t if must be pre string msg parsing error message pred colon throw new parse exception translator localize msg st get token index if currentseq null if currentseq size 2 currentseq get currentseq size 2 null currentseq get currentseq size 1 null currentseq remove currentseq size 1 currentseq remove currentseq size 1 seqno currentseq currentseq null may delete expr true else if equals token if st has more tokens string t st next token if equals t st put token continue st put token t if must be seq string msg parsing error message sequence slash throw new parse exception translator localize msg st get token index must be pre false must be seq true if currentseq size 2 currentseq get currentseq size 2 null currentseq get currentseq size 1 null currentseq remove currentseq size 1 currentseq remove currentseq size 1 if currentseq get currentseq size 2 null currentseq get currentseq size 1 null predecessors add currentseq currentseq new array list integer currentseq add null currentseq add null has predecessors true else if equals token if must be pre string msg parsing error message pred parallelized throw new parse exception translator localize msg st get token index must be seq true if currentseq null parallell true else if equals token if currentseq null if must be seq string msg parsing error message many numbers throw new parse exception translator localize msg st get token index must be pre true if currentseq size 2 currentseq get currentseq size 2 null currentseq get currentseq size 1 null currentseq remove currentseq size 1 currentseq remove currentseq size 1 if currentseq get currentseq size 2 null currentseq get currentseq size 1 null predecessors add currentseq currentseq new array list integer currentseq add null currentseq add null has predecessors true else if varname null fname null varname new string builder fname token fname null else if varname null fname null varname append token else string msg parsing error message found comma throw new parse exception translator localize msg st get token index else if equals token equals token if currentseq null if varname null varname new string builder fname fname else fname else if currentseq null if param expr null token char at 0 if token char at token length 1 string msg parsing error message malformed parameters throw new parse exception translator localize msg st get token index if fname null equals fname string msg parsing error message function not found throw new parse exception translator localize msg st get token index umlmessage parseexception parseerror geterroroffset parsemessage umlmessage parseexception stringbuilder paramexpr stringbuilder arraylist arraylist mustbepre mustbeseq maydeleteexpr refindoperation haspredecessors mytokenizer mytokenizer mytokenizer paren_expr_string_separator hasmoretokens nexttoken mustbepre parseexception gettokenindex mustbeseq parseexception gettokenindex stringbuilder nexttoken mustbepre parseexception gettokenindex mustbeseq parseexception gettokenindex hasmoretokens nexttoken puttoken puttoken mustbepre parseexception gettokenindex maydeleteexpr hasmoretokens nexttoken puttoken puttoken mustbeseq parseexception gettokenindex mustbepre mustbeseq arraylist haspredecessors mustbepre parseexception gettokenindex mustbeseq mustbeseq parseexception gettokenindex mustbepre arraylist haspredecessors stringbuilder parseexception gettokenindex stringbuilder paramexpr charat charat parseexception gettokenindex parseexception gettokenindex private void print debug info string s string fname string builder guard string param expr string builder varname list list predecessors list integer seqno boolean parallell boolean iterative if log is debug enabled string buffer buf new string buffer buf append parse message s n buf append message for int i 0 seqno null i 1 seqno size i 2 if i 0 buf append buf append seqno get i seqno get i 1 buf append n buf append predecessors predecessors size n for int i 0 i predecessors size i int j list v predecessors get i buf append predecessor for j 0 v null j 1 v size j 2 if j 0 buf append buf append v get j v get j 1 buf append guard guard it iterative pl parallell n buf append varname fname param expr n log debug buf printdebuginfo stringbuilder paramexpr stringbuilder isdebugenabled stringbuffer stringbuffer parsemessage paramexpr param param expr param may delete expr return protected list string parse arguments string param expr boolean may delete expr string token list string args null if param expr null my tokenizer st new my tokenizer param expr parameter custom sep args new array list string while st has more tokens token st next token if equals token if args size 0 args add null args add null else if args size 0 if token trim length 0 continue args add null string arg args get args size 1 if arg null arg arg token else arg token args set args size 1 arg else if may delete expr args new array list string return args paramexpr maydeleteexpr parsearguments paramexpr maydeleteexpr paramexpr mytokenizer mytokenizer paramexpr parametercustomsep arraylist hasmoretokens nexttoken maydeleteexpr arraylist set the predecessors of the given message param uml message the given uml message object to be adapted param predecessors the given predecessors as parsed param has predecessors true if there are some if false we do nothing throws parse exception if something is wrong with the predecessor text protected void handle predecessors object uml message list list predecessors boolean has predecessors throws parse exception predecessors used to be not implemented because it caused some problems that i ve not found an easy way to handle yet d00mst the specific problem is that the notation currently is ambiguous on second message after a thread split why not implement it anyway d00mst todo document this ambiguity and the choice made if has predecessors collection roots find candidate roots model get facade get messages model get facade get interaction uml message null null list object pre new array list object predfor for int i 0 i predecessors size i for object root roots object msg walk tree root predecessors get i if msg null msg uml message if is bad pre msg uml message msg string parse msg parsing error message one pred throw new parse exception translator localize parse msg 0 pre add msg continue predfor string parse msg parsing error message pred not found throw new parse exception translator localize parse msg 0 msg ptr ptr new msg ptr rec count predecessors uml message ptr if ptr message null pre contains ptr message pre add ptr message model get collaborations helper set predecessors uml message pre umlmessage haspredecessors parseexception handlepredecessors umlmessage haspredecessors parseexception haspredecessors findcandidateroots getfacade getmessages getfacade getinteraction umlmessage arraylist walktree umlmessage isbadpremsg umlmessage parsemsg parseexception parsemsg parsemsg parseexception parsemsg msgptr msgptr reccountpredecessors umlmessage getcollaborationshelper setpredecessors umlmessage update the model with the operation name p the given operation name is located on the receiver of the given message if an operation with the given name and a matching number of arguments is located then the call action of the message is adapted accordingly param uml message the message of which the call action is to be adapted param fname the name of the operation to be used param refind operation true if we have to set the operation of the call action throws parse exception if the operation syntax can not be parsed protected void handle operation object uml message string fname boolean refind operation throws parse exception if fname null refind operation object role model get facade get receiver uml message list ops get operation model get facade get bases role fname trim model get facade get actual arguments model get facade get action uml message size object call action model get facade get action uml message if model get facade isa call action call action if ops size 0 if there are more than one suitable operation then we pick the first one model get common behavior helper set operation call action ops get 0 else model get common behavior helper set operation call action null callaction umlmessage callaction refindoperation callaction parseexception handleoperation umlmessage refindoperation parseexception refindoperation getfacade getreceiver umlmessage getoperation getfacade getbases getfacade getactualarguments getfacade getaction umlmessage callaction getfacade getaction umlmessage getfacade isacallaction callaction getcommonbehaviorhelper setoperation callaction getcommonbehaviorhelper setoperation callaction param uml message param seqno param refind operation return throws parse exception protected boolean handle sequence number object uml message list integer seqno boolean refind operation throws parse exception int i if seqno null object m message root find the preceding message if any on either end of the association string builder pname new string builder string builder mname new string builder string gname generate message number uml message boolean swap roles false int majval 0 if seqno get seqno size 2 null majval math max seqno get seqno size 2 int value 1 0 int minval 0 if seqno get seqno size 1 null minval math max seqno get seqno size 1 int value 0 for i 0 i 1 seqno size i 2 int bv 1 if seqno get i null bv math max seqno get i int value 1 int sv 0 if seqno get i 1 null sv math max seqno get i 1 int value 0 if i 0 mname append mname append integer to string bv char a sv if i 3 seqno size if i 0 pname append pname append integer to string bv char a sv root null if pname length 0 root find msg model get facade get sender uml message pname to string if root null root find msg model get facade get receiver uml message pname to string if root null swap roles true else if has msg with activator model get facade get sender uml message null has msg with activator model get facade get receiver uml message null swap roles true if compare msg numbers mname to string gname to string do nothing else if is msg number start of gname to string mname to string string msg parsing error message subtree rooted self throw new parse exception translator localize msg 0 else if model get facade get predecessors uml message size 1 model get facade get successors uml message size 1 string msg parsing error message start end many threads throw new parse exception translator localize msg 0 else if root null pname length 0 string msg parsing error message activator not found throw new parse exception translator localize msg 0 else if swap roles model get facade get activated messages uml message size 0 model get facade get sender uml message model get facade get receiver uml message string msg parsing error message reverse direction message throw new parse exception translator localize msg 0 else disconnect the message from the call graph make copies of returned live collections since we re modifying collection c new array list model get facade get predecessors uml message collection c2 new array list model get facade get successors uml message iterator it it c2 iterator while it has next model get collaborations helper remove successor uml message it next it c iterator while it has next iterator it2 c2 iterator object pre m message it next model get collaborations helper remove predecessor uml message pre while it2 has next model get collaborations helper add predecessor it2 next pre connect the message at a new spot model get collaborations helper set activator uml message root if swap roles object m classifier role r model get facade get sender uml message model get collaborations helper set sender uml message model get facade get receiver uml message model get common behavior helper set receiver uml message r if root null c filter with activator model get facade get sent messages model get facade get sender uml message null else c model get facade get activated messages root c2 find candidate roots c root uml message it c2 iterator if c2 is empty then we re done or there is a cycle in the message graph which would be bad if c2 has more than one element then the model is crappy but we ll just use one of them anyway if majval 0 while it has next model get collaborations helper add successor uml message m message it next else if it has next object m message pre walk m message it next majval 1 false object m message post successor pre minval if post null model get collaborations helper remove predecessor post pre model get collaborations helper add predecessor post uml message insert successor pre uml message minval refind operation true return refind operation umlmessage refindoperation parseexception handlesequencenumber umlmessage refindoperation parseexception mmessage stringbuilder stringbuilder stringbuilder stringbuilder generatemessagenumber umlmessage swaproles intvalue intvalue intvalue intvalue tostring tostring findmsg getfacade getsender umlmessage tostring findmsg getfacade getreceiver umlmessage tostring swaproles hasmsgwithactivator getfacade getsender umlmessage hasmsgwithactivator getfacade getreceiver umlmessage swaproles comparemsgnumbers tostring tostring ismsgnumberstartof tostring tostring parseexception getfacade getpredecessors umlmessage getfacade getsuccessors umlmessage parseexception parseexception swaproles getfacade getactivatedmessages umlmessage getfacade getsender umlmessage getfacade getreceiver umlmessage parseexception arraylist getfacade getpredecessors umlmessage arraylist getfacade getsuccessors umlmessage hasnext getcollaborationshelper removesuccessor umlmessage hasnext mmessage getcollaborationshelper removepredecessor umlmessage hasnext getcollaborationshelper addpredecessor getcollaborationshelper setactivator umlmessage swaproles mclassifierrole getfacade getsender umlmessage getcollaborationshelper setsender umlmessage getfacade getreceiver umlmessage getcommonbehaviorhelper setreceiver umlmessage filterwithactivator getfacade getsentmessages getfacade getsender umlmessage getfacade getactivatedmessages findcandidateroots umlmessage hasnext getcollaborationshelper addsuccessor umlmessage mmessage hasnext mmessage mmessage mmessage getcollaborationshelper removepredecessor getcollaborationshelper addpredecessor umlmessage insertsuccessor umlmessage refindoperation refindoperation param uml message param args param refind operation return protected boolean handle arguments object uml message list string args boolean refind operation if args null collection c new array list model get facade get actual arguments model get facade get action uml message iterator it c iterator int ii for ii 0 ii args size ii object uml argument it has next it next null if uml argument null uml argument model get common behavior factory create argument model get common behavior helper add actual argument model get facade get action uml message uml argument refind operation true if model get facade get value uml argument null args get ii equals model get facade get body model get facade get value uml argument string value args get ii null args get ii object uml expression model get data types factory create expression get expression language value trim model get common behavior helper set value uml argument uml expression while it has next model get common behavior helper remove actual argument model get facade get action uml message it next refind operation true return refind operation umlmessage refindoperation handlearguments umlmessage refindoperation arraylist getfacade getactualarguments getfacade getaction umlmessage umlargument hasnext umlargument umlargument getcommonbehaviorfactory createargument getcommonbehaviorhelper addactualargument getfacade getaction umlmessage umlargument refindoperation getfacade getvalue umlargument getfacade getbody getfacade getvalue umlargument umlexpression getdatatypesfactory createexpression getexpressionlanguage getcommonbehaviorhelper setvalue umlargument umlexpression hasnext getcommonbehaviorhelper removeactualargument getfacade getaction umlmessage refindoperation refindoperation store the given function name and return variable name in the script of the action of the given message p constraint the given message shall have an action param uml message the given uml message object to adapt param fname the name of the function param varname the return variable name param refind operation if false then we may return true or false if true we return true return true if we stored the fname and varname in the action of the message protected boolean handle function name object uml message string fname string builder varname boolean refind operation if fname null string expr fname trim if varname length 0 expr varname to string trim expr object action model get facade get action uml message assert action null object script model get facade get script action if script null expr equals model get facade get body script object new action expression model get data types factory create action expression get expression language expr trim model get common behavior helper set script action new action expression refind operation true return refind operation umlmessage refindoperation handlefunctionname umlmessage stringbuilder refindoperation tostring getfacade getaction umlmessage getfacade getscript getfacade getbody newactionexpression getdatatypesfactory createactionexpression getexpressionlanguage getcommonbehaviorhelper setscript newactionexpression refindoperation refindoperation fill in the variable name if it is blank p the variable name is the part in front of the assignment operator param uml message the given message to fill the variable name for param varname if null then we get the variable name from the model param may delete expr if true then we may delete the variable and hence we return an empty string return the original variable name or if it was null a variable name generated from the model protected string builder fill blank variable name object uml message string builder varname boolean may delete expr if no variable name was given then retain the one in the model if varname null object script model get facade get script model get facade get action uml message if may delete expr script null string body string model get facade get body script int idx body index of if idx 0 idx body index of if idx 0 varname new string builder body substring 0 idx else varname new string builder else varname new string builder return varname umlmessage maydeleteexpr stringbuilder fillblankvariablename umlmessage stringbuilder maydeleteexpr getfacade getscript getfacade getaction umlmessage maydeleteexpr getfacade getbody indexof indexof stringbuilder stringbuilder stringbuilder fill in the function name if it is blank p the fname is the part of the script after the assignment operator param uml message the given message to fill the fname for param fname if null then we get the fname from the model param may delete expr if true then we may delete the function and hence we return an empty string return the original fname or if it was null a fname generated from the model protected string fill blank function name object uml message string fname boolean may delete expr if no function name was given then retain the one in the model if fname null object script model get facade get script model get facade get action uml message if may delete expr script null string body string model get facade get body script int idx body index of if idx 0 idx else idx body index of if idx 0 fname body substring idx 1 else fname body else fname return fname umlmessage maydeleteexpr fillblankfunctionname umlmessage maydeleteexpr getfacade getscript getfacade getaction umlmessage maydeleteexpr getfacade getbody indexof indexof store the parsed guard in the uml objects related to the given message param uml message the uml message object param guard the guard expression string param parallell true if parallel execution was indicated param iterative true if this is an iterative expression as opposed to a condition protected void handle guard object uml message string builder guard boolean parallell boolean iterative store the guard i e condition or iteration expression in the recurrence field of the action if guard null guard new string builder guard to string trim if iterative if parallell guard guard insert 0 else guard guard insert 0 object expr model get data types factory create iteration expression get expression language guard to string model get common behavior helper set recurrence model get facade get action uml message expr umlmessage handleguard umlmessage stringbuilder stringbuilder tostring getdatatypesfactory createiterationexpression getexpressionlanguage tostring getcommonbehaviorhelper setrecurrence getfacade getaction umlmessage build a call action for the given uml message if it did not have an action yet param uml message the uml message object to create an action for protected void build action object uml message if model get facade get action uml message null if there was no action yet create a call action object a model get common behavior factory create call action model get core helper add owned element model get facade get context model get facade get interaction uml message a model get collaborations helper set action uml message a callaction umlmessage buildaction umlmessage getfacade getaction umlmessage callaction getcommonbehaviorfactory createcallaction getcorehelper addownedelement getfacade getcontext getfacade getinteraction umlmessage getcollaborationshelper setaction umlmessage todo this name of the expression language should be configurable by the user p according to the uml standard the expression language should be the same for all elements in one diagram p uml is not a sensible default usually this is some pseudo language return the name of the expression language private string get expression language return getexpressionlanguage walks a call tree from a code root code node following the directions given in code path code to a destination node if the destination node cannot be reached then null is returned param root the root of the call tree param path the path to walk in the call tree return the message at the end of path or code null code private object walk tree object root list path int i for i 0 i 1 path size i 2 int bv 0 if path get i null bv math max integer path get i int value 1 0 int sv 0 if path get i 1 null sv math max integer path get i 1 int value 0 root walk root bv 1 true if root null return null if bv 0 root successor root sv if root null return null if i 3 path size iterator it find candidate roots model get facade get activated messages root root null iterator things are strange if there are more than one candidate root it has no obvious interpretation in terms of a call tree if it has next return null root m message it next return root walktree intvalue intvalue findcandidateroots getfacade getactivatedmessages hasnext mmessage finds the steps th successor of r in the sense that it is a successor of a successor of r steps times the first successor with the same activator as r is used in each step if there are not enough successors then struct determines the result if struct is true then null is returned otherwise the last successor found private object walk object m message r int steps boolean strict object m message act model get facade get activator r while steps 0 iterator it model get facade get successors r iterator do if it has next return strict null r r m message it next while model get facade get activator r act steps return r mmessage mmessage getfacade getactivator getfacade getsuccessors hasnext mmessage getfacade getactivator finds the root candidates in a collection c ie the messages in c that has the activator a may be null and has no predecessor with the same activator if veto isn t null then the message in veto will not be included in the collection of candidates param c the collection of uml message objects param a the message param veto the excluded message return the found roots private collection find candidate roots collection c object a object veto list object candidates new array list object for object message c if message veto continue if model get facade get activator message a continue collection predecessors model get facade get predecessors message boolean is candidate true for object predecessor predecessors if model get facade get activator predecessor a is candidate false if is candidate candidates add message return candidates findcandidateroots arraylist getfacade getactivator getfacade getpredecessors iscandidate getfacade getactivator iscandidate iscandidate finds the steps th successor of message r in the sense that it is a direct successor of r returns null if r has fewer successors private object successor object m message r int steps iterator it model get facade get successors r iterator while it has next steps 0 it next steps if it has next return m message it next return null mmessage getfacade getsuccessors hasnext hasnext mmessage compares two message numbers n1 n2 with each other to determine if n1 specifies a the same position as n2 in a call tree or n1 specifies a position that is a father of the position specified by n2 private boolean is msg number start of string n1 string n2 int i j len jlen len n1 length jlen n2 length i 0 j 0 for i len int ibv isv int jbv jsv ibv 0 for i len i char c n1 char at i if c 0 c 9 break ibv 10 ibv c 0 isv 0 for i len i char c n1 char at i if c a c z break isv 26 isv c a jbv 0 for j jlen j char c n2 char at j if c 0 c 9 break jbv 10 jbv c 0 jsv 0 for j jlen j char c n2 char at j if c a c z break jsv 26 jsv c a if ibv jbv isv jsv return false if i len n1 char at i return false i if j jlen n2 char at j return false j return true ismsgnumberstartof charat charat charat charat charat charat compares two message numbers with each other to see if they are equal in the sense that they refer to the same position in a call tree param n1 the first number param n2 the second number return code true code if they are the same private boolean compare msg numbers string n1 string n2 return is msg number start of n1 n2 is msg number start of n2 n1 comparemsgnumbers ismsgnumberstartof ismsgnumberstartof parses a message order specification private static int parse msg order string s int i t int v 0 t s length for i 0 i t i char c s char at i if c a c z throw new number format exception v 26 v c a return v parsemsgorder charat numberformatexception finds the message in classifier role r that has the message number written in n if it isn t found null is returned private object find msg object m classifier role r string n collection c model get facade get received messages r iterator it c iterator while it has next object msg m message it next string gname generate message number msg if compare msg numbers gname n return msg return null classifierrole findmsg mclassifierrole getfacade getreceivedmessages hasnext mmessage generatemessagenumber comparemsgnumbers examines a collection to see if any message has the given message as an activator param r m classifier role param m m message private boolean has msg with activator object r object m iterator it model get facade get sent messages r iterator while it has next if model get facade get activator it next m return true return false mclassifierrole mmessage hasmsgwithactivator getfacade getsentmessages hasnext getfacade getactivator examines the call tree from chld to see if ans is an ancestor param ans m message param chld m message private boolean is bad pre msg object ans object chld while chld null if ans chld return true if is predecessor msg ans chld 100 return true chld model get facade get activator chld return false mmessage mmessage isbadpremsg ispredecessormsg getfacade getactivator examines the call tree from suc to see if pre is a predecessor this function is recursive and md specifies the maximum level of recursions allowed param pre m message param suc m message private boolean is predecessor msg object pre object suc int md iterator it model get facade get predecessors suc iterator while it has next object m m message it next if m pre return true if md 0 is predecessor msg pre m md 1 return true return false mmessage mmessage ispredecessormsg getfacade getpredecessors hasnext mmessage ispredecessormsg finds the messages in collection c that has message a as activator private collection object filter with activator collection c object m message a list object v new array list object for object msg c if model get facade get activator msg a v add msg return v filterwithactivator mmessage arraylist getfacade getactivator inserts message s as the p th successor of message m param m m message param s m message private void insert successor object m object s int p list object successors new array list object model get facade get successors m if successors size p successors add p s else successors add s model get collaborations helper set successors m successors mmessage mmessage insertsuccessor arraylist getfacade getsuccessors getcollaborationshelper setsuccessors finds all operations in a given collection of classifiers with the given name and the given number of parameters if no operation is found one is created in the first given classifier the applicable operations are returned param classifiers the collection of classifiers to search for operations param name the name of the operation to be found param params the number of parameters of the operation to be found return a list of the sought operations throws parse exception if the operation syntax can not be parsed private list get operation collection classifiers string name int params throws parse exception list object operations new array list object if name null name length 0 return operations for object clf classifiers collection oe model get facade get features clf for object operation oe if model get facade isa operation operation continue if name equals model get facade get name operation continue if params count parameters operation continue operations add operation if operations size 0 return operations iterator it classifiers iterator if it has next string builder expr new string builder name int i for i 0 i params i if i 0 expr append expr append param i 1 expr append jaap branderhorst 2002 23 09 added next lines to link parameters and operations to the figs that represent them object cls it next object return type project manager get manager get current project get default return type object op model get core factory build operation cls return type new operation notation uml op parse operation expr to string op operations add op return operations parseexception getoperation parseexception arraylist getfacade getfeatures getfacade isaoperation getfacade getname countparameters hasnext stringbuilder stringbuilder returntype projectmanager getmanager getcurrentproject getdefaultreturntype getcorefactory buildoperation returntype operationnotationuml parseoperation tostring counts the number of parameters that are not return values private int count parameters object bf int count 0 for object parameter model get facade get parameters bf if model get facade is return parameter count return count countparameters getfacade getparameters getfacade isreturn recursively count the number of predecessors of the given message and return a pointer to the first message in the chain param uml message the uml message to count the predecessors for param ptr an object to contain the returned first message return the number of messages in the chain protected int rec count predecessors object uml message msg ptr ptr int pre 0 int local 0 object m message maxmsg null object activator if uml message null ptr message null return 0 activator model get facade get activator uml message for object predecessor model get facade get predecessors uml message if model get facade get activator predecessor activator continue int p rec count predecessors predecessor null 1 if p pre pre p maxmsg predecessor local if ptr null ptr message maxmsg return math max pre local umlmessage reccountpredecessors umlmessage msgptr mmessage umlmessage getfacade getactivator umlmessage getfacade getpredecessors umlmessage getfacade getactivator reccountpredecessors public void init set up the property panels for uml elements prop panel factory element factory new element prop panel factory prop panel factory manager add prop panel factory element factory set up the property panels for other uml objects prop panel factory uml object factory new uml object prop panel factory prop panel factory manager add prop panel factory uml object factory proppanelfactory elementfactory elementproppanelfactory proppanelfactorymanager addproppanelfactory elementfactory proppanelfactory umlobjectfactory umlobjectproppanelfactory proppanelfactorymanager addproppanelfactory umlobjectfactory public list abstract argoj panel get details tabs list abstract argoj panel result new array list abstract argoj panel result add new tab props result add new tab documentation result add new tab style result add new tab src result add new tab constraints result add new tab stereotype result add new tab tagged values return result abstractargojpanel getdetailstabs abstractargojpanel arraylist abstractargojpanel tabprops tabdocumentation tabstyle tabsrc tabconstraints tabstereotype tabtaggedvalues public list gui settings tab interface get project settings tabs return collections empty list guisettingstabinterface getprojectsettingstabs emptylist public list gui settings tab interface get settings tabs return collections empty list guisettingstabinterface getsettingstabs emptylist the constructor public cr non agg data type setup head and desc add supported decision uml decision containment add supported decision uml decision class selection set knowledge types critic kt syntax crnonaggdatatype setupheadanddesc addsupporteddecision umldecision addsupporteddecision umldecision class_selection setknowledgetypes kt_syntax java lang object org argouml cognitive designer public boolean predicate2 object dm designer dsgr todo not implemented return no problem no_problem public set object get criticized design materials set object ret new hash set object ret add model get meta types get data type return ret getcriticizeddesignmaterials hashset getmetatypes getdatatype constructor deprecated by for 0 27 4 by tfmorris use link fig node instance object rectangle diagram settings suppress warnings deprecation deprecated public fig node instance super get name fig set underline true fignodeinstance diagramsettings suppresswarnings fignodeinstance getnamefig setunderline constructor which hooks the new fig into an existing uml element param gm ignored param node the uml element deprecated by for 0 27 4 by tfmorris use link fig node instance object rectangle diagram settings suppress warnings deprecation deprecated public fig node instance graph model gm object node super gm node get name fig set underline true fignodeinstance diagramsettings suppresswarnings fignodeinstance graphmodel getnamefig setunderline construct a new fig node instance param owner owning uml element param bounds position and size param settings render settings public fig node instance object owner rectangle bounds diagram settings settings super owner bounds settings get name fig set underline true fignodeinstance fignodeinstance diagramsettings getnamefig setunderline override protected int get notation provider type return notation provider factory2 type nodeinstance getnotationprovidertype notationproviderfactory2 type_nodeinstance override public object clone object clone super clone return clone see org tigris gef presentation fig make selection override public selection make selection return new selection node instance this makeselection makeselection selectionnodeinstance override public void set enclosing fig fig encloser if get owner null object nod get owner if encloser null object comp encloser get owner if model get facade isa component instance comp if model get facade get component instance nod comp model get common behavior helper set component instance nod comp super set enclosing fig encloser else if model get facade isa node comp super set enclosing fig encloser else if encloser null if is visible if we are not visible most likely we re being deleted todo this indicates a more fundamental problem that should be investigated tfm 20061230 model get facade get component instance nod null model get common behavior helper set component instance nod null super set enclosing fig encloser if get layer null element ordering figures collection contents new array list get layer get contents for object o contents if o instanceof fig edge model element fig edge model element figedge fig edge model element o figedge get layer bring to front figedge setenclosingfig getowner getowner getowner getfacade isacomponentinstance getfacade getcomponentinstance getcommonbehaviorhelper setcomponentinstance setenclosingfig getfacade isanode setenclosingfig isvisible getfacade getcomponentinstance getcommonbehaviorhelper setcomponentinstance setenclosingfig getlayer elementordering arraylist getlayer getcontents figedgemodelelement figedgemodelelement figedgemodelelement getlayer bringtofront override protected void update listeners object old owner object new owner super update listeners old owner new owner if new owner null for object classifier model get facade get classifiers new owner add element listener classifier name updatelisteners oldowner newowner updatelisteners oldowner newowner newowner getfacade getclassifiers newowner addelementlistener construct a new selection stereotype for the given fig param f the given fig public selection stereotype fig f super f selectionstereotype selectionstereotype override public void mouse entered mouse event me super mouse entered me use composite me is shift down mouseentered mouseevent mouseentered usecomposite isshiftdown override protected object get new node int index if index 0 index get button object ns model get facade get namespace get content get owner switch index case 10 object clazz model get core factory build class ns stereotype utility deal with stereotypes clazz metaclass false return clazz case 11 object st model get extension mechanisms factory create stereotype model get core helper set namespace st ns return st return null getnewnode getbutton getfacade getnamespace getcontent getowner getcorefactory buildclass stereotypeutility dealwithstereotypes getextensionmechanismsfactory createstereotype getcorehelper setnamespace override protected object get new node type int index switch index case 10 return model get meta types get class case 11 return model get meta types get stereotype return null getnewnodetype getmetatypes getclass getmetatypes getstereotype override protected object create edge above mutable graph model mgm object new node object dep super create edge above mgm new node stereotype utility deal with stereotypes dep stereotype false return dep createedgeabove mutablegraphmodel newnode createedgeabove newnode stereotypeutility dealwithstereotypes override protected icon get icons in the deployment diagram there are no generalizations if globals cur editor get graph model instanceof deployment diagram graph model return null if model get model management helper is read only get content get owner return new icon null inherit icon null null null return icons geticons deploymentdiagram cureditor getgraphmodel deploymentdiagramgraphmodel getmodelmanagementhelper isreadonly getcontent getowner inheriticon override protected string get instructions int index return instructions index base getinstructions override protected object get new edge type int index if index top return model get meta types get dependency else if index bottom return model get meta types get generalization return null getnewedgetype getmetatypes getdependency getmetatypes getgeneralization override protected boolean is reverse edge int index if index bottom return true return false isreverseedge override protected boolean is edge post process requested return use composite isedgepostprocessrequested usecomposite the constructor public action new extension point super button new extension point put value action name translator localize button new extension point actionnewextensionpoint putvalue public void action performed action event e object target target manager get instance get model target if model get facade isa use case target target manager get instance set target model get use cases factory build extension point target super action performed e actionperformed actionevent targetmanager getinstance getmodeltarget getfacade isausecase targetmanager getinstance settarget getusecasesfactory buildextensionpoint actionperformed construct a property panel for usage elements public prop panel usage super label usage lookup icon usage add field translator localize label name get name text field add field translator localize label namespace get namespace selector add separator add field translator localize label suppliers get supplier scroll add field translator localize label clients get client scroll add action new action navigate namespace add action get delete action proppanelusage lookupicon addfield getnametextfield addfield getnamespaceselector addseparator addfield getsupplierscroll addfield getclientscroll addaction actionnavigatenamespace addaction getdeleteaction loads a model xmi only from a url be advised this method has a side effect it sets uuidrefs to the model p if there is a problem with the xmi file an error is set in the get last load status field this needs to be examined by the calling function p see org argouml persistence member file persister load org argouml kernel project java io input stream public void load project project url url throws open exception load project new input source url to external form _uuidrefs getlastloadstatus memberfilepersister inputstream openexception inputsource toexternalform loads a model xmi only from an input stream be advised this method has a side effect it sets uuidrefs to the model p if there is a problem with the xmi file an error is set in the get last load status field this needs to be examined by the calling function p see org argouml persistence member file persister load org argouml kernel project java io input stream public void load project project input stream input stream throws open exception load project new input source input stream _uuidrefs getlastloadstatus memberfilepersister inputstream inputstream inputstream openexception inputsource inputstream private void load project project input source source throws open exception object mmodel null 2002 07 18 jaap branderhorst changed the loading of the projectfiles to solve hanging of argouml if a project is corrupted issue 913 created xmireader with method get errors to check if parsing went well try source set encoding argo get encoding read models source mmodel get cur model catch open exception e log error uml exception caught e throw e this should probably be inside xmi reader parse but there is another place in this source where xmi reader is used but it appears to be the nsuml xmi reader when argo xmi reader is used consistently it can be responsible for loading the listener until then do it here model get uml helper add listeners to model mmodel project add member mmodel project setuuid refs new hash map string object getuuid refs inputsource openexception geterrors setencoding getencoding readmodels getcurmodel openexception umlexception xmireader xmireader xmireader xmireader getumlhelper addlistenerstomodel addmember setuuidrefs hashmap getuuidrefs public string get main tag try return model get xmi reader get tag name catch uml exception e should never happen something s really wrong throw new runtime exception e getmaintag getxmireader gettagname umlexception runtimeexception save the project model to xmi see org argouml persistence member file persister save project member output stream public void save project member member output stream out stream throws save exception project member model pmm project member model member object model pmm get model try xmi writer xmi writer model get xmi writer model out stream application version get version uml file persister persistence version xmi writer write out stream flush catch uml exception e throw new save exception e catch io exception e throw new save exception e memberfilepersister projectmember outputstream projectmember outputstream outstream saveexception projectmembermodel projectmembermodel getmodel xmiwriter xmiwriter getxmiwriter outstream applicationversion getversion umlfilepersister persistence_version xmiwriter outstream umlexception saveexception ioexception saveexception public void parse string label string xmi extension string log info parsing an extension for label xmiextensionstring return the current model public object get cur model return cur model getcurmodel curmodel return xmi id to object map for the most recently read xmi file return the uuid public hash map string object getuuid refs return uuid refs hashmap getuuidrefs uuidrefs read an xmi file from the given url param url the url param xmi extension parser the xmi extension parser throws open exception when there is an io error public synchronized void read models url url xmi extension parser xmi extension parser throws open exception log info log info reading model url try todo what progress mgr is to be used here where does it come from input source source new input source new xmi input stream url open stream xmi extension parser 100000 null source set system id url to string read models source catch io exception ex throw new open exception ex xmiextensionparser xmiextensionparser openexception readmodels xmiextensionparser xmiextensionparser openexception progressmgr inputsource inputsource xmiinputstream openstream xmiextensionparser setsystemid tostring readmodels ioexception openexception read a xmi file from the given inputsource param source the input source the system id of the input source should be set so that it can be used to resolve external references throws open exception if an error occur while reading the source public synchronized void read models input source source throws open exception xmi reader reader null try reader model get xmi reader if configuration get boolean argo key xmi strip diagrams false reader set ignored elements new string uml diagram else reader set ignored elements null list string search path reader get search path string path list system get property org argouml model modules search path if path list null string paths path list split for string path paths if search path contains path reader add search path path reader add search path source get system id cur model null elements read reader parse source false if elements read null elements read is empty facade facade model get facade object current iterator elements elements read iterator while elements has next current elements next if facade isa model current log info loaded model facade get name current if cur model null cur model current uuid refs new hash map string object reader getxmiuuid to object map catch xmi exception ex throw new xmi format exception ex catch uml exception ex could this be some other type of internal error that we want to handle differently don t think so tfm throw new xmi format exception ex log info inputsource systemid openexception readmodels inputsource openexception xmireader getxmireader getboolean key_xmi_strip_diagrams setignoredelements setignoredelements searchpath getsearchpath pathlist getproperty modules_search_path pathlist pathlist searchpath addsearchpath addsearchpath getsystemid curmodel elementsread elementsread elementsread isempty getfacade elementsread hasnext isamodel getname curmodel curmodel uuidrefs hashmap getxmiuuidtoobjectmap xmiexception xmiformatexception umlexception xmiformatexception create and register diagrams for activity and statemachines in the model s of the project if no other diagrams are created a default class diagram will be created argouml currently requires at least one diagram for proper operation todo move to xmi file persister protected param project the project public void register diagrams project project register diagrams internal project elements read true xmifilepersister registerdiagrams registerdiagramsinternal elementsread internal method create diagrams for activity graphs and state machines it exists soley to contain common functionality from the two public methods it can be merged into its caller when the deprecated version of the public method goes away param project the project param elements collection of top level model elements to process param at least one if true forces at least one diagram to be created private void register diagrams internal project project collection elements boolean at least one facade facade model get facade collection diagrams element new array list iterator it elements iterator while it has next object element it next if facade isa model element diagrams element add all model get model management helper get all model elements of kind element model get meta types get state machine else if facade isa state machine element diagrams element add element diagram factory diagram factory diagram factory get instance it diagrams element iterator while it has next object statemachine it next object namespace facade get namespace statemachine if namespace null namespace facade get context statemachine model get core helper set namespace statemachine namespace argo diagram diagram null if facade isa activity graph statemachine log info creating activity diagram for facade getuml class name statemachine facade get name statemachine diagram diagram factory create diagram diagram type activity namespace statemachine else log info creating state diagram for facade getuml class name statemachine facade get name statemachine diagram diagram factory create diagram diagram type state namespace statemachine if diagram null project add member diagram issue 3516 make sure there is at least one diagram because argouml requires it for correct operation if at least one project get diagram count 1 argo diagram d diagram factory create diagram diagram type class cur model null project add member d if project get diagram count 1 project get active diagram null project set active diagram project get diagram list get 0 atleastone registerdiagramsinternal atleastone getfacade diagramselement arraylist hasnext isamodel diagramselement addall getmodelmanagementhelper getallmodelelementsofkind getmetatypes getstatemachine isastatemachine diagramselement diagramfactory diagramfactory diagramfactory getinstance diagramselement hasnext getnamespace getcontext getcorehelper setnamespace argodiagram isaactivitygraph getumlclassname getname diagramfactory creatediagram diagramtype getumlclassname getname diagramfactory creatediagram diagramtype addmember atleastone getdiagramcount argodiagram diagramfactory creatediagram diagramtype curmodel addmember getdiagramcount getactivediagram setactivediagram getdiagramlist return returns the elements read public collection get elements read return elements read elementsread getelementsread elementsread param elements the elements read to set public void set elements read collection elements this elements read elements elementsread setelementsread elementsread constructor that simply delegates to super param the path see the path documentation in link profile reference profile reference string url param public reference see public reference documentation in link profile reference profile reference string url public user profile reference string the path url public reference super the path public reference thepath thepath profilereference profilereference publicreference publicreference profilereference profilereference userprofilereference thepath publicreference thepath publicreference constructor which builds a profile reference for a user defined profile by prefixing the file name with link default user profile base url and using this as the public reference param path the profile absolute file name throws malformedurl exception if the built url is incorrect public user profile reference string path throws malformedurl exception super path new url default user profile base url new file path get name profilereference filename default_user_profile_base_url publicreference malformedurlexception userprofilereference malformedurlexception default_user_profile_base_url getname creates new boolean change listener param container the container of uml user interface components param property the property public uml stimulus action text field uml user interface container container uml stimulus action text property property the container container the property property get document add document listener this update booleanchangelistener umlstimulusactiontextfield umluserinterfacecontainer umlstimulusactiontextproperty thecontainer theproperty getdocument adddocumentlistener see org argouml uml ui uml user interface component target changed public void target changed the property target changed update umluserinterfacecomponent targetchanged targetchanged theproperty targetchanged see org argouml uml ui uml user interface component target reasserted public void target reasserted umluserinterfacecomponent targetreasserted targetreasserted public void property change property change event event if the property is affected event check the possibility that this is a promiscuous event object event source event get source object target the container get target if event source is unknown or the event source is the container s target then update the field if event source null event source target update propertychange propertychangeevent theproperty isaffected eventsource getsource thecontainer gettarget eventsource eventsource private void update string old text get text string new text the property get property the container if old text null new text null old text equals new text if old text new text set text new text oldtext gettext newtext theproperty getproperty thecontainer oldtext newtext oldtext newtext oldtext newtext settext newtext see javax swing event document listener changed update javax swing event document event public void changed update final document event p1 the property set property the container get text documentlistener changedupdate documentevent changedupdate documentevent theproperty setproperty thecontainer gettext see javax swing event document listener remove update javax swing event document event public void remove update final document event p1 the property set property the container get text documentlistener removeupdate documentevent removeupdate documentevent theproperty setproperty thecontainer gettext public void insert update final document event p1 the property set property the container get text insertupdate documentevent theproperty setproperty thecontainer gettext constructor deprecated for 0 27 3 by tfmorris use link fig classifier box object rectangle diagram settings suppress warnings deprecation deprecated fig classifier box super rectangle bounds get default bounds operations fig new fig operations compartment bounds x bounds y bounds width bounds height construct figs figclassifierbox diagramsettings suppresswarnings figclassifierbox getdefaultbounds operationsfig figoperationscompartment constructfigs initialization shared by all constructors private void construct figs set properties of the stereotype box make it 1 pixel higher than before so it overlaps the name box and the blanking takes out both lines initially not set to be displayed but this will be changed when we try to render it if we find we have a stereotype get stereotype fig set filled true get stereotype fig set line width line width 1 to have 1 pixel overlap with get name fig get stereotype fig set height stereoheight 1 border fig new fig empty rect x0 y0 0 0 border fig set line width line width border fig set line color line color get big port set line width 0 get big port set fill color fill color constructfigs getstereotypefig setfilled getstereotypefig setlinewidth line_width getnamefig getstereotypefig setheight borderfig figemptyrect borderfig setlinewidth line_width borderfig setlinecolor line_color getbigport setlinewidth getbigport setfillcolor fill_color private rectangle get default bounds this rectangle marks the operation section all operations are inside it rectangle bounds new rectangle default compartment bounds 2nd compartment so adjust y appropriately bounds y default compartment bounds y rowheight 1 return bounds getdefaultbounds default_compartment_bounds default_compartment_bounds construct a fig with owner bounds and settings param owner the model element that owns this fig param bounds the rectangle defining the bounds param settings the rendering settings public fig classifier box object owner rectangle bounds diagram settings settings super owner bounds settings operations fig new fig operations compartment owner get default bounds get settings construct figs figclassifierbox diagramsettings operationsfig figoperationscompartment getdefaultbounds getsettings constructfigs public object clone fig classifier box fig clone fig classifier box super clone iterator this iter this get figs iterator while this iter has next fig this fig fig this iter next if this fig operations fig fig clone operations fig fig operations compartment this fig return fig clone return fig clone figclassifierbox figclone figclassifierbox thisiter getfigs thisiter hasnext thisfig thisiter thisfig operationsfig figclone operationsfig figoperationscompartment thisfig figclone figclone updates the operations box called from update layout if there is a model event effecting the attributes and from rendering changed in all cases todo the above statement means that the entire contents of the fig operations compartment is being rebuilt whenever an add remove of an operation or a reception is detected it would be better to have fig operations compartment itself listen for add and remove events and make minimum change rather than entirely rebuild remark mvw this is a bit exaggerated since the populate method is already heavily optimised protected void update operations if is operations visible return operations fig populate set bounds get bounds damage updatelayout renderingchanged figoperationscompartment figoperationscompartment updateoperations isoperationsvisible operationsfig setbounds getbounds public void rendering changed super rendering changed todo we should be able to just call rendering changed on the child figs here instead of doing an update operations update operations renderingchanged renderingchanged renderingchanged updateoperations updateoperations we are getting events we don t want filter them out todo can we instruct the model event pump not to send these in the first place see defect 5095 param event the event public void property change property change event event if event get property name equals generalization model get facade isa generalization event get old value return else if event get property name equals association model get facade isa association end event get old value return else if event get property name equals supplier dependency model get facade isa usage event get old value return else if event get property name equals client dependency model get facade isa abstraction event get old value return super property change event propertychange propertychangeevent getpropertyname getfacade isageneralization getoldvalue getpropertyname getfacade isaassociationend getoldvalue getpropertyname supplierdependency getfacade isausage getoldvalue getpropertyname clientdependency getfacade isaabstraction getoldvalue propertychange protected void update layout uml change event event super update layout event if event instanceof association change event get owner equals event get source object o null if event instanceof add association event o event get new value else if event instanceof remove association event o event get old value if model get facade isa operation o model get facade isa reception o update operations updatelayout umlchangeevent updatelayout associationchangeevent getowner getsource addassociationevent getnewvalue removeassociationevent getoldvalue getfacade isaoperation getfacade isareception updateoperations return the fig for the operations compartment protected fig operations compartment get operations fig return operations fig figoperationscompartment getoperationsfig operationsfig get the bounds of the operations compartment return the bounds of the operations compartment public rectangle get operations bounds return operations fig get bounds getoperationsbounds operationsfig getbounds see org argouml uml diagram ui operations compartment container is operations visible public boolean is operations visible return operations fig null operations fig is visible operationscompartmentcontainer isoperationsvisible isoperationsvisible operationsfig operationsfig isvisible see org argouml uml diagram ui operations compartment container set operations visible boolean public void set operations visible boolean is visible set compartment visible operations fig is visible operationscompartmentcontainer setoperationsvisible setoperationsvisible isvisible setcompartmentvisible operationsfig isvisible public void translate int dx int dy super translate dx dy editor ce globals cur editor if ce null selection sel ce get selection manager find selection for this if sel instanceof selection class selection class sel hide buttons cureditor getselectionmanager findselectionfor selectionclass selectionclass hidebuttons build a collection of menu items relevant for a right click popup menu on an interface param me a mouse event return a collection of menu items public vector get pop up actions mouse event me vector pop up actions super get pop up actions me add argoj menu add menu build add menu pop up actions add pop up actions size get popup add offset add menu modifier pop up actions add pop up actions size get popup add offset build modifier pop up visibility pop up actions add pop up actions size get popup add offset build visibility pop up return pop up actions getpopupactions mouseevent popupactions getpopupactions argojmenu addmenu buildaddmenu popupactions popupactions getpopupaddoffset addmenu popupactions popupactions getpopupaddoffset buildmodifierpopup popupactions popupactions getpopupaddoffset buildvisibilitypopup popupactions protected argoj menu build show pop up argoj menu show menu super build show pop up iterator i action compartment display get actions iterator while i has next show menu add action i next return show menu argojmenu buildshowpopup argojmenu showmenu buildshowpopup actioncompartmentdisplay getactions hasnext showmenu showmenu protected argoj menu build add menu argoj menu add menu new argoj menu menu popup add action add operation new action add operation add operation set enabled is single target add menu insert add operation 0 add menu add new action add note add menu add action edges display get show edges add menu add action edges display get hide edges return add menu argojmenu buildaddmenu argojmenu addmenu argojmenu addoperation actionaddoperation addoperation setenabled issingletarget addmenu addoperation addmenu actionaddnote addmenu actionedgesdisplay getshowedges addmenu actionedgesdisplay gethideedges addmenu used by pgml tee return the class name and bounds together with compartment visibility public string class name and bounds return super class name and bounds operations visible is operations visible classnameandbounds classnameandbounds operationsvisible isoperationsvisible protected object build modifier pop up return build modifier pop up abstract leaf root buildmodifierpopup buildmodifierpopup constructor for fig state deprecated for 0 27 3 by mvw use link fig state object rectangle diagram settings suppress warnings deprecation deprecated public fig state super initialize state figstate figstate diagramsettings suppresswarnings figstate initializestate constructor for fig state used when an uml elm already exists param gm ignored param node the uml element deprecated for 0 27 3 by mvw use link fig state object rectangle diagram settings deprecated public fig state suppress warnings unused graph model gm object node this set owner node figstate figstate diagramsettings figstate suppresswarnings graphmodel setowner constructor used by pgml parser param owner the owning uml element param bounds rectangle describing bounds param settings rendering settings public fig state object owner rectangle bounds diagram settings settings super owner bounds settings initialize state notation name notation notation find notation get notation settings get notation language notation provider body notation provider factory2 get instance get notation provider notation provider factory2 type statebody get owner this notation figstate diagramsettings initializestate notationname findnotation getnotationsettings getnotationlanguage notationproviderbody notationproviderfactory2 getinstance getnotationprovider notationproviderfactory2 type_statebody getowner private void initialize state todo get rid of magic numbers figure out which represent line widths vs padding vs offsets set big port new figr rect get initialx 1 get initialy 1 get initial width 2 get initial height 2 debug color debug color get name fig set line width 0 get name fig set bounds get initialx 2 get initialy 2 get initial width 4 get name fig get bounds height get name fig set filled false internal new fig text get initialx 2 get initialy 2 name fig height 4 get initial width 4 get initial height get initialy 2 name fig height 4 internal set font get settings get font font plain internal set text color text color internal set line width 0 internal set filled false internal set expand only true internal set return action fig text insert internal set justification fig text justify left initializestate setbigport figrrect getinitialx getinitialy getinitialwidth getinitialheight debug_color debug_color getnamefig setlinewidth getnamefig setbounds getinitialx getinitialy getinitialwidth getnamefig getbounds getnamefig setfilled figtext getinitialx getinitialy name_fig_height getinitialwidth getinitialheight getinitialy name_fig_height setfont getsettings getfont settextcolor text_color setlinewidth setfilled setexpandonly setreturnaction figtext setjustification figtext justify_left suppress warnings deprecation deprecated override public void set owner object new owner super set owner new owner rendering changed suppresswarnings setowner newowner setowner newowner renderingchanged override protected void init notation providers object own if notation provider body null notation provider body clean listener this own super init notation providers own notation name notation notation find notation get notation settings get notation language if model get facade isa state own notation provider body notation provider factory2 get instance get notation provider notation provider factory2 type statebody own this notation initnotationproviders notationproviderbody notationproviderbody cleanlistener initnotationproviders notationname findnotation getnotationsettings getnotationlanguage getfacade isastate notationproviderbody notationproviderfactory2 getinstance getnotationprovider notationproviderfactory2 type_statebody protected void model changed property change event mee super model changed mee if mee instanceof association change event mee instanceof attribute change event rendering changed notation provider body update listener this get owner mee damage modelchanged propertychangeevent modelchanged associationchangeevent attributechangeevent renderingchanged notationproviderbody updatelistener getowner override public void remove from diagram impl if notation provider body null notation provider body clean listener this get owner super remove from diagram impl removefromdiagramimpl notationproviderbody notationproviderbody cleanlistener getowner removefromdiagramimpl override public void rendering changed super rendering changed object state get owner if state null return if notation provider body null internal set text notation provider body to string get owner get notation settings calc bounds set bounds get bounds renderingchanged renderingchanged getowner notationproviderbody settext notationproviderbody tostring getowner getnotationsettings calcbounds setbounds getbounds return the initial x protected abstract int get initialx getinitialx protected abstract int get initialx return the initial y protected abstract int get initialy getinitialx getinitialy protected abstract int get initialy return the initial width protected abstract int get initial width getinitialy getinitialwidth protected abstract int get initial width return the initial height protected abstract int get initial height getinitialwidth getinitialheight param the internal the internal to set protected void set internal fig text the internal this internal the internal theinternal setinternal figtext theinternal theinternal return returns the internal protected fig text get internal return internal figtext getinternal override protected void text edit started fig text ft super text edit started ft if ft internal show help notation provider body get parsing help texteditstarted figtext texteditstarted showhelp notationproviderbody getparsinghelp override public void text edited fig text ft throws property veto exception super text edited ft if ft get internal object st get owner if st null return notation provider body parse get owner ft get text ft set text notation provider body to string get owner get notation settings textedited figtext propertyvetoexception textedited getinternal getowner notationproviderbody getowner gettext settext notationproviderbody tostring getowner getnotationsettings see org argouml uml diagram ui fig node model element update font override protected void update font super update font font f get settings get font font plain internal set font f fignodemodelelement updatefont updatefont updatefont getsettings getfont setfont the constructor public prop paneluml state diagram super translator localize label state chart diagram lookup icon state diagram proppanelumlstatediagram lookupicon statediagram this function returns the documentation in c style comment format param o the model element param indent the current indentation for new lines return the documentation as a string public static string get docs object o string indent return get docs o indent modelelement getdocs getdocs param o the model element param indent the current indentation for new lines param header is the first line param prefix is inserted at every line before the doc param footer is the closing line return the string that represents the documentation for the given model element public static string get docs object o string indent string header string prefix string footer string s result default for o indent if model get facade isa model element o iterator iter model get facade get tagged values o if iter null while iter has next object tv iter next string tag model get facade get tag of tag tv if argo documentation tag equals tag argo documentation tag alt equals tag s result model get facade get value of tag tv give priority to standard documentation tag if argo documentation tag equals tag break if s result null return no comment string buffer result new string buffer if header null result append header append line separator if indent null if prefix null prefix indent prefix if footer null footer indent footer append comment result prefix s result 0 if footer null result append footer return result to string modelelement modelelement getdocs sresult defaultfor getfacade isamodelelement getfacade gettaggedvalues hasnext getfacade gettagoftag documentation_tag documentation_tag_alt sresult getfacade getvalueoftag documentation_tag sresult stringbuffer stringbuffer line_separator appendcomment sresult tostring param o the model element if it is not a model element then you ll get a illegal argument exception param s the string representing the documentation public static void set docs object o string s object tagged value model get facade get tagged value o argo documentation tag if tagged value null tagged value model get extension mechanisms factory build tagged value argo documentation tag s model get extension mechanisms helper add tagged value o tagged value else model get extension mechanisms helper set value of tag tagged value s modelelement modelelement illegalargumentexception setdocs taggedvalue getfacade gettaggedvalue documentation_tag taggedvalue taggedvalue getextensionmechanismsfactory buildtaggedvalue documentation_tag getextensionmechanismshelper addtaggedvalue taggedvalue getextensionmechanismshelper setvalueoftag taggedvalue determine whether documentation is associated with the given element or not added 2001 10 05 steffen zschaler for use by org argouml language java generator code generator param o the given element return true if the given element has docs public static boolean has docs object o if model get facade isa model element o iterator i model get facade get tagged values o if i null while i has next object tv i next string tag model get facade get tag of tag tv string value model get facade get value of tag tv if argo documentation tag equals tag argo documentation tag alt equals tag value null value trim length 0 return true return false codegenerator hasdocs getfacade isamodelelement getfacade gettaggedvalues hasnext getfacade gettagoftag getfacade getvalueoftag documentation_tag documentation_tag_alt generate default documentation param o the model element param indent the current indentation string for new lines return the default documentation public static string default for object o string indent if model get facade isa class o todo needs localization return a class that represents n n indent see other classes n indent author your name here if model get facade isa attribute o return an attribute that represents if model get facade isa operation o return an operation that does n n indent param first param a description of this parameter if model get facade isa interface o return an interface defining operations expected of n n indent see other classes n indent author your name here if model get facade isa model element o return n return null modelelement defaultfor getfacade isaclass otherclasses your_name_here getfacade isaattribute getfacade isaoperation firstparam getfacade isainterface otherclasses your_name_here getfacade isamodelelement get the comments the notes in a diagram for a modelelement p this returns a c style comments param o the modelelement return a string public static string get comments object o return get comments o getcomments getcomments get the comments the notes in a diagram for a modelelement return a string with the comments param o the given modelelement param header is the comment header param prefix is the comment prefix on every line param footer is the comment footer public static string get comments object o string header string prefix string footer string buffer result new string buffer if header null result append header append line separator if model get facade isauml element o collection comments model get facade get comments o if comments is empty int nlcount 2 for iterator iter comments iterator iter has next object c iter next string s model get facade get name c nlcount append comment result prefix s nlcount 1 0 1 else return else return if footer null result append footer append line separator return result to string getcomments stringbuffer stringbuffer line_separator getfacade isaumlelement getfacade getcomments isempty hasnext getfacade getname appendcomment line_separator tostring append a string to sb which is chopped into lines and each line prefixed with prefix param sb the string buffer to append to param prefix the prefix to each line param comment the text to reformat param nlprefix the number of empty lines to prefix the comment with return the number of pending empty lines private static int append comment string buffer sb string prefix string comment int nlprefix int nlcount 0 for nlprefix 0 nlprefix if prefix null sb append prefix sb append line separator nlcount if comment null return nlcount my tokenizer tokens new my tokenizer comment my tokenizer line separator while tokens has more tokens string s tokens next token if s starts with r s starts with n if prefix null sb append prefix sb append s sb append line separator nlcount 0 else if nlcount 0 if prefix null sb append prefix sb append line separator nlcount else nlcount return nlcount stringbuffer appendcomment stringbuffer line_separator mytokenizer mytokenizer mytokenizer line_separator hasmoretokens nexttoken startswith startswith line_separator line_separator the constructor param classifier role the uml classifier role public classifier role notation uml object classifier role super classifier role classifierrole classifierrole classifierrolenotationuml classifierrole classifierrole see org argouml notation providers notation provider get parsing help public string get parsing help return parsing help fig classifierrole notationprovider getparsinghelp getparsinghelp public void parse object model element string text try parse classifier role model element text catch parse exception pe string msg statusmsg bar error parsing classifierrole object args pe get localized message integer value of pe get error offset argo event pump fire event new argo help event argo event types help changed this translator message format msg args modelelement parseclassifierrole modelelement parseexception getlocalizedmessage valueof geterroroffset argoeventpump fireevent argohelpevent argoeventtypes help_changed messageformat parses a classifier role represented by the following line of the format pre baselist base base classifier role name role baselist pre code role code and code baselist code can be given in any order p this syntax is compatible with the uml 1 3 specification formerly name base param cls the classifier role to apply any changes to param s the string to parse return the classifier role with the applied changes throws parse exception when it detects an error in the attribute string see also parse error get error offset protected object parse classifier role object cls string s throws parse exception string name null string token string role null string base null list string bases null boolean has colon false boolean has slash false try my tokenizer st new my tokenizer s t while st has more tokens token st next token if equals token t equals token do nothing else if equals token has slash true has colon false if base null if bases null bases new array list string bases add base base null else if equals token has colon true has slash false if bases null bases new array list string if base null bases add base base null else if equals token if base null if bases null bases new array list string bases add base base null else if has colon if base null string msg parsing error classifier extra test throw new parse exception translator localize msg st get token index base token else if has slash if role null string msg parsing error classifier extra test throw new parse exception translator localize msg st get token index role token else if name null string msg parsing error classifier extra test throw new parse exception translator localize msg st get token index name token catch no such element exception nsee string msg parsing error classifier unexpected end attribute throw new parse exception translator localize msg s length if base null if bases null bases new array list string bases add base todo what to do about object name if name null if role null model get core helper set name cls role trim if bases null remove bases that aren t there anymore copy can t iterate modify live collection while iterating it collection b new array list model get facade get bases cls iterator it b iterator object c object ns model get facade get namespace cls if ns null model get facade get namespace ns null ns model get facade get namespace ns else ns model get facade get model cls while it has next c it next if bases contains model get facade get name c model get collaborations helper remove base cls c it bases iterator add bases while it has next string d string it next trim iterator it2 b iterator while it2 has next c it2 next if d equals model get facade get name c continue add bases c notation utility uml get type d ns if model get facade isa collaboration model get facade get namespace c model get core helper set namespace c ns model get collaborations helper add base cls c return cls classifierrole classifierrole parseexception parseerror geterroroffset parseclassifierrole parseexception hascolon hasslash mytokenizer mytokenizer hasmoretokens nexttoken hasslash hascolon arraylist hascolon hasslash arraylist arraylist hascolon parseexception gettokenindex hasslash parseexception gettokenindex parseexception gettokenindex nosuchelementexception parseexception arraylist getcorehelper setname arraylist getfacade getbases getfacade getnamespace getfacade getnamespace getfacade getnamespace getfacade getmodel hasnext getfacade getname getcollaborationshelper removebase addbases hasnext hasnext getfacade getname addbases notationutilityuml gettype getfacade isacollaboration getfacade getnamespace getcorehelper setnamespace getcollaborationshelper addbase suppress warnings deprecation deprecated public string to string object model element map args return to string model element suppresswarnings tostring modelelement tostring modelelement private string to string object model element string name string model get facade get name model element if name string null name string name string name string trim loop through all base classes building a comma separated list string builder base string format name list model get facade get bases model element base string new string builder base string to string trim build the final string if name string length 0 name string name string if base string length 0 base string base string insert 0 return name string base string to string tostring modelelement namestring getfacade getname modelelement namestring namestring namestring namestring stringbuilder basestring formatnamelist getfacade getbases modelelement basestring stringbuilder basestring tostring namestring namestring namestring basestring basestring basestring namestring basestring tostring override public string to string object model element notation settings settings return to string model element tostring modelelement notationsettings tostring modelelement constructor for the critic sets up the resource name which will allow headline and description to be found for the current locale provides a design issue category patterns sets a priority for any to do items low and adds triggers for metaclasses stereotype structural feature and association end public cr singleton violated only private constructors setup head and desc add supported decision uml decision patterns set priority to do item med priority these may not actually make any difference at present the code behind add trigger needs more work add trigger stereotype add trigger structural feature add trigger association end structuralfeature associationend crsingletonviolatedonlyprivateconstructors setupheadanddesc addsupporteddecision umldecision setpriority todoitem med_priority addtrigger addtrigger addtrigger structuralfeature addtrigger associationend the trigger for the critic p first check we are actually stereotyped singleton or we will accept singleton p then check for a static attribute with the same type as the singleton class that will hold the instance of the singleton class when its created p param dm the link java lang object object to be checked against the critic param dsgr the link org argouml cognitive designer designer creating the model not used this is for future development of argouml return link problem found problem found if the critic is triggered otherwise link no problem no problem public boolean predicate2 object dm designer dsgr only look at classes if model get facade isa class dm return no problem we only look at singletons if model get facade is singleton dm return no problem iterator operations model get facade get operations dm iterator while operations has next object o operations next if model get facade is constructor o continue if model get facade is private o return problem found return no problem problem_found problem_found no_problem no_problem getfacade isaclass no_problem getfacade issingleton no_problem getfacade getoperations hasnext getfacade isconstructor getfacade isprivate problem_found no_problem the constructor public cr wrong dep ends setup head and desc add supported decision uml decision patterns crwrongdepends setupheadanddesc addsupporteddecision umldecision override public boolean predicate2 object dm designer dsgr if dm instanceof uml deployment diagram return no problem uml deployment diagram dd uml deployment diagram dm list set offs compute offenders dd if offs null return no problem return problem found umldeploymentdiagram no_problem umldeploymentdiagram umldeploymentdiagram listset computeoffenders no_problem problem_found override public to do item to do item object dm designer dsgr uml deployment diagram dd uml deployment diagram dm list set offs compute offenders dd return new uml to do item this offs dsgr todoitem todoitem umldeploymentdiagram umldeploymentdiagram listset computeoffenders umltodoitem override public boolean still valid to do item i designer dsgr if is active return false list set offs i get offenders uml deployment diagram dd uml deployment diagram offs get 0 if predicate dm dsgr return false list set new offs compute offenders dd boolean res offs equals new offs return res stillvalid todoitem isactive listset getoffenders umldeploymentdiagram umldeploymentdiagram listset newoffs computeoffenders newoffs if there are deps that are going from inside a fig component to inside a fig component instance the returned vector set is not null then in the vector set are the uml deployment diagram and all fig dependencies with this characteristic and their fig objects described over the supplier and client param dd the diagram to check return the set of offenders public list set compute offenders uml deployment diagram dd collection figs dd get layer get contents list set offs null for object obj figs if obj instanceof fig dependency continue fig dependency fig dependency fig dependency obj if model get facade isa dependency fig dependency get owner continue object dependency fig dependency get owner collection suppliers model get facade get suppliers dependency int count 0 if suppliers null for object moe suppliers if model get facade isa object moe object obj sup moe if model get facade get element residences obj sup null model get facade get element residences obj sup size 0 count 2 if model get facade get component instance obj sup null count collection clients model get facade get clients dependency if clients null clients size 0 for object moe clients if model get facade isa object moe object obj cli moe if model get facade get element residences obj cli null model get facade get element residences obj cli size 0 count 2 if model get facade get component instance obj cli null count if count 3 if offs null offs new list set offs add dd offs add fig dependency offs add fig dependency get source port fig offs add fig dependency get dest port fig return offs figcomponent figcomponentinstance umldeploymentdiagram figdependencies figobjects listset computeoffenders umldeploymentdiagram getlayer getcontents listset figdependency figdependency figdependency figdependency getfacade isadependency figdependency getowner figdependency getowner getfacade getsuppliers getfacade isaobject objsup getfacade getelementresidences objsup getfacade getelementresidences objsup getfacade getcomponentinstance objsup getfacade getclients getfacade isaobject objcli getfacade getelementresidences objcli getfacade getelementresidences objcli getfacade getcomponentinstance objcli listset figdependency figdependency getsourceportfig figdependency getdestportfig glass pane constructor comment param component a protected glass pane component component add adapters that do nothing for keyboard and mouse actions add mouse listener new mouse adapter public void mouse clicked mouse event e add key listener new key adapter set active component component glasspane glasspane addmouselistener mouseadapter mouseclicked mouseevent addkeylistener keyadapter setactivecomponent add adapters that do nothing for keyboard and mouse actions add mouse listener new mouse adapter public void mouse clicked mouse event e addmouselistener mouseadapter mouseclicked mouseevent receives all key events in the awt and processes the ones that originated from the current window with the glass pane param event the awt event that was fired public void event dispatched awt event event object source event get source discard the event if its source is not from the correct type boolean source is component event get source instanceof component if event instanceof key event event getid key event key released source is component if the event originated from the window w glass pane consume the event if swing utilities window for component component source the window key event event consume toolkit get default toolkit beep awtevent eventdispatched awtevent getsource sourceiscomponent getsource keyevent keyevent key_released sourceiscomponent swingutilities windowforcomponent thewindow keyevent getdefaulttoolkit finds the glass pane that is related to the specified component param start component the component used to start the search for the glass pane param create a flag whether to create a glass pane if one does not exist return glass pane public static synchronized glass pane mount component start component boolean create root pane container a container null component a component start component climb the component hierarchy until a root pane container is found or until the very top while a component get parent null a component instanceof root pane container a component a component get parent guard against error conditions if climb search wasn t successful if a component instanceof root pane container a container root pane container a component if a container null retrieve an existing glass pane if old one already exist or create a new one otherwise return null if a container get glass pane null a container get glass pane instanceof glass pane return glass pane a container get glass pane else if create glass pane a glass pane new glass pane start component a container set glass pane a glass pane return a glass pane else return null else return null startcomponent glasspane glasspane startcomponent rootpanecontainer acontainer acomponent startcomponent rootpanecontainer acomponent getparent acomponent rootpanecontainer acomponent acomponent getparent acomponent rootpanecontainer acontainer rootpanecontainer acomponent acontainer glasspane acontainer getglasspane acontainer getglasspane glasspane glasspane acontainer getglasspane glasspane aglasspane glasspane startcomponent acontainer setglasspane aglasspane aglasspane set the component that ordered up the glass pane param a component the ui component that asked for the glass pane private void set active component component a component active component a component acomponent setactivecomponent acomponent activecomponent acomponent sets the glass pane as visible or invisible the mouse cursor will be set accordingly param value document me public void set visible boolean value if value keep track of the visible window associated w the component useful during event filtering if the window null the window swing utilities window for component active component if the window null if active component instanceof window the window window active component sets the mouse cursor to hourglass mode get top level ancestor set cursor cursor get predefined cursor cursor wait cursor active component the window get focus owner start receiving all events and consume them if necessary toolkit get default toolkit addawt event listener this awt event key event mask this request focus activate the glass pane capabilities super set visible value else stop receiving all events toolkit get default toolkit removeawt event listener this deactivate the glass pane capabilities super set visible value sets the mouse cursor back to the regular pointer if get top level ancestor null get top level ancestor set cursor null setvisible thewindow thewindow swingutilities windowforcomponent activecomponent thewindow activecomponent thewindow activecomponent gettoplevelancestor setcursor getpredefinedcursor wait_cursor activecomponent thewindow getfocusowner getdefaulttoolkit addawteventlistener awtevent key_event_mask requestfocus setvisible getdefaulttoolkit removeawteventlistener setvisible gettoplevelancestor gettoplevelancestor setcursor the constructor public checklist super return the items public list check item get check item list return this checkitem getcheckitemlist param description the description for a new item public void add item string description add new check item next category description additem checkitem nextcategory replace the list by the given new list param list the given new list public synchronized void add all checklist list for check item item list add item addall checkitem param cat the category public void set next category string cat next category cat setnextcategory nextcategory override public string to string string builder sb new string builder sb append get class get name n for check item item this sb append item to string n sb append return sb to string tostring stringbuilder stringbuilder getclass getname checkitem tostring tostring the constructor public action print super translator localize action print resource loader wrapper lookup icon action print set the tooltip string put value action short description translator localize action print actionprint resourceloaderwrapper lookupicon putvalue short_description see java awt event action listener action performed java awt event action event public void action performed action event ae print manager get instance print actionlistener actionperformed actionevent actionperformed actionevent printmanager getinstance the constructor public prop panel tagged value super label tagged value lookup icon tagged value add field translator localize label name get name text field add field translator localize label modelelement get model element selector add field translator localize label type get type selector add separator add field translator localize label reference values get reference values scroll add field translator localize label data values get data values scroll add action new action navigate container element add action new action new tag definition add action get delete action proppaneltaggedvalue lookupicon taggedvalue addfield getnametextfield addfield getmodelelementselector addfield gettypeselector addseparator addfield getreferencevaluesscroll addfield getdatavaluesscroll addaction actionnavigatecontainerelement addaction actionnewtagdefinition addaction getdeleteaction protected j scroll pane get reference values scroll if reference values scroll null j list list new uml linked list new uml reference value list model reference values scroll new j scroll pane list return reference values scroll jscrollpane getreferencevaluesscroll referencevaluesscroll jlist umllinkedlist umlreferencevaluelistmodel referencevaluesscroll jscrollpane referencevaluesscroll protected j scroll pane get data values scroll if data values scroll null j list list new uml linked list new uml data value list model data values scroll new j scroll pane list return data values scroll jscrollpane getdatavaluesscroll datavaluesscroll jlist umllinkedlist umldatavaluelistmodel datavaluesscroll jscrollpane datavaluesscroll returns the modelelement selector this is a component which allows the user to select a single item as the modelelement return the modelelement selecter protected j component get model element selector if model element selector null model element selector new box box layout x axis model element selector add new uml combo box navigator translator localize label modelelement navigate tooltip new uml combo box2 new uml tagged value model element combo box model new action set tagged value model element return model element selector jcomponent getmodelelementselector modelelementselector modelelementselector boxlayout x_axis modelelementselector umlcomboboxnavigator umlcombobox2 umltaggedvaluemodelelementcomboboxmodel actionsettaggedvaluemodelelement modelelementselector returns the type selector this is a component which allows the user to select a single tagged value as the type return the modelelement selecter protected j component get type selector if type selector null type selector new box box layout x axis type selector add new uml combo box navigator translator localize label type navigate tooltip new uml combo box2 new uml tagged value type combo box model new action set tagged value type return type selector taggedvalue jcomponent gettypeselector typeselector typeselector boxlayout x_axis typeselector umlcomboboxnavigator umlcombobox2 umltaggedvaluetypecomboboxmodel actionsettaggedvaluetype typeselector construct this action public action set tagged value model element super actionsettaggedvaluemodelelement public void action performed action event e super action performed e object source e get source if source instanceof uml combo box2 e get modifiers awt event mouse event mask uml combo box2 combo uml combo box2 source object o combo get selected item final object tagged value combo get target if model get facade isa model element o model get facade isa tagged value tagged value object oldme model get facade get model element tagged value model get extension mechanisms helper remove tagged value oldme tagged value model get extension mechanisms helper add tagged value o tagged value actionperformed actionevent actionperformed getsource umlcombobox2 getmodifiers awtevent mouse_event_mask umlcombobox2 umlcombobox2 getselecteditem taggedvalue gettarget getfacade isamodelelement getfacade isataggedvalue taggedvalue getfacade getmodelelement taggedvalue getextensionmechanismshelper removetaggedvalue taggedvalue getextensionmechanismshelper addtaggedvalue taggedvalue constructor public uml tagged value model element combo box model super modelelement true model get pump add class model event listener this model get meta types get namespace owned element umltaggedvaluemodelelementcomboboxmodel getpump addclassmodeleventlistener getmetatypes getnamespace ownedelement protected void build model list project p project manager get manager get current project object model p get root set elements model get model management helper get all model elements of kind with model model model get meta types get model element buildmodellist projectmanager getmanager getcurrentproject getroot setelements getmodelmanagementhelper getallmodelelementsofkindwithmodel getmetatypes getmodelelement protected object get selected model element object me null if get target null model get facade isa tagged value get target me model get facade get model element get target return me getselectedmodelelement gettarget getfacade isataggedvalue gettarget getfacade getmodelelement gettarget see org argouml uml ui uml combo box model2 is valid element java lang object protected boolean is valid element object element return model get facade isa model element element umlcomboboxmodel2 isvalidelement isvalidelement getfacade isamodelelement construct this action public action set tagged value type super actionsettaggedvaluetype public void action performed action event e super action performed e object source e get source if source instanceof uml combo box2 e get modifiers awt event mouse event mask uml combo box2 combo uml combo box2 source object o combo get selected item final object tagged value combo get target if model get facade isa model element o model get facade isa tagged value tagged value model get extension mechanisms helper set type tagged value o actionperformed actionevent actionperformed getsource umlcombobox2 getmodifiers awtevent mouse_event_mask umlcombobox2 umlcombobox2 getselecteditem taggedvalue gettarget getfacade isamodelelement getfacade isataggedvalue taggedvalue getextensionmechanismshelper settype taggedvalue constructor for uml model element stereotype combo box model public uml tagged value type combo box model super type true umlmodelelementstereotypecomboboxmodel umltaggedvaluetypecomboboxmodel protected void build model list project p project manager get manager get current project object model p get root set elements model get model management helper get all model elements of kind with model model model get meta types get tag definition buildmodellist projectmanager getmanager getcurrentproject getroot setelements getmodelmanagementhelper getallmodelelementsofkindwithmodel getmetatypes gettagdefinition protected object get selected model element object me null if get target null model get facade isa tagged value get target me model get facade get type get target return me getselectedmodelelement gettarget getfacade isataggedvalue gettarget getfacade gettype gettarget see org argouml uml ui uml combo box model2 is valid element java lang object protected boolean is valid element object element return model get facade isa tag definition element umlcomboboxmodel2 isvalidelement isvalidelement getfacade isatagdefinition constructor for uml extended elements list model public uml reference value list model super reference value umlextendedelementslistmodel umlreferencevaluelistmodel referencevalue protected void build model list if get target null set all elements model get facade get reference value get target buildmodellist gettarget setallelements getfacade getreferencevalue gettarget protected boolean is valid element object element return model get facade isa model element element model get facade get reference value get target contains element isvalidelement getfacade isamodelelement getfacade getreferencevalue gettarget constructor for uml extended elements list model public uml data value list model super data value umlextendedelementslistmodel umldatavaluelistmodel datavalue protected void build model list if get target null set all elements model get facade get data value get target buildmodellist gettarget setallelements getfacade getdatavalue gettarget protected boolean is valid element object element return model get facade isa model element element model get facade get data value get target contains element isvalidelement getfacade isamodelelement getfacade getdatavalue gettarget construct a property panel for a signal event public prop panel signal event super label signal event lookup icon signal event proppanelsignalevent lookupicon signalevent override public void initialize super initialize j list signal list new uml signal event signal list new uml signal event signal list model signal list set visible row count 2 add field label signal new j scroll pane signal list add action new action new parameter add action get delete action jlist signallist umlsignaleventsignallist umlsignaleventsignallistmodel signallist setvisiblerowcount addfield jscrollpane signallist addaction actionnewparameter addaction getdeleteaction public class button action new time event extends button action new event protected object create event object ns return model get state machines factory build time event ns buttonactionnewtimeevent buttonactionnewevent createevent getstatemachinesfactory buildtimeevent protected string get key name return button new timeevent getkeyname protected string get icon name return time event geticonname timeevent new classdiagram model element factory private classdiagram model element factory classdiagrammodelelementfactory classdiagrammodelelementfactory create layouter object from a fig param f object which contains the fig return layouter for the edge or classnode or null if none exists public layouted object get instance object f if f instanceof fig comment return new classdiagram note fig comment f else if f instanceof fig node model element return new classdiagram node fig node f else if f instanceof fig generalization return new classdiagram generalization edge fig generalization f else if f instanceof fig abstraction return new classdiagram realization edge fig abstraction f else if f instanceof fig association return new classdiagram association edge fig association f else if f instanceof fig edge note return new classdiagram note edge fig edge note f log debug do not know how to deal with f get class get name n using standard layout return null layoutedobject getinstance figcomment classdiagramnote figcomment fignodemodelelement classdiagramnode fignode figgeneralization classdiagramgeneralizationedge figgeneralization figabstraction classdiagramrealizationedge figabstraction figassociation classdiagramassociationedge figassociation figedgenote classdiagramnoteedge figedgenote getclass getname nusing the constructor param objectflowstate the uml element public object flow state type notation object objectflowstate if model get facade isa object flow state objectflowstate throw new illegal argument exception this is not a object flow state objectflowstatetypenotation getfacade isaobjectflowstate illegalargumentexception objectflowstate return the show sequence numbers setting public boolean is show sequence numbers return show sequence numbers showsequencenumbers isshowsequencenumbers showsequencenumbers param show them true to show sequence numbers public void set show sequence numbers boolean show them this show sequence numbers show them showthem setshowsequencenumbers showthem showsequencenumbers showthem param owner the owner object public fig destroy action message object owner super owner set dest arrow head new arrow head greater set dashed false figdestroyactionmessage setdestarrowhead arrowheadgreater setdashed the constructor public fig destroy action message this null figdestroyactionmessage the constructor param table size the size of the table public xml token table base int table size tokens new hashtable table size setup tokens tablesize xmltokentablebase tablesize tablesize setuptokens param s the string param push true if the token is to be pushed return the token public final int to token string s boolean push if push open tags num open s else if s equals open tags num open log debug matched s return open tokens num open integer i integer tokens get s if i null open tokens num open i int value return open tokens num open else return 1 totoken opentags numopen opentags numopen opentokens numopen opentokens numopen intvalue opentokens numopen param d true if debugging public void set dbg boolean d dbg d setdbg public void set dbg boolean d dbg d return true if debugging is turned on public boolean get dbg return dbg setdbg getdbg param s the string represented by the token number param i the token number protected void add token string s integer i boolean error false if dbg if tokens contains i tokens contains key s log error error token table already contains s error true tokens put s i if dbg error log debug note added s to token table addtoken containskey param token the given token return true if the token is present public boolean contains string token return tokens contains key token containskey this function shall set up all the tokens with the add token function protected abstract void setup tokens addtoken setuptokens the constructor public cr unnavigable assoc setup head and desc add supported decision uml decision relationships add trigger end navigable crunnavigableassoc setupheadanddesc addsupporteddecision umldecision addtrigger end_navigable public boolean predicate2 object dm designer dsgr if model get facade isa association dm return no problem object asc m association dm collection conn model get facade get connections asc if model get facade isa association role asc conn model get facade get connections asc for iterator iter conn iterator iter has next object ae m association end iter next if model get facade is navigable ae return no problem return problem found getfacade isaassociation no_problem massociation getfacade getconnections getfacade isaassociationrole getfacade getconnections hasnext massociationend getfacade isnavigable no_problem problem_found see org argouml cognitive critics critic get wizard class org argouml cognitive to do item public class get wizard class to do item item return wiz navigable class getwizardclass todoitem getwizardclass todoitem wiznavigable public set object get criticized design materials set object ret new hash set object ret add model get meta types get association class return ret getcriticizeddesignmaterials hashset getmetatypes getassociationclass the constructor param w the wizard ignored param cue the instructions cue public wiz step cue wizard w string cue store wizard instructions set text cue instructions set wrap style word true instructions set editable false instructions set border null instructions set background get main panel get background get main panel set border new etched border grid bag layout gb new grid bag layout get main panel set layout gb grid bag constraints c new grid bag constraints c ipadx 3 c ipady 3 c weightx 0 0 c weighty 0 0 c anchor grid bag constraints east j label image new j label image set margin new insets 0 0 0 0 image set icon get wizard icon image set border null c gridx 0 c gridheight grid bag constraints remainder c gridy 0 c anchor grid bag constraints north gb set constraints image c get main panel add image c weightx 1 0 c gridx 2 c gridheight grid bag constraints remainder c gridwidth 3 c gridy 0 c fill grid bag constraints horizontal gb set constraints instructions c get main panel add instructions c gridx 1 c gridy 1 c weightx 0 0 c gridwidth 1 c fill grid bag constraints none spacer panel spacer2 new spacer panel gb set constraints spacer2 c get main panel add spacer2 wizstepcue settext setwrapstyleword seteditable setborder setbackground getmainpanel getbackground getmainpanel setborder etchedborder gridbaglayout gridbaglayout getmainpanel setlayout gridbagconstraints gridbagconstraints gridbagconstraints jlabel jlabel setmargin seticon getwizardicon setborder gridbagconstraints gridbagconstraints setconstraints getmainpanel gridbagconstraints gridbagconstraints setconstraints getmainpanel gridbagconstraints spacerpanel spacerpanel setconstraints getmainpanel construct a property panel for uml enumeration literals public prop panel enumeration literal super label enumeration literal lookup icon enumeration literal add field translator localize label name get name text field add field translator localize label enumeration get single row scroll new enumeration list model add action new action navigate container element add action new action add literal add action new action new stereotype add action get delete action enumerationliterals proppanelenumerationliteral lookupicon enumerationliteral addfield getnametextfield addfield getsinglerowscroll enumerationlistmodel addaction actionnavigatecontainerelement addaction actionaddliteral addaction actionnewstereotype addaction getdeleteaction constructor for enumeration list model public enumeration list model super set target target manager get instance get model target target manager get instance add target listener this enumerationlistmodel enumerationlistmodel settarget targetmanager getinstance getmodeltarget targetmanager getinstance addtargetlistener see target listener target added target event public void target added target event e set target e get new target targetlistener targetadded targetevent targetadded targetevent settarget getnewtarget see target listener target removed target event public void target removed target event e set target e get new target targetlistener targetremoved targetevent targetremoved targetevent settarget getnewtarget see target listener target set target event public void target set target event e set target e get new target targetlistener targetset targetevent targetset targetevent settarget getnewtarget private void set target object t remove all elements if model get facade isa enumeration literal t add element model get facade get enumeration t settarget removeallelements getfacade isaenumerationliteral addelement getfacade getenumeration constructor for uml association role base combo box model public uml association role base combo box model super base true umlassociationrolebasecomboboxmodel umlassociationrolebasecomboboxmodel override protected void build model list remove all elements object ar get target object base model get facade get base ar if model get facade isa association role ar set elements model get collaborations helper get all possible bases ar if base null add element base buildmodellist removeallelements gettarget getfacade getbase getfacade isaassociationrole setelements getcollaborationshelper getallpossiblebases addelement override protected object get selected model element object ar get target if model get facade isa association role ar object base model get facade get base ar if base null return base return null getselectedmodelelement gettarget getfacade isaassociationrole getfacade getbase override protected boolean is valid element object element object ar get target if model get facade isa association role ar object base model get facade get base ar if element base return true collection b model get collaborations helper get all possible bases ar return b contains element return false isvalidelement gettarget getfacade isaassociationrole getfacade getbase getcollaborationshelper getallpossiblebases override protected void add other model event listeners object new target super add other model event listeners new target collection connections model get facade get connections new target collection types new array list for object conn connections types add model get facade get type conn for object classifier role types others add all model get facade get bases classifier role for object classifier others model get pump add model event listener this classifier feature addothermodeleventlisteners newtarget addothermodeleventlisteners newtarget getfacade getconnections newtarget arraylist getfacade gettype classifierrole addall getfacade getbases classifierrole getpump addmodeleventlistener override protected void remove other model event listeners object old target super remove other model event listeners old target for object classifier others model get pump remove model event listener this classifier feature others clear removeothermodeleventlisteners oldtarget removeothermodeleventlisteners oldtarget getpump removemodeleventlistener constructor for uml state machine context list model public uml activity graph context combo box model super context false umlstatemachinecontextlistmodel umlactivitygraphcontextcomboboxmodel protected void build model list collection elements new array list project p project manager get manager get current project for object model p get user defined model list elements add all model get model management helper get all model elements of kind model model get meta types get classifier elements add all model get model management helper get all model elements of kind model model get meta types get behavioral feature elements add all model get model management helper get all model elements of kind model model get meta types get package set elements elements buildmodellist arraylist projectmanager getmanager getcurrentproject getuserdefinedmodellist addall getmodelmanagementhelper getallmodelelementsofkind getmetatypes getclassifier addall getmodelmanagementhelper getallmodelelementsofkind getmetatypes getbehavioralfeature addall getmodelmanagementhelper getallmodelelementsofkind getmetatypes getpackage setelements protected boolean is valid element object element return model get facade isa classifier element model get facade isa behavioral feature element model get facade isa package element isvalidelement getfacade isaclassifier getfacade isabehavioralfeature getfacade isapackage see org argouml uml ui uml combo box model2 get selected model element protected object get selected model element return model get facade get context get target umlcomboboxmodel2 getselectedmodelelement getselectedmodelelement getfacade getcontext gettarget see org argouml uml ui uml combo box model2 property change java beans property change event public void model change uml change event evt do nothing by design umlcomboboxmodel2 propertychange propertychangeevent modelchange umlchangeevent return the instance of this dialog public static find dialog get instance if instance null instance new find dialog return instance finddialog getinstance finddialog the constructor public find dialog super translator localize dialog find title argo dialog ok cancel option false j panel main panel new j panel new border layout init name loc tab tabs add tab translator localize dialog find tab name and location name loc tab penyaskito says according to issue 2501 i have removed the tabs init modified tab tabs add tab translator localize dialog find tab last modified modified tab tabs set enabled at 1 false init tag vals tab tabs add tab translator localize dialog find tab tagged values tag vals tab tabs set enabled at 2 false init constraints tab tabs add tab translator localize tab constraints constraints tab tabs set enabled at 3 false tabs set minimum size new dimension 300 250 j panel north new j panel north set layout new border layout north add tabs border layout center main panel add north border layout north main panel add name loc tab border layout north init help tab results add tab translator localize dialog find tab help help main panel add results border layout center search add action listener this results add mouse listener this clear tabs add action listener this clear tabs set enabled false set content main panel get ok button set enabled false finddialog argodialog ok_cancel_option jpanel mainpanel jpanel borderlayout initnameloctab addtab nameloctab initmodifiedtab addtab modifiedtab setenabledat inittagvalstab addtab tagvalstab setenabledat initconstraintstab addtab constraintstab setenabledat setminimumsize jpanel jpanel setlayout borderlayout borderlayout mainpanel borderlayout mainpanel nameloctab borderlayout inithelptab addtab mainpanel borderlayout addactionlistener addmouselistener cleartabs addactionlistener cleartabs setenabled setcontent mainpanel getokbutton setenabled initialise the tab name and location private void init name loc tab element name set editable true todo don t use hardcoded colors here tfm element name get editor get editor component set background color white diagram name set editable true diagram name get editor get editor component set background color white element name add item diagram name add item todo add recent patterns grid bag layout gb new grid bag layout name loc tab set layout gb j label element name label new j label translator localize dialog find label element name j label diagram name label new j label translator localize dialog find label in diagram j label type label new j label translator localize dialog find label element type j label loc label new j label translator localize dialog find label find in location add item translator localize dialog find comboboxitem entire project init types type details set minimum size new dimension 200 100 type details set preferred size new dimension 200 100 type details set size new dimension 200 100 grid bag constraints c new grid bag constraints c fill grid bag constraints both c ipadx 3 c ipady 3 c gridwidth 1 c gridx 0 c gridy 0 c weightx 0 0 gb set constraints element name label c name loc tab add element name label c gridx 1 c gridy 0 c weightx 1 0 gb set constraints element name c name loc tab add element name c gridx 0 c gridy 1 c weightx 0 0 gb set constraints diagram name label c name loc tab add diagram name label c gridx 1 c gridy 1 c weightx 1 0 gb set constraints diagram name c name loc tab add diagram name open space at gridy 2 c gridx 0 c gridy 3 c weightx 0 0 gb set constraints loc label c name loc tab add loc label c gridx 1 c gridy 3 c weightx 1 0 gb set constraints location c name loc tab add location spacer panel spacer new spacer panel c gridx 2 c gridy 0 c weightx 0 0 gb set constraints spacer c name loc tab add spacer c gridx 3 c gridy 0 c weightx 0 0 gb set constraints type label c name loc tab add type label c gridx 4 c gridy 0 c weightx 1 0 gb set constraints type c name loc tab add type c gridx 3 c gridy 1 c gridwidth 2 c gridheight 5 gb set constraints type details c name loc tab add type details j panel search panel new j panel search panel set layout new grid layout 1 2 5 5 search panel add clear tabs search panel add search search panel set border new empty border 10 10 10 10 c gridx 0 c gridy 4 c weightx 0 0 c weighty 0 0 c gridwidth 2 c gridheight 1 gb set constraints search panel c name loc tab add search panel initnameloctab elementname seteditable elementname geteditor geteditorcomponent setbackground diagramname seteditable diagramname geteditor geteditorcomponent setbackground elementname additem diagramname additem gridbaglayout gridbaglayout nameloctab setlayout jlabel elementnamelabel jlabel jlabel diagramnamelabel jlabel jlabel typelabel jlabel jlabel loclabel jlabel additem inittypes typedetails setminimumsize typedetails setpreferredsize typedetails setsize gridbagconstraints gridbagconstraints gridbagconstraints setconstraints elementnamelabel nameloctab elementnamelabel setconstraints elementname nameloctab elementname setconstraints diagramnamelabel nameloctab diagramnamelabel setconstraints diagramname nameloctab diagramname setconstraints loclabel nameloctab loclabel setconstraints nameloctab spacerpanel spacerpanel setconstraints nameloctab setconstraints typelabel nameloctab typelabel setconstraints nameloctab setconstraints typedetails nameloctab typedetails jpanel searchpanel jpanel searchpanel setlayout gridlayout searchpanel cleartabs searchpanel searchpanel setborder emptyborder setconstraints searchpanel nameloctab searchpanel initialise the help tab private void init help tab help set layout new border layout j text area help text new j text area help text set text translator localize dialog find helptext help text set editable false help text set margin new insets inset px inset px inset px inset px help add new j scroll pane help text border layout center inithelptab setlayout borderlayout jtextarea helptext jtextarea helptext settext helptext seteditable helptext setmargin inset_px inset_px inset_px inset_px jscrollpane helptext borderlayout init the modelelement types that we can look for private void init types type add item predicatem type create any type type add item predicatem type create model get meta types getuml class type add item predicatem type create model get meta types get interface type add item predicatem type create model get meta types get action not in uml 2 x or metatypes type add item predicatem type create model get meta types get activity graph type add item predicatem type create model get meta types get actor type add item predicatem type create model get meta types get association type add item predicatem type create model get meta types get association class type add item predicatem type create model get meta types get association end role type add item predicatem type create model get meta types get association role type add item predicatem type create model get meta types get artifact type add item predicatem type create model get meta types get attribute type add item predicatem type create model get meta types get classifier type add item predicatem type create model get meta types get classifier role type add item predicatem type create model get meta types get collaboration type add item predicatem type create model get meta types get comment type add item predicatem type create model get meta types get component type add item predicatem type create model get meta types get composite state type add item predicatem type create model get meta types get constraint type add item predicatem type create model get meta types get data type type add item predicatem type create model get meta types get dependency type add item predicatem type create model get meta types get element import type add item predicatem type create model get meta types get enumeration type add item predicatem type create model get meta types get enumeration literal type add item predicatem type create model get meta types get exception type add item predicatem type create model get meta types get extend type add item predicatem type create model get meta types get extension point type add item predicatem type create model get meta types get guard type add item predicatem type create model get meta types get generalization type add item predicatem type create model get meta types get include type add item predicatem type create model get meta types get instance type add item predicatem type create model get meta types get interaction type add item predicatem type create model get meta types get interface type add item predicatem type create model get meta types get link type add item predicatem type create model get meta types get message type add item predicatem type create model get meta types get model type add item predicatem type create model get meta types get node type add item predicatem type create model get meta types get package type add item predicatem type create model get meta types get parameter type add item predicatem type create model get meta types get partition type add item predicatem type create model get meta types get pseudostate type add item predicatem type create model get meta types get operation type add item predicatem type create model get meta types get simple state type add item predicatem type create model get meta types get signal type add item predicatem type create model get meta types get state type add item predicatem type create model get meta types get state machine type add item predicatem type create model get meta types get state vertex type add item predicatem type create model get meta types get stereotype type add item predicatem type create model get meta types get tag definition todo doesn t work perhaps because composite so disable for now so user isn t misled tfm 20070904 type add item predicatem type create model get meta types get tagged value not in uml 2 x or metatypes type add item predicatem type create model get meta types get template argument type add item predicatem type create model get meta types get template parameter type add item predicatem type create model get meta types get transition type add item predicatem type create model get meta types get use case inittypes additem predicatemtype additem predicatemtype getmetatypes getumlclass additem predicatemtype getmetatypes getinterface additem predicatemtype getmetatypes getaction additem predicatemtype getmetatypes getactivitygraph additem predicatemtype getmetatypes getactor additem predicatemtype getmetatypes getassociation additem predicatemtype getmetatypes getassociationclass additem predicatemtype getmetatypes getassociationendrole additem predicatemtype getmetatypes getassociationrole additem predicatemtype getmetatypes getartifact additem predicatemtype getmetatypes getattribute additem predicatemtype getmetatypes getclassifier additem predicatemtype getmetatypes getclassifierrole additem predicatemtype getmetatypes getcollaboration additem predicatemtype getmetatypes getcomment additem predicatemtype getmetatypes getcomponent additem predicatemtype getmetatypes getcompositestate additem predicatemtype getmetatypes getconstraint additem predicatemtype getmetatypes getdatatype additem predicatemtype getmetatypes getdependency additem predicatemtype getmetatypes getelementimport additem predicatemtype getmetatypes getenumeration additem predicatemtype getmetatypes getenumerationliteral additem predicatemtype getmetatypes getexception additem predicatemtype getmetatypes getextend additem predicatemtype getmetatypes getextensionpoint additem predicatemtype getmetatypes getguard additem predicatemtype getmetatypes getgeneralization additem predicatemtype getmetatypes getinclude additem predicatemtype getmetatypes getinstance additem predicatemtype getmetatypes getinteraction additem predicatemtype getmetatypes getinterface additem predicatemtype getmetatypes getlink additem predicatemtype getmetatypes getmessage additem predicatemtype getmetatypes getmodel additem predicatemtype getmetatypes getnode additem predicatemtype getmetatypes getpackage additem predicatemtype getmetatypes getparameter additem predicatemtype getmetatypes getpartition additem predicatemtype getmetatypes getpseudostate additem predicatemtype getmetatypes getoperation additem predicatemtype getmetatypes getsimplestate additem predicatemtype getmetatypes getsignal additem predicatemtype getmetatypes getstate additem predicatemtype getmetatypes getstatemachine additem predicatemtype getmetatypes getstatevertex additem predicatemtype getmetatypes getstereotype additem predicatemtype getmetatypes gettagdefinition additem predicatemtype getmetatypes gettaggedvalue additem predicatemtype getmetatypes gettemplateargument additem predicatemtype getmetatypes gettemplateparameter additem predicatemtype getmetatypes gettransition additem predicatemtype getmetatypes getusecase override protected void name buttons super name buttons name button get ok button button go to selection name button get cancel button button close namebuttons namebuttons namebutton getokbutton namebutton getcancelbutton override public void action performed action event e if e get source search do search else if e get source clear tabs do clear tabs else if e get source get ok button do go to selection else super action performed e actionperformed actionevent getsource dosearch getsource cleartabs docleartabs getsource getokbutton dogotoselection actionperformed do the search private void do search num finds string e name if element name get selected item null e name element name get selected item element name remove item e name element name insert item at e name 0 element name set selected item e name string d name if diagram name get selected item null d name diagram name get selected item diagram name remove item d name diagram name insert item at d name 0 diagram name set selected item d name string name e name if d name length 0 object msg args name d name name translator message format dialog find comboboxitem element in diagram msg args name in d name string type name type get selected item to string if type name equals any type name type name if name length 0 name translator localize dialog find tabname next result num if name length 15 todo localize name name substring 0 12 string p name predicate e name pred predicate string match create e name predicate p name pred predicate string match create p name predicate d name pred predicate string match create d name predicate type pred predicate type get selected item predicate search pred new predicate search e name pred p name pred d name pred type pred child gen search gen new child gen search object root project manager get manager get current project tab results new results new tab results new results set title name new results set predicate pred new results set root root new results set generator gen result tabs add new results results add tab name new results clear tabs set enabled true get ok button set enabled true results set selected component new results object msg args name location add item translator message format dialog find comboboxitem in tab msg args invalidate results invalidate validate new results run new results request focus new results select result 0 dosearch numfinds ename elementname getselecteditem ename elementname getselecteditem elementname removeitem ename elementname insertitemat ename elementname setselecteditem ename dname diagramname getselecteditem dname diagramname getselecteditem diagramname removeitem dname diagramname insertitemat dname diagramname setselecteditem dname ename dname msgargs dname messageformat msgargs dname typename getselecteditem tostring typename typename nextresultnum pname enamepred predicatestringmatch ename pnamepred predicatestringmatch pname dnamepred predicatestringmatch dname typepred getselecteditem predicatesearch predicatesearch enamepred pnamepred dnamepred typepred childgensearch childgensearch projectmanager getmanager getcurrentproject tabresults newresults tabresults newresults settitle newresults setpredicate newresults setroot newresults setgenerator resulttabs newresults addtab newresults cleartabs setenabled getokbutton setenabled setselectedcomponent newresults msgargs additem messageformat msgargs newresults newresults requestfocus newresults selectresult reset the user interface to its initial state use this if a new project has been loaded and the find dialog is being displayed with stale results public void reset do clear tabs do reset fields true docleartabs doresetfields clear the tabs private void do clear tabs int num tabs result tabs size for int i 0 i num tabs i results remove result tabs get i result tabs clear clear tabs set enabled false get ok button set enabled false do reset fields false docleartabs numtabs resulttabs numtabs resulttabs resulttabs cleartabs setenabled getokbutton setenabled doresetfields reset the fields param complete if true reset all 3 fields element name diagram name and location otherwise only the last is reset private void do reset fields boolean complete if complete element name remove all items diagram name remove all items element name add item diagram name add item location remove all items location add item translator localize dialog find comboboxitem entire project doresetfields elementname removeallitems diagramname removeallitems elementname additem diagramname additem removeallitems additem execute the go to selection command private void do go to selection if results get selected component instanceof tab results tab results results get selected component do double click goto dogotoselection getselectedcomponent tabresults tabresults getselectedcomponent dodoubleclick see java awt event mouse listener mouse pressed java awt event mouse event public void mouse pressed mouse event me empty implementation we only handle mouse clicked mouselistener mousepressed mouseevent mousepressed mouseevent mouseclicked see java awt event mouse listener mouse released java awt event mouse event public void mouse released mouse event me empty implementation we only handle mouse clicked mouselistener mousereleased mouseevent mousereleased mouseevent mouseclicked see java awt event mouse listener mouse entered java awt event mouse event public void mouse entered mouse event me empty implementation we only handle mouse clicked mouselistener mouseentered mouseevent mouseentered mouseevent mouseclicked see java awt event mouse listener mouse exited java awt event mouse event public void mouse exited mouse event me empty implementation we only handle mouse clicked mouselistener mouseexited mouseevent mouseexited mouseevent mouseclicked public void mouse clicked mouse event me int tab results get selected index if tab 1 rectangle tab bounds results get bounds at tab if tab bounds contains me getx me gety return if tab 1 me get click count 2 my double click tab 1 help tab is 0 mouseclicked mouseevent getselectedindex tabbounds getboundsat tabbounds getclickcount mydoubleclick double click on tab detaches it in a free floating window mvw this is the only place where spawning is still enabled param tab the given tab private void my double click int tab j panel t result tabs get tab if t instanceof abstract argoj panel if abstract argoj panel t spawn null result tabs remove tab location remove item in tab abstract argoj panel t get title mydoubleclick jpanel resulttabs abstractargojpanel abstractargojpanel resulttabs removeitem abstractargojpanel gettitle class predicatem type extends predicate type the constructor param pats the classes protected predicatem type class pats super pats pats length predicatemtype predicatetype predicatemtype the constructor param pats the classes or code null code if num pats is 0 param num pats the count of classes protected predicatem type class pats int num pats super pats num pats numpats numpats predicatemtype numpats numpats create without classes return a newly created predicate type public static predicate type create return new predicatem type null 0 predicatetype predicatetype predicatemtype create with one class param c0 first class return a newly created predicate type public static predicate type create object c0 class classes new class 1 classes 0 class c0 return new predicatem type classes predicatetype predicatetype predicatemtype create with two classes param c0 first class param c1 second class return a newly created predicate type public static predicate type create object c0 object c1 class classes new class 2 classes 0 class c0 classes 1 class c1 return new predicatem type classes predicatetype predicatetype predicatemtype create with three classes param c0 first class param c1 second class param c2 third class return a newly created predicate type public static predicate type create object c0 object c1 object c2 class classes new class 3 classes 0 class c0 classes 1 class c1 classes 2 class c2 return new predicatem type classes predicatetype predicatetype predicatemtype override public string to string string result super to string todo this shouldn t know the internal form of type names but i m not sure what gef s predicate type does so i m fixing it here tfm if result starts with uml result result substring 3 return result tostring tostring predicatetype startswith the constructor param the object the uml element public object notation object the object if model get facade isa object the object throw new illegal argument exception this is not an object theobject objectnotation theobject getfacade isaobject theobject illegalargumentexception public void initialise listener property change listener listener object model element add element listener listener model element new string name classifier add the following once we show stereotypes collection c model get facade get stereotypes new owner iterator i c iterator while i has next object st i next add element listener st name collection c model get facade get classifiers model element iterator i c iterator while i has next object st i next add element listener listener st name initialiselistener propertychangelistener modelelement addelementlistener modelelement getfacade getstereotypes newowner hasnext addelementlistener getfacade getclassifiers modelelement hasnext addelementlistener public void update listener property change listener listener object model element property change event pce if pce instanceof attribute change event pce get source model element classifier equals pce get property name if pce get old value null remove element listener listener pce get old value if pce get new value null add element listener listener pce get new value name updatelistener propertychangelistener modelelement propertychangeevent attributechangeevent getsource modelelement getpropertyname getoldvalue removeelementlistener getoldvalue getnewvalue addelementlistener getnewvalue param owner the owner object public fig call action message object owner super owner set dest arrow head new arrow head triangle set dashed false figcallactionmessage setdestarrowhead arrowheadtriangle setdashed public fig call action message this null figcallactionmessage the constructor public cr no initial state setup head and desc add supported decision uml decision state machines add trigger substate crnoinitialstate setupheadanddesc addsupporteddecision umldecision state_machines addtrigger public boolean predicate2 object dm designer dsgr if model get facade isa composite state dm return no problem object cs m composite state dm if this composite state is not attached to a statemachine it is not the toplevel composite state if model get facade get state machine cs null return no problem collection peers model get facade get subvertices cs int initial state count 0 if peers null return problem found for iterator iter peers iterator iter has next object sv iter next if model get facade isa pseudostate sv model get facade get kind sv equals model get pseudostate kind get initial initial state count if initial state count 0 return problem found return no problem getfacade isacompositestate no_problem mcompositestate getfacade getstatemachine no_problem getfacade getsubvertices initialstatecount problem_found hasnext getfacade isapseudostate getfacade getkind getpseudostatekind getinitial initialstatecount initialstatecount problem_found no_problem public set object get criticized design materials set object ret new hash set object ret add model get meta types get composite state return ret getcriticizeddesignmaterials hashset getmetatypes getcompositestate construct a new xml input stream param in stream the input stream to wrap param the tag the tag name from which to start reading param the length the expected length of the input stream param the event spacing the number of characters to read before firing a progress event public xml input stream input stream in stream string the tag long the length long the event spacing super in stream tag name the tag end tag name the tag attributes null child only false xmlinputstream instream thetag thelength theeventspacing xmlinputstream inputstream instream thetag thelength theeventspacing instream tagname thetag endtagname thetag childonly reopen a stream that has already reached the end of an xml fragment param the tag the tag name param attribs the attributes param child child only public synchronized void reopen string the tag map attribs boolean child end stream false xml started false in tag false tag name the tag end tag name the tag attributes attribs child only child thetag thetag endstream xmlstarted intag tagname thetag endtagname thetag childonly reopen a stream that has already reached the end of an xml fragment param the tag the tag name public synchronized void reopen string the tag end stream false xml started false in tag false tag name the tag end tag name the tag attributes null child only false thetag thetag endstream xmlstarted intag tagname thetag endtagname thetag childonly public synchronized int read throws io exception if xml started skip to tag xml started true if end stream return 1 int ch super read end stream is last tag ch return ch ioexception xmlstarted skiptotag xmlstarted endstream endstream islasttag public synchronized int read byte b int off int len throws io exception if xml started skip to tag xml started true if end stream return 1 int cnt for cnt 0 cnt len cnt int read read if read 1 break b cnt off byte read if cnt 0 return cnt return 1 ioexception xmlstarted skiptotag xmlstarted endstream determines if the character is the last character of the last tag of interest every character read after the first tag of interest should be passed through this method in order param ch the character to test return true if this is the end of the last tag private boolean is last tag int ch if ch in tag true current tag set length 0 else if ch in tag false string tag current tag to string if tag equals end tag name todo the below is not strictly correct but should cover the case we deal with using a real xml parser would be better look for xml document has just a single root element current tag char at current tag length 1 tag starts with tag name tag index of tag name index of return true else if in tag current tag append char ch return false islasttag intag currenttag setlength intag currenttag tostring endtagname currenttag charat currenttag startswith tagname indexof tagname indexof intag currenttag keep on reading an input stream until a specific sequence of characters has ben read this method assumes there is at least one match throws io exception private void skip to tag throws io exception char search chars tag name to char array int i boolean found while true if child only mark 1000 keep reading till we get the left bracket of an opening tag while real read if child only mark 1000 found true compare each following character to see that it matches the tag we want for i 0 i tag name length i int c real read if c search chars i found false break int terminator real read we also want to match with the right bracket of the tag or some other terminator if found is name terminator char terminator found false if found we ve found the matching tag but do we have the correct instance with matching attributes if attributes null map attributes found new hash map if terminator attributes found read attributes search all attributes found to those expected if any don t match then turn off the found flag so that we search for the next matching tag iterator it attributes entry set iterator while found it has next map entry pair map entry it next if pair get value equals attributes found get pair get key found false if found if instance count 0 found false instance count if found if child only read the name of the child tag and then reset read position back to that child tag mark 1000 while real read do nothing tag name char ch char real read while is name terminator ch tag name ch ch char real read end tag name tag name log info start tag tag name log info end tag end tag name reset return ioexception skiptotag ioexception searchchars tagname tochararray childonly realread childonly tagname realread searchchars realread isnameterminator attributesfound hashmap attributesfound readattributes entryset hasnext getvalue attributesfound getkey instancecount instancecount childonly realread tagname realread isnameterminator tagname realread endtagname tagname tagname endtagname private boolean is name terminator char ch return ch character is whitespace ch isnameterminator iswhitespace having read the inputstream up until the tag name this method continues to read the contents of the tag to retrieve any attribute names and values return a map of name value pairs throws io exception private map read attributes throws io exception map attributes found new hash map int character while character real read if character is whitespace char character string buffer attribute name new string buffer attribute name append char character while character real read character is whitespace char character attribute name append char character skip any whitespace till we should be on an equals sign while character is whitespace char character character real read if character throw new io exception expected sign after attribute attribute name skip any whitespace till we should be on a quote symbol int quote symbol real read while character is whitespace char quote symbol quote symbol real read if quote symbol quote symbol throw new io exception expected or around attribute value after attribute attribute name string buffer attribute value new string buffer while character real read quote symbol attribute value append char character attributes found put attribute name to string attribute value to string return attributes found ioexception readattributes ioexception attributesfound hashmap realread iswhitespace stringbuffer attributename stringbuffer attributename realread iswhitespace attributename iswhitespace realread ioexception attributename quotesymbol realread iswhitespace quotesymbol quotesymbol realread quotesymbol quotesymbol ioexception attributename stringbuffer attributevalue stringbuffer realread quotesymbol attributevalue attributesfound attributename tostring attributevalue tostring attributesfound the close method is overridden to prevent some class out of our control from closing the stream such as a sax parser use real close to finally close the stream for real throws io exception to satisfy ancestor but will never happen public void close throws io exception realclose ioexception ioexception really close the input throws io exception if an i o error occurs public void real close throws io exception super close ioexception realclose ioexception private int real read throws io exception int read super read if read 1 throw new io exception tag tag name not found return read realread ioexception ioexception tagname the constructor public standardcm add mech new enabledcm add mech new not snoozedcm add mech new design goalscm add mech new cur decisioncm addmech addmech notsnoozedcm addmech designgoalscm addmech curdecisioncm see org argouml cognitive critics control mech is relevant org argouml cognitive critics critic org argouml cognitive designer public boolean is relevant critic c designer d return c is enabled controlmech isrelevant isrelevant isenabled see org argouml cognitive critics control mech is relevant org argouml cognitive critics critic org argouml cognitive designer public boolean is relevant critic c designer d return c snooze order get snoozed controlmech isrelevant isrelevant snoozeorder getsnoozed see org argouml cognitive critics control mech is relevant org argouml cognitive critics critic org argouml cognitive designer public boolean is relevant critic c designer d return c is relevant to goals d controlmech isrelevant isrelevant isrelevanttogoals see org argouml cognitive critics control mech is relevant org argouml cognitive critics critic org argouml cognitive designer public boolean is relevant critic c designer d return c is relevant to decisions d controlmech isrelevant isrelevant isrelevanttodecisions return a list of the control mechs protected list control mech get mech list return mechs controlmechs controlmech getmechlist param cm the control mech public void add mech control mech cm mechs add cm controlmech addmech controlmech public boolean is relevant critic c designer d for control mech cm get mech list if cm is relevant c d return false return true isrelevant controlmech getmechlist isrelevant public boolean is relevant critic c designer d for control mech cm get mech list if cm is relevant c d return true return false isrelevant controlmech getmechlist isrelevant constructor for uml collaboration represented operation combo box model public uml collaboration represented operation combo box model super represented operation true umlcollaborationrepresentedoperationcomboboxmodel umlcollaborationrepresentedoperationcomboboxmodel representedoperation protected void build model list collection operations new array list project p project manager get manager get current project for object model p get user defined model list collection c model get model management helper get all model elements of kind model model get meta types get operation for object oper c object ns model get facade get owner oper collection s model get model management helper get all surrounding namespaces ns if s contains get target operations add oper set elements operations buildmodellist arraylist projectmanager getmanager getcurrentproject getuserdefinedmodellist getmodelmanagementhelper getallmodelelementsofkind getmetatypes getoperation getfacade getowner getmodelmanagementhelper getallsurroundingnamespaces gettarget setelements protected boolean is valid element object element return model get facade isa operation element model get facade get represented operation get target element isvalidelement getfacade isaoperation getfacade getrepresentedoperation gettarget protected object get selected model element return model get facade get represented operation get target getselectedmodelelement getfacade getrepresentedoperation gettarget override public void model changed uml change event evt do nothing by design modelchanged umlchangeevent the constructor public cr unconventional class name setup head and desc add supported decision uml decision naming set knowledge types critic kt syntax add trigger name crunconventionalclassname setupheadanddesc addsupporteddecision umldecision setknowledgetypes kt_syntax addtrigger override public boolean predicate2 object dm designer dsgr if model get facade isa class dm model get facade isa interface dm return no problem object cls m classifier dm string my name model get facade get name cls if my name null my name equals return no problem string name str my name if name str null name str length 0 return no problem char initial char name str char at 0 if character is digit initial char character is upper case initial char return problem found return no problem getfacade isaclass getfacade isainterface no_problem mclassifier myname getfacade getname myname myname no_problem namestr myname namestr namestr no_problem initialchar namestr charat isdigit initialchar isuppercase initialchar problem_found no_problem see org argouml cognitive poster get clarifier override public icon get clarifier return cl class name get the instance getclarifier getclarifier clclassname gettheinstance override public void init wizard wizard w if w instanceof wizme name to do item item to do item w get to do item object me item get offenders get 0 string sug model get facade get name me sug compute suggestion sug string ins super get instructions wizme name w set instructions ins wizme name w set suggestion sug initwizard wizmename todoitem todoitem gettodoitem getoffenders getfacade getname computesuggestion getinstructions wizmename setinstructions wizmename setsuggestion public string compute suggestion string sug if sug null return string buffer sb new string buffer sug while sb length 0 character is digit sb char at 0 sb delete char at 0 if sb length 0 return return sb replace 0 1 character to string character to upper case sb char at 0 to string computesuggestion stringbuffer stringbuffer isdigit charat deletecharat tostring touppercase charat tostring see org argouml cognitive critics critic get wizard class org argouml cognitive to do item override public class get wizard class to do item item return wizme name class getwizardclass todoitem getwizardclass todoitem wizmename public set object get criticized design materials set object ret new hash set object ret add model get meta types getuml class return ret getcriticizeddesignmaterials hashset getmetatypes getumlclass constructor for uml model element namespace list model public uml model element namespace list model super namespace umlmodelelementnamespacelistmodel umlmodelelementnamespacelistmodel protected void build model list remove all elements if get target null add element model get facade get namespace get target buildmodellist removeallelements gettarget addelement getfacade getnamespace gettarget see org argouml uml ui uml model element list model2 is valid element object protected boolean is valid element object element return model get facade get namespace get target element umlmodelelementlistmodel2 isvalidelement isvalidelement getfacade getnamespace gettarget the constructor public tab checklist super tab checklist set icon new up arrow icon table model new table model checklist this table set model table model font label font look and feel mgr get instance get standard font table set font label font table set intercell spacing new dimension 0 1 table set show vertical lines false table get selection model add list selection listener this table set auto resize mode j table auto resize last column table column check col table get column model get column 0 table column desc col table get column model get column 1 check col set min width 20 check col set max width 30 check col set width 30 desc col set preferred width 900 table set auto resize mode j table auto resize last column table size columns to fit 1 j scroll pane sp new j scroll pane table set layout new border layout add new j label translator localize tab checklist warning border layout north add sp border layout center add component listener this tabchecklist seticon uparrowicon tablemodel tablemodelchecklist setmodel tablemodel labelfont lookandfeelmgr getinstance getstandardfont setfont labelfont setintercellspacing setshowverticallines getselectionmodel addlistselectionlistener setautoresizemode jtable auto_resize_last_column tablecolumn checkcol getcolumnmodel getcolumn tablecolumn desccol getcolumnmodel getcolumn checkcol setminwidth checkcol setmaxwidth checkcol setwidth desccol setpreferredwidth setautoresizemode jtable auto_resize_last_column sizecolumnstofit jscrollpane jscrollpane setlayout borderlayout jlabel borderlayout borderlayout addcomponentlistener converts a selected element to a target that is appropriate for a checklist p the argument can be either a fig if a figure when something is selected from a diagram or a model element when an object is selected from the explorer p param t that is an object return target that is always model element private object find target object t if t instanceof fig fig f fig t t f get owner return t findtarget getowner accessors actually prepares the tab param t is the target to show the list for public void set target object t target find target t if target null should be enabled false return should be enabled true if is visible set target internal target settarget findtarget shouldbeenabled shouldbeenabled isvisible settargetinternal private void set target internal object t if t null return checklist cl check manager get checklist for t if cl null target null should be enabled false return table model set target t resize columns settargetinternal checkmanager getchecklistfor shouldbeenabled tablemodel settarget resizecolumns see org argouml ui tab target get target public object get target return target tabtarget gettarget gettarget see org argouml ui tab target refresh public void refresh set target target tabtarget settarget public boolean should be enabled object t t find target t if t null should be enabled false return should be enabled should be enabled true checklist cl check manager get checklist for t if cl null should be enabled false return should be enabled return should be enabled shouldbeenabled findtarget shouldbeenabled shouldbeenabled shouldbeenabled checkmanager getchecklistfor shouldbeenabled shouldbeenabled shouldbeenabled resize the columns to fit public void resize columns table column check col table get column model get column 0 table column desc col table get column model get column 1 check col set min width 20 check col set max width 30 check col set width 30 desc col set preferred width 900 table set auto resize mode j table auto resize last column table size columns to fit 0 validate resizecolumns tablecolumn checkcol getcolumnmodel getcolumn tablecolumn desccol getcolumnmodel getcolumn checkcol setminwidth checkcol setmaxwidth checkcol setwidth desccol setpreferredwidth setautoresizemode jtable auto_resize_last_column sizecolumnstofit see java awt event action listener action performed java awt event action event public void action performed action event ae actionlistener actionperformed actionevent actionperformed actionevent see javax swing event list selection listener value changed javax swing event list selection event public void value changed list selection event lse listselectionlistener valuechanged listselectionevent valuechanged listselectionevent see org argouml ui targetmanager target listener target added org argouml ui targetmanager target event public void target added target event e targetlistener targetadded targetevent targetadded targetevent see org argouml ui targetmanager target listener target removed org argouml ui targetmanager target event public void target removed target event e set target e get new target targetlistener targetremoved targetevent targetremoved targetevent settarget getnewtarget see org argouml ui targetmanager target listener target set org argouml ui targetmanager target event public void target set target event e set target e get new target targetlistener targetset targetevent targetset targetevent settarget getnewtarget see java awt event component listener component shown java awt event component event public void component shown component event e update our model with our saved target set target internal target componentlistener componentshown componentevent componentshown componentevent settargetinternal see java awt event component listener component hidden java awt event component event public void component hidden component event e stop updating model when we re not visible set target internal null componentlistener componenthidden componentevent componenthidden componentevent settargetinternal public void component moved component event e ignored componentmoved componentevent public void component resized component event e ignored componentresized componentevent constructor constructor param tc the tab checklist to show public table model checklist tab checklist tc panel tc tabchecklist tablemodelchecklist tabchecklist this function is called when the target is changed by the user it updates the items and causes events to arrive when the uml model of the new target gets updated p limited to the target name changes to reduce the number of events fired param t the new target public void set target object t if model get facade isa element target model get pump remove model event listener this target target t if model get facade isa element target model get pump add model event listener this target name fire table structure changed settarget getfacade isaelement getpump removemodeleventlistener getfacade isaelement getpump addmodeleventlistener firetablestructurechanged see javax swing table table model get column count public int get column count return 2 tablemodel getcolumncount getcolumncount override public string get column name int c if c 0 return x if c 1 return translator localize tab checklist description return xxx getcolumnname public class get column class int c if c 0 return boolean class else if c 1 return string class else return string class getcolumnclass see javax swing table table model is cell editable int int override public boolean is cell editable int row int col return col 0 tablemodel iscelleditable iscelleditable public int get row count if target null return 0 checklist cl check manager get checklist for target if cl null return 0 return cl size getrowcount checkmanager getchecklistfor public object get value at int row int col checklist cl check manager get checklist for target if cl null return no checklist check item ci cl get row if col 0 checklist status stat check manager get status for target return stat contains ci boolean true boolean false else if col 1 return ci get description target else return cl row 2 col getvalueat checkmanager getchecklistfor checkitem checkliststatus checkmanager getstatusfor getdescription override public void set value at object a value int row index int column index log debug setting table value row index column index if column index 0 return if a value instanceof boolean return boolean val boolean a value boolean value checklist cl check manager get checklist for target if cl null return check item ci cl get row index if column index 0 checklist status stat check manager get status for target if val stat add ci else stat remove ci setvalueat avalue rowindex columnindex rowindex columnindex columnindex avalue avalue booleanvalue checkmanager getchecklistfor checkitem rowindex columnindex checkliststatus checkmanager getstatusfor public void vetoable change property change event pce swing utilities invoke later new runnable public void run fire table structure changed panel resize columns vetoablechange propertychangeevent swingutilities invokelater firetablestructurechanged resizecolumns public void vetoable change property change event pce swing utilities invoke later new runnable public void run fire table structure changed panel resize columns vetoablechange propertychangeevent swingutilities invokelater firetablestructurechanged resizecolumns see java beans property change listener property change java beans property change event public void property change property change event evt fire table structure changed panel resize columns propertychangelistener propertychange propertychangeevent propertychange propertychangeevent firetablestructurechanged resizecolumns the constructor settings tab environment super set layout new border layout int label gap 10 int component gap 5 j panel top new j panel new labelled layout label gap component gap j label label new j label translator localize label default graphics format field graphics format new j combo box label set label for field graphics format top add label top add field graphics format label new j label translator localize label default graphics resolution the resolutions new array list g resolution the resolutions add new g resolution 1 combobox item resolution 1 the resolutions add new g resolution 2 combobox item resolution 2 the resolutions add new g resolution 4 combobox item resolution 4 field graphics resolution new j combo box filled in later label set label for field graphics resolution top add label top add field graphics resolution this string is not to be translated see issue 2381 label new j label argo ext dir j text field j2 new j text field field argo ext dir j2 field argo ext dir set enabled false label set label for field argo ext dir top add label top add field argo ext dir this string is not to be translated see issue 2381 label new j label java home j text field j3 new j text field field java home j3 field java home set enabled false label set label for field java home top add label top add field java home this string is not to be translated see issue 2381 label new j label user home j text field j4 new j text field field user home j4 field user home set enabled false label set label for field user home top add label top add field user home this string is not to be translated see issue 2381 label new j label user dir j text field j5 new j text field field user dir j5 field user dir set enabled false label set label for field user dir top add label top add field user dir label new j label translator localize label startup directory j text field j6 new j text field field startup dir j6 field startup dir set enabled false label set label for field startup dir top add label top add field startup dir top set border border factory create empty border 10 10 10 10 add top border layout north j panel bottom new j panel bottom add new j label translator localize label graphics export resolution warning add bottom border layout south settingstabenvironment setlayout borderlayout labelgap componentgap jpanel jpanel labelledlayout labelgap componentgap jlabel jlabel fieldgraphicsformat jcombobox setlabelfor fieldgraphicsformat fieldgraphicsformat jlabel theresolutions arraylist gresolution theresolutions gresolution theresolutions gresolution theresolutions gresolution fieldgraphicsresolution jcombobox setlabelfor fieldgraphicsresolution fieldgraphicsresolution jlabel jtextfield jtextfield fieldargoextdir fieldargoextdir setenabled setlabelfor fieldargoextdir fieldargoextdir jlabel jtextfield jtextfield fieldjavahome fieldjavahome setenabled setlabelfor fieldjavahome fieldjavahome jlabel jtextfield jtextfield fielduserhome fielduserhome setenabled setlabelfor fielduserhome fielduserhome jlabel jtextfield jtextfield fielduserdir fielduserdir setenabled setlabelfor fielduserdir fielduserdir jlabel jtextfield jtextfield fieldstartupdir fieldstartupdir setenabled setlabelfor fieldstartupdir fieldstartupdir setborder borderfactory createemptyborder borderlayout jpanel jpanel jlabel borderlayout public void handle settings tab refresh field argo ext dir set text system get property argo ext dir field java home set text system get property java home field user home set text system get property user home field user dir set text configuration get string argo key startup dir system get property user dir field startup dir set text argo get directory field graphics format remove all items collection c save graphics manager get instance get settings list field graphics format set model new default combo box model c to array field graphics resolution remove all items field graphics resolution set model new default combo box model the resolutions to array int default resolution configuration get integer save graphics manager key graphics resolution 1 for g resolution gr the resolutions if default resolution gr get resolution field graphics resolution set selected item gr break handlesettingstabrefresh fieldargoextdir settext getproperty fieldjavahome settext getproperty fielduserhome settext getproperty fielduserdir settext getstring key_startup_dir getproperty fieldstartupdir settext getdirectory fieldgraphicsformat removeallitems savegraphicsmanager getinstance getsettingslist fieldgraphicsformat setmodel defaultcomboboxmodel toarray fieldgraphicsresolution removeallitems fieldgraphicsresolution setmodel defaultcomboboxmodel theresolutions toarray defaultresolution getinteger savegraphicsmanager key_graphics_resolution gresolution theresolutions defaultresolution getresolution fieldgraphicsresolution setselecteditem public void handle settings tab save configuration set string argo key startup dir field user dir get text g resolution r g resolution field graphics resolution get selected item configuration set integer save graphics manager key graphics resolution r get resolution save graphics manager get instance set default filter suffix filter field graphics format get selected item handlesettingstabsave setstring key_startup_dir fielduserdir gettext gresolution gresolution fieldgraphicsresolution getselecteditem setinteger savegraphicsmanager key_graphics_resolution getresolution savegraphicsmanager getinstance setdefaultfilter suffixfilter fieldgraphicsformat getselecteditem see gui settings tab interface handle settings tab cancel public void handle settings tab cancel handle settings tab refresh guisettingstabinterface handlesettingstabcancel handlesettingstabcancel handlesettingstabrefresh see org argouml ui gui settings tab interface handle reset to default public void handle reset to default do nothing these buttons are not shown guisettingstabinterface handleresettodefault handleresettodefault see gui settings tab interface get tab key public string get tab key return tab environment guisettingstabinterface gettabkey gettabkey see gui settings tab interface get tab panel public j panel get tab panel return this guisettingstabinterface gettabpanel jpanel gettabpanel constructor param r param name g resolution int r string name resolution r label translator localize name gresolution int get resolution return resolution getresolution see java lang object to string public string to string return label tostring tostring creates a new resolved criticxml helper for helping item param rc the resolved critic to expose public resolved criticxml helper resolved critic rc if rc null throw new illegal argument exception there must be a resolved critic supplied item rc resolvedcriticxmlhelper resolvedcritic resolvedcriticxmlhelper resolvedcritic illegalargumentexception resolvedcritic encodes the critic of this resolved critic in an xml safe way and returns the new string the string can be regained by running the returned string through link todo parser decode string return the encoded critic public string get critic return item get critic resolvedcritic todoparser getcritic getcritic gets the offender vector of this critic where each offender is wrapped in an offenderxml helper return a vector of offenderxml helpers or null if there are no offenders see offenderxml helper note used by todo tee public vector offenderxml helper get offender list list string in item get offender list vector offenderxml helper out if in null return null out new vector offenderxml helper for string elem in try offenderxml helper helper new offenderxml helper elem out add element helper catch class cast exception cce todo shouldn t we do something here return out offenderxmlhelper offenderxmlhelpers offenderxmlhelper offenderxmlhelper getoffenderlist getoffenderlist offenderxmlhelper offenderxmlhelper offenderxmlhelper offenderxmlhelper addelement classcastexception suppress warnings unchecked public object invoke feature map string object vt object subject string feature string type object parameters todo this is an absurdly long method break it up if subject null subject vt get self 4 5 2 1 abstraction todo investigate abstraction mapping is not in the model sybsystem 4 5 2 3 association if model get facade isa association subject if type equals if feature equals connection return new array list object model get facade get connections subject additional operation 4 5 3 1 1 if feature equals all connections return new hash set object model get facade get connections subject 4 5 2 5 association end if model get facade isa association end subject if type equals if feature equals aggregation return model get facade get aggregation subject if feature equals changeability return model get facade get changeability subject if feature equals ordering return model get facade get ordering subject if feature equals is navigable return model get facade is navigable subject if feature equals multiplicity return model get facade get multiplicity subject todo is static in uml 2 x if feature equals target scope return model get facade get target scope subject if feature equals visibility return model get facade get visibility subject if feature equals qualifier return model get facade get qualifiers subject if feature equals specification return model get facade get specification subject if feature equals participant return model get facade get classifier subject todo investigate the unnamed opposite end aditional operation 4 5 3 3 1 if feature equals upperbound return model get facade get upper subject 4 5 2 6 attribute if model get facade isa attribute subject if type equals if feature equals initial value return model get facade get initial value subject if feature equals association end return new array list object model get facade get association ends subject 4 5 2 7 behavioral feature if model get facade isa behavioral feature subject if type equals if feature equals is query return model get facade is query subject if feature equals parameter return new array list object model get facade get parameters subject todo implement additional operations in 4 5 3 5 4 5 2 8 binding if model get facade isa binding subject if type equals if feature equals argument return model get facade get arguments subject 4 5 2 9 class if model get facade isa class subject if type equals if feature equals is active return model get facade is active subject 4 5 2 10 classifier if model get facade isa classifier subject if type equals if feature equals feature return new array list object model get facade get features subject if feature equals feature return new array list object model get facade get features subject if feature equals association todo verify if this is the corrected semantics return new array list object model get facade get associated classes subject if feature equals powertype range return new hash set object model get facade get powertype ranges subject todo specified end if feature equals feature return new array list object model get facade get features subject additional operations in 4 5 3 8 if feature equals all features return internal ocl subject vt self feature union self parent ocl as type classifier all features if feature equals all operations return internal ocl subject vt self all features select f f ocl is kind of operation if feature equals all methods return internal ocl subject vt self all features select f f ocl is kind of method if feature equals all attributes return internal ocl subject vt self all features select f f ocl is kind of attribute if feature equals associations return internal ocl subject vt self association association as set if feature equals all associations return internal ocl subject vt self associations union self parent ocl as type classifier all associations if feature equals opposite association ends return internal ocl subject vt self associations select a a connection select ae ae participant self size 1 collect a a connection select ae ae participant self union self associations select a a connection select ae ae participant self size 1 collect a a connection if feature equals all opposite association ends return internal ocl subject vt self opposite association ends union self parent all opposite association ends if feature equals specification return internal ocl subject vt self client dependency select d d ocl is kind of abstraction and d stereotype name realization and d supplier ocl is kind of classifier supplier ocl as type classifier if feature equals all contents return internal ocl subject vt self contents union self parent all contents select e e element ownership visibility public or true or e element ownership visibility protected if feature equals all discriminators return internal ocl subject vt self generalization discriminator union self parent ocl as type classifier all discriminators 4 5 2 11 comment if model get facade isa comment subject suppresswarnings invokefeature getfacade isaassociation arraylist getfacade getconnections allconnections hashset getfacade getconnections associationend getfacade isaassociationend getfacade getaggregation getfacade getchangeability getfacade getordering isnavigable getfacade isnavigable getfacade getmultiplicity isstatic targetscope getfacade gettargetscope getfacade getvisibility getfacade getqualifiers getfacade getspecification getfacade getclassifier getfacade getupper getfacade isaattribute initialvalue getfacade getinitialvalue associationend arraylist getfacade getassociationends behavioralfeature getfacade isabehavioralfeature isquery getfacade isquery arraylist getfacade getparameters getfacade isabinding getfacade getarguments getfacade isaclass isactive getfacade isactive getfacade isaclassifier arraylist getfacade getfeatures arraylist getfacade getfeatures arraylist getfacade getassociatedclasses powertyperange hashset getfacade getpowertyperanges specifiedend arraylist getfacade getfeatures allfeatures internalocl oclastype allfeatures alloperations internalocl allfeatures ocliskindof allmethods internalocl allfeatures ocliskindof allattributes internalocl allfeatures ocliskindof internalocl asset allassociations internalocl oclastype allassociations oppositeassociationends internalocl alloppositeassociationends internalocl oppositeassociationends alloppositeassociationends internalocl clientdependency ocliskindof ocliskindof oclastype allcontents internalocl allcontents elementownership elementownership alldiscriminators internalocl oclastype alldiscriminators getfacade isacomment private object internal ocl object subject map string object vt string ocl try object old self vt get self vt put self subject object ret default ocl evaluator get instance evaluate vt uml14mi ocl vt put self old self return ret catch invalid ocl exception e log error exception e return null internalocl oldself defaultoclevaluator getinstance oldself invalidoclexception add the metamodel metaclasses as built in symbols param sym the symbol return the value of the symbol see org argouml profile internal ocl model interpreter get built in symbol java lang string public object get built in symbol string sym for string name model get facade get metatype names if name equals sym return new ocl type sym return null modelinterpreter getbuiltinsymbol getbuiltinsymbol getfacade getmetatypenames ocltype the constructor param icon name the name of the image to be shown public splash panel string icon name super splash image resource loader wrapper lookup icon resource icon name j label splash label new j label swing constants left the following values were determined experimentally left margin 10 top margin 18 see javax swing j component paint java awt graphics public void paint graphics g super paint g g draw string v application version get version get insets left 10 get insets top 18 if splash image null splash label set icon splash image set layout new border layout 0 0 add splash label border layout center iconname splashpanel iconname splashimage resourceloaderwrapper lookupiconresource iconname jlabel splashlabel jlabel swingconstants jcomponent drawstring applicationversion getversion getinsets getinsets splashimage splashlabel seticon splashimage setlayout borderlayout splashlabel borderlayout the following values were determined experimentally left margin 10 top margin 18 see javax swing j component paint java awt graphics public void paint graphics g super paint g g draw string v application version get version get insets left 10 get insets top 18 jcomponent drawstring applicationversion getversion getinsets getinsets return the image of the splash public image icon get image return splash image imageicon getimage splashimage private wizard item item null construct a new wizard to help the user repair a design flaw public wizard wizarditem param s the step number of the panel to be removed protected void remove panel int s panels remove s removepanel setter for the todoitem param i the todoitem public void set to do item wizard item i item i settodoitem wizarditem return the todoitem public wizard item get to do item return item wizarditem gettodoitem an integer between 0 and 100 shows percent done the current argouml user interface shows different post it note icons for 0 1 25 26 50 51 75 and 76 100 return the percentage done public int get progress return step 100 get num steps postit getprogress getnumsteps get the number of steps in this wizard subclasses should override to return a constant or compute based on context return the number of steps in this wizard get the panel that should be displayed now usually called after the user pressed next gt and next has returned or after the user pressed lt back and back has returned also called when the user turns away from the wizard to do something else and then returns his or her attention to the wizard return the panel that should be displayed now public j panel get current panel return get panel step jpanel getcurrentpanel getpanel get the exising panel at step s step 1 is the first wizard panel param s the step return the panel for step s or null if none public j panel get panel int s if s 0 s panels size return panels get s 1 return null jpanel getpanel return true iff the next gt button should be enabled subclasses should override to first check super next enabled and then check for legal context values return code true code iff the next gt button should be enabled public boolean can go next return step get num steps nextenabled cangonext getnumsteps the next step of the wizard public void next do action step step j panel p make panel step if p null panels add p started true if item null item changed doaction jpanel makepanel return true if we can step back public boolean can go back return step 0 cangoback step back public void back step if step 0 step 0 undo action step if item null item changed undoaction return true if we can finish i e the finish button is not downlighted public boolean can finish return true canfinish return true if the wizard is started public boolean is started return started isstarted return true if the wizard is finished public boolean is finished return finished isfinished finish the wizard public void finish started true int num steps get num steps for int i step i num steps i do action i if item null item changed todo do all following steps todo resolve item from to do list finished true numsteps getnumsteps numsteps doaction todolist create a new panel for the given step for example when the given step is 1 create the first step of the wizard p todo it might be convient to make a reusable subclass of wizard that shows all textual steps to guide the user without any automation such a wizard could be easily authored stored in an xml file and efficiently presented by reusing a single panel with a single j text area param new step the number of the step to make a panel for return a new panel for the given step jtextarea newstep take action at the completion of a step for example when the given step is 0 do nothing and when the given step is 1 do the first action argo non modal wizards should take action as they do along as soon as possible they should not wait until the final step also if the user pressed finish do action may be called for steps that never constructored or displayed their panels param old step the given step doaction oldstep public abstract void do action int old step do the action of this wizard public void do action do action step doaction oldstep doaction doaction undo the action done after the given step for example when the given step is 0 nothing was done so nothing can be undone and when the given step is 1 undo the first action undo allows users to work part way through fixing a problem see the partial result and explore a different alternative param old step the given step public void undo action int old step oldstep undoaction oldstep undo the action public void undo action undo action step undoaction undoaction return returns the step protected int get step return step getstep constructor for uml message activator combo box param container the ui container param arg0 the model public uml message activator combo box uml user interface container container uml combo box model2 arg0 todo this super constructor has been deprecated super arg0 set renderer new uml list cell renderer2 true umlmessageactivatorcombobox umlmessageactivatorcombobox umluserinterfacecontainer umlcomboboxmodel2 setrenderer umllistcellrenderer2 protected void do it action event event object o get model get element at get selected index object activator o object mes get target if activator model get facade get activator mes model get collaborations helper set activator mes activator doit actionevent getmodel getelementat getselectedindex gettarget getfacade getactivator getcollaborationshelper setactivator construct a new selection classifier role for the given fig param f the given fig public selection classifier role fig f super f selectionclassifierrole selectionclassifierrole param b true if the incoming button is enabled public void set incoming button enabled boolean b show incoming b setincomingbuttonenabled showincoming param b true if the outgoing button is enabled public void set outgoing button enabled boolean b show outgoing b setoutgoingbuttonenabled showoutgoing override protected icon get icons icon working icons new icon icons length system arraycopy icons 0 working icons 0 icons length if show incoming working icons base left null if show outgoing working icons base right null if show outgoing show incoming working icons base lower left null return working icons geticons workingicons workingicons showincoming workingicons showoutgoing workingicons showoutgoing showincoming workingicons lower_left workingicons override protected string get instructions int index return instructions index base getinstructions override protected object get new edge type int index the next 4 lines fix the first half of issue 5638 is there no better way editor cur editor globals cur editor mode manager mode manager cur editor get mode manager mode mode mode manager top mode set arg unidirectional true return model get meta types get association role getnewedgetype cureditor cureditor modemanager modemanager cureditor getmodemanager modemanager setarg getmetatypes getassociationrole override protected object get new node type int index return model get meta types get classifier role getnewnodetype getmetatypes getclassifierrole override protected object get new node int index return model get collaborations factory create classifier role getnewnode getcollaborationsfactory createclassifierrole override protected boolean is reverse edge int index if index left return true return false isreverseedge override public void drag handle int mx int my int anx int any handle hand super drag handle mx my anx any hand the next 4 lines fix the 2nd half of issue 5638 is there no better way editor cur editor globals cur editor mode manager mode manager cur editor get mode manager mode mode mode manager top mode set arg unidirectional true draghandle draghandle cureditor cureditor modemanager modemanager cureditor getmodemanager modemanager setarg the constructor public action save project as super translator localize action save project as resource loader wrapper lookup icon action save project as actionsaveprojectas resourceloaderwrapper lookupicon see java awt event action listener action performed java awt event action event public void action performed action event e log info performing saveas action project browser get instance try save false true actionlistener actionperformed actionevent actionperformed actionevent projectbrowser getinstance trysave public fig node get fig node for graph model gm layer lay object node map style attributes assert node null fig node fig node null although not generally true for gef for argo we know that the layer is a layer perspective which knows the associated diagram diagram diag layer perspective lay get diagram if diag instanceof uml diagram uml diagram diag does accept node fig node uml diagram diag drop node null else log debug todo state diagram renderer get fig node for throw new illegal argument exception node is not a recognised type received node get class get name lay add fig node return fig node fignode getfignodefor graphmodel styleattributes fignode fignode layerperspective layerperspective getdiagram umldiagram umldiagram doesaccept fignode umldiagram statediagramrenderer getfignodefor illegalargumentexception getclass getname fignode fignode public fig edge get fig edge for graph model gm layer lay object edge map style attributes assert edge null assert lay instanceof layer perspective argo diagram diag argo diagram layer perspective lay get diagram diagram settings settings diag get diagram settings fig edge new edge null if model get facade isa transition edge new edge new fig transition edge settings else if edge instanceof comment edge new edge new fig edge note edge settings todo settings if new edge null log debug todo state diagram renderer get fig edge for return null lay add new edge return new edge figedge getfigedgefor graphmodel styleattributes layerperspective argodiagram argodiagram layerperspective getdiagram diagramsettings getdiagramsettings figedge newedge getfacade isatransition newedge figtransition commentedge newedge figedgenote newedge statediagramrenderer getfigedgefor newedge newedge creates a new to do itemxml helper for item param todo item a to do item public to do itemxml helper to do item todo item if todo item null throw new null pointer exception item todo item todoitemxmlhelper todoitem todoitem todoitemxmlhelper todoitem todoitem todoitem nullpointerexception todoitem encodes the headline of this to do item in an xml safe way and returns the new string the string can be regained by running the returned string through link todo parser decode string return the encoded headline public string get headline return todo parser encode item get headline todoitem todoparser getheadline todoparser getheadline encodes the priority of this to do item in an xml safe way and returns the new string the string can be regained by running the returned string through link todo parser decode string and comparing to the string prio values in todo token table return the encoded priority public string get priority string s todo token table string prio high switch item get priority case to do item high priority s todo token table string prio high break case to do item med priority s todo token table string prio med break case to do item low priority s todo token table string prio low break return todo parser encode s todoitem todoparser string_prio_ todotokentable getpriority todotokentable string_prio_high getpriority todoitem high_priority todotokentable string_prio_high todoitem med_priority todotokentable string_prio_med todoitem low_priority todotokentable string_prio_low todoparser encodes the more infourl of this to do item in an xml safe way and returns the new string the string can be regained by running the returned string through link todo parser decode string return the encoded more infourl public string get more infourl return todo parser encode item get more infourl moreinfourl todoitem todoparser moreinfourl getmoreinfourl todoparser getmoreinfourl encodes the description of this to do item in an xml safe way and returns the new string the string can be regained by running the returned string through link todo parser decode string return the encoded description public string get description return todo parser encode item get description todoitem todoparser getdescription todoparser getdescription the constructor param owner the owner object public message node fig classifier role owner fig classifier role owner fig message port null state initial messagenode figclassifierrole figclassifierrole figmessageport todo need to replace this with get fig message return the fig message port public fig message port get fig message port return fig message port getfigmessage figmessageport figmessageport getfigmessageport figmessageport return the state public int get state return state getstate param st the state public void set state int st state st setstate param the callers the callers public void set callers list the callers this callers the callers thecallers setcallers thecallers thecallers get the list of callers return the caller list public list get callers return callers getcallers return the figclassifierrole that is the owner public fig classifier role get fig classifier role return fig classifier role figclassifierrole getfigclassifierrole figclassifierrole return the classifierrole public object get classifier role return fig classifier role get owner getclassifierrole figclassifierrole getowner param fmp the fig messageport public void set fig message port fig message port fmp fig message port fmp setfigmessageport figmessageport figmessageport public boolean can call return fig message port null state initial state created state called state done something no call state implicit returned state implicit created cancall figmessageport done_something_no_call implicit_returned implicit_created public boolean can be called return fig message port null state initial state created state done something no call state called state returned state implicit returned state implicit created canbecalled figmessageport done_something_no_call implicit_returned implicit_created public boolean can return object caller return fig message port null callers null callers contains caller canreturn figmessageport public boolean can be returned to return fig message port null state done something no call state called state created state implicit returned state implicit created canbereturnedto figmessageport done_something_no_call implicit_returned implicit_created public boolean matching caller list object caller int caller index if callers null callers last index of caller caller index if state implicit returned state called return true return false matchingcallerlist callerindex lastindexof callerindex implicit_returned public boolean can create return can call cancreate cancall public boolean can destroy return can call candestroy cancall public boolean can be created return fig message port null state initial canbecreated figmessageport public boolean can be destroyed boolean destroyable node fig message port null state done something no call state created state called state returned state implicit returned state implicit created if destroyable node for int i fig classifier role get index of this 1 destroyable node i fig classifier role get node count i message node node fig classifier role get node i if node get fig message port null destroyable node false return destroyable node canbedestroyed destroyablenode figmessageport done_something_no_call implicit_returned implicit_created destroyablenode figclassifierrole getindexof destroyablenode figclassifierrole getnodecount messagenode figclassifierrole getnode getfigmessageport destroyablenode destroyablenode construct an exception dialog for the given frame and throwable param f the code frame code from which the dialog is displayed param e the exception public exception dialog frame f throwable e this f translator localize dialog exception unknown error e exceptiondialog construct an exception dialog with the given parameters param f the code frame code from which the dialog is displayed param message the message param e the exception public exception dialog frame f string message throwable e this f message e false exceptiondialog construct an exception dialog with the given parameters param f the code frame code from which the dialog is displayed param message the message param e the exception param highlight cause give priority to throwable cause in display use this if the main exception is mostly boilerplate and the really useful information is in the enclosed cause public exception dialog frame f string message throwable e boolean highlight cause this f translator localize dialog exception title translator localize dialog exception message format exception message e highlight cause highlightcause exceptiondialog highlightcause formatexception highlightcause public static string format exception string message throwable e boolean highlight cause string writer sw new string writer print writer pw new print writer sw if highlight cause e get cause null this text is for the developers it doesn t need to be localized pw print message pw print hr system info p system info dialog get info pw print p hr error occurred at new date pw print p cause e get cause print stack trace pw pw print p full exception e print stack trace pw return sw to string formatexception highlightcause stringwriter stringwriter printwriter printwriter highlightcause getcause systeminfodialog getinfo getcause printstacktrace printstacktrace tostring construct an exception dialog with given title introduction and detail message param f the code frame code from which the dialog is displayed param title string to use as title of dialog box param intro introductory text summary of error param message the message public exception dialog frame f string title string intro string message super f set resizable true set modal false set title title dimension scr size toolkit get default toolkit get screen size get content pane set layout new border layout 0 0 the introducing label north label new j label intro north label set border border factory create empty border 5 5 5 5 get content pane add north label border layout north the text box containing the problem messages todo this should be hidden by default but accessible on via a details button or tab to provide more info to the user text area new j editor pane text area set content type text html text area set editable false text area add hyperlink listener new hyperlink listener public void hyperlink update hyperlink event hle link event hle these shouldn t really be br instead of p elements but the lines all get run together when pasted into a browser window text area set text message replace all n p text area set caret position 0 j panel center panel new j panel new border layout center panel add new j scroll pane text area center panel set preferred size new dimension 500 200 get content pane add center panel copy button new j button translator localize button copy to clipboard copy button add action listener new action listener public void action performed action event evt copy action performed evt close button new j button translator localize button close close button add action listener this j panel bottom panel new j panel bottom panel add copy button bottom panel add close button get content pane add bottom panel border layout south add window listener new window adapter public void window closing window event evt dispose dialog pack dimension content pane size get content pane get size set location scr size width 2 content pane size width 2 scr size height 2 content pane size height 2 exceptiondialog setresizable setmodal settitle scrsize getdefaulttoolkit getscreensize getcontentpane setlayout borderlayout northlabel jlabel northlabel setborder borderfactory createemptyborder getcontentpane northlabel borderlayout textarea jeditorpane textarea setcontenttype textarea seteditable textarea addhyperlinklistener hyperlinklistener hyperlinkupdate hyperlinkevent linkevent textarea settext replaceall textarea setcaretposition jpanel centerpanel jpanel borderlayout centerpanel jscrollpane textarea centerpanel setpreferredsize getcontentpane centerpanel copybutton jbutton copybutton addactionlistener actionlistener actionperformed actionevent copyactionperformed closebutton jbutton closebutton addactionlistener jpanel bottompanel jpanel bottompanel copybutton bottompanel closebutton getcontentpane bottompanel borderlayout addwindowlistener windowadapter windowclosing windowevent disposedialog contentpanesize getcontentpane getsize setlocation scrsize contentpanesize scrsize contentpanesize text area set editable false text area add hyperlink listener new hyperlink listener public void hyperlink update hyperlink event hle link event hle textarea seteditable textarea addhyperlinklistener hyperlinklistener hyperlinkupdate hyperlinkevent linkevent new j button translator localize button copy to clipboard copy button add action listener new action listener public void action performed action event evt copy action performed evt jbutton copybutton addactionlistener actionlistener actionperformed actionevent copyactionperformed add window listener new window adapter public void window closing window event evt dispose dialog addwindowlistener windowadapter windowclosing windowevent disposedialog see java awt event action listener action performed java awt event action event public void action performed action event e dispose dialog actionlistener actionperformed actionevent actionperformed actionevent disposedialog copy the textpane s contents to the clipboard param e the action event private void copy action performed action event e assert e get source copy button text area set selection start 0 text area set selection end text area get text length text area copy text area set selection end 0 actionevent copyactionperformed actionevent getsource copybutton textarea setselectionstart textarea setselectionend textarea gettext textarea textarea setselectionend dispose this dialog private void dispose dialog set visible false dispose disposedialog setvisible handle link activation for our hyperlink param e the event private void link event hyperlink event e if e get event type equals hyperlink event event type activated start browser open url e geturl linkevent hyperlinkevent geteventtype hyperlinkevent eventtype startbrowser openurl construct a property panel for a use case public prop panel use case super label usecase lookup icon use case add field label name get name text field add field label namespace get namespace selector add get modifiers panel add field label client dependencies get client dependency scroll add field label supplier dependencies get supplier dependency scroll add separator add field label generalizations get generalization scroll add field label specializations get specialization scroll j list extends list new uml linked list new uml use case extend list model add field label extends new j scroll pane extends list j list includes list new uml linked list new uml use case include list model add field label includes new j scroll pane includes list add separator add field label attributes get attribute scroll add field label association ends get association end scroll add field label operations get operation scroll j list extension points new uml mutable linked list new uml use case extension point list model null action new use case extension point singleton add field label extension points new j scroll pane extension points add action new action navigate namespace add action new action new use case add action new action new extension point add action new action add attribute add action new action add operation add action get action new reception add action new action new stereotype add action get delete action usecase proppanelusecase lookupicon usecase addfield getnametextfield addfield getnamespaceselector getmodifierspanel addfield getclientdependencyscroll addfield getsupplierdependencyscroll addseparator addfield getgeneralizationscroll addfield getspecializationscroll jlist extendslist umllinkedlist umlusecaseextendlistmodel addfield jscrollpane extendslist jlist includeslist umllinkedlist umlusecaseincludelistmodel addfield jscrollpane includeslist addseparator addfield getattributescroll addfield getassociationendscroll addfield getoperationscroll jlist extensionpoints umlmutablelinkedlist umlusecaseextensionpointlistmodel actionnewusecaseextensionpoint addfield jscrollpane extensionpoints addaction actionnavigatenamespace addaction actionnewusecase addaction actionnewextensionpoint addaction actionaddattribute addaction actionaddoperation addaction getactionnewreception addaction actionnewstereotype addaction getdeleteaction the constructor public action add literal super button new enumeration literal put value action name translator localize button new enumeration literal icon icon resource loader wrapper lookup icon enumeration literal put value action small icon icon actionaddliteral putvalue resourceloaderwrapper lookupicon enumerationliteral putvalue small_icon public void action performed action event e object target target manager get instance get model target if model get facade isa enumeration literal target target model get facade get enumeration target if model get facade isa classifier target object el model get core factory build enumeration literal target target manager get instance set target el super action performed e actionperformed actionevent targetmanager getinstance getmodeltarget getfacade isaenumerationliteral getfacade getenumeration getfacade isaclassifier getcorefactory buildenumerationliteral targetmanager getinstance settarget actionperformed creates a uml plain text document object that represents the text of a comment associated with a model element param use body use the uml 1 4 body attribute instead of the uml 1 3 name attribute public uml model element comment document boolean use body super comment this use body use body umlplaintextdocument modelelement usebody umlmodelelementcommentdocument usebody usebody usebody add a comment with the given string todo currently a no op doc is read only param text the property protected void set property string text if model get facade isa model element get target model get core helper add comment get target text setproperty getfacade isamodelelement gettarget getcorehelper addcomment gettarget get the text of all comments annotating this model element return the text of all comments protected string get property string buffer sb new string buffer collection comments collections empty list if model get facade isa model element get target comments model get facade get comments get target for iterator i comments iterator i has next object c i next string s if use body s string model get facade get body c sb append string model get facade get body c else s model get facade get name c sb append model get facade get name c if s null s sb append s sb append if sb length 4 return sb substring 0 sb length 4 to string else return getproperty stringbuffer stringbuffer empty_list getfacade isamodelelement gettarget getfacade getcomments gettarget hasnext usebody getfacade getbody getfacade getbody getfacade getname getfacade getname tostring see org argouml ui explorer rules perspective rule get rule name public string get rule name return translator localize misc project collaboration perspectiverule getrulename getrulename public collection get children object parent collection col new array list if parent instanceof project for object model project parent get user defined model list col add all model get model management helper get all model elements of kind model model get meta types get collaboration return col getchildren arraylist getuserdefinedmodellist addall getmodelmanagementhelper getallmodelelementsofkind getmetatypes getcollaboration public set get dependencies object parent if parent instanceof project set set new hash set set add parent return set return collections empty set getdependencies hashset empty_set the constructor public action add classifier role super model get meta types get classifier role button new classifierrole actionaddclassifierrole getmetatypes getclassifierrole public object make node object node null editor ce globals cur editor graph model gm ce get graph model if gm instanceof sequence diagram graph model object collaboration sequence diagram graph model gm get collaboration node model get collaborations factory build classifier role collaboration model get core helper set namespace node model get facade get namespace collaboration else throw new illegal state exception graphmodel is not a sequence diagram graph model return node makenode cureditor graphmodel getgraphmodel sequencediagramgraphmodel sequencediagramgraphmodel getcollaboration getcollaborationsfactory buildclassifierrole getcorehelper setnamespace getfacade getnamespace illegalstateexception constructor deprecated for 0 28 by tfmorris use link uml activity diagram string object graph model deprecated public uml deployment diagram try set name get new diagram name catch property veto exception pve todo all super constrcutors should take a graph model set graph model create graph model umlactivitydiagram graphmodel umldeploymentdiagram setname getnewdiagramname propertyvetoexception graphmodel setgraphmodel creategraphmodel param namespace the namespace for the new diagram deprecated for 0 28 by tfmorris use link uml activity diagram string object graph model deprecated public uml deployment diagram object namespace this set namespace namespace umlactivitydiagram graphmodel umldeploymentdiagram setnamespace method to perform a number of important initializations of a em deployment diagram em p each diagram type has a similar em um lxxx diagram em class p changed em lay em from em layer perspective em to em layer perspective mutable em this class is a child of em layer perspective em and was implemented to correct some difficulties in changing the model em lay em is used mainly in em layer manager em gef to control the adding changing and deleting layers on the diagram p param handle package from the model author psager tigris org jan 24 2002 public void set namespace object handle if model get facade isa namespace handle log error illegal argument object handle is not a namespace throw new illegal argument exception illegal argument object handle is not a namespace object m handle boolean init null get namespace super set namespace m deployment diagram graph model gm create graph model gm set home model m if init layer perspective lay new layer perspective mutable model get facade get name m gm deployment diagram renderer rend new deployment diagram renderer lay set graph node renderer rend lay set graph edge renderer rend set layer lay umlxxxdiagram layerperspective layerperspectivemutable layerperspective layermanager setnamespace getfacade isanamespace illegalargumentexception getnamespace setnamespace deploymentdiagramgraphmodel creategraphmodel sethomemodel layerperspective layerperspectivemutable getfacade getname deploymentdiagramrenderer deploymentdiagramrenderer setgraphnoderenderer setgraphedgerenderer setlayer should be created in constructor private deployment diagram graph model create graph model if get graph model instanceof deployment diagram graph model return deployment diagram graph model get graph model else return new deployment diagram graph model deploymentdiagramgraphmodel creategraphmodel getgraphmodel deploymentdiagramgraphmodel deploymentdiagramgraphmodel getgraphmodel deploymentdiagramgraphmodel protected object get uml actions object actions get actionm node get actionm node instance get actionm component get actionm component instance get actionm generalization get actionm abstraction get actionm dependency get association actions get actionm object get actionm link return actions getumlactions getactionmnode getactionmnodeinstance getactionmcomponent getactionmcomponentinstance getactionmgeneralization getactionmabstraction getactionmdependency getassociationactions getactionmobject getactionmlink private object get association actions object actions get action association get action uni association get action aggregation get action uni aggregation get action composition get action uni composition tool bar utility manage default actions diagram deployment association return actions getassociationactions getactionassociation getactionuniassociation getactionaggregation getactionuniaggregation getactioncomposition getactionunicomposition toolbarutility managedefault see org argouml uml diagram ui uml diagram get label name public string get label name return translator localize label deployment diagram umldiagram getlabelname getlabelname return returns the action aggregation protected action get action aggregation if action aggregation null action aggregation new radio action new action set add association mode model get aggregation kind get aggregate false button new aggregation return action aggregation actionaggregation getactionaggregation actionaggregation actionaggregation radioaction actionsetaddassociationmode getaggregationkind getaggregate actionaggregation return returns the action association protected action get action association if action association null action association new radio action new action set add association mode model get aggregation kind get none false button new association return action association actionassociation getactionassociation actionassociation actionassociation radioaction actionsetaddassociationmode getaggregationkind getnone actionassociation return returns the action composition protected action get action composition if action composition null action composition new radio action new action set add association mode model get aggregation kind get composite false button new composition return action composition actioncomposition getactioncomposition actioncomposition actioncomposition radioaction actionsetaddassociationmode getaggregationkind getcomposite actioncomposition return returns the actionm association protected action get actionm association if actionm association null actionm association new radio action new action set mode mode create poly edge class edge class model get meta types get association button new association return actionm association actionmassociation getactionmassociation actionmassociation actionmassociation radioaction actionsetmode modecreatepolyedge edgeclass getmetatypes getassociation actionmassociation return returns the actionm class protected action get actionm class if actionm class null actionm class new radio action new cmd create node model get meta types getuml class button new class return actionm class actionmclass getactionmclass actionmclass actionmclass radioaction cmdcreatenode getmetatypes getumlclass actionmclass return returns the actionm component protected action get actionm component if actionm component null actionm component new radio action new cmd create node model get meta types get component button new component return actionm component actionmcomponent getactionmcomponent actionmcomponent actionmcomponent radioaction cmdcreatenode getmetatypes getcomponent actionmcomponent return returns the actionm component instance protected action get actionm component instance if actionm component instance null actionm component instance new radio action new cmd create node model get meta types get component instance button new componentinstance return actionm component instance actionmcomponentinstance getactionmcomponentinstance actionmcomponentinstance actionmcomponentinstance radioaction cmdcreatenode getmetatypes getcomponentinstance actionmcomponentinstance return returns the actionm dependency protected action get actionm dependency if actionm dependency null actionm dependency new radio action new action set mode mode create poly edge class edge class model get meta types get dependency button new dependency return actionm dependency actionmdependency getactionmdependency actionmdependency actionmdependency radioaction actionsetmode modecreatepolyedge edgeclass getmetatypes getdependency actionmdependency return returns the actionm generalization protected action get actionm generalization if actionm generalization null actionm generalization new radio action new action set mode mode create poly edge class edge class model get meta types get generalization button new generalization return actionm generalization actionmgeneralization getactionmgeneralization actionmgeneralization actionmgeneralization radioaction actionsetmode modecreatepolyedge edgeclass getmetatypes getgeneralization actionmgeneralization return returns the actionm abstraction protected action get actionm abstraction if actionm abstraction null actionm abstraction new radio action new action set mode mode create poly edge class edge class model get meta types get abstraction button new realization return actionm abstraction actionmabstraction getactionmabstraction actionmabstraction actionmabstraction radioaction actionsetmode modecreatepolyedge edgeclass getmetatypes getabstraction actionmabstraction return returns the actionm interface protected action get actionm interface if actionm interface null actionm interface new radio action new cmd create node model get meta types get interface button new interface return actionm interface actionminterface getactionminterface actionminterface actionminterface radioaction cmdcreatenode getmetatypes getinterface actionminterface return returns the actionm link protected action get actionm link if actionm link null actionm link new radio action new action set mode mode create poly edge class edge class model get meta types get link button new link return actionm link actionmlink getactionmlink actionmlink actionmlink radioaction actionsetmode modecreatepolyedge edgeclass getmetatypes getlink actionmlink return returns the actionm node protected action get actionm node if actionm node null actionm node new radio action new cmd create node model get meta types get node button new node return actionm node actionmnode getactionmnode actionmnode actionmnode radioaction cmdcreatenode getmetatypes getnode actionmnode return returns the actionm node instance protected action get actionm node instance if actionm node instance null actionm node instance new radio action new cmd create node model get meta types get node instance button new nodeinstance return actionm node instance actionmnodeinstance getactionmnodeinstance actionmnodeinstance actionmnodeinstance radioaction cmdcreatenode getmetatypes getnodeinstance actionmnodeinstance return returns the actionm object protected action get actionm object if actionm object null actionm object new radio action new cmd create node model get meta types get object button new object return actionm object actionmobject getactionmobject actionmobject actionmobject radioaction cmdcreatenode getmetatypes getobject actionmobject return returns the action uni aggregation protected action get action uni aggregation if action uni aggregation null action uni aggregation new radio action new action set add association mode model get aggregation kind get aggregate true button new uniaggregation return action uni aggregation actionuniaggregation getactionuniaggregation actionuniaggregation actionuniaggregation radioaction actionsetaddassociationmode getaggregationkind getaggregate actionuniaggregation return returns the action uni association protected action get action uni association if action uni association null action uni association new radio action new action set add association mode model get aggregation kind get none true button new uniassociation return action uni association actionuniassociation getactionuniassociation actionuniassociation actionuniassociation radioaction actionsetaddassociationmode getaggregationkind getnone actionuniassociation return returns the action uni composition protected action get action uni composition if action uni composition null action uni composition new radio action new action set add association mode model get aggregation kind get composite true button new unicomposition return action uni composition actionunicomposition getactionunicomposition actionunicomposition actionunicomposition radioaction actionsetaddassociationmode getaggregationkind getcomposite actionunicomposition see org argouml uml diagram ui uml diagram is relocation allowed java lang object public boolean is relocation allowed object base return model get facade isa package base umldiagram isrelocationallowed isrelocationallowed getfacade isapackage suppress warnings unchecked public collection get relocation candidates object root return model get model management helper get all model elements of kind with model root model get meta types get package suppresswarnings getrelocationcandidates getmodelmanagementhelper getallmodelelementsofkindwithmodel getmetatypes getpackage public boolean relocate object base set namespace base damage return true setnamespace provides the standard functionality of the superclass only for deployment diagram specific model elements param model element the model element param namespace the namespace or null for diagram see org argouml uml diagram ui uml diagram set model element namespace java lang object object public void set model element namespace object model element object namespace facade facade model get facade if facade isa node model element facade isa node instance model element facade isa component model element facade isa component instance model element log info setting namespace of model element super set model element namespace model element namespace modelelement umldiagram setmodelelementnamespace setmodelelementnamespace modelelement getfacade isanode modelelement isanodeinstance modelelement isacomponent modelelement isacomponentinstance modelelement modelelement setmodelelementnamespace modelelement public void encloser changed fig node enclosed fig node old encloser fig node new encloser if old encloser null new encloser null model get facade isa component old encloser get owner collection object er1 model get facade get element residences enclosed get owner collection er2 model get facade get resident elements old encloser get owner collection object common new array list object er1 common retain all er2 for object element residence common model get uml factory delete element residence encloserchanged fignode fignode oldencloser fignode newencloser oldencloser newencloser getfacade isacomponent oldencloser getowner getfacade getelementresidences getowner getfacade getresidentelements oldencloser getowner arraylist retainall elementresidence getumlfactory elementresidence override public boolean does accept object object to accept if model get facade isa node object to accept return true else if model get facade isa association object to accept return true else if model get facade isa node instance object to accept return true else if model get facade isa component object to accept return true else if model get facade isa component instance object to accept return true else if model get facade isa class object to accept return true else if model get facade isa interface object to accept return true else if model get facade isa object object to accept return true else if model get facade isa comment object to accept return true else if model get facade isa actor object to accept return true return false doesaccept objecttoaccept getfacade isanode objecttoaccept getfacade isaassociation objecttoaccept getfacade isanodeinstance objecttoaccept getfacade isacomponent objecttoaccept getfacade isacomponentinstance objecttoaccept getfacade isaclass objecttoaccept getfacade isainterface objecttoaccept getfacade isaobject objecttoaccept getfacade isacomment objecttoaccept getfacade isaactor objecttoaccept override public fig node drop object dropped object point location fig node fig node null if location is non null convert to a rectangle that we can use rectangle bounds null if location null bounds new rectangle location x location y 0 0 diagram settings settings get diagram settings if model get facade isa node dropped object fig node new figm node dropped object bounds settings else if model get facade isa association dropped object fig node create nary association node dropped object bounds settings else if model get facade isa node instance dropped object fig node new fig node instance dropped object bounds settings else if model get facade isa component dropped object fig node new fig component dropped object bounds settings else if model get facade isa component instance dropped object fig node new fig component instance dropped object bounds settings else if model get facade isa class dropped object fig node new fig class dropped object bounds settings else if model get facade isa interface dropped object fig node new fig interface dropped object bounds settings else if model get facade isa object dropped object fig node new fig object dropped object bounds settings else if model get facade isa actor dropped object fig node new fig actor dropped object bounds settings else if model get facade isa comment dropped object fig node new fig comment dropped object bounds settings if fig node null if location is null here the position of the new fig node is set after in org tigris gef base mode place mouse pressed mouse event e if location null fig node set location location x location y log debug dropped object dropped object converted to fig node else log debug dropped object not added fig node return fig node fignode droppedobject fignode fignode diagramsettings getdiagramsettings getfacade isanode droppedobject fignode figmnode droppedobject getfacade isaassociation droppedobject fignode createnaryassociationnode droppedobject getfacade isanodeinstance droppedobject fignode fignodeinstance droppedobject getfacade isacomponent droppedobject fignode figcomponent droppedobject getfacade isacomponentinstance droppedobject fignode figcomponentinstance droppedobject getfacade isaclass droppedobject fignode figclass droppedobject getfacade isainterface droppedobject fignode figinterface droppedobject getfacade isaobject droppedobject fignode figobject droppedobject getfacade isaactor droppedobject fignode figactor droppedobject getfacade isacomment droppedobject fignode figcomment droppedobject fignode fignode modeplace mousepressed mouseevent fignode setlocation droppedobject fignode fignode fignode constructor param x x param y x param w w param h h param a fig the fig param np the notation provider for the text deprecated for 0 27 3 by tfmorris suppress warnings deprecation deprecated public fig operation int x int y int w int h fig a fig notation provider np super x y w h a fig np afig suppresswarnings figoperation afig notationprovider afig construct a fig for a uml operation deprecated by mvw in v0 27 3 use the constructor without np parameter param owner owning uml element param bounds position and size param settings rendering settings param np notation provider suppress warnings deprecation deprecated public fig operation object owner rectangle bounds diagram settings settings notation provider np super owner bounds settings np model get pump add model event listener this owner is abstract suppresswarnings figoperation diagramsettings notationprovider getpump addmodeleventlistener isabstract construct a fig for a uml operation param owner owning uml element param bounds position and size param settings rendering settings public fig operation object owner rectangle bounds diagram settings settings super owner bounds settings model get pump add model event listener this owner is abstract figoperation diagramsettings getpump addmodeleventlistener isabstract suppress warnings deprecation deprecated override public void set owner object owner super set owner owner if owner null diagram font changed null model get pump add model event listener this owner is abstract suppresswarnings setowner setowner diagramfontchanged getpump addmodeleventlistener isabstract override public void remove from diagram model get pump remove model event listener this get owner is abstract super remove from diagram removefromdiagram getpump removemodeleventlistener getowner isabstract removefromdiagram override public void property change property change event pce super property change pce if is abstract equals pce get property name rendering changed propertychange propertychangeevent propertychange isabstract getpropertyname renderingchanged override protected int get fig font style return model get facade is abstract get owner font italic font plain getfigfontstyle getfacade isabstract getowner override protected int get notation provider type return notation provider factory2 type operation getnotationprovidertype notationproviderfactory2 type_operation private static list tree model rules new array list tree model private perspective support treemodel arraylist treemodel perspectivesupport creates a new instance of perspective support param n the name to be localized public perspective support string n name translator localize n go rules new array list tree model perspectivesupport perspectivesupport gorules arraylist treemodel the constructor p todo is this constructor used what is the purpose with it param n the name to be localized param subs the go rules public perspective support string n list tree model subs this n go rules subs perspectivesupport treemodel gorules adds a rule to the perspective that will generate child nodes for any given parent node param tm the tree model to be added public void add sub tree model tree model tm if go rules contains tm return go rules add tm addsubtreemodel treemodel gorules gorules remove a rule from the perspective that will generate child nodes for any given parent node param tm the treemodel to be removed public void remove sub tree model tree model tm go rules remove tm removesubtreemodel treemodel gorules get the rules that together form the perspective return the rules that form the perspective public list tree model get sub tree model list return go rules treemodel getsubtreemodellist gorules name return the name public string get name return name getname param s the name public void set name string s name s setname override public string to string if get name null return get name else return super to string tostring getname getname tostring todo factor out param rule the rule to be added public static void register rule tree model rule rules add rule registerrule treemodel return returns the gorules protected list tree model get go rule list return go rules _gorules treemodel getgorulelist gorules public class action stereotype view small icon extends action stereotype view default constructor for this action param node the current node public action stereotype view small icon fig node model element node super node menu popup stereotype view small icon diagram appearance stereotype view small icon actionstereotypeviewsmallicon actionstereotypeview actionstereotypeviewsmallicon fignodemodelelement diagramappearance stereotype_view_small_icon the singleton accessor method of this class return the singleton public static project manager get manager return instance projectmanager getmanager constructor for project manager private project manager super model set model command creation observer this projectmanager projectmanager setmodelcommandcreationobserver adds a listener to the listener list param listener the listener to add public void add property change listener property change listener listener listener list add property change listener class listener addpropertychangelistener propertychangelistener listenerlist propertychangelistener removes a listener from the listener list param listener the listener to remove public void remove property change listener property change listener listener listener list remove property change listener class listener removepropertychangelistener propertychangelistener listenerlist propertychangelistener fire an event to all members of the listener list param property name the name of the event param old value the old value param new value the new value void fire property changed string property name object old value object new value guaranteed to return a non null array object listeners listener list get listener list process the listeners last to first notifying those that are interested in this event for int i listeners length 2 i 0 i 2 if listeners i property change listener class lazily create the event if event null event new property change event this property name old value new value property change listener listeners i 1 property change event event null propertyname oldvalue newvalue firepropertychanged propertyname oldvalue newvalue listenerlist getlistenerlist propertychangelistener propertychangeevent propertyname oldvalue newvalue propertychangelistener propertychange sets the current project the project that is viewable in the projectbrowser sets the current diagram for the project if one exists this method fires a propertychanged event p if the argument is null then the current project will be forgotten about param new project the new project deprecated for 0 27 2 by tfmorris there is no longer the concept of a single global current project in the future multiple projects will be able to be open at a time so all code should be prepared to deal with multiple projects and should require a project to be passed as an argument if they need access public void set current project project new project project old project current project current project new project add project new project if current project null current project get active diagram null list argo diagram diagrams current project get diagram list if diagrams null diagrams is empty argo diagram active diagram diagrams get 0 current project set active diagram active diagram notify project added new project old project newproject setcurrentproject newproject oldproject currentproject currentproject newproject addproject newproject currentproject currentproject getactivediagram argodiagram currentproject getdiagramlist isempty argodiagram activediagram currentproject setactivediagram activediagram notifyprojectadded newproject oldproject private void notify project added project new project project old project fire property changed current project property name old project new project todo tentative implementation do we want something that updates the list of open projects or just simple open and close events tfm fire property changed open projects property new project old project new project new project notifyprojectadded newproject oldproject firepropertychanged current_project_property_name oldproject newproject firepropertychanged open_projects_property oldproject newproject returns the current project ie the project which must recently had the user focus or null if there is no current project p this should only be used by callers who need to know the global state most things which need a project want the project that contains them which they can discover by traversing their containing elements e g fig diagram diagram settings p return project the current project or null if none deprecated for 0 27 2 by tfmorris there is no longer the concept of a single global current project in the future multiple projects will be able to be open at a time so all code should be prepared to deal with multiple projects and should require a project to be passed as an argument if they need access to get a list of all currently open projects use link get open projects for settings which affect renderings in diagrams use link org argouml uml diagram ui argo fig get settings public project get current project if current project null creating current project make empty project return current project diagramsettings getopenprojects argofig getsettings getcurrentproject currentproject creatingcurrentproject makeemptyproject currentproject return a list of the currently open projects in the order they were opened public list project get open projects list project result new array list project if current project null result add current project return result getopenprojects arraylist currentproject currentproject makes an empty project return project the empty project public project make empty project return make empty project true makeemptyproject makeemptyproject make a new empty project optionally including default diagrams p historically new projects have been created with two default diagrams class and use case note argouml currently requires at least one diagram for proper operation param add default diagrams if true the project will be be created with the two standard default diagrams class and use case return project the newly created project public project make empty project final boolean add default diagrams final command cmd new non undoable command override public object execute model get pump stop pumping events creating current project true log info making empty project project new project new project impl create default model new project if add default diagrams create default diagrams new project creating current project false set current project new project model get pump start pumping events return null cmd execute current project get undo manager add command cmd set save enabled false return current project adddefaultdiagrams makeemptyproject adddefaultdiagrams nonundoablecommand getpump stoppumpingevents creatingcurrentproject newproject projectimpl createdefaultmodel newproject adddefaultdiagrams createdefaultdiagrams newproject creatingcurrentproject setcurrentproject newproject getpump startpumpingevents currentproject getundomanager addcommand setsaveenabled currentproject override public object execute model get pump stop pumping events creating current project true log info making empty project project new project new project impl create default model new project if add default diagrams create default diagrams new project creating current project false set current project new project model get pump start pumping events return null getpump stoppumpingevents creatingcurrentproject newproject projectimpl createdefaultmodel newproject adddefaultdiagrams createdefaultdiagrams newproject creatingcurrentproject setcurrentproject newproject getpump startpumpingevents create the default diagrams for the project currently a class diagram and a use case diagram param project the project to create the diagrams in private void create default diagrams project project object model project get roots iterator next diagram factory df diagram factory get instance argo diagram d df create diagram factory diagram type class model project get project settings get default diagram settings project add member d project add member df create diagram factory diagram type use case model project get project settings get default diagram settings project add member new project member todo list project project set active diagram d usecase createdefaultdiagrams getroots diagramfactory diagramfactory getinstance argodiagram diagramfactory diagramtype getprojectsettings getdefaultdiagramsettings addmember addmember diagramfactory diagramtype usecase getprojectsettings getdefaultdiagramsettings addmember projectmembertodolist setactivediagram create the top level model for the project and set it as a root and the current namespace param project the project to create the model in private void create default model project project object model model get model management factory create model model get core helper set name model translator localize misc untitled model collection roots new array list roots add model project set roots roots project set current namespace model project add member model createdefaultmodel getmodelmanagementfactory createmodel getcorehelper setname arraylist setroots setcurrentnamespace addmember set the save action param save the action to be used public void set save action action save this save action save register with the save action with other subsystems so that any changes in those subsystems will enable the save button menu item etc designer set save action save setsaveaction saveaction setsaveaction return true is the save action is currently enabled p deprecated for 0 27 2 by tfmorris use link project is dirty public boolean is save action enabled return this save action is enabled isdirty issaveactionenabled saveaction isenabled notify the gui that the current project s save state has changed there are 2 receivers the save project tool icon and the title bar for showing a p deprecated for 0 27 2 by tfmorris use link project set dirty boolean public void set save enabled boolean new value if save action null save action set enabled new value saveproject setdirty setsaveenabled newvalue saveaction saveaction setenabled newvalue private void add project project new project open projects add last new project addproject newproject openprojects addlast newproject remove the project param old project the project to be removed public void remove project project old project open projects remove old project todo this code can be removed when get current project is removed if current project old project if open projects size 0 current project open projects get last else current project null old project remove oldproject removeproject oldproject openprojects oldproject getcurrentproject currentproject oldproject openprojects currentproject openprojects getlast currentproject oldproject called when the model subsystem creates a command we must add this to the undo manager param command the command return result of the command if any see org argouml model model command creation observer execute model command public object execute final model command command set save enabled true abstract command wrapped command new abstract command private model command model command command public void undo model command undo public boolean is undoable return model command is undoable public boolean is redoable return model command is redoable public object execute return model command execute public string to string return model command to string project p get current project if p null return get current project get undo manager execute wrapped command else return wrapped command execute undomanager modelcommandcreationobserver modelcommand modelcommand setsaveenabled abstractcommand wrappedcommand abstractcommand modelcommand modelcommand modelcommand isundoable modelcommand isundoable isredoable modelcommand isredoable modelcommand tostring modelcommand tostring getcurrentproject getcurrentproject getundomanager wrappedcommand wrappedcommand abstract command wrapped command new abstract command private model command model command command public void undo model command undo abstractcommand wrappedcommand abstractcommand modelcommand modelcommand modelcommand model command undo public boolean is undoable return model command is undoable modelcommand isundoable modelcommand isundoable return model command is undoable public boolean is redoable return model command is redoable modelcommand isundoable isredoable modelcommand isredoable return model command is redoable public object execute return model command execute modelcommand isredoable modelcommand return model command execute public string to string return model command to string modelcommand tostring modelcommand tostring constructor for project file view private project file view projectfileview projectfileview returns the singleton instance return project file view public static project file view get instance return instance projectfileview projectfileview getinstance load an icon for a supported project file param f the file to check return a nice icon if the file is known as a project file otherwise a default one public icon get icon file f abstract file persister persister persistence manager get instance get persister from file name f get name if persister null persister has an icon return resource loader wrapper lookup icon resource uml notation else return null geticon abstractfilepersister persistencemanager getinstance getpersisterfromfilename getname hasanicon resourceloaderwrapper lookupiconresource umlnotation construct a default combo box model public uml meta class combo box model super tag type true collection string tmp meta classes model get core helper get all metatype names if tmp meta classes instanceof list meta classes list string tmp meta classes else meta classes new linked list string tmp meta classes tmp meta classes add all model get core helper get all meta datatype names try collections sort meta classes catch unsupported operation exception e we got passed an unmodifiable list copy it and sort the result meta classes new linked list string tmp meta classes collections sort meta classes umlmetaclasscomboboxmodel tagtype tmpmetaclasses getcorehelper getallmetatypenames tmpmetaclasses metaclasses tmpmetaclasses metaclasses linkedlist tmpmetaclasses tmpmetaclasses addall getcorehelper getallmetadatatypenames metaclasses unsupportedoperationexception metaclasses linkedlist tmpmetaclasses metaclasses override protected object get selected model element if get target null return model get facade get type get target return null getselectedmodelelement gettarget getfacade gettype gettarget see org argouml uml ui uml combo box model2 build model list protected void build model list set elements meta classes umlcomboboxmodel2 buildmodellist buildmodellist setelements metaclasses see org argouml uml ui uml combo box model2 is valid element object protected boolean is valid element object element return meta classes contains element umlcomboboxmodel2 isvalidelement isvalidelement metaclasses constructs a token sep that will match the string given in str param str the delimiter string public token sep string str the string str length str length if length 32 throw new illegal argument exception token sep str is length 32 chars long pattern 0 tokensep tokensep thestring illegalargumentexception tokensep called by my tokenizer when a new character is processed in the sequence returns true if we have found the delimiter public boolean add char char c int i pattern 1 pattern 1 for i 0 i length i if the string char at i c pattern 1 i return pattern 1 length 1 0 mytokenizer addchar thestring charat called by my tokenizer before starting scanning for a new token public void reset pattern 0 mytokenizer gets the length of this token public int length return length gets this token public string get string return the string getstring thestring param n the next to set public void set next token sep n this next n setnext tokensep return returns the next public token sep get next return next tokensep getnext creates a separator of the first form see above where chr q and esc esc param q the delimiter character param esc the escape character public quoted string separator char q char esc super q esced false esc chr esc start chr 0 stop chr q tok len 0 level 1 quotedstringseparator escchr startchr stopchr toklen creates a separator of the second form see above where lchr sq rchr eq and esc esc param sq the left delimiter character param eq the right delimiter character param esc the escape character public quoted string separator char sq char eq char esc super sq esced false esc chr esc start chr sq stop chr eq tok len 0 level 1 quotedstringseparator escchr startchr stopchr toklen public void reset super reset tok len 0 level 1 toklen inherit doc overridden to return the entire length of the token public int token length return super token length tok len inheritdoc tokenlength tokenlength toklen inherit doc overridden to return true return true public boolean has free part return true inheritdoc hasfreepart inherit doc overridden to find the end of the token public boolean end char char c tok len if esced esced false return false if esc chr 0 c esc chr esced true return false if start chr 0 c start chr level if c stop chr level return level 0 inheritdoc endchar toklen escchr escchr startchr startchr stopchr the constructor no choices available public expr separator with strings super is esc false iss quot false isd quot false tok level 1 tok len 0 exprseparatorwithstrings isesc issquot isdquot toklevel toklen public void reset super reset is esc false iss quot false isd quot false tok level 1 tok len 0 isesc issquot isdquot toklevel toklen inherit doc overridden to return the entire length of the token public int token length return super token length tok len inheritdoc tokenlength tokenlength toklen inherit doc overridden to return true return true public boolean has free part return true inheritdoc hasfreepart inherit doc overridden to find the end of the token public boolean end char char c tok len if iss quot if is esc is esc false return false if c is esc true else if c iss quot false return false else if isd quot if is esc is esc false return false if c is esc true else if c isd quot false return false else if c iss quot true else if c isd quot true else if c tok level else if c tok level return tok level 0 inheritdoc endchar toklen issquot isesc isesc isesc issquot isdquot isesc isesc isesc isdquot issquot isdquot toklevel toklevel toklevel creates a line separator public line separator has cr false has lf false has peeked false lineseparator lineseparator hascr haslf haspeeked public void reset super reset has cr false has lf false has peeked false hascr haslf haspeeked inherit doc public int token length return has cr has lf 2 1 inheritdoc tokenlength hascr haslf inherit doc public int get peek count return has peeked 1 0 inheritdoc getpeekcount haspeeked inherit doc public boolean has free part return has lf inheritdoc hasfreepart haslf inherit doc overridden to find the start of a line end public boolean add char char c if c n has lf true return true if c r has cr true return true return false inheritdoc addchar haslf hascr inherit doc overridden to find the end of a line end public boolean end char char c if c n has lf true else has peeked true return true inheritdoc endchar haslf haspeeked constructs a new instance see above for a description of the delimiter string param string the string to be tokenized param delim the string of delimiters public my tokenizer string string string delim source string delims parse delim string delim s idx 0 tok idx 0 e idx string length saved token null custom seps null put token null mytokenizer parsedelimstring sidx tokidx eidx savedtoken customseps puttoken constructs a new instance see above for a description of the delimiter string and custom separators param string the string to be tokenized param delim the string of delimiters param sep a custom separator to use public my tokenizer string string string delim custom separator sep source string delims parse delim string delim s idx 0 tok idx 0 e idx string length saved token null custom seps new array list custom seps add sep mytokenizer customseparator parsedelimstring sidx tokidx eidx savedtoken customseps arraylist customseps constructs a new instance see above for a description of the delimiter string and custom separators param string the string to be tokenized param delim the string of delimiters param seps some container with custom separators to use public my tokenizer string string string delim collection seps source string delims parse delim string delim s idx 0 tok idx 0 e idx string length saved token null custom seps new array list seps mytokenizer parsedelimstring sidx tokidx eidx savedtoken customseps arraylist returns true if there are more tokens left return true if another token can be fetched with next token public boolean has more tokens return s idx e idx saved token null put token null nexttoken hasmoretokens sidx eidx savedtoken puttoken retrives the next token return the next token public string next token custom separator csep token sep sep string s null int i j if put token null s put token put token null return s if saved token null s saved token tok idx saved idx saved token null return s if s idx e idx throw new no such element exception no more tokens available for sep delims sep null sep sep get next sep reset if custom seps null for i 0 i custom seps size i custom separator custom seps get i reset for i s idx i e idx i char c source char at i for j 0 custom seps null j custom seps size j csep custom separator custom seps get j if csep add char c break if custom seps null j custom seps size csep custom separator custom seps get j while csep has free part i 1 e idx if csep end char source char at i break i math min csep get peek count i int clen math min i 1 source length if i s idx 1 csep token length s source substring s idx i csep token length 1 saved idx i csep token length 1 saved token source substring saved idx clen else s source substring s idx clen tok idx s idx s idx i 1 break for sep delims sep null sep sep get next if sep add char c break if sep null if i s idx 1 sep length s source substring s idx i sep length 1 saved idx i sep length 1 saved token sep get string else s sep get string tok idx s idx s idx i 1 break if s null s source substring s idx tok idx s idx s idx e idx return s nexttoken customseparator tokensep puttoken puttoken puttoken savedtoken savedtoken tokidx savedidx savedtoken sidx eidx nosuchelementexception getnext customseps customseps customseparator customseps sidx eidx charat customseps customseps customseparator customseps addchar customseps customseps customseparator customseps hasfreepart eidx endchar charat getpeekcount sidx tokenlength sidx tokenlength savedidx tokenlength savedtoken savedidx sidx tokidx sidx sidx getnext addchar sidx sidx savedidx savedtoken getstring getstring tokidx sidx sidx sidx tokidx sidx sidx eidx this class implements the enumeration interface this call maps to next token return next token see next token next token public object next element return next token nexttoken nexttoken nexttoken nexttoken nextelement nexttoken this class implements the enumeration interface this call maps to has more tokens return has more tokens see has more tokens has more tokens public boolean has more elements return has more tokens hasmoretokens hasmoretokens hasmoretokens hasmoretokens hasmoreelements hasmoretokens returns the index in the string of the last token returned by next token or zero if no token has been retrived return the index of the last token public int get token index return tok idx nexttoken gettokenindex tokidx put a token on the input stream this will be the next token read from the tokenizer if this function is called again before the last token has been read then it will be lost p the index returned from get token index will be the same for the token put as that of the last token that wasn t put param s the token to put throws null pointer exception if s is null public void put token string s if s null throw new null pointer exception cannot put a null token put token s gettokenindex nullpointerexception puttoken nullpointerexception puttoken creates a linked list of token seps from the comma separated string str param str the string specifying delimiter strings return a list of token seps private static token sep parse delim string string str token sep first null token sep p null int idx0 idx1 length string builder val new string builder char c length str length for idx0 0 idx0 length for idx1 idx0 idx1 length idx1 c str char at idx1 if c idx1 if idx1 length val append str char at idx1 else if c break else val append c idx1 math min idx1 length if idx1 idx0 p new token sep val to string val new string builder p set next first first p idx0 idx1 1 return first tokenseps tokenseps tokensep parsedelimstring tokensep tokensep stringbuilder stringbuilder charat charat tokensep tostring stringbuilder setnext default constructor builds a critic that checks uml reserved names public cr reserved name this uml reserved crreservedname umlreserved construct a critic that checks against the given list of reserved names param reserved names the list of reserved names to check against public cr reserved name list string reserved names setup head and desc set priority to do item high priority add supported decision uml decision naming set knowledge types critic kt syntax add trigger name add trigger feature name names reserved names reservednames crreservedname reservednames setupheadanddesc setpriority todoitem high_priority addsupporteddecision umldecision setknowledgetypes kt_syntax addtrigger addtrigger feature_name reservednames override public boolean predicate2 object dm designer dsgr if model get facade is primary object dm return no problem if model get facade isa model element dm return no problem string me name model get facade get name dm if me name null me name equals return no problem string name str me name if name str null name str length 0 return no problem if is builtin name str return no problem for string name names if name equals ignore case name str return problem found return no problem getfacade isprimaryobject no_problem getfacade isamodelelement no_problem mename getfacade getname mename mename no_problem namestr mename namestr namestr no_problem isbuiltin namestr no_problem equalsignorecase namestr problem_found no_problem don t critique elements from the profile they may have names which are nominally reserved param name the name of the type to test return true if it is a builtin protected boolean is builtin string name project p project manager get manager get current project object type p find type in default model name return type null isbuiltin projectmanager getmanager getcurrentproject findtypeindefaultmodel see org argouml cognitive poster get clarifier override public icon get clarifier return cl class name get the instance getclarifier getclarifier clclassname gettheinstance override public void init wizard wizard w if w instanceof wizme name to do item item to do item w get to do item string sug model get facade get name item get offenders get 0 string ins super get instructions wizme name w set instructions ins wizme name w set suggestion sug wizme name w set must edit true initwizard wizmename todoitem todoitem gettodoitem getfacade getname getoffenders getinstructions wizmename setinstructions wizmename setsuggestion wizmename setmustedit see org argouml cognitive critics critic get wizard class org argouml cognitive to do item override public class get wizard class to do item item return wizme name class getwizardclass todoitem getwizardclass todoitem wizmename public set object get criticized design materials set object ret new hash set object ret add model get meta types get classifier ret add model get meta types get operation ret add model get meta types get state ret add model get meta types get association return ret getcriticizeddesignmaterials hashset getmetatypes getclassifier getmetatypes getoperation getmetatypes getstate getmetatypes getassociation creates a new instance of selection reroute edge param feme the given fig public selection reroute edge fig edge model element feme todo there is a cyclic dependency between selection reroute edge and fig edge model element super feme set it to an invalid number by default to make sure it is set correctly point index 1 selectionrerouteedge selectionrerouteedge figedgemodelelement selectionrerouteedge figedgemodelelement pointindex set up for re routing inherit doc public void mouse pressed mouse event me calculate the source and dest figs for to self assoc source fig fig node model element fig edge get content get source fig node dest fig fig node model element fig edge get content get dest fig node rectangle mouse position new rectangle me getx 5 me gety 5 10 10 reset the point index point index 1 int npoints get content get num points int xs get content get xs int ys get content get ys for int i 0 i npoints i if mouse position contains xs i ys i point index i super mouse pressed me return super mouse pressed me inheritdoc mousepressed mouseevent sourcefig fignodemodelelement figedge getcontent getsourcefignode destfig fignodemodelelement figedge getcontent getdestfignode mouseposition pointindex pointindex getcontent getnumpoints getcontent getxs getcontent getys mouseposition pointindex mousepressed mousepressed public void mouse dragged mouse event me editor editor globals cur editor mode manager mode mgr editor get mode manager fig modifying mode f mode mode mgr top if f mode instanceof mode create poly edge armed true super mouse dragged me mousedragged mouseevent cureditor modemanager modemgr getmodemanager figmodifyingmode fmode modemgr fmode modecreatepolyedge mousedragged public void mouse released mouse event me check pre conds if me is consumed armed point index 1 armed false super mouse released me return set up int x me getx y me gety the fig that was under the mouse when it was released fig node model element new fig null make a nice little target area rectangle mouse point new rectangle x 5 y 5 5 5 and find the fig editor editor globals cur editor layer manager lm editor get layer manager layer active lm get active layer enumeration figs active elements in mouse point last is the top fig while figs has more elements fig candidate fig fig figs next element if candidate fig instanceof fig node model element candidate fig is selectable new fig fig node model element candidate fig check intermediate post condition if new fig null armed false super mouse released me return uml mutable graph support mgm uml mutable graph support editor get graph model fig node model element old fig null boolean is source false if point index 0 old fig source fig is source true else old fig dest fig delegate the re routing to graphmodels if mgm can change connected node new fig get owner old fig get owner this get content get owner mgm change connected node new fig get owner old fig get owner this get content get owner is source editor get selection manager deselect get content armed false todo there is a cyclic dependency between selection reroute edge and fig edge model element fig edge model element fig edge fig edge model element get content fig edge determine fig nodes fig edge compute route super mouse released me return mousereleased mouseevent isconsumed pointindex mousereleased fignodemodelelement newfig mousepoint cureditor layermanager getlayermanager getactivelayer elementsin mousepoint hasmoreelements candidatefig nextelement candidatefig fignodemodelelement candidatefig isselectable newfig fignodemodelelement candidatefig newfig mousereleased umlmutablegraphsupport umlmutablegraphsupport getgraphmodel fignodemodelelement oldfig issource pointindex oldfig sourcefig issource oldfig destfig canchangeconnectednode newfig getowner oldfig getowner getcontent getowner changeconnectednode newfig getowner oldfig getowner getcontent getowner issource getselectionmanager getcontent selectionrerouteedge figedgemodelelement figedgemodelelement figedge figedgemodelelement getcontent figedge determinefignodes figedge computeroute mousereleased the constructor public prop panel send action super label send action lookup icon send action abstract action add model element2 action new action add send action signal uml mutable linked list list new uml mutable linked list new uml send action signal list model action new action new signal null true list set visible row count 2 j scroll pane signal scroll new j scroll pane list add field before translator localize label signal signal scroll arguments scroll proppanelsendaction lookupicon sendaction abstractactionaddmodelelement2 actionaddsendactionsignal umlmutablelinkedlist umlmutablelinkedlist umlsendactionsignallistmodel actionnewsignal setvisiblerowcount jscrollpane signalscroll jscrollpane addfieldbefore signalscroll argumentsscroll see org argouml uml ui behavior common behavior prop panel action add extra actions override protected void add extra actions add action new action new signal common_behavior proppanelaction addextraactions addextraactions addaction actionnewsignal constructor public action add send action signal super set multi select false actionaddsendactionsignal setmultiselect override protected void do it collection selected if selected null selected size 1 model get common behavior helper set signal get target selected iterator next else model get common behavior helper set signal get target null doit getcommonbehaviorhelper setsignal gettarget getcommonbehaviorhelper setsignal gettarget protected list get choices list ret new array list if get target null project p project manager get manager get current project object model p get root ret add all model get model management helper get all model elements of kind with model model choice class return ret getchoices arraylist gettarget projectmanager getmanager getcurrentproject getroot addall getmodelmanagementhelper getallmodelelementsofkindwithmodel choiceclass protected string get dialog title return translator localize dialog title add signal getdialogtitle protected list get selected list ret new array list object signal model get facade get signal get target if signal null ret add signal return ret getselected arraylist getfacade getsignal gettarget constructor for uml send action signal list model public uml send action signal list model super signal umlsendactionsignallistmodel umlsendactionsignallistmodel see org argouml uml ui uml model element list model2 build model list protected void build model list remove all elements add element model get facade get signal get target umlmodelelementlistmodel2 buildmodellist buildmodellist removeallelements addelement getfacade getsignal gettarget see org argouml uml ui uml model element list model2 is valid element java lang object protected boolean is valid element object elem return model get facade isa signal elem model get facade get signal get target elem umlmodelelementlistmodel2 isvalidelement isvalidelement getfacade isasignal getfacade getsignal gettarget constructor for uml association end target scope checkbox public uml association end target scope checkbox todo property name will need to be updated for uml 2 x unfortunately we can specify two property names here super translator localize label static action set association end target scope get instance target scope umlassociationendtargetscopecheckbox umlassociationendtargetscopecheckbox actionsetassociationendtargetscope getinstance targetscope public void build model if get target null object association end get target set selected model get facade is static association end buildmodel gettarget associationend gettarget setselected getfacade isstatic associationend constructor for uml model element source flow list model public uml model element source flow list model super source flow umlmodelelementsourceflowlistmodel umlmodelelementsourceflowlistmodel sourceflow protected void build model list if get target null set all elements model get facade get source flows get target buildmodellist gettarget setallelements getfacade getsourceflows gettarget see org argouml uml ui uml model element list model2 is valid element object protected boolean is valid element object o return model get facade isa flow o model get facade get source flows get target contains o umlmodelelementlistmodel2 isvalidelement isvalidelement getfacade isaflow getfacade getsourceflows gettarget the constructor param tab name the name of the tab param spn style panel names public tab style string tab name string spn super tab name this style panel names spn set icon new up arrow icon set layout new border layout tabname tabstyle tabname tabname stylepanelnames seticon uparrowicon setlayout borderlayout construct a default stylepanel with basenames code style panel code and code sp code resulting in the lookup order described above public tab style this tab style new string style panel sp stylepanel tabstyle stylepanel adds a style panel to the internal list this allows a plugin to add and register a new style panel at run time this property style will then be displayed in the details pane whenever an element of the given metaclass is selected param c the metaclass whose details show be displayed in the property panel p param s an instance of the style panel for the metaclass m public void add panel class c style panel s panels put c s addpanel stylepanel sets the target of the style tab param t is the new target public void set target object t if target null target remove property change listener this if target instanceof fig edge in this case the bounds are determined by the fig edge fig edge target get fig remove property change listener this if target instanceof fig association class in this case the bounds of the box are determined by the fig class association class fig class association class ac fig association class target get association class a newly created association class may not have all its parts created by the time we are called if ac null ac remove property change listener this todo defer most of this work if the panel isn t visible tfm the responsibility of determining if the given target is a correct one for this tab has been moved from the details pane to the member tabs of the details pane reason for this is that the details pane is configurable and cannot know what s the correct target for some tab if t instanceof fig if model get facade isa model element t argo diagram diagram diagram utils get active diagram if diagram null t diagram presentation for t if t instanceof fig project p project manager get manager get current project collection col p find figs for member t if col null col is empty return t col iterator next if t instanceof fig return else return target fig t if target null target add property change listener this todo this shouldn t know about the specific type of fig that is being displayed that couples it too strongly to things it shouldn t need to know about tfm 20070924 if target instanceof fig edge in this case the bounds are determined by the fig edge fig edge target get fig add property change listener this if target instanceof fig association class in this case the bounds of the box are determined by the fig class association class fig class association class ac fig association class target get association class a newly created association class may not have all its parts created by the time we are called if ac null ac add property change listener this if last panel null remove last panel if last panel instanceof target listener remove target listener target listener last panel if t null add blank panel border layout north should be enabled false last panel blank panel return should be enabled true style panel null class target class t get class style panel find panel for target class if style panel null remove target listener style panel add target listener style panel style panel set target target add style panel border layout north should be enabled true last panel style panel else add blank panel border layout north should be enabled false last panel blank panel validate repaint settarget removepropertychangelistener figedge figedge figedge getfig removepropertychangelistener figassociationclass figclassassociationclass figclassassociationclass figassociationclass getassociationclass associationclass removepropertychangelistener detailspane getfacade isamodelelement argodiagram diagramutils getactivediagram presentationfor projectmanager getmanager getcurrentproject findfigsformember isempty addpropertychangelistener figedge figedge figedge getfig addpropertychangelistener figassociationclass figclassassociationclass figclassassociationclass figassociationclass getassociationclass associationclass addpropertychangelistener lastpanel lastpanel lastpanel targetlistener removetargetlistener targetlistener lastpanel blankpanel borderlayout shouldbeenabled lastpanel blankpanel shouldbeenabled stylepanel targetclass getclass stylepanel findpanelfor targetclass stylepanel removetargetlistener stylepanel addtargetlistener stylepanel stylepanel settarget stylepanel borderlayout shouldbeenabled lastpanel stylepanel blankpanel borderlayout shouldbeenabled lastpanel blankpanel see org argouml ui tab target refresh public void refresh set target target tabtarget settarget find the stylepanel for a given target class param target class the target class return a stylepanel object or code null code on error public style panel find panel for class target class class panel class null tab fig target p panels get target class if p null class new class target class while new class null panel class null panel class panel class for new class new class new class get superclass if panel class null return null try p tab fig target panel class new instance catch illegal access exception ignore log error ignore return null catch instantiation exception ignore log error ignore return null panels put target class p log debug found style for target class get name p get class return style panel p targetclass stylepanel findpanelfor targetclass panelclass tabfigtarget targetclass newclass targetclass newclass panelclass panelclass panelclassfor newclass newclass newclass getsuperclass panelclass tabfigtarget panelclass newinstance illegalaccessexception instantiationexception targetclass targetclass getname getclass stylepanel get the class for the required stylepanel param target class the class of the current selected target return the panel class for the class given or null if none available public class panel class for class target class if target class null return null string namespace class ns string namespace string namespace parse target class string namespace base ns string namespace string namespace parse org argouml ui namespace java ns token string namespace element target class element string namespace element class ns peek namespace element log debug attempt to find style panel for class ns class ns pop namespace element string bases new string class ns to string base ns to string for string style panel name style panel names for string base name bases string name base name style panel name target class element class cls load class name if cls null return cls return null targetclass panelclassfor targetclass targetclass stringnamespace classns stringnamespace stringnamespace targetclass stringnamespace basens stringnamespace stringnamespace java_ns_token stringnamespaceelement targetclasselement stringnamespaceelement classns peeknamespaceelement classns classns popnamespaceelement classns tostring basens tostring stylepanelname stylepanelnames basename basename stylepanelname targetclasselement loadclass private class load class string name try class cls class for name name return cls catch class not found exception ignore log debug class not found exception could not find class name return null loadclass forname classnotfoundexception classnotfoundexception return the style panel names protected string get style panel names return style panel names getstylepanelnames stylepanelnames see org argouml ui tab target get target public object get target return target tabtarget gettarget gettarget public boolean should be enabled object target item if target item instanceof fig if model get facade isa model element target item argo diagram diagram diagram utils get active diagram if diagram null should be enabled false return false fig f diagram presentation for target item if f null should be enabled false return false target item f else should be enabled false return false should be enabled true todo it would be better to defer this initialization until the panel actually needs to be displayed perhaps optimistically always return true and figure out later if we ve got something to display tfm 20070110 class target class target item get class style panel find panel for target class target class target class get superclass if style panel null should be enabled false return should be enabled shouldbeenabled targetitem targetitem getfacade isamodelelement targetitem argodiagram diagramutils getactivediagram shouldbeenabled presentationfor targetitem shouldbeenabled targetitem shouldbeenabled shouldbeenabled targetclass targetitem getclass stylepanel findpanelfor targetclass targetclass targetclass getsuperclass stylepanel shouldbeenabled shouldbeenabled see org argouml ui targetmanager target listener target added org argouml ui targetmanager target event public void property change property change event pce delayed change notify delayed notify new delayed change notify this pce swing utilities invoke later delayed notify targetlistener targetadded targetevent propertychange propertychangeevent delayedchangenotify delayednotify delayedchangenotify swingutilities invokelater delayednotify public void delayed vetoable change property change event pce if style panel null style panel refresh pce delayedvetoablechange propertychangeevent stylepanel stylepanel see target listener target added target event public void target added target event e set target e get new target fire target added e targetlistener targetadded targetevent targetadded targetevent settarget getnewtarget firetargetadded public void target removed target event e how to handle empty target lists probably the tab props should only show an empty pane in that case set target e get new target fire target removed e targetremoved targetevent tabprops settarget getnewtarget firetargetremoved see target listener target set target event public void target set target event e set target e get new target fire target set e targetlistener targetset targetevent targetset targetevent settarget getnewtarget firetargetset adds a listener param listener the listener to add private void add target listener target listener listener listener list add target listener class listener addtargetlistener targetlistener listenerlist targetlistener removes a target listener param listener the listener to remove private void remove target listener target listener listener listener list remove target listener class listener removetargetlistener targetlistener listenerlist targetlistener param target event private void fire target set target event target event guaranteed to return a non null array object listeners listener list get listener list for int i listeners length 2 i 0 i 2 if listeners i target listener class lazily create the event target listener listeners i 1 target set target event targetevent firetargetset targetevent targetevent listenerlist getlistenerlist targetlistener targetlistener targetset targetevent param target event private void fire target added target event target event guaranteed to return a non null array object listeners listener list get listener list for int i listeners length 2 i 0 i 2 if listeners i target listener class lazily create the event target listener listeners i 1 target added target event targetevent firetargetadded targetevent targetevent listenerlist getlistenerlist targetlistener targetlistener targetadded targetevent param target event private void fire target removed target event target event guaranteed to return a non null array object listeners listener list get listener list for int i listeners length 2 i 0 i 2 if listeners i target listener class lazily create the event target listener listeners i 1 target removed target event targetevent firetargetremoved targetevent targetevent listenerlist getlistenerlist targetlistener targetlistener targetremoved targetevent the constructor creates a simple timer public simple timer simpletimer mark store the current time public void mark points add new long system current time millis labels add null currenttimemillis mark store the current time param label the mark will be labeled with this string public void mark string label mark labels set labels size 1 label returns an enumeration of formatted distances return an enumeration representing the results public enumeration result mark return new simple timer enumeration simpletimerenumeration see java util enumeration has more elements public boolean has more elements return count points size hasmoreelements hasmoreelements public string next element string buffer res new string buffer synchronized points if count points size if labels get count 1 null res append phase append count else res append labels get count 1 res append res append res set length 60 res append points get count points get count 1 else if count points size res append total res set length 18 res append points get points size 1 points get 0 count return res to string nextelement stringbuffer stringbuffer setlength setlength tostring public string to string string buffer sb new string buffer for enumeration e result e has more elements sb append string e next element sb append n return sb to string tostring stringbuffer stringbuffer hasmoreelements nextelement tostring see org argouml ui explorer rules perspective rule get rule name public string get rule name return translator localize misc package class perspectiverule getrulename getrulename public collection get children object parent if model get facade isa package parent return model get model management helper get all model elements of kind parent model get meta types getuml class return collections empty set getchildren getfacade isapackage getmodelmanagementhelper getallmodelelementsofkind getmetatypes getumlclass empty_set see org argouml ui explorer rules perspective rule get dependencies java lang object public set get dependencies object parent todo what return collections empty set perspectiverule getdependencies getdependencies empty_set default constructor param literal name name of the literal public ocl enum literal string literal name this name literal name literalname oclenumliteral literalname literalname public boolean equals object obj if obj instanceof ocl enum literal return name equals ocl enum literal obj name else if model get facade isa enumeration literal obj return name equals model get facade get name obj else return false oclenumliteral oclenumliteral getfacade isaenumerationliteral getfacade getname public int hash code todo how to implement this method properly return name hash code hashcode hashcode the constructor public action open critics super translator localize action browse critics null set the tooltip string put value action short description translator localize action browse critics actionopencritics putvalue short_description public void action performed action event ae super action performed ae critic browser dialog dialog new critic browser dialog dialog set visible true actionperformed actionevent actionperformed criticbrowserdialog criticbrowserdialog setvisible public table critics table model model list selection listener lsl table model listener tml super model set selection mode list selection model single selection set show vertical lines false get selection model add list selection listener lsl get model add table model listener tml set auto resize mode j table auto resize last column initialised true set column widths tablecritics tablemodel listselectionlistener tablemodellistener setselectionmode listselectionmodel single_selection setshowverticallines getselectionmodel addlistselectionlistener getmodel addtablemodellistener setautoresizemode jtable auto_resize_last_column setcolumnwidths private void set column widths if initialised return table column check col get column model get column 0 table column desc col get column model get column 1 table column act col get column model get column 2 check col set min width 35 check col set max width 35 check col set width 30 int desc width get font metrics get font string width desc width text desc col set min width desc width desc col set width desc width no maximum set so it will stretch act col set min width 50 act col set max width 55 act col set width 55 and for advanced mode if get column model get column count 3 desc col set min width desc width 2 table column prio col get column model get column 3 prio col set min width 45 prio col set max width 50 prio col set width 50 setcolumnwidths tablecolumn checkcol getcolumnmodel getcolumn tablecolumn desccol getcolumnmodel getcolumn tablecolumn actcol getcolumnmodel getcolumn checkcol setminwidth checkcol setmaxwidth checkcol setwidth descwidth getfontmetrics getfont stringwidth desc_width_text desccol setminwidth descwidth desccol setwidth descwidth actcol setminwidth actcol setmaxwidth actcol setwidth getcolumnmodel getcolumncount desccol setminwidth descwidth tablecolumn priocol getcolumnmodel getcolumn priocol setminwidth priocol setmaxwidth priocol setwidth public critic get critic at row int row table model critics model table model critics get model return model get critic at row row getcriticatrow tablemodelcritics tablemodelcritics getmodel getcriticatrow public dimension get initial size return new dimension get column model get total column width 20 0 getinitialsize getcolumnmodel gettotalcolumnwidth public void set advanced boolean mode table model critics model table model critics get model model set advanced mode setadvanced tablemodelcritics tablemodelcritics getmodel setadvanced see javax swing j table table changed javax swing event table model event override public void table changed table model event e super table changed e this changes the complete structure of the table so we need to set the column widths again set column widths jtable tablechanged tablemodelevent tablechanged tablemodelevent tablechanged setcolumnwidths public fig node get fig node for graph model gm layer lay object node map style attributes fig node model element fig node null if node null throw new illegal argument exception a node must be supplied although not generally true for gef for argo we know that the layer is a layer perspective which knows the associated diagram diagram diag layer perspective lay get diagram if diag instanceof uml diagram uml diagram diag does accept node fig node fig node model element uml diagram diag drop node null else log error todo class diagram renderer get fig node for node throw new illegal argument exception node is not a recognised type received node get class get name lay add fig node fig node set di element graph change adapter get instance create element gm node return fig node fignode getfignodefor graphmodel styleattributes fignodemodelelement fignode illegalargumentexception layerperspective layerperspective getdiagram umldiagram umldiagram doesaccept fignode fignodemodelelement umldiagram classdiagramrenderer getfignodefor illegalargumentexception getclass getname fignode fignode setdielement graphchangeadapter getinstance createelement fignode return a fig that can be used to represent the given edge throws illegal argument exception if the edge is not of an expected type throws illegal state exception if the edge generated has no source or dest port inherit doc public fig edge get fig edge for graph model gm layer lay object edge map style attribute if log is debug enabled log debug making figedge for edge if edge null throw new illegal argument exception a model edge must be supplied assert lay instanceof layer perspective argo diagram diag argo diagram layer perspective lay get diagram diagram settings settings diag get diagram settings fig edge new edge null if model get facade isa association class edge new edge new fig association class edge settings else if model get facade isa association end edge fig association end asend new fig association end edge settings model get facade get association edge fig node associationfn fig node lay presentation for model get facade get association edge fig node classifierfn fig node lay presentation for model get facade get type edge asend set source port fig associationfn asend set source fig node associationfn asend set dest port fig classifierfn asend set dest fig node classifierfn new edge asend else if model get facade isa association edge new edge new fig association edge settings else if model get facade isa link edge fig link lnk fig new fig link edge settings collection link ends coln model get facade get connections edge object link ends link ends coln to array object from inst model get facade get instance link ends 0 object to inst model get facade get instance link ends 1 fig node fromfn fig node lay presentation for from inst fig node tofn fig node lay presentation for to inst lnk fig set source port fig fromfn lnk fig set source fig node fromfn lnk fig set dest port fig tofn lnk fig set dest fig node tofn lnk fig get fig set layer lay new edge lnk fig else if model get facade isa generalization edge new edge new fig generalization edge settings else if model get facade isa package import edge new edge new fig permission edge settings else if model get facade isa usage edge new edge new fig usage edge settings else if model get facade isa abstraction edge new edge new fig abstraction edge settings else if model get facade isa dependency edge string name for object stereotype model get facade get stereotypes edge name model get facade get name stereotype if core factory realize stereotype equals name break if core factory realize stereotype equals name todo this code doesn t look like it will get reached because any abstraction realization is going to take the isa abstraction leg of the if before it gets to this more general case tfm 20080508 fig abstraction real fig new fig abstraction edge settings object supplier model get facade get suppliers edge to array 0 object client model get facade get clients edge to array 0 fig node supfn fig node lay presentation for supplier fig node clifn fig node lay presentation for client real fig set source port fig clifn real fig set source fig node clifn real fig set dest port fig supfn real fig set dest fig node supfn real fig get fig set layer lay new edge real fig else fig dependency dep fig new fig dependency edge settings new edge dep fig else if edge instanceof comment edge new edge new fig edge note edge settings if new edge null throw new illegal argument exception don t know how to create fig edge for model type edge get class get name set ports lay new edge assert new edge null there has been no fig edge created new edge set di element graph change adapter get instance create element gm edge assert new edge null there has been no fig edge created assert new edge get dest fig node null the fig edge has no dest node assert new edge get dest port fig null the fig edge has no dest port assert new edge get source fig node null the fig edge has no source node assert new edge get source port fig null the fig edge has no source port lay add new edge return new edge illegalargumentexception illegalstateexception inheritdoc figedge getfigedgefor graphmodel styleattribute isdebugenabled illegalargumentexception layerperspective argodiagram argodiagram layerperspective getdiagram diagramsettings getdiagramsettings figedge newedge getfacade isaassociationclass newedge figassociationclass getfacade isaassociationend figassociationend figassociationend getfacade getassociation fignode fignode presentationfor getfacade getassociation fignode fignode presentationfor getfacade gettype setsourceportfig setsourcefignode setdestportfig setdestfignode newedge getfacade isaassociation newedge figassociation getfacade isalink figlink lnkfig figlink linkendscoln getfacade getconnections linkends linkendscoln toarray frominst getfacade getinstance linkends toinst getfacade getinstance linkends fignode fignode presentationfor frominst fignode fignode presentationfor toinst lnkfig setsourceportfig lnkfig setsourcefignode lnkfig setdestportfig lnkfig setdestfignode lnkfig getfig setlayer newedge lnkfig getfacade isageneralization newedge figgeneralization getfacade isapackageimport newedge figpermission getfacade isausage newedge figusage getfacade isaabstraction newedge figabstraction getfacade isadependency getfacade getstereotypes getfacade getname corefactory realize_stereotype corefactory realize_stereotype isaabstraction figabstraction realfig figabstraction getfacade getsuppliers toarray getfacade getclients toarray fignode fignode presentationfor fignode fignode presentationfor realfig setsourceportfig realfig setsourcefignode realfig setdestportfig realfig setdestfignode realfig getfig setlayer newedge realfig figdependency depfig figdependency newedge depfig commentedge newedge figedgenote newedge illegalargumentexception figedge getclass getname setports newedge newedge figedge newedge setdielement graphchangeadapter getinstance createelement newedge figedge newedge getdestfignode figedge newedge getdestportfig figedge newedge getsourcefignode figedge newedge getsourceportfig figedge newedge newedge constructor for uml feature owner scope check box public uml feature owner scope check box super translator localize checkbox static lc action set feature owner scope get instance owner scope umlfeatureownerscopecheckbox umlfeatureownerscopecheckbox actionsetfeatureownerscope getinstance ownerscope see org argouml uml ui uml check box2 build model public void build model set selected model get facade is static get target umlcheckbox2 buildmodel buildmodel setselected getfacade isstatic gettarget the constructor param edge the fig edge public classdiagram generalization edge fig edge edge super edge classdiagramgeneralizationedge figedge the constructor param o the target public action visibility protected object o super checkbox visibility protected uc false put value selected boolean value of model get visibility kind get protected equals value of target o actionvisibilityprotected putvalue valueof getvisibilitykind getprotected valueoftarget see org argouml uml diagram ui abstract action radio menu item toggle value of target java lang object void toggle value of target object t model get core helper set visibility t model get visibility kind get protected abstractactionradiomenuitem togglevalueoftarget togglevalueoftarget getcorehelper setvisibility getvisibilitykind getprotected make use of the default visibility which is public todo centralise this knowledge see org argouml uml diagram ui abstract action radio menu item value of target java lang object object value of target object t object v model get facade get visibility t return v null model get visibility kind get public v abstractactionradiomenuitem valueoftarget valueoftarget getfacade getvisibility getvisibilitykind getpublic construct new documentation tab public tab documentation super translator localize tab documentation image icon null set orientation orientation equals west orientation equals east vertical get instance horizontal get instance set icon new up arrow icon add field translator localize label author new uml text field2 new uml model element tagged value document argo author tag add field translator localize label version new uml text field2 new uml model element tagged value document argo version tag add field translator localize label since new uml text field2 new uml model element tagged value document argo since tag add field translator localize label deprecated new uml deprecated check box uml text area2 see new uml text area2 new uml model element tagged value document argo see tag see set rows 2 see set line wrap true see set wrap style word true j scroll pane sp see new j scroll pane sp see get viewport add see add field translator localize label see sp see make new column with labelled layout add labelled layout get separator uml text area2 doc new uml text area2 new uml model element tagged value document argo documentation tag doc set rows 2 doc set line wrap true doc set wrap style word true j scroll pane sp docs new j scroll pane sp docs get viewport add doc add field translator localize label documentation sp docs comment name text field editing disabled uml text area2 comment new uml text area2 new uml model element comment document false disable text area comment j scroll pane sp comment new j scroll pane sp comment get viewport add comment add field translator localize label comment name sp comment comment body text field editing disabled uml text area2 comment body new uml text area2 new uml model element comment document true disable text area comment body j scroll pane sp comment body new j scroll pane sp comment body get viewport add comment body add field translator localize label comment body sp comment body since there are no buttons on this panel we have to set the size of the buttonpanel otherwise the title would not be aligned right set button panel size 18 tabdocumentation imageicon setorientation getinstance getinstance seticon uparrowicon addfield umltextfield2 umlmodelelementtaggedvaluedocument author_tag addfield umltextfield2 umlmodelelementtaggedvaluedocument version_tag addfield umltextfield2 umlmodelelementtaggedvaluedocument since_tag addfield umldeprecatedcheckbox umltextarea2 umltextarea2 umlmodelelementtaggedvaluedocument see_tag setrows setlinewrap setwrapstyleword jscrollpane spsee jscrollpane spsee getviewport addfield spsee labelledlayout labelledlayout getseparator umltextarea2 umltextarea2 umlmodelelementtaggedvaluedocument documentation_tag setrows setlinewrap setwrapstyleword jscrollpane spdocs jscrollpane spdocs getviewport addfield spdocs umltextarea2 umltextarea2 umlmodelelementcommentdocument disabletextarea jscrollpane spcomment jscrollpane spcomment getviewport addfield spcomment umltextarea2 commentbody umltextarea2 umlmodelelementcommentdocument disabletextarea commentbody jscrollpane spcommentbody jscrollpane spcommentbody getviewport commentbody addfield spcommentbody setbuttonpanelsize private void disable text area final j text area text area text area set rows 2 text area set line wrap true text area set wrap style word true text area set enabled false text area set disabled text color text area get foreground only change the background colour if it is supplied by the laf otherwise leave look and feel to handle this itself final color inactive color ui manager get color text field inactive background if inactive color null see http bugs sun com bugdatabase view bug do bug id 4919687 text area set background new color inactive color getrgb disabletextarea jtextarea textarea textarea setrows textarea setlinewrap textarea setwrapstyleword textarea setenabled textarea setdisabledtextcolor textarea getforeground inactivecolor uimanager getcolor textfield inactivebackground inactivecolor view_bug bug_id textarea setbackground inactivecolor checks if the tab should be enabled returns true if the target returned by get target is a modelelement or if that target shows up as fig on the active diagram and has a modelelement as owner return true if this tab should be enabled otherwise false public boolean should be enabled object target get target return should be enabled target gettarget shouldbeenabled gettarget shouldbeenabled override public boolean should be enabled object target target target instanceof fig fig target get owner target return model get facade isa model element target shouldbeenabled getowner getfacade isamodelelement creates dialog window with chooser and configuration panel param frame the ui frame to display dialogs on public import frame frame super my frame frame j component chooser get chooser dialog new j dialog frame translator localize action import sources true dialog get content pane add chooser border layout center dialog get content pane add get config panel border layout east dialog pack int x frame get size width dialog get size width 2 int y frame get size height dialog get size height 2 dialog set location x 0 x 0 y 0 y 0 ui utils load common key map dialog dialog set visible true myframe jcomponent getchooser jdialog getcontentpane borderlayout getcontentpane getconfigpanel borderlayout getsize getsize getsize getsize setlocation uiutils loadcommonkeymap setvisible see org argouml uml reveng import settings get input source encoding public string get input source encoding return string source encoding get selected item importsettings getinputsourceencoding getinputsourceencoding sourceencoding getselecteditem see org argouml uml reveng import settings is attribute selected deprecated public boolean is attribute selected return false importsettings isattributeselected isattributeselected see org argouml uml reveng import settings is datatype selected deprecated public boolean is datatype selected return false importsettings isdatatypeselected isdatatypeselected close dialog window private void dispose dialog string buffer flags new string buffer 30 flags append is descend selected append flags append is changed only selected append flags append is create diagrams selected append flags append is minimize figs selected append flags append is diagram layout selected configuration set string argo key import general settings flags flags to string configuration set string argo key import general detail level string value of get import level configuration set string argo key input source encoding get input source encoding dialog set visible false dialog dispose disposedialog stringbuffer stringbuffer isdescendselected ischangedonlyselected iscreatediagramsselected isminimizefigsselected isdiagramlayoutselected setstring key_import_general_settings_flags tostring setstring key_import_general_detail_level valueof getimportlevel setstring key_input_source_encoding getinputsourceencoding setvisible get the panel that lets the user set reverse engineering parameters param import instance the instance of the import return the panel this is an internal method use the accessors in link import settings to determine the current settings private j component get config panel final j tabbed pane tab new j tabbed pane build the config panel if config panel null j panel general new j panel general set layout new grid layout2 20 1 0 0 grid layout2 none general add new j label translator localize action import select lang j combo box selected language new j combo box get modules key set to array selected language add action listener new selected language listener tab general add selected language add config checkboxes general add detail level buttons general add source encoding general tab add general translator localize action import general import interface current get current module if current null tab add get config panel extension current get name config panel tab return config panel importinstance importsettings jcomponent getconfigpanel jtabbedpane jtabbedpane configpanel configpanel jpanel jpanel setlayout gridlayout2 gridlayout2 jlabel jcombobox selectedlanguage jcombobox getmodules keyset toarray selectedlanguage addactionlistener selectedlanguagelistener selectedlanguage addconfigcheckboxes adddetaillevelbuttons addsourceencoding importinterface getcurrentmodule getconfigpanelextension getname configpanel configpanel private void add config checkboxes j panel panel boolean desc true boolean chan true boolean crea true boolean mini true boolean layo true string flags configuration get string argo key import general settings flags if flags null flags length 0 string tokenizer st new string tokenizer flags if st has more tokens st next token equals false desc false if st has more tokens st next token equals false chan false if st has more tokens st next token equals false crea false if st has more tokens st next token equals false mini false if st has more tokens st next token equals false layo false descend new j check box translator localize action import option descend dir recur desc panel add descend changed only new j check box translator localize action import option changed new chan panel add changed only create diagrams new j check box translator localize action import option create diagram crea panel add create diagrams minimise figs new j check box translator localize action import option min class icon mini panel add minimise figs layout diagrams new j check box translator localize action import option perform auto diagram layout layo panel add layout diagrams de selects the fig minimising layout if we are not creating diagrams create diagrams add action listener new action listener public void action performed action event action event if create diagrams is selected minimise figs set selected false layout diagrams set selected false addconfigcheckboxes jpanel getstring key_import_general_settings_flags stringtokenizer stringtokenizer hasmoretokens nexttoken hasmoretokens nexttoken hasmoretokens nexttoken hasmoretokens nexttoken hasmoretokens nexttoken jcheckbox changedonly jcheckbox changed_new changedonly creatediagrams jcheckbox creatediagrams minimisefigs jcheckbox minimisefigs layoutdiagrams jcheckbox layoutdiagrams creatediagrams addactionlistener actionlistener actionperformed actionevent actionevent creatediagrams isselected minimisefigs setselected layoutdiagrams setselected create diagrams add action listener new action listener public void action performed action event action event if create diagrams is selected minimise figs set selected false layout diagrams set selected false creatediagrams addactionlistener actionlistener actionperformed actionevent actionevent creatediagrams isselected minimisefigs setselected layoutdiagrams setselected private void add detail level buttons j panel panel select the level of import 0 classifiers only 1 classifiers plus feature specifications 2 full import feature detail j label import detail label new j label translator localize action import level of import detail button group detail button group new button group class only new j radio button translator localize action import option classifiers detail button group add class only class and features new j radio button translator localize action import option classifiers plus specs detail button group add class and features full import new j radio button translator localize action import option full import string detaillevel configuration get string argo key import general detail level if 0 equals detaillevel class only set selected true else if 1 equals detaillevel class and features set selected true else full import set selected true detail button group add full import panel add import detail label panel add class only panel add class and features panel add full import adddetaillevelbuttons jpanel jlabel importdetaillabel jlabel buttongroup detailbuttongroup buttongroup classonly jradiobutton detailbuttongroup classonly classandfeatures jradiobutton detailbuttongroup classandfeatures fullimport jradiobutton getstring key_import_general_detail_level classonly setselected classandfeatures setselected fullimport setselected detailbuttongroup fullimport importdetaillabel classonly classandfeatures fullimport private void add source encoding j panel panel panel add new j label translator localize action import file encoding string enc configuration get string argo key input source encoding if enc null enc trim equals enc system get property file encoding cp1252 is often the default but windows 1252 is the name listed by charset available charsets if enc starts with cp enc windows enc substring 2 source encoding new j combo box charset available charsets key set to array source encoding set selected item enc panel add source encoding addsourceencoding jpanel jlabel getstring key_input_source_encoding getproperty availablecharsets startswith sourceencoding jcombobox availablecharsets keyset toarray sourceencoding setselecteditem sourceencoding private j component get config panel extension list setting settings null import interface current get current module if current null settings current get import settings return new config panel extension settings jcomponent getconfigpanelextension importinterface getcurrentmodule getimportsettings configpanelextension the constructor param i the current import param t the pane selected language listener j tabbed pane t tab t selectedlanguagelistener jtabbedpane public void action performed action event e j combo box cb j combo box e get source string selected string cb get selected item import interface old module get current module set current module get modules get selected update filters j file chooser dialog get content pane get component 0 old module get suffix filters get current module get suffix filters update tabbed pane actionperformed actionevent jcombobox jcombobox getsource getselecteditem importinterface oldmodule getcurrentmodule setcurrentmodule getmodules updatefilters jfilechooser getcontentpane getcomponent oldmodule getsuffixfilters getcurrentmodule getsuffixfilters updatetabbedpane private void update tabbed pane string name module interface get current module get name if tab index of tab name 0 tab add get config panel extension name updatetabbedpane moduleinterface getcurrentmodule getname indexoftab getconfigpanelextension parse all selected files it calls the actual parser methods depending on the type of the file public void do file iss new import status screen my frame importing splash thread t new thread new runnable public void run do import iss explorer event adaptor get instance structure changed project browser get instance get status bar show progress 0 import thread t start dofile importstatusscreen myframe doimport explorereventadaptor getinstance structurechanged projectbrowser getinstance getstatusbar showprogress thread t new thread new runnable public void run do import iss explorer event adaptor get instance structure changed project browser get instance get status bar show progress 0 doimport explorereventadaptor getinstance structurechanged projectbrowser getinstance getstatusbar showprogress public int get import level if class only null class only is selected return import settings detail classifier else if class and features null class and features is selected return import settings detail classifier feature else if full import null full import is selected return import settings detail full else return import settings detail classifier getimportlevel classonly classonly isselected importsettings detail_classifier classandfeatures classandfeatures isselected importsettings detail_classifier_feature fullimport fullimport isselected importsettings detail_full importsettings detail_classifier public boolean is create diagrams selected if create diagrams null return create diagrams is selected return true iscreatediagramsselected creatediagrams creatediagrams isselected public boolean is minimize figs selected if minimise figs null return minimise figs is selected return false isminimizefigsselected minimisefigs minimisefigs isselected public boolean is diagram layout selected if layout diagrams null return layout diagrams is selected return false isdiagramlayoutselected layoutdiagrams layoutdiagrams isselected public boolean is descend selected if descend null return descend is selected return true isdescendselected isselected public boolean is changed only selected if changed only null return changed only is selected return false ischangedonlyselected changedonly changedonly isselected private j component get chooser string directory globals get last directory final j file chooser chooser new import file chooser this directory chooser set file selection mode j file chooser files and directories import interface current get current module if current null update filters chooser null current get suffix filters return chooser jcomponent getchooser getlastdirectory jfilechooser importfilechooser setfileselectionmode jfilechooser files_and_directories importinterface getcurrentmodule updatefilters getsuffixfilters private static void update filters j file chooser chooser suffix filter old filters suffix filter new filters if old filters null for int i 0 i old filters length i chooser remove choosable file filter old filters i if new filters null for int i 0 i new filters length i chooser add choosable file filter new filters i if new filters length 0 chooser set file filter new filters 0 updatefilters jfilechooser suffixfilter oldfilters suffixfilter newfilters oldfilters oldfilters removechoosablefilefilter oldfilters newfilters newfilters addchoosablefilefilter newfilters newfilters setfilefilter newfilters constructs a new import file chooser opened to the given directory param imp the import manager param current directory path the directory path see javax swing j file chooser j file chooser string public import file chooser import imp string current directory path super current directory path the import imp init chooser importfilechooser currentdirectorypath jfilechooser jfilechooser importfilechooser currentdirectorypath currentdirectorypath theimport initchooser constructs a j file chooser using the given current directory path and file system view param imp the import manager param current directory path the directory path param fsv the file system view see javax swing j file chooser j file chooser string file system view public import file chooser import imp string current directory path file system view fsv super current directory path fsv the import imp init chooser jfilechooser filesystemview currentdirectorypath jfilechooser jfilechooser filesystemview importfilechooser currentdirectorypath filesystemview currentdirectorypath theimport initchooser constructs a new default import file chooser param imp the import manager see javax swing j file chooser j file chooser public import file chooser import imp super the import imp init chooser importfilechooser jfilechooser jfilechooser importfilechooser theimport initchooser constructs a j file chooser using the given file system view param imp the import manager param fsv the file system view see javax swing j file chooser j file chooser file system view public import file chooser import imp file system view fsv super fsv the import imp init chooser jfilechooser filesystemview jfilechooser jfilechooser filesystemview importfilechooser filesystemview theimport initchooser private void init chooser set file selection mode j file chooser files and directories set multi selection enabled true set selected file get current directory initchooser setfileselectionmode jfilechooser files_and_directories setmultiselectionenabled setselectedfile getcurrentdirectory override public void approve selection file files get selected files file dir get current directory if files length 0 files new file dir if files length 1 file file files 0 if file null file is directory dir file else dir file get parent file the import set selected files files try the import set selected suffix filter suffix filter get file filter catch exception e this is because of the senseless all files file filter the import set selected suffix filter null globals set last directory dir get path the import dispose dialog the import do file approveselection getselectedfiles getcurrentdirectory isdirectory getparentfile theimport setselectedfiles theimport setselectedsuffixfilter suffixfilter getfilefilter filefilter theimport setselectedsuffixfilter setlastdirectory getpath theimport disposedialog theimport dofile see javax swing j file chooser cancel selection override public void cancel selection the import dispose dialog jfilechooser cancelselection cancelselection theimport disposedialog construct the configuration extension panel param settings a list of settings requested by the language importer public config panel extension final list setting settings set layout new grid bag layout if settings null settings size 0 j label label new j label no settings for this importer add label create grid bag constraints true false false add new j panel create grid bag constraints final return for setting setting settings if setting instanceof unique selection2 j label label new j label setting get label add label create grid bag constraints true false false final unique selection2 us unique selection2 setting button group group new button group int count 0 for string option us get options j radio button button new j radio button option final int index count if us get default selection index button set selected true group add button button add action listener new action listener public void action performed action event e us set selection index add button create grid bag constraints false false false else if setting instanceof user string2 j label label new j label setting get label add label create grid bag constraints true false false final user string2 us user string2 setting final j text field text new j text field us get default string text add focus listener new focus listener public void focus gained focus event e public void focus lost focus event e us set user string text get text add text create grid bag constraints true false false else if setting instanceof boolean selection2 final boolean selection2 bs boolean selection2 setting final j check box button new j check box setting get label button set enabled bs is selected button add action listener new action listener public void action performed action event e bs set selected button is selected add button create grid bag constraints true false false else if setting instanceof path selection j label label new j label setting get label add label create grid bag constraints true false false path selection ps path selection setting todo need to add file chooser j text field text new j text field ps get default path add text create grid bag constraints true false false todo update setting else if setting instanceof path list selection path list selection pls path list selection setting add new import classpath dialog pls create grid bag constraints true false false else throw new runtime exception unknown setting type requested setting add new j panel create grid bag constraints final configpanelextension setlayout gridbaglayout jlabel jlabel creategridbagconstraints jpanel creategridbagconstraintsfinal uniqueselection2 jlabel jlabel getlabel creategridbagconstraints uniqueselection2 uniqueselection2 buttongroup buttongroup getoptions jradiobutton jradiobutton getdefaultselection setselected addactionlistener actionlistener actionperformed actionevent setselection creategridbagconstraints userstring2 jlabel jlabel getlabel creategridbagconstraints userstring2 userstring2 jtextfield jtextfield getdefaultstring addfocuslistener focuslistener focusgained focusevent focuslost focusevent setuserstring gettext creategridbagconstraints booleanselection2 booleanselection2 booleanselection2 jcheckbox jcheckbox getlabel setenabled isselected addactionlistener actionlistener actionperformed actionevent setselected isselected creategridbagconstraints pathselection jlabel jlabel getlabel creategridbagconstraints pathselection pathselection filechooser jtextfield jtextfield getdefaultpath creategridbagconstraints pathlistselection pathlistselection pathlistselection importclasspathdialog creategridbagconstraints runtimeexception jpanel creategridbagconstraintsfinal group add button button add action listener new action listener public void action performed action event e us set selection index addactionlistener actionlistener actionperformed actionevent setselection new j text field us get default string text add focus listener new focus listener public void focus gained focus event e jtextfield getdefaultstring addfocuslistener focuslistener focusgained focusevent text add focus listener new focus listener public void focus gained focus event e public void focus lost focus event e us set user string text get text addfocuslistener focuslistener focusgained focusevent focuslost focusevent setuserstring gettext button set enabled bs is selected button add action listener new action listener public void action performed action event e bs set selected button is selected setenabled isselected addactionlistener actionlistener actionperformed actionevent setselected isselected create a grid bag constraints object to use with the layout param top inset true to use a top inset param bottom inset true to use a bottom inset param fill true to fill horizontally return the grid bag constraints private grid bag constraints create grid bag constraints boolean top inset boolean bottom inset boolean fill grid bag constraints gbc new grid bag constraints gbc gridx grid bag constraints relative gbc gridy grid bag constraints relative gbc gridwidth grid bag constraints remainder gbc gridheight 1 gbc weightx 1 0 gbc weighty 0 0 gbc anchor grid bag constraints northwest gbc fill fill grid bag constraints horizontal grid bag constraints none gbc insets new insets top inset 5 0 5 bottom inset 5 0 5 gbc ipadx 0 gbc ipady 0 return gbc gridbagconstraints topinset bottominset gridbagconstraints creategridbagconstraints topinset bottominset gridbagconstraints gridbagconstraints gridbagconstraints gridbagconstraints gridbagconstraints gridbagconstraints gridbagconstraints gridbagconstraints topinset bottominset a grid bag constraints for the last item to take up the rest of the space return the grid bag constraints object private grid bag constraints create grid bag constraints final grid bag constraints gbc create grid bag constraints false true false gbc gridheight grid bag constraints remainder gbc weighty 1 0 return gbc gridbagconstraints gridbagconstraints gridbagconstraints creategridbagconstraintsfinal gridbagconstraints creategridbagconstraints gridbagconstraints the constructor param x the initial x position param y the initial y position param w the initial width param h the initial height param expand only true if the fig should never shrink deprecated for 0 27 3 by mvw use link fig single line text with notation object rectangle diagram settings boolean suppress warnings deprecation deprecated public fig single line text with notation int x int y int w int h boolean expand only super x y w h expand only expandonly figsinglelinetextwithnotation diagramsettings suppresswarnings figsinglelinetextwithnotation expandonly expandonly the constructor param x the initial x position param y the initial y position param w the initial width param h the initial height param expand only true if this fig shall not shrink param all properties the properties to listen to see org tigris gef presentation fig text fig text int int int int boolean deprecated for 0 27 3 by mvw use link fig single line text with notation object rectangle diagram settings boolean suppress warnings deprecation deprecated public fig single line text with notation int x int y int w int h boolean expand only string all properties super x y w h expand only all properties expandonly allproperties figtext figtext figsinglelinetextwithnotation diagramsettings suppresswarnings figsinglelinetextwithnotation expandonly allproperties expandonly allproperties param owner the owning uml object param bounds the initial position and size param settings the diagram settings applicable for this fig param expand only true if the fig won t shrink if its contents shrink public fig single line text with notation object owner rectangle bounds diagram settings settings boolean expand only super owner bounds settings expand only init notation providers expandonly figsinglelinetextwithnotation diagramsettings expandonly expandonly initnotationproviders param owner the owning uml object param bounds the initial position and size param settings the diagram settings applicable for this fig param expand only true if the fig won t shrink if its contents shrink param property name of property to listen to public fig single line text with notation object owner rectangle bounds diagram settings settings boolean expand only string property super owner bounds settings expand only property init notation providers expandonly figsinglelinetextwithnotation diagramsettings expandonly expandonly initnotationproviders param owner the owning uml object param bounds the initial position and size param settings the diagram settings applicable for this fig param expand only true if the fig won t shrink if its contents shrink param all properties names of properties to listen to public fig single line text with notation object owner rectangle bounds diagram settings settings boolean expand only string all properties super owner bounds settings expand only all properties init notation providers expandonly allproperties figsinglelinetextwithnotation diagramsettings expandonly allproperties expandonly allproperties initnotationproviders deprecated by mvw for 0 27 3 remove this method completely once the deprecated constructors are gone param owner the uml element see org argouml uml diagram ui fig single line text set owner java lang object suppress warnings deprecation deprecated override public void set owner object owner super set owner owner init notation providers figsinglelinetext setowner suppresswarnings setowner setowner initnotationproviders override public void remove from diagram argo event pump remove listener argo event types any notation event this notation provider clean listener this get owner super remove from diagram removefromdiagram argoeventpump removelistener argoeventtypes any_notation_event notationprovider cleanlistener getowner removefromdiagram override public void property change property change event pce if notation provider null notation provider update listener this get owner pce super property change pce propertychange propertychangeevent notationprovider notationprovider updatelistener getowner propertychange this is a template method called by the argouml framework as the result of a change to a model element do not call this method directly yourself p override this in any subclasses in order to redisplay the fig due to change of any model element that this fig is listening to p p this method is guaranteed by the framework to be running on the swing awt thread p param event the uml change event that caused the change protected void update layout uml change event event assert event null if notation provider null remove equals event get property name event get source get owner not this set text notation provider to string get owner get notation settings damage umlchangeevent updatelayout umlchangeevent notationprovider getpropertyname getsource getowner settext notationprovider tostring getowner getnotationsettings overrule this for subclasses that need a different notation provider return the type of the notation provider protected int get notation provider type return notation provider factory2 type name notationprovider getnotationprovidertype notationproviderfactory2 type_name return returns the notation provider for the text in this compartment public notation provider get notation provider return notation provider notationprovider notationprovider getnotationprovider notationprovider param np the notation provider to set void set notation provider notation provider np if notation provider null notation provider clean listener this get owner this notation provider np init notation arguments notationprovider setnotationprovider notationprovider notationprovider notationprovider cleanlistener getowner notationprovider initnotationarguments return returns the notation provider arguments deprecated for 0 27 3 by tfmorris use link get settings then get notation settings on the settings object returned deprecated public hash map string object get np arguments return np arguments getsettings getnotationsettings hashmap getnparguments nparguments protected void init notation providers if notation provider null notation provider clean listener this get owner if get owner null notation name notation notation find notation get notation settings get notation language notation provider notation provider factory2 get instance get notation provider get notation provider type get owner this notation init notation arguments initnotationproviders notationprovider notationprovider cleanlistener getowner getowner notationname findnotation getnotationsettings getnotationlanguage notationprovider notationproviderfactory2 getinstance getnotationprovider getnotationprovidertype getowner initnotationarguments deprecated for 0 27 3 by tfmorris no replacement deprecated protected void init notation arguments np arguments put use guillemets get notation settings is use guillemets initnotationarguments nparguments useguillemets getnotationsettings isuseguillemets deprecated protected void put notation argument string key object element np arguments put key element putnotationargument nparguments show the help text for parsing and initialise the text protected void text edit started string s get notation provider get parsing help show help s set text texteditstarted getnotationprovider getparsinghelp showhelp settext parse the edited text to adapt the uml model protected void text edited notation provider parse get owner get text set text textedited notationprovider getowner gettext settext deprecated for 0 27 3 by tfmorris diagrams are responsible for updating their contained figs with any notation changes mvw there is no replacement yet param e the event see org argouml application events argo notation event listener notation added org argouml application events argo notation event deprecated public void notation added argo notation event e do nothing argonotationeventlistener notationadded argonotationevent notationadded argonotationevent deprecated for 0 27 3 by tfmorris diagrams are responsible for updating their contained figs with any notation changes mvw there is no replacement yet param e the event see org argouml application events argo notation event listener notation changed org argouml application events argo notation event deprecated public void notation changed argo notation event e rendering changed argonotationeventlistener notationchanged argonotationevent notationchanged argonotationevent renderingchanged deprecated for 0 27 3 by tfmorris diagrams are responsible for updating their contained figs with any notation changes mvw there is no replacement yet param e the event see org argouml application events argo notation event listener notation provider added org argouml application events argo notation event deprecated public void notation provider added argo notation event e do nothing argonotationeventlistener notationprovideradded argonotationevent notationprovideradded argonotationevent deprecated for 0 27 3 by tfmorris diagrams are responsible for updating their contained figs with any notation changes mvw there is no replacement yet param e the event see org argouml application events argo notation event listener notation provider removed org argouml application events argo notation event deprecated public void notation provider removed argo notation event e do nothing argonotationeventlistener notationproviderremoved argonotationevent notationproviderremoved argonotationevent deprecated for 0 27 3 by tfmorris diagrams are responsible for updating their contained figs with any notation changes mvw there is no replacement yet param e the event see org argouml application events argo notation event listener notation removed org argouml application events argo notation event deprecated public void notation removed argo notation event e do nothing argonotationeventlistener notationremoved argonotationevent notationremoved argonotationevent public void rendering changed init notation providers super rendering changed renderingchanged initnotationproviders renderingchanged override protected void set text assert get owner null assert notation provider null set text notation provider to string get owner get notation settings settext getowner notationprovider settext notationprovider tostring getowner getnotationsettings utility function to localize the given string with help text and show it in the status bar of the argouml window this function is used in favour of the inline call to enable later improvements e g it would be possible to show a help balloon p todo this code is also present in other root figs param s the given string to be localized and shown protected void show help string s argo event pump fire event new argo help event argo event types help changed this translator localize s showhelp argoeventpump fireevent argohelpevent argoeventtypes help_changed protected notation settings get notation settings return get settings get notation settings notationsettings getnotationsettings getsettings getnotationsettings creates a uml plain text document object that represents a tagged value of an model element object param tagged value the tagged value public uml model element tagged value document string tagged value stores the action command into the uml plain text document class which is also used for set property and get property todo this appears to expect that the uml 1 3 tag name will appear as a property name in an event but with the uml 1 4 switch to tag definitions this won t work super tagged value umlplaintextdocument modelelement taggedvalue umlmodelelementtaggedvaluedocument taggedvalue umlplaintextdocument setproperty getproperty tagdefinitions taggedvalue sets the tagged value to given string param text the property protected void set property string text if get target null model get core helper set tagged value get target get event name text setproperty gettarget getcorehelper settaggedvalue gettarget geteventname return the value of the tagged value protected string get property string event name get event name if model get facade isa model element get target object tagged value model get facade get tagged value get target event name if tagged value null return model get facade get value of tag tagged value return getproperty eventname geteventname getfacade isamodelelement gettarget taggedvalue getfacade gettaggedvalue gettarget eventname taggedvalue getfacade getvalueoftag taggedvalue constructor public navigate target forward action super translator localize action navigate forward resource loader wrapper lookup icon action navigate forward set the tooltip string put value action short description translator localize action navigate forward navigatetargetforwardaction resourceloaderwrapper lookupicon putvalue short_description java awt event action event public void action performed action event e target manager get instance navigate forward actionevent actionperformed actionevent targetmanager getinstance navigateforward action is possible only if navigate forward possible on target manager returns true see javax swing action is enabled public boolean is enabled return target manager get instance navigate forward possible navigateforwardpossible targetmanager isenabled isenabled targetmanager getinstance navigateforwardpossible public association name notation object model element if model get facade isa association model element throw new illegal argument exception this is not an association associationnamenotation modelelement getfacade isaassociation modelelement illegalargumentexception public void initialise listener property change listener listener object model element listen to the modelelement itself add element listener listener model element new string name visibility stereotype collection stereotypes model get facade get stereotypes model element iterator iter stereotypes iterator while iter has next object one stereo type iter next add element listener listener one stereo type new string name remove initialiselistener propertychangelistener modelelement addelementlistener modelelement getfacade getstereotypes modelelement hasnext onestereotype addelementlistener onestereotype see org argouml uml ui abstract action navigate navigate to java lang object protected object navigate to object source return model get facade get owner source abstractactionnavigate navigateto navigateto getfacade getowner the constructor param expression model expression model should be shared between language and body fields param notify set to true to forward events to model only one of language and body fields should have this set to true public uml expression body field uml expression model2 expression model boolean notify model expression model notify model notify get document add document listener this set tool tip text translator localize label body tooltip set font look and feel mgr get instance get standard font set rows 2 make it stretch vertically expressionmodel umlexpressionbodyfield umlexpressionmodel2 expressionmodel expressionmodel notifymodel getdocument adddocumentlistener settooltiptext setfont lookandfeelmgr getinstance getstandardfont setrows public void target changed log debug uml expression body field target changed if notify model model target changed update targetchanged umlexpressionbodyfield targetchanged notifymodel targetchanged see org argouml uml ui uml user interface component target reasserted public void target reasserted umluserinterfacecomponent targetreasserted targetreasserted todo this does not work no event arrives public void property change property change event event log debug uml expression body field property set event update propertychange propertychangeevent umlexpressionbodyfield propertyset private void update string old text get text string new text model get body if old text null new text null old text equals new text if old text new text set text new text oldtext gettext newtext getbody oldtext newtext oldtext newtext oldtext newtext settext newtext see javax swing event document listener changed update javax swing event document event public void changed update final document event p1 model set body get text documentlistener changedupdate documentevent changedupdate documentevent setbody gettext see javax swing event document listener remove update javax swing event document event public void remove update final document event p1 model set body get text documentlistener removeupdate documentevent removeupdate documentevent setbody gettext see javax swing event document listener insert update javax swing event document event public void insert update final document event p1 model set body get text documentlistener insertupdate documentevent insertupdate documentevent setbody gettext public target listener get targettable model return model targetlistener gettargettablemodel deprecated for 0 27 3 by tfmorris only used by link diagram factory create rendering element object object which is itself unused and now deprecated deprecated public fig node get fig node for object node int x int y map style attributes if node null throw new illegal argument exception a model element must be supplied fig node fig node null if model get facade isa comment node fig node new fig comment else if model get facade isa stub state node return new fig stub state else if model get facade isa association class node fig node new fig class association class node x y 10 10 else if model get facade isa class node fig node new fig class node x y 10 10 else if model get facade isa interface node fig node new fig interface else if model get facade isa enumeration node fig node new fig enumeration else if model get facade isa stereotype node fig node new fig stereotype declaration else if model get facade isa data type node fig node new fig data type else if model get facade isa model node fig node new fig model node x y else if model get facade isa subsystem node fig node new fig subsystem node x y else if model get facade isa package node fig node new fig package node x y else if model get facade isa association node fig node new fig node association else if model get facade isa actor node fig node new fig actor else if model get facade isa use case node fig node new fig use case else if model get facade isa partition node fig node new fig partition else if model get facade isa call state node fig node new fig call state else if model get facade isa object flow state node fig node new fig object flow state else if model get facade isa subactivity state node fig node new fig subactivity state else if model get facade isa classifier role node fig node new fig classifier role else if model get facade isa message node fig node new fig message else if model get facade isa node node fig node new figm node else if model get facade isa node instance node fig node new fig node instance else if model get facade isa component node fig node new fig component else if model get facade isa component instance node fig node new fig component instance else if model get facade isa object node fig node new fig object else if model get facade isa comment node fig node new fig comment else if model get facade isa action state node fig node new fig action state else if model get facade isa final state node fig node new fig final state else if model get facade isa submachine state node fig node new fig submachine state else if model get facade isa concurrent region node fig node new fig concurrent region else if model get facade isa synch state node fig node new fig synch state else if model get facade isa composite state node fig node new fig composite state else if model get facade isa state node fig node new fig simple state else if model get facade isa pseudostate node object p state node object kind model get facade get kind p state if model get pseudostate kind get initial equals kind fig node new fig initial state else if model get pseudostate kind get choice equals kind fig node new fig branch state else if model get pseudostate kind get junction equals kind fig node new fig junction state else if model get pseudostate kind get fork equals kind fig node new fig fork state else if model get pseudostate kind get join equals kind fig node new fig join state else if model get pseudostate kind get shallow history equals kind fig node new fig shallow history state else if model get pseudostate kind get deep history equals kind fig node new fig deep history state if fig node null throw new illegal argument exception failed to construct a fig node for node set style attributes fig node style attributes return fig node diagramfactory createrenderingelement fignode getfignodefor styleattributes illegalargumentexception fignode fignode getfacade isacomment fignode figcomment getfacade isastubstate figstubstate getfacade isaassociationclass fignode figclassassociationclass getfacade isaclass fignode figclass getfacade isainterface fignode figinterface getfacade isaenumeration fignode figenumeration getfacade isastereotype fignode figstereotypedeclaration getfacade isadatatype fignode figdatatype getfacade isamodel fignode figmodel getfacade isasubsystem fignode figsubsystem getfacade isapackage fignode figpackage getfacade isaassociation fignode fignodeassociation getfacade isaactor fignode figactor getfacade isausecase fignode figusecase getfacade isapartition fignode figpartition getfacade isacallstate fignode figcallstate getfacade isaobjectflowstate fignode figobjectflowstate getfacade isasubactivitystate fignode figsubactivitystate getfacade isaclassifierrole fignode figclassifierrole getfacade isamessage fignode figmessage getfacade isanode fignode figmnode getfacade isanodeinstance fignode fignodeinstance getfacade isacomponent fignode figcomponent getfacade isacomponentinstance fignode figcomponentinstance getfacade isaobject fignode figobject getfacade isacomment fignode figcomment getfacade isaactionstate fignode figactionstate getfacade isafinalstate fignode figfinalstate getfacade isasubmachinestate fignode figsubmachinestate getfacade isaconcurrentregion fignode figconcurrentregion getfacade isasynchstate fignode figsynchstate getfacade isacompositestate fignode figcompositestate getfacade isastate fignode figsimplestate getfacade isapseudostate pstate getfacade getkind pstate getpseudostatekind getinitial fignode figinitialstate getpseudostatekind getchoice fignode figbranchstate getpseudostatekind getjunction fignode figjunctionstate getpseudostatekind getfork fignode figforkstate getpseudostatekind getjoin fignode figjoinstate getpseudostatekind getshallowhistory fignode figshallowhistorystate getpseudostatekind getdeephistory fignode figdeephistorystate fignode illegalargumentexception fignode setstyleattributes fignode styleattributes fignode set the fig style according to attributes param fig the fig to style param attribute map a map of name value pairs private void set style attributes fig fig map string string attribute map string name string value for map entry string string entry attribute map entry set name entry get key value entry get value if operations visible equals name operations compartment container fig set operations visible value equals ignore case true else if attributes visible equals name attributes compartment container fig set attributes visible value equals ignore case true attributemap setstyleattributes attributemap attributemap entryset getkey getvalue operationsvisible operationscompartmentcontainer setoperationsvisible equalsignorecase attributesvisible attributescompartmentcontainer setattributesvisible equalsignorecase deprecated for 0 27 3 by tfmorris use method of same name which takes a graph model argument in the subclasses of this class see org tigris gef graph graph edge renderer get fig edge for java lang object java util map deprecated public fig edge get fig edge for object edge map style attributes if edge null throw new illegal argument exception a model edge must be supplied fig edge new edge null if model get facade isa association class edge new edge new fig association class else if model get facade isa association end edge new edge new fig association end else if model get facade isa association edge new edge new fig association else if model get facade isa link edge new edge new fig link else if model get facade isa generalization edge new edge new fig generalization else if model get facade isa package import edge new edge new fig permission else if model get facade isa usage edge new edge new fig usage else if model get facade isa dependency edge if model get extension mechanisms helper has stereotype edge core factory realize stereotype new edge new fig abstraction else new edge new fig dependency else if edge instanceof comment edge new edge null else if model get facade isa association role edge new edge new fig association role else if model get facade isa transition edge new edge new fig transition else if model get facade isa extend edge new edge new fig extend else if model get facade isa include edge new edge new fig include if new edge null throw new illegal argument exception failed to construct a fig edge for edge return new edge graphmodel graphedgerenderer getfigedgefor figedge getfigedgefor styleattributes illegalargumentexception figedge newedge getfacade isaassociationclass newedge figassociationclass getfacade isaassociationend newedge figassociationend getfacade isaassociation newedge figassociation getfacade isalink newedge figlink getfacade isageneralization newedge figgeneralization getfacade isapackageimport newedge figpermission getfacade isausage newedge figusage getfacade isadependency getextensionmechanismshelper hasstereotype corefactory realize_stereotype newedge figabstraction newedge figdependency commentedge newedge getfacade isaassociationrole newedge figassociationrole getfacade isatransition newedge figtransition getfacade isaextend newedge figextend getfacade isainclude newedge figinclude newedge illegalargumentexception figedge newedge find the figs in the given layer that should be the source and destination and attach these to either end of the fig edge param layer the layer to look for the fig nodes param new edge the edge to attach protected final void set ports layer layer fig edge new edge object model element new edge get owner if new edge get source port fig null object source if model element instanceof comment edge source comment edge model element get source else source model get uml helper get source model element fig node source node get node presentation for layer source assert source node null no fig node found for source set source port new edge source node if new edge get dest port fig null object dest if model element instanceof comment edge dest comment edge model element get destination else dest model get uml helper get destination new edge get owner set dest port new edge get node presentation for layer dest if new edge get source port fig null new edge get dest port fig null throw new illegal state exception edge of type new edge get class get name created with no source or destination port figedge fignodes newedge setports figedge newedge modelelement newedge getowner newedge getsourceportfig modelelement commentedge commentedge modelelement getsource getumlhelper getsource modelelement fignode sourcenode getnodepresentationfor sourcenode fignode setsourceport newedge sourcenode newedge getdestportfig modelelement commentedge commentedge modelelement getdestination getumlhelper getdestination newedge getowner setdestport newedge getnodepresentationfor newedge getsourceportfig newedge getdestportfig illegalstateexception newedge getclass getname private void set source port fig edge edge fig node source edge set source port fig source edge set source fig node source setsourceport figedge fignode setsourceportfig setsourcefignode private void set dest port fig edge edge fig node dest edge set dest port fig dest edge set dest fig node dest setdestport figedge fignode setdestportfig setdestfignode get the fig node from the given layer that represents the given model element the fig node portion of an association class is returned in preference to the fig edge portion if no fig node is found then a f ig edge is searched for and the fig node that acts as its edge port is returned param lay the layer containing the fig param model element the model element to find presentation for return the fig node presentation of the model element private fig node get node presentation for layer lay object model element assert model element null a model element must be supplied for object fig lay get contents no edges if fig instanceof fig node fig node fig get owner equals model element return fig node fig for object fig lay get contents edges only if fig instanceof fig edge model element model element equals fig edge model element fig get owner return fig edge model element fig get edge port return null fignode fignode figedge fignode figedge fignode modelelement fignode fignode getnodepresentationfor modelelement modelelement modelelement getcontentsnoedges fignode fignode getowner modelelement fignode getcontentsedgesonly figedgemodelelement modelelement figedgemodelelement getowner figedgemodelelement getedgeport the constructor public go stereotype to tag definition super gostereotypetotagdefinition override public collection get children final object parent if model get facade isa stereotype parent final list list new array list if model get facade get tag definitions parent null model get facade get tag definitions parent size 0 list add all model get facade get tag definitions parent return list return collections empty set getchildren getfacade isastereotype arraylist getfacade gettagdefinitions getfacade gettagdefinitions addall getfacade gettagdefinitions empty_set see org argouml ui explorer rules abstract perspective rule get rule name override public string get rule name return stereotype tag definition abstractperspectiverule getrulename getrulename tagdefinition see org argouml ui explorer rules abstract perspective rule to string override public string to string return super to string abstractperspectiverule tostring tostring tostring public set get dependencies final object parent if model get facade isa stereotype parent final set set new hash set set add parent set add all model get facade get tag definitions parent return set return collections empty set getdependencies getfacade isastereotype hashset addall getfacade gettagdefinitions empty_set construct a new fig junction state param owner owning uml element param bounds position and size param settings rendering settings public fig junction state object owner rectangle bounds diagram settings settings super owner bounds settings init figs figjunctionstate figjunctionstate diagramsettings initfigs the constructor deprecated for 0 27 4 by tfmorris use link fig junction state object rectangle diagram settings suppress warnings deprecation deprecated public fig junction state super init figs figjunctionstate diagramsettings suppresswarnings figjunctionstate initfigs private void init figs set editable false set big port new fig diamond x y width height false debug color debug color head new fig diamond x y width height false line color fill color add fig get big port add fig head set blink ports false make port invisible unless mouse enters initfigs seteditable setbigport figdiamond debug_color debug_color figdiamond line_color fill_color addfig getbigport addfig setblinkports constructor param gm ignored param node the owner deprecated for 0 27 4 by tfmorris use link fig junction state object rectangle diagram settings suppress warnings deprecation deprecated public fig junction state suppress warnings unused graph model gm object node this set owner node figjunctionstate diagramsettings suppresswarnings figjunctionstate suppresswarnings graphmodel setowner override public object clone fig junction state fig clone fig junction state super clone iterator it fig clone get figs iterator fig clone set big port fig diamond it next fig clone head fig diamond it next return fig clone figjunctionstate figclone figjunctionstate figclone getfigs figclone setbigport figdiamond figclone figdiamond figclone initial states are fixed size return false override public boolean is resizable return false isresizable see org tigris gef presentation fig set line color java awt color override public void set line color color col head set line color col setlinecolor setlinecolor setlinecolor see org tigris gef presentation fig get line color override public color get line color return head get line color getlinecolor getlinecolor getlinecolor see org tigris gef presentation fig set fill color java awt color override public void set fill color color col head set fill color col setfillcolor setfillcolor setfillcolor see org tigris gef presentation fig get fill color override public color get fill color return head get fill color getfillcolor getfillcolor getfillcolor see org tigris gef presentation fig set filled boolean override public void set filled boolean f setfilled setfilled override public boolean is filled return true isfilled see org tigris gef presentation fig set line width int override public void set line width int w head set line width w setlinewidth setlinewidth setlinewidth see org tigris gef presentation fig get line width override public int get line width return head get line width getlinewidth getlinewidth getlinewidth see java awt event mouse listener mouse clicked java awt event mouse event override public void mouse clicked mouse event me mouselistener mouseclicked mouseevent mouseclicked mouseevent override public point get closest point point another pt rectangle r get bounds int xs r x r width 2 r x r width r x r width 2 r x r x r width 2 int ys r y r y r height 2 r y r height r y r height 2 r y point p geometry pt closest to xs ys 5 another pt return p getclosestpoint anotherpt getbounds ptclosestto anotherpt override set standard bounds to keep shapes looking right inherit doc override protected void set standard bounds int x int y int w int h if get name fig null return rectangle old bounds get bounds get big port set bounds x y w h head set bounds x y w h calc bounds x x y y w w h h update edges fire prop change bounds old bounds get bounds setstandardbounds inheritdoc setstandardbounds getnamefig oldbounds getbounds getbigport setbounds setbounds calcbounds _x _y _w _h updateedges firepropchange oldbounds getbounds see org argouml persistence member file persister get main tag public string get main tag return profile memberfilepersister getmaintag getmaintag public void load project project input stream input stream throws open exception try profile configuration parser parser new profile configuration parser parser parse new input source input stream collection profile profiles parser get profiles collection string unresolved parser get unresolved filenames if unresolved is empty profiles add all load unresolved unresolved profile configuration pc new profile configuration project profiles project set profile configuration pc catch exception e if e instanceof open exception throw open exception e throw new open exception e inputstream inputstream openexception profileconfigurationparser profileconfigurationparser inputsource inputstream getprofiles getunresolvedfilenames isempty addall loadunresolved profileconfiguration profileconfiguration setprofileconfiguration openexception openexception openexception use xmi as a fall back alternative when the file for the user defined profile isn t found by the profile manager p todo work in progress see issue 5039 param unresolved collection of unresolved filenames from the parser return collection of resolved profiles private collection profile load unresolved collection string unresolved collection profile profiles new array list profile profile manager profile manager profile facade get manager for string filename unresolved todo work in progress see issue 5039 add user defined profile filename xmi profile manager profile profile get matching user defined profile filename profile manager assert profile null profile should have been found now profiles add profile return profiles loadunresolved arraylist profilemanager profilemanager profilefacade getmanager adduserdefinedprofile profilemanager getmatchinguserdefinedprofile profilemanager register a user defined profile in the profile manager using the backup xmi file from the project being loaded p em note em this has the side effect of permanently registering the profile which may not be what the user wants param file name name of original xmi file that the author of the project used when creating the user defined profile param xmi the contents of the xmi file param profile manager the link profile manager throws io exception on any i o error private void add user defined profile string file name string buffer xmi profile manager profile manager throws io exception file profiles directory get profiles directory profile manager file profile file new file profiles directory file name output stream writer writer new output stream writer new file output stream profile file argo get encoding writer write xmi to string writer close log info wrote user defined profile profile file with size xmi length if is some profile directory configured profile manager profile manager refresh registered profiles else profile manager add search path directory profiles directory get absolute path profilemanager filename userdefinedprofile profilemanager profilemanager ioexception adduserdefinedprofile filename stringbuffer profilemanager profilemanager ioexception profilesdirectory getprofilesdirectory profilemanager profilefile profilesdirectory filename outputstreamwriter outputstreamwriter fileoutputstream profilefile getencoding tostring profilefile issomeprofiledirectoryconfigured profilemanager profilemanager refreshregisteredprofiles profilemanager addsearchpathdirectory profilesdirectory getabsolutepath private static file get profiles directory profile manager profile manager if is some profile directory configured profile manager list string directories profile manager get search path directories return new file directories get 0 else file user settings file new file configuration get factory get configuration handler get default path return user settings file get parent file getprofilesdirectory profilemanager profilemanager issomeprofiledirectoryconfigured profilemanager profilemanager getsearchpathdirectories usersettingsfile getfactory getconfigurationhandler getdefaultpath usersettingsfile getparentfile private static boolean is some profile directory configured profile manager profile manager return profile manager get search path directories size 0 issomeprofiledirectoryconfigured profilemanager profilemanager profilemanager getsearchpathdirectories public void save project member member output stream stream throws save exception print writer w try w new print writer new output stream writer stream utf 8 catch unsupported encoding exception e1 throw new save exception utf 8 encoding not supported on platform e1 save project member member w w flush projectmember outputstream saveexception printwriter printwriter outputstreamwriter unsupportedencodingexception saveexception saveprojectmember private void save project member project member member print writer w throws save exception try if member instanceof profile configuration profile configuration pc profile configuration member w println xml version 1 0 encoding utf 8 todo this dtd doesn t exist so we can t tell readers to look for it w println doctype profile system profile dtd but we need a 2nd line to make the funky uml persister work w println remove this line if the above is uncommented w println profile for profile profile pc get profiles if profile instanceof user defined profile user defined profile uprofile user defined profile profile w println t t user defined w println t t t filename uprofile get model file get name filename w println t t t model print modelxmi w uprofile get profile packages w println t t t model w println t t user defined else w println t t plugin w println t t t profile get profile identifier w println t t plugin w println profile catch exception e e print stack trace throw new save exception e saveprojectmember projectmember printwriter saveexception profileconfiguration profileconfiguration profileconfiguration getprofiles userdefinedprofile userdefinedprofile userdefinedprofile userdefined getmodelfile getname printmodelxmi getprofilepackages userdefined getprofileidentifier printstacktrace saveexception private void print modelxmi print writer w collection profile models throws uml exception todo why is this not executed remove if not needed tfm if true return string writer my writer new string writer for object model profile models xmi writer xmi writer model get xmi writer model output stream null my writer application version get version uml file persister persistence version xmi writer write my writer flush w println my writer to string printmodelxmi printwriter profilemodels umlexception stringwriter mywriter stringwriter profilemodels xmiwriter xmiwriter getxmiwriter outputstream mywriter applicationversion getversion umlfilepersister persistence_version xmiwriter mywriter mywriter tostring override public void load project project url url throws open exception try load project url open stream catch io exception e throw new open exception e openexception openstream ioexception openexception construct the parser public profile configuration parser empty constructor profileconfigurationparser public collection profile get profiles return profiles getprofiles public collection string get unresolved filenames return unresolved filenames getunresolvedfilenames unresolvedfilenames public void handle start element xml element e try switch tokens to token e get name true case profile configuration token table token profile break case profile configuration token table token plugin profile null break case profile configuration token table token user defined profile null filename null model null break case profile configuration token table token filename break case profile configuration token table token model break default log warn warning unknown tag e get name break catch exception ex log error exception in startelement ex handlestartelement xmlelement totoken getname profileconfigurationtokentable token_profile profileconfigurationtokentable token_plugin profileconfigurationtokentable token_user_defined profileconfigurationtokentable token_filename profileconfigurationtokentable token_model getname called by the xml implementation to signal the end of an xml entity param e the xml entity that ends throws sax exception on any error public void handle end element xml element e throws sax exception try switch tokens to token e get name false case profile configuration token table token profile handle profile end e break case profile configuration token table token plugin handle plugin end e break case profile configuration token table token user defined handle user defined end e break case profile configuration token table token filename handle filename end e break case profile configuration token table token model handle model end e break default log warn warning unknown end tag e get name break catch exception ex throw new sax exception ex saxexception handleendelement xmlelement saxexception totoken getname profileconfigurationtokentable token_profile handleprofileend profileconfigurationtokentable token_plugin handlepluginend profileconfigurationtokentable token_user_defined handleuserdefinedend profileconfigurationtokentable token_filename handlefilenameend profileconfigurationtokentable token_model handlemodelend getname saxexception protected void handle profile end xml element e if profiles is empty log warn no profiles defined handleprofileend xmlelement isempty protected void handle plugin end xml element e throws sax exception string name e get text trim profile lookup profile name if profile null profiles add profile log debug found plugin profile name else log error unabled to find plugin profile name handlepluginend xmlelement saxexception gettext lookupprofile private static profile lookup profile string profile identifier throws sax exception profile profile profile profile facade get manager look for registered profile profile identifier if profile null for compatibility with older format profile profile facade get manager get profile for class profile identifier if profile null throw new sax exception plugin profile profile identifier is not available in installation null return profile lookupprofile profileidentifier saxexception profilefacade getmanager lookforregisteredprofile profileidentifier profilefacade getmanager getprofileforclass profileidentifier saxexception profileidentifier protected void handle user defined end xml element e model is not used in current implementation if filename null model null log error got badly formed user defined profile entry e profile get matching user defined profile filename profile facade get manager if profile null unresolved filenames add filename else profiles add profile log debug loaded user defined profile filename filename handleuserdefinedend xmlelement getmatchinguserdefinedprofile profilefacade getmanager unresolvedfilenames private static profile get matching user defined profile string file name profile manager profile manager for profile candidate profile profile manager get registered profiles if candidate profile instanceof user defined profile user defined profile user profile user defined profile candidate profile if user profile get model file null file name equals user profile get model file get name return user profile return null getmatchinguserdefinedprofile filename profilemanager profilemanager candidateprofile profilemanager getregisteredprofiles candidateprofile userdefinedprofile userdefinedprofile userprofile userdefinedprofile candidateprofile userprofile getmodelfile filename userprofile getmodelfile getname userprofile protected void handle filename end xml element e filename e get text trim log debug got filename filename handlefilenameend xmlelement gettext protected void handle model end xml element e model e get text trim log debug got model model handlemodelend xmlelement gettext construct the token table public profile configuration token table super token last profileconfigurationtokentable token_last protected void setup tokens add token string profile integer value of token profile add token string plugin integer value of token plugin add token string user defined integer value of token user defined add token string filename integer value of token filename add token string model integer value of token model setuptokens addtoken string_profile valueof token_profile addtoken string_plugin valueof token_plugin addtoken string_user_defined valueof token_user_defined addtoken string_filename valueof token_filename addtoken string_model valueof token_model the main entry point of argouml param args command line parameters public static void main string args try log info argouml started simple timer st new simple timer st mark begin init preinitialize st mark arguments parse command line args register our last chance exception handler awt exception handler register exception handler get the splash screen up as early as possible st mark create splash splash screen splash null if batch we have to do this to set the laf for the splash screen st mark initialize laf look and feel mgr get instance initialize look and feel if the theme null look and feel mgr get instance set current theme the theme if do splash splash initialize splash main initialization happens here project browser pb initialize subsystems st splash needs to happen after initialization is done modules loaded st mark perform commands if batch todo add an open most recent project command so that command state can be decoupled from user settings perform commands internal commands commands null system out println exiting because we are running in batch new action exit do command null return if reload recent project name null project name get most recent project url url to open null if project name null project name persistence manager get instance fix extension project name url to open project url project name url to open open project st splash pb url to open st mark perspectives if splash null splash get status bar show progress 75 st mark open window update progress splash 95 statusmsg bar open project browser argo frame get instance set visible true st mark close splash if splash null splash set visible false splash dispose splash null perform commands commands commands null st mark start critics runnable start critics new start critics main add post load action start critics st mark start loading modules runnable module loader new load modules main add post load action module loader post load pl new post load post load actions thread post load thead new thread pl post load thead start log info log info profile of load time for enumeration i st result i has more elements log info i next element log info log info st null argo frame get instance set cursor cursor get predefined cursor cursor default cursor tool tip manager shared instance set initial delay 500 tool tip manager shared instance set dismiss delay 50000000 catch throwable t try log fatal fatal error on startup argouml failed to start t finally system out println fatal error on startup argouml failed to start t print stack trace system exit 1 simpletimer simpletimer initpreinitialize parsecommandline awtexceptionhandler registerexceptionhandler splashscreen lookandfeelmgr getinstance initializelookandfeel thetheme lookandfeelmgr getinstance setcurrenttheme thetheme dosplash initializesplash projectbrowser initializesubsystems performcommandsinternal actionexit docommand reloadrecent projectname projectname getmostrecentproject urltoopen projectname projectname persistencemanager getinstance fixextension projectname urltoopen projecturl projectname urltoopen openproject urltoopen getstatusbar showprogress updateprogress argoframe getinstance setvisible setvisible performcommands startcritics startcritics addpostloadaction startcritics moduleloader loadmodules addpostloadaction moduleloader postload postload postloadactions postloadthead postloadthead hasmoreelements nextelement argoframe getinstance setcursor getpredefinedcursor default_cursor tooltipmanager sharedinstance setinitialdelay tooltipmanager sharedinstance setdismissdelay printstacktrace private static void init preinitialize checkjvm version check hosts file force the configuration to load configuration load synchronize the startup directory string directory argo get directory org tigris gef base globals set last directory directory init version init translator then print out some version info for debuggers org argouml util tools log version info set system properties initpreinitialize checkjvmversion checkhostsfile getdirectory setlastdirectory initversion inittranslator logversioninfo setsystemproperties private static void init translator set the i18n locale translator init configuration get string argo key locale create an anonymous class as a kind of adaptor for the cognitive system to provide proper translation i18n org argouml cognitive translator set translator new abstract cognitive translator public string i18nlocalize string key return translator localize key public string i18nmessage format string key object i args return translator message format key i args inittranslator getstring key_locale settranslator abstractcognitivetranslator i18nmessageformat iargs messageformat iargs org argouml cognitive translator set translator new abstract cognitive translator public string i18nlocalize string key return translator localize key settranslator abstractcognitivetranslator public string i18nmessage format string key object i args return translator message format key i args i18nmessageformat iargs messageformat iargs private static void set system properties set properties for application behaviour system set property gef image location org argouml images system set property apple laf use screen menu bar true fix set the application name for mac os x system set property com apple mrj application apple menu about name argouml setsystemproperties setproperty imagelocation setproperty usescreenmenubar setproperty parse command line args the assumption is that all options precede the name of a project file to load sets static fields that can be referenced later param args command line args private static void parse command line string args do splash configuration get boolean argo key splash true reload recent configuration get boolean argo key reload recent project false commands new array list string the theme null for int i 0 i args length i if args i starts with string theme name look and feel mgr get instance get theme class name from arg args i if theme name null the theme theme name else if args i equals ignore case help args i equals ignore case h args i equals ignore case help args i equals ignore case print usage system exit 0 else if args i equals ignore case nosplash do splash false else if args i equals ignore case norecentfile reload recent false else if args i equals ignore case command i 1 args length commands add args i 1 i else if args i equals ignore case locale i 1 args length translator set locale args i 1 i else if args i equals ignore case batch batch true else if args i equals ignore case open i 1 args length project name args i else if args i equals ignore case print i 1 args length todo huge side effect hoist out of parse tfm let s load the project string project to be printed persistence manager get instance fix extension args i url url to be printed project url project to be printed null project browser get instance load project new file url to be printed get file true null now let s print it print manager get instance print nothing else to do system exit 0 else system err println ignoring unknown incomplete option args i else if project name null system out println setting project name to args i project name args i parsecommandline dosplash getboolean key_splash reloadrecent getboolean key_reload_recent_project arraylist thetheme startswith themename lookandfeelmgr getinstance getthemeclassnamefromarg themename thetheme themename equalsignorecase equalsignorecase equalsignorecase equalsignorecase printusage equalsignorecase dosplash equalsignorecase reloadrecent equalsignorecase equalsignorecase setlocale equalsignorecase equalsignorecase projectname equalsignorecase projecttobeprinted persistencemanager getinstance fixextension urltobeprinted projecturl projecttobeprinted projectbrowser getinstance loadproject urltobeprinted getfile printmanager getinstance projectname projectname projectname private static project browser initialize subsystems simple timer st splash screen splash project browser pb null st mark initialize model subsystem init model update progress splash 5 statusmsg bar model subsystem st mark initialize the profile subsystem new init profile subsystem init the reason the gui is initialized before the commands are run is that some of the commands will use the projectbrowser st mark initialize gui pb initializegui splash st mark initialize subsystems subsystem utility init subsystem new init ui cmd subsystem subsystem utility init subsystem new init notationui subsystem utility init subsystem new init notation subsystem utility init subsystem new init notation uml subsystem utility init subsystem new init notation java subsystem utility init subsystem new init diagram appearanceui subsystem utility init subsystem new init activity diagram subsystem utility init subsystem new init collaboration diagram subsystem utility init subsystem new init deployment diagram subsystem utility init subsystem new init sequence diagram subsystem utility init subsystem new init state diagram subsystem utility init subsystem new init class diagram subsystem utility init subsystem new init use case diagram subsystem utility init subsystem new init umlui subsystem utility init subsystem new init check listui subsystem utility init subsystem new init cognitiveui initialize the module loader at least the plug ins that provide profiles need to be initialized before the project is loaded because some of these profile may have been set as default profiles and need to be applied to the project as soon as it has been created or loaded the first instance of a project is needed during the gui initialization st mark initialize modules subsystem utility init subsystem new init module loader return pb projectbrowser initializesubsystems simpletimer splashscreen projectbrowser initmodel updateprogress initprofilesubsystem subsystemutility initsubsystem inituicmdsubsystem subsystemutility initsubsystem initnotationui subsystemutility initsubsystem initnotation subsystemutility initsubsystem initnotationuml subsystemutility initsubsystem initnotationjava subsystemutility initsubsystem initdiagramappearanceui subsystemutility initsubsystem initactivitydiagram subsystemutility initsubsystem initcollaborationdiagram subsystemutility initsubsystem initdeploymentdiagram subsystemutility initsubsystem initsequencediagram subsystemutility initsubsystem initstatediagram subsystemutility initsubsystem initclassdiagram subsystemutility initsubsystem initusecasediagram subsystemutility initsubsystem initumlui subsystemutility initsubsystem initchecklistui subsystemutility initsubsystem initcognitiveui subsystemutility initsubsystem initmoduleloader initialize the uml model repository private static void init model string class name system get property argouml model implementation default model implementation throwable ret model initialise class name if ret null log fatal model component not correctly initialized ret system err println class name is not a working model implementation system exit 1 initmodel classname getproperty default_model_implementation classname classname private static void open project simple timer st splash screen splash project browser pb url url to open if splash null splash get status bar show progress 40 st mark open project designer disable critiquing designer clear critiquing boolean project loaded false if url to open null if splash null object msg args project name splash get status bar show status translator message format statusmsg bar readingproject msg args string filename url to open get file file file new file filename system err println the url of the file to open is url to open system err println the filename is filename system err println the file is file system err println file exists file exists project loaded pb load project file true null else if splash null splash get status bar show status translator localize statusmsg bar defaultproject if project loaded although this looks redundant it s needed to get all the initialization state set correctly too many side effects as part of initialization project manager get manager set current project project manager get manager get current project project manager get manager set save enabled false st mark set project designer enable critiquing openproject simpletimer splashscreen projectbrowser urltoopen getstatusbar showprogress disablecritiquing clearcritiquing projectloaded urltoopen msgargs projectname getstatusbar showstatus messageformat msgargs urltoopen getfile urltoopen projectloaded loadproject getstatusbar showstatus projectloaded projectmanager getmanager setcurrentproject projectmanager getmanager getcurrentproject projectmanager getmanager setsaveenabled enablecritiquing private static string get most recent project if no project was entered on the command line try to reload the most recent project if that option is true string s configuration get string argo key most recent project file if equals s file file new file s if file exists log info re opening project s return s else log warn cannot re open s because it does not exist return null getmostrecentproject getstring key_most_recent_project_file helper to update progress if we have a splash screen displayed param splash code true code if the splash is to be shown param percent the new percentage for progress bar param message the message to be shown in the splash private static void update progress splash screen splash int percent string message if splash null splash get status bar show status translator localize message splash get status bar show progress percent updateprogress splashscreen getstatusbar showstatus getstatusbar showprogress calculates the link url for the given project name if the file does not exist or cannot be converted the default link url is returned param the project name is the file name of the project param url to open is the default link url return the new url private static url project url final string the project name url url to open file project file new file the project name if project file exists system err println project file project file does not exist this will cause an empty project to be created else try url to open util file tourl project file catch exception e log error exception opening project in main e return url to open theprojectname urltoopen projecturl theprojectname urltoopen projectfile theprojectname projectfile projectfile urltoopen filetourl projectfile urltoopen prints the usage message private static void print usage system err println usage options project file system err println options include system err println help display this information look and feel mgr get instance print theme args system err println nosplash don t display logo at startup system err println norecentfile don t reload last saved file system err println command arg command to perform on startup system err println batch don t start gui system err println locale arg set the locale e g en gb todo the quickguide also mentions open arg open given file on startup print arg print given file on startup and exit why are these gone system err println system err println you can also set java settings which influence the behaviour of argouml system err println xms250m xmx500m makes argouml reserve more memory for large projects system err println n n printusage lookandfeelmgr getinstance printthemeargs en_gb check tha jvm version p if it is a unsupported jvm version we exit immediately p note in most cases the jvm classloader will complain about an unsupported class version error long before we get anywhere near this point in the initialization private static void checkjvm version check if we are using a supported java version if java runtime utility is jre supported system err println you are using java java runtime utility get jre version please use java 5 aka 1 5 or later with argouml system exit 0 unsupportedclassversionerror checkjvmversion javaruntimeutility isjresupported javaruntimeutility getjreversion check that we can get the inet address for localhost this can fail on unix if etc hosts is not correctly set up private static void check hosts file try inet address get local host catch unknown host exception e system err println error unable to get localhost information e print stack trace system err system err println on unix systems this usually indicates that your etc hosts file is incorrectly setup system err println stopping execution of argouml system exit 0 inetaddress checkhostsfile inetaddress getlocalhost unknownhostexception printstacktrace add an element to the post load actions list which contains actions that are run after argouml has started param r a runnable action public static void add post load action runnable r post load actions add r postloadactions addpostloadaction postloadactions perform a list of commands that were given on the command line this first implementation just has a list of commands that is possible to give param list the commands a list of strings public static void perform commands list string list init preinitialize initialize subsystems new simple timer null argo frame get instance set visible true perform commands internal list performcommands initpreinitialize initializesubsystems simpletimer argoframe getinstance setvisible performcommandsinternal perform a list of commands that were given on the command line this first implementation just has a list of commands that is possible to give param list the commands a list of strings private static void perform commands internal list string list for string command string list int pos command string index of string command name string command argument if pos 1 command name command string command argument null else command name command string substring 0 pos command argument command string substring pos 1 perform one command class c try c class for name command name catch class not found exception e system out println cannot find the command command name continue now create a new object object o null try o c new instance catch instantiation exception e system out println command name could not be instantiated skipping instantiation exception continue catch illegal access exception e system out println command name could not be instantiated skipping illegal access exception continue if o null o instanceof command line interface system out println command name is not a command skipping continue command line interface clio command line interface o system out println performing command command name command argument null command argument boolean result clio do command command argument if result system out println there was an error executing the command command name command argument null command argument system out println aborting the rest of the commands return performcommandsinternal commandstring commandstring indexof commandname commandargument commandname commandstring commandargument commandname commandstring commandargument commandstring forname commandname classnotfoundexception commandname newinstance instantiationexception commandname instantiationexception illegalaccessexception commandname illegalaccessexception commandlineinterface commandname commandlineinterface commandlineinterface commandname commandargument commandargument docommand commandargument commandname commandargument commandargument create and display a splash screen return the splash screen private static splash screen initialize splash splash screen splash new splash screen splash set visible true on uniprocessors wait until we re sure the splash screen has been painted so that we aren t competing for resources if event queue is dispatch thread runtime get runtime available processors 1 synchronized splash while splash is paint called try splash wait catch interrupted exception e return splash splashscreen initializesplash splashscreen splashscreen setvisible eventqueue isdispatchthread getruntime availableprocessors ispaintcalled interruptedexception do a part of the initialization that is very much gui stuff param splash the splash screeen private static project browser initializegui splash screen splash make the projectbrowser j panel todo pane new to do pane splash project browser pb project browser make instance splash true todo pane j option pane set root frame pb pb set cursor cursor get predefined cursor cursor wait cursor set the screen layout to what the user left it before or to reasonable defaults rectangle scr size graphics environment get local graphics environment get maximum window bounds int config frame width configuration get integer argo key screen width scr size width int w math min config frame width scr size width if w 0 w 600 int config frame height configuration get integer argo key screen height scr size height int h math min config frame height scr size height if h 0 h 400 int x configuration get integer argo key screen left x 0 int y configuration get integer argo key screen top y 0 pb set location x y pb set size w h pb set extended state configuration get boolean argo key screen maximized false frame maximized both frame normal ui manager put button focus input map new ui defaults lazy input map new object enter pressed released enter released space pressed released space released return pb projectbrowser splashscreen jpanel todopane todopane projectbrowser projectbrowser makeinstance todopane joptionpane setrootframe setcursor getpredefinedcursor wait_cursor scrsize graphicsenvironment getlocalgraphicsenvironment getmaximumwindowbounds configframewidth getinteger key_screen_width scrsize configframewidth scrsize configframeheight getinteger key_screen_height scrsize configframeheight scrsize getinteger key_screen_left_x getinteger key_screen_top_y setlocation setsize setextendedstate getboolean key_screen_maximized maximized_both uimanager focusinputmap uidefaults lazyinputmap publish the version of the argouml application p this function is intentionally public since applications built on argouml that do not make use of main main can call this function and then access argouml s version from the application version class public static void init version argo version init applicationversion initversion argoversion constructor param actions the actions to perform public post load list runnable actions post load actions actions postload postloadactions public void run try thread sleep 1000 catch exception ex log error post load no sleep ex for runnable r post load actions r run try thread sleep 100 catch exception ex log error post load no sleep2 ex postloadactions load internal modules which should be found on the standard classpath private void hunt for internal modules for string module optional internal modules try module loader2 add class module catch class not found exception e we don t care if optional modules aren t found log debug module module not found huntforinternalmodules optional_internal_modules moduleloader2 addclass classnotfoundexception see java lang runnable run public void run hunt for internal modules log info module loading done huntforinternalmodules the constructor settings tab user set layout new border layout j panel top new j panel top set layout new border layout j panel warning new j panel warning set layout new box layout warning box layout page axis j label warning label new j label translator localize label warning warning label set alignmentx component right alignment warning add warning label j link button project settings new j link button project settings set action new action project settings project settings set text translator localize button project settings project settings set icon null project settings set alignmentx component right alignment warning add project settings top add warning border layout north j panel settings new j panel settings set layout new grid bag layout grid bag constraints label constraints new grid bag constraints label constraints anchor grid bag constraints west label constraints gridy 0 label constraints gridx 0 label constraints gridwidth 1 label constraints gridheight 1 label constraints insets new insets 2 20 2 4 grid bag constraints field constraints new grid bag constraints field constraints anchor grid bag constraints east field constraints fill grid bag constraints horizontal field constraints gridy 0 field constraints gridx 1 field constraints gridwidth 3 field constraints gridheight 1 field constraints weightx 1 0 field constraints insets new insets 2 4 2 20 label constraints gridy 0 field constraints gridy 0 settings add new j label translator localize label user label constraints j text field j new j text field user fullname j settings add user fullname field constraints label constraints gridy 1 field constraints gridy 1 settings add new j label translator localize label email label constraints j text field j1 new j text field user email j1 settings add user email field constraints top add settings border layout center add top border layout north settingstabuser setlayout borderlayout jpanel jpanel setlayout borderlayout jpanel jpanel setlayout boxlayout boxlayout page_axis jlabel warninglabel jlabel warninglabel setalignmentx right_alignment warninglabel jlinkbutton projectsettings jlinkbutton projectsettings setaction actionprojectsettings projectsettings settext projectsettings seticon projectsettings setalignmentx right_alignment projectsettings borderlayout jpanel jpanel setlayout gridbaglayout gridbagconstraints labelconstraints gridbagconstraints labelconstraints gridbagconstraints labelconstraints labelconstraints labelconstraints labelconstraints labelconstraints gridbagconstraints fieldconstraints gridbagconstraints fieldconstraints gridbagconstraints fieldconstraints gridbagconstraints fieldconstraints fieldconstraints fieldconstraints fieldconstraints fieldconstraints fieldconstraints labelconstraints fieldconstraints jlabel labelconstraints jtextfield jtextfield userfullname userfullname fieldconstraints labelconstraints fieldconstraints jlabel labelconstraints jtextfield jtextfield useremail useremail fieldconstraints borderlayout borderlayout see gui settings tab interface handle settings tab refresh public void handle settings tab refresh user fullname set text configuration get string argo key user fullname user email set text configuration get string argo key user email guisettingstabinterface handlesettingstabrefresh handlesettingstabrefresh userfullname settext getstring key_user_fullname useremail settext getstring key_user_email see gui settings tab interface handle settings tab save public void handle settings tab save configuration set string argo key user fullname user fullname get text configuration set string argo key user email user email get text guisettingstabinterface handlesettingstabsave handlesettingstabsave setstring key_user_fullname userfullname gettext setstring key_user_email useremail gettext see gui settings tab interface handle settings tab cancel public void handle settings tab cancel handle settings tab refresh guisettingstabinterface handlesettingstabcancel handlesettingstabcancel handlesettingstabrefresh see org argouml ui gui settings tab interface handle reset to default public void handle reset to default do nothing these buttons are not shown guisettingstabinterface handleresettodefault handleresettodefault see gui settings tab interface get tab key public string get tab key return tab user guisettingstabinterface gettabkey gettabkey see gui settings tab interface get tab panel public j panel get tab panel return this guisettingstabinterface gettabpanel jpanel gettabpanel manages the selection of the default tool in a popup tool in the toolbar p i e in a toolbar you can have tools that can be opened into a grid of tools the last used tool is remembered and put at the top when the popup is closed i e is the only tool that remains visible this remembering is persistent hence stored in the configuration file under a certain key i e name param actions the array of actions that make up the popup param key appendix for the key for the configuration file public static void manage default object actions string key action default action null configuration key k configuration make key default popupactions key string default name configuration get string k popup actions listener listener new popup actions listener k for int i 0 i actions length i if actions i instanceof action action a action actions i if a get value action name equals default name default action a a add property change listener listener else if actions i instanceof object object action row object actions i for int j 0 j action row length j action a action action row j if a get value action name equals default name default action a a add property change listener listener if default action null default action put value is default boolean value of true managedefault defaultaction configurationkey makekey defaultname getstring popupactionslistener popupactionslistener getvalue defaultname defaultaction addpropertychangelistener actionrow actionrow actionrow getvalue defaultname defaultaction addpropertychangelistener defaultaction defaultaction putvalue isdefault valueof constructor param k public popup actions listener configuration key k key k popupactionslistener configurationkey public void property change property change event evt if evt get source instanceof action action a action evt get source if block events evt get property name equals popped block events true switch the value back off so that we will get notified again next time a put value popped boolean value of false block events false configuration set string key string a get value action name propertychange propertychangeevent getsource getsource blockevents getpropertyname blockevents putvalue valueof blockevents setstring getvalue todo use the following function to have a dropdown set of tools tool bar factory add items to tool bar button panel actions true instead this temporary solution param button panel the toolbar param actions an array of actions representing the tool layout public static void add items to tool bar j tool bar button panel object actions j button button build popup tool box button actions false if tool bar manager always use standard rollover button set border painted false button panel add button toolbarfactory additemstotoolbar buttonpanel buttonpanel additemstotoolbar jtoolbar buttonpanel jbutton buildpopuptoolboxbutton toolbarmanager alwaysusestandardrollover setborderpainted buttonpanel todo use the following function to have a dropdown set of tools tool bar factory add items to tool bar button panel actions true instead this temporary solution param button panel the toolbar param actions an array of actions representing the tool layout public static void add items to tool bar j tool bar button panel collection actions add items to tool bar button panel actions to array toolbarfactory additemstotoolbar buttonpanel buttonpanel additemstotoolbar jtoolbar buttonpanel additemstotoolbar buttonpanel toarray todo move this into the toolbar project private static popup tool box button build popup tool box button object actions boolean rollover popup tool box button tool box null for int i 0 i actions length i if actions i instanceof action log info adding a actions i to the toolbar action a action actions i if tool box null tool box new popup tool box button a 0 1 rollover tool box add a else if actions i instanceof component tool box add component actions i else if actions i instanceof object object action row object actions i for int j 0 j action row length j action a action action row j if tool box null int cols action row length tool box new popup tool box button a 0 cols rollover tool box add a else log error can t add a actions i to the toolbar return tool box popuptoolboxbutton buildpopuptoolboxbutton popuptoolboxbutton toolbox toolbox toolbox popuptoolboxbutton toolbox toolbox actionrow actionrow actionrow toolbox actionrow toolbox popuptoolboxbutton toolbox toolbox the constructor param operation the operation public operation notation object operation if model get facade isa operation operation model get facade isa reception operation throw new illegal argument exception this is not an operation or reception operationnotation getfacade isaoperation getfacade isareception illegalargumentexception override public void initialise listener property change listener listener object model element add element listener listener model element if model get facade isa operation model element we also show stereotypes for object uml model get facade get stereotypes model element add element listener listener uml we also show parameters for object uml model get facade get parameters model element add element listener listener uml we also show the type of which e g the name may change object type model get facade get type uml if type null add element listener listener type we also show tagged values for object uml model get facade get tagged values collection model element add element listener listener uml initialiselistener propertychangelistener modelelement addelementlistener modelelement getfacade isaoperation modelelement getfacade getstereotypes modelelement addelementlistener getfacade getparameters modelelement addelementlistener getfacade gettype addelementlistener getfacade gettaggedvaluescollection modelelement addelementlistener override public void update listener property change listener listener object model element property change event pce if pce get source model element stereotype equals pce get property name parameter equals pce get property name tagged value equals pce get property name if pce instanceof add association event add element listener listener pce get new value if pce instanceof remove association event remove element listener listener pce get old value if model get uml factory is removed model element we also show types of parameters for object param model get facade get parameters model element if pce get source param type equals pce get property name if pce instanceof add association event add element listener listener pce get new value if pce instanceof remove association event remove element listener listener pce get old value updatelistener propertychangelistener modelelement propertychangeevent getsource modelelement getpropertyname getpropertyname taggedvalue getpropertyname addassociationevent addelementlistener getnewvalue removeassociationevent removeelementlistener getoldvalue getumlfactory isremoved modelelement getfacade getparameters modelelement getsource getpropertyname addassociationevent addelementlistener getnewvalue removeassociationevent removeelementlistener getoldvalue creates a new instance of explorer popup param selected item is the item that we are pointing at param me is the event public explorer popup object selected item mouse event me super explorer popup menu check if multiple items are selected boolean multi select target manager get instance get targets size 1 boolean mutable model elements only true for object element target manager get instance get targets if model get facade isauml element element model get model management helper is read only element mutable model elements only false break final argo diagram active diagram diagram utils get active diagram todo i ve made some attempt to rationalize the conditions here and make them more readable however i d suggest that the conditions should move to each diagram break up one complex method into a few simple ones and give the diagrams more knowledge of themselves although the diagrams may in fact delegate this in turn to the model component bob tarling 31 jan 2004 eg the code here should be something like if active diagram can add selected item uml action action new action add existing node menu localize menu popup add to diagram selected item action set enabled action should be enabled this add action if multi select mutable model elements only init menu create diagrams this add create diagrams try if multi select selected item instanceof profile profile selected item get profile packages is empty this add new action export profilexmi profile selected item catch exception e if multi select selected item instanceof profile configuration this add new action manage profiles if mutable model elements only init menu create model elements final boolean model element selected model get facade isauml element selected item if model element selected final boolean n ary association selected model get facade isa nary association selected item final boolean classifier selected model get facade isa classifier selected item final boolean package selected model get facade isa package selected item final boolean comment selected model get facade isa comment selected item final boolean state vertex selected model get facade isa state vertex selected item final boolean instance selected model get facade isa instance selected item final boolean data value selected model get facade isa data value selected item final boolean relationship selected model get facade isa relationship selected item final boolean flow selected model get facade isa flow selected item final boolean link selected model get facade isa link selected item final boolean transition selected model get facade isa transition selected item final boolean activity diagram active active diagram instanceof uml activity diagram final boolean sequence diagram active active diagram instanceof uml sequence diagram final boolean state diagram active active diagram instanceof uml state diagram final object selected state machine state vertex selected model get state machines helper get state machine selected item null final object diagram state machine state diagram active uml state diagram active diagram get state machine null final object diagram activity activity diagram active uml activity diagram active diagram get state machine null collection project models project manager get manager get current project get models if multi select if classifier selected relationship selected package selected todo allow adding models to a diagram issue 4172 project models contains selected item state vertex selected activity diagram active diagram activity selected state machine state vertex selected state diagram active diagram state machine selected state machine instance selected data value selected sequence diagram active n ary association selected comment selected todo why can t we use action add existing nodes here bob action action new action add existing node menu localize menu popup add to diagram selected item this add action if relationship selected flow selected n ary association selected link selected sequence diagram active transition selected action action new action add existing edge menu localize menu popup add to diagram selected item this add action add menu item for both ends of selected item if classifier selected package selected this add new action set source path if mutable model elements only can t delete last top level model project models size 1 project models contains selected item todo shouldn t be creating a new instance here we should hold the delete action in some central place this add new action delete model elements todo make sure this shouldn t go into a previous condition tml if multi select if selected item instanceof uml class diagram action action new action add all classes from model menu localize menu popup add all classes to diagram selected item this add action if multi select list object classifiers new array list object for object o target manager get instance get targets todo should be anything allowed by current diagram if model get facade isa classifier o model get facade isa relationship o classifiers add o if classifiers is empty action action new action add existing nodes menu localize menu popup add to diagram classifiers this add action else if selected item instanceof diagram this add new action save diagram to clipboard todo delete should be available on any combination of model elements and diagrams todo shouldn t be creating a new instance here we should hold the delete action in some central place action delete model elements ad new action delete model elements ad set enabled ad should be enabled this add ad explorerpopup selecteditem explorerpopup selecteditem mouseevent multiselect targetmanager getinstance gettargets mutablemodelelementsonly targetmanager getinstance gettargets getfacade isaumlelement getmodelmanagementhelper isreadonly mutablemodelelementsonly argodiagram activediagram diagramutils getactivediagram activediagram canadd selecteditem umlaction actionaddexistingnode menulocalize selecteditem setenabled shouldbeenabled multiselect mutablemodelelementsonly initmenucreatediagrams creatediagrams multiselect selecteditem selecteditem getprofilepackages isempty actionexportprofilexmi selecteditem multiselect selecteditem profileconfiguration actionmanageprofiles mutablemodelelementsonly initmenucreatemodelelements modelelementselected getfacade isaumlelement selecteditem modelelementselected naryassociationselected getfacade isanaryassociation selecteditem classifierselected getfacade isaclassifier selecteditem packageselected getfacade isapackage selecteditem commentselected getfacade isacomment selecteditem statevertexselected getfacade isastatevertex selecteditem instanceselected getfacade isainstance selecteditem datavalueselected getfacade isadatavalue selecteditem relationshipselected getfacade isarelationship selecteditem flowselected getfacade isaflow selecteditem linkselected getfacade isalink selecteditem transitionselected getfacade isatransition selecteditem activitydiagramactive activediagram umlactivitydiagram sequencediagramactive activediagram umlsequencediagram statediagramactive activediagram umlstatediagram selectedstatemachine statevertexselected getstatemachineshelper getstatemachine selecteditem diagramstatemachine statediagramactive umlstatediagram activediagram getstatemachine diagramactivity activitydiagramactive umlactivitydiagram activediagram getstatemachine projectmodels projectmanager getmanager getcurrentproject getmodels multiselect classifierselected relationshipselected packageselected projectmodels selecteditem statevertexselected activitydiagramactive diagramactivity selectedstatemachine statevertexselected statediagramactive diagramstatemachine selectedstatemachine instanceselected datavalueselected sequencediagramactive naryassociationselected commentselected actionaddexistingnodes actionaddexistingnode menulocalize selecteditem relationshipselected flowselected naryassociationselected linkselected sequencediagramactive transitionselected actionaddexistingedge menulocalize selecteditem addmenuitemforbothendsof selecteditem classifierselected packageselected actionsetsourcepath mutablemodelelementsonly projectmodels projectmodels selecteditem actiondeletemodelelements multiselect selecteditem umlclassdiagram actionaddallclassesfrommodel menulocalize selecteditem multiselect arraylist targetmanager getinstance gettargets getfacade isaclassifier getfacade isarelationship isempty actionaddexistingnodes menulocalize selecteditem actionsavediagramtoclipboard actiondeletemodelelements actiondeletemodelelements setenabled shouldbeenabled initialize the menu for diagram construction in the explorer popup menu private void init menu create diagrams create diagrams add new action use case diagram create diagrams add new action class diagram create diagrams add new action sequence diagram create diagrams add new action collaboration diagram create diagrams add new action state diagram create diagrams add new action activity diagram create diagrams add new action deployment diagram initmenucreatediagrams creatediagrams actionusecasediagram creatediagrams actionclassdiagram creatediagrams actionsequencediagram creatediagrams actioncollaborationdiagram creatediagrams actionstatediagram creatediagrams actionactivitydiagram creatediagrams actiondeploymentdiagram initialize the menu for diagram construction in the explorer popup menu private void init menu create model elements list targets target manager get instance get targets set j menu item menu items new tree set j menu item if targets size 2 check to see if all targets are classifiers before adding an option to create an association between them all boolean classifier role found false boolean classifier roles only true for iterator it targets iterator it has next classifier roles only if model get facade isa classifier role it next classifier role found true else classifier roles only false if classifier roles only menu items add new ordered menu item new action create association role model get meta types get association role targets else if classifier role found boolean classifiers only true for iterator it targets iterator it has next classifiers only if model get facade isa classifier it next classifiers only false if classifiers only menu items add new ordered menu item new action create association model get meta types get association targets if targets size 2 add create model element action menu items model get meta types get dependency menu localize menu popup depends on add create model element action menu items model get meta types get generalization menu localize menu popup generalizes add create model element action menu items model get meta types get include menu localize menu popup includes add create model element action menu items model get meta types get extend menu localize menu popup extends add create model element action menu items model get meta types get package import menu localize menu popup has permission on add create model element action menu items model get meta types get usage menu localize menu popup uses add create model element action menu items model get meta types get abstraction menu localize menu popup realizes else if targets size 1 object target targets get 0 iterate through all possible model elements to determine which are valid to be contained by the selected target for int iter 0 iter model element menuitems length iter 2 test if this element can be contained by the target if model get uml factory is containment valid model element menuitems iter target this element can be contained add a menu item that allows the user to take that action menu items add new ordered menu item new action create contained model element model element menuitems iter target string model element menuitems iter 1 if menu items size 1 add menu items iterator next else if menu items size 1 j menu menu new j menu menu localize menu popup create model element add menu for j menu item item menu items menu add item initmenucreatemodelelements targetmanager getinstance gettargets jmenuitem menuitems treeset jmenuitem classifierrolefound classifierrolesonly hasnext classifierrolesonly getfacade isaclassifierrole classifierrolefound classifierrolesonly classifierrolesonly menuitems orderedmenuitem actioncreateassociationrole getmetatypes getassociationrole classifierrolefound classifiersonly hasnext classifiersonly getfacade isaclassifier classifiersonly classifiersonly menuitems orderedmenuitem actioncreateassociation getmetatypes getassociation addcreatemodelelementaction menuitems getmetatypes getdependency menulocalize addcreatemodelelementaction menuitems getmetatypes getgeneralization menulocalize addcreatemodelelementaction menuitems getmetatypes getinclude menulocalize addcreatemodelelementaction menuitems getmetatypes getextend menulocalize addcreatemodelelementaction menuitems getmetatypes getpackageimport menulocalize addcreatemodelelementaction menuitems getmetatypes getusage menulocalize addcreatemodelelementaction menuitems getmetatypes getabstraction menulocalize model_element_menuitems getumlfactory iscontainmentvalid model_element_menuitems menuitems orderedmenuitem actioncreatecontainedmodelelement model_element_menuitems model_element_menuitems menuitems menuitems menuitems jmenu jmenu menulocalize jmenuitem menuitems private void add create model element action set j menu item menu items object meta type string relationship descr list targets target manager get instance get targets object source targets get 0 object dest targets get 1 j menu sub menu new ordered menu menu localize menu popup create model get meta types get name meta type build directional create menu item meta type dest source relationship descr sub menu build directional create menu item meta type source dest relationship descr sub menu if sub menu get menu components length 0 menu items add sub menu addcreatemodelelementaction jmenuitem menuitems metatype relationshipdescr targetmanager getinstance gettargets jmenu submenu orderedmenu menulocalize getmetatypes getname metatype builddirectionalcreatemenuitem metatype relationshipdescr submenu builddirectionalcreatemenuitem metatype relationshipdescr submenu submenu getmenucomponents menuitems submenu attempt to build a menu item to create the given model element type as a relation betwen two existing model elements if succesful then the menu item is added to the given menu param meta type the type of model element the menu item should create param source the source model element param dest the destination model element param relationship descr a textual description that describes how source relates to dest param menu the menu to which the menu item should be added private void build directional create menu item object meta type object source object dest string relationship descr j menu menu if model get uml factory is connection valid meta type source dest true j menu item menu item new j menu item new action create edge model element meta type source dest relationship descr if menu item null menu add menu item metatype relationshipdescr builddirectionalcreatemenuitem metatype relationshipdescr jmenu getumlfactory isconnectionvalid metatype jmenuitem menuitem jmenuitem actioncreateedgemodelelement metatype relationshipdescr menuitem menuitem localize a popup menu item in the navigator pane param key the key for the string to localize return the localized string private string menu localize string key return translator localize key menulocalize add popup menu items for adding to diagram both edge ends param edge the edge for which the menu item will be added private void add menu item for both ends of object edge collection coll null if model get facade isa association edge model get facade isa link edge coll model get facade get connections edge else if model get facade isa abstraction edge model get facade isa dependency edge coll new array list coll add all model get facade get clients edge coll add all model get facade get suppliers edge else if model get facade isa generalization edge coll new array list object parent model get facade get general edge coll add parent coll add all model get facade get children parent if coll null return iterator iter coll iterator while iter has next object me iter next if me null if model get facade isa association end me me model get facade get type me if me null string name model get facade get name me if name null name length 0 name anon element action action new action add existing related node menu localize menu popup add to diagram name me this add action addmenuitemforbothendsof getfacade isaassociation getfacade isalink getfacade getconnections getfacade isaabstraction getfacade isadependency arraylist addall getfacade getclients addall getfacade getsuppliers getfacade isageneralization arraylist getfacade getgeneral addall getfacade getchildren hasnext getfacade isaassociationend getfacade gettype getfacade getname actionaddexistingrelatednode menulocalize the constructor param name the localized name of the action param o the node uml object to be added public action add existing related node string name object o super name object o actionaddexistingrelatednode see javax swing action is enabled public boolean is enabled argo diagram dia diagram utils get active diagram if dia null return false mutable graph model gm mutable graph model dia get graph model return gm can add node object isenabled isenabled argodiagram diagramutils getactivediagram mutablegraphmodel mutablegraphmodel getgraphmodel canaddnode public void action performed action event ae super action performed ae editor ce globals cur editor graph model gm ce get graph model if gm instanceof mutable graph model return string instructions null if object null instructions translator localize misc message click on diagram to add new object model get facade to string object globals show status instructions array list object elements to add new array list object 1 elements to add add object final mode add to diagram place mode new mode add to diagram elements to add instructions globals mode place mode false actionperformed actionevent actionperformed cureditor graphmodel getgraphmodel mutablegraphmodel getfacade tostring showstatus arraylist elementstoadd arraylist elementstoadd modeaddtodiagram placemode modeaddtodiagram elementstoadd placemode instantiate ordered menu item param action public ordered menu item action action super action orderedmenuitem orderedmenuitem instantiate ordered menu item param name public ordered menu item string name super name set name name orderedmenuitem orderedmenuitem setname public int compare to object o j menu item other j menu item o return to string compare to other to string compareto jmenuitem jmenuitem tostring compareto tostring instantiate ordered menu param name public ordered menu string name super name orderedmenu orderedmenu public int compare to object o j menu item other j menu item o return to string compare to other to string compareto jmenuitem jmenuitem tostring compareto tostring public action create association object the meta type list classifiers list super menu localize menu popup create model get meta types get name the meta type this meta type the meta type this classifiers classifiers list actioncreateassociation themetatype classifierslist menulocalize getmetatypes getname themetatype metatype themetatype classifierslist public void action performed action event e try object new element model get uml factory build connection meta type classifiers get 0 null classifiers get 1 null null null for int i 2 i classifiers size i model get uml factory build connection model get meta types get association end new element null classifiers get i null null null catch illegal model element connection exception e1 log error exception e1 actionperformed actionevent newelement getumlfactory buildconnection metatype getumlfactory buildconnection getmetatypes getassociationend newelement illegalmodelelementconnectionexception public action create association role object the meta type list classifier roles list super menu localize menu popup create model get meta types get name the meta type this meta type the meta type this classifier roles classifier roles list actioncreateassociationrole themetatype classifierroleslist menulocalize getmetatypes getname themetatype metatype themetatype classifierroles classifierroleslist public void action performed action event e try object new element model get uml factory build connection meta type classifier roles get 0 null classifier roles get 1 null null null for int i 2 i classifier roles size i model get uml factory build connection model get meta types get association end role new element null classifier roles get i null null null catch illegal model element connection exception e1 log error exception e1 actionperformed actionevent newelement getumlfactory buildconnection metatype classifierroles classifierroles classifierroles getumlfactory buildconnection getmetatypes getassociationendrole newelement classifierroles illegalmodelelementconnectionexception construct an action to resolve a to do item public action resolve super action resolve item true todo actionresolve override public void action performed action event ae super action performed ae dismiss to do item dialog dialog new dismiss to do item dialog dialog set target get remembered target dialog set visible true actionperformed actionevent actionperformed dismisstodoitemdialog dismisstodoitemdialog settarget getrememberedtarget setvisible see org argouml ui explorer rules perspective rule get rule name public string get rule name return translator localize misc summary outgoing dependency perspectiverule getrulename getrulename public collection get children object parent if parent instanceof outgoing dependency node collection list new array list iterator it model get facade get client dependencies outgoing dependency node parent get parent iterator while it has next object next it next if model get facade isa abstraction next list add next return list return collections empty set getchildren outgoingdependencynode arraylist getfacade getclientdependencies outgoingdependencynode getparent hasnext getfacade isaabstraction empty_set public set get dependencies object parent if parent instanceof outgoing dependency node set set new hash set set add outgoing dependency node parent get parent return set return collections empty set getdependencies outgoingdependencynode hashset outgoingdependencynode getparent empty_set the constructor param container the container of uml user interface components param property name the name of the property public uml condition expression model uml user interface container container string property name super container property name propertyname umlconditionexpressionmodel umluserinterfacecontainer propertyname propertyname see org argouml uml ui uml expression model2 get expression public object get expression return model get facade get condition target manager get instance get target umlexpressionmodel2 getexpression getexpression getfacade getcondition targetmanager getinstance gettarget public void set expression object expression object target target manager get instance get target if target null throw new illegal state exception there is no target for get container model get use cases helper set condition target expression setexpression targetmanager getinstance gettarget illegalstateexception getcontainer getusecaseshelper setcondition see org argouml uml ui uml expression model2 new expression public object new expression log debug new boolean expression return model get data types factory create boolean expression umlexpressionmodel2 newexpression newexpression getdatatypesfactory createbooleanexpression the main constructor deprecated for 0 27 3 by mvw use link fig state vertex object rectangle diagram settings suppress warnings deprecation deprecated public fig state vertex this allow remove from diagram false figstatevertex diagramsettings suppresswarnings figstatevertex allowremovefromdiagram the constructor which hooks the fig into the uml element param gm ignored param node the uml elm deprecated for 0 27 3 by mvw use link fig state vertex object rectangle diagram settings suppress warnings deprecation deprecated public fig state vertex suppress warnings unused graph model gm object node this set owner node figstatevertex diagramsettings suppresswarnings figstatevertex suppresswarnings graphmodel setowner constructor used by pgml parser param owner the owning uml element param bounds rectangle describing bounds param settings rendering settings public fig state vertex object owner rectangle bounds diagram settings settings super owner bounds settings this allow remove from diagram false figstatevertex diagramsettings allowremovefromdiagram override public void set enclosing fig fig encloser layer perspective layer layer perspective get layer if the layer is null then most likely we are being deleted if layer null return super set enclosing fig encloser if model get facade isa state vertex get owner return object state vertex get owner object composite state null if encloser null model get facade isa composite state encloser get owner composite state encloser get owner fig state vertex encloser redraw enclosed figs else composite state model get state machines helper get top model get state machines helper get state machine state vertex if composite state null do not change the model unless needed avoids issue 4446 if model get facade get container state vertex composite state model get state machines helper set container state vertex composite state setenclosingfig layerperspective layerperspective getlayer setenclosingfig getfacade isastatevertex getowner statevertex getowner compositestate getfacade isacompositestate getowner compositestate getowner figstatevertex redrawenclosedfigs compositestate getstatemachineshelper gettop getstatemachineshelper getstatemachine statevertex compositestate getfacade getcontainer statevertex compositestate getstatemachineshelper setcontainer statevertex compositestate method to draw a state vertex fig s enclosed figs public void redraw enclosed figs editor editor globals cur editor if editor null get enclosed figs is empty layer diagram lay layer diagram editor get layer manager get active layer for fig f get enclosed figs lay bring in front of f this if f instanceof fig node fig node fn fig node f iterator it fn get fig edges iterator while it has next lay bring in front of fig edge it next this if fn instanceof fig state vertex fig state vertex fn redraw enclosed figs statevertex redrawenclosedfigs cureditor getenclosedfigs isempty layerdiagram layerdiagram getlayermanager getactivelayer getenclosedfigs bringinfrontof fignode fignode fignode getfigedges hasnext bringinfrontof figedge figstatevertex figstatevertex redrawenclosedfigs return selectors depending whether we deal with activity or state diagrams inherit doc override public selection make selection object pstate get owner if pstate null if model get facade isa activity graph model get facade get state machine model get facade get container pstate return new selection action state this return new selection state this return null inheritdoc makeselection getowner getfacade isaactivitygraph getfacade getstatemachine getfacade getcontainer selectionactionstate selectionstate return a list of gravity points around circle which is enclosed in the bounding box convenience method for use by fig initial state and fig final state todo as this method is not required by all sub classes it would seem sensible to extend fig state vertex with fig circle vertex and only have the relevant concrete figs extend that and gain this functionality return a list of points list point get circle gravity points list point ret new array list point int cx get big port get center x int cy get big port get center y double radius get big port get width 2 1 final double pi2 math pi 2 for int i 0 i circle points i int x int cx math cos pi2 i circle points radius int y int cy math sin pi2 i circle points radius ret add new point x y return ret figinitialstate figfinalstate figstatevertex figcirclevertex getcirclegravitypoints arraylist getbigport getcenter getbigport getcenter getbigport getwidth circle_points circle_points circle_points construct a new property panel for an extension point public prop panel extension point super label extension point lookup icon extension point first column name field stereotype box and namespace scroll are all set up by prop panel model element add field label name get name text field our location a string allow the location label to expand vertically so we all float to the top j text field location field new uml text field2 new uml extension point location document add field label location location field add separator add field label usecase base get single row scroll new uml extension point use case list model j list extend list new uml linked list new uml extension point extend list model add field label extend new j scroll pane extend list add action new action navigate container element add action new action new extension point add action new action new stereotype add action get delete action extensionpoint proppanelextensionpoint lookupicon extensionpoint namefield stereotypebox namespacescroll proppanelmodelelement addfield getnametextfield jtextfield locationfield umltextfield2 umlextensionpointlocationdocument addfield locationfield addseparator addfield getsinglerowscroll umlextensionpointusecaselistmodel jlist extendlist umllinkedlist umlextensionpointextendlistmodel addfield jscrollpane extendlist addaction actionnavigatecontainerelement addaction actionnewextensionpoint addaction actionnewstereotype addaction getdeleteaction the method for the navigate up button which takes us to the owning use case p this is a change from the norm which is to navigate to the parent namespace p override public void navigate up object target get target only works for extension points if model get facade isa extension point target return get the owning use case and navigate to it if it exists object owner model get facade get use case target if owner null target manager get instance set target owner navigateup gettarget getfacade isaextensionpoint getfacade getusecase targetmanager getinstance settarget construct an action to create a new extension point public action new extension point super button new extension point put value action name translator localize button new extension point actionnewextensionpoint putvalue override public void action performed action event e object target target manager get instance get model target if model get facade isa extension point target target manager get instance set target model get use cases factory build extension point model get facade get use case target super action performed e actionperformed actionevent targetmanager getinstance getmodeltarget getfacade isaextensionpoint targetmanager getinstance settarget getusecasesfactory buildextensionpoint getfacade getusecase actionperformed constructor public prop panel argument super label argument lookup icon argument add field translator localize label name get name text field uml expression model2 expression model new uml expression expression model this expression j text area ebf new uml expression body field expression model true ebf set font look and feel mgr get instance get standard font ebf set rows 3 make it take up all remaining height add field translator localize label value new j scroll pane ebf add field translator localize label language new uml expression language field expression model true add action new action navigate action add action get delete action proppanelargument lookupicon addfield getnametextfield umlexpressionmodel2 expressionmodel umlexpressionexpressionmodel jtextarea umlexpressionbodyfield expressionmodel setfont lookandfeelmgr getinstance getstandardfont setrows addfield jscrollpane addfield umlexpressionlanguagefield expressionmodel addaction actionnavigateaction addaction getdeleteaction see org argouml ui explorer rules perspective rule get rule name public string get rule name return translator localize misc class navigable class perspectiverule getrulename getrulename public collection get children object parent if model get facade isa class parent return collections empty set list child classes new array list collection ends model get facade get association ends parent if ends null return collections empty set iterator it ends iterator while it has next object ae m association end it next object asc model get facade get association ae collection all ends model get facade get connections asc object other end null iterator end it all ends iterator if end it has next other end m association end end it next if ae other end end it has next other end m association end end it next if ae other end other end null if other end null continue if model get facade is navigable other end continue if child classes contains model get facade get type other end continue child classes add model get facade get type other end todo handle n way associations return child classes getchildren getfacade isaclass empty_set childclasses arraylist getfacade getassociationends empty_set hasnext massociationend getfacade getassociation allends getfacade getconnections otherend endit allends endit hasnext otherend massociationend endit otherend endit hasnext otherend massociationend endit otherend otherend otherend getfacade isnavigable otherend childclasses getfacade gettype otherend childclasses getfacade gettype otherend childclasses public set get dependencies object parent if model get facade isa class parent set set new hash set set add parent return set return collections empty set getdependencies getfacade isaclass hashset empty_set the constructor public cr invalid join setup head and desc add supported decision uml decision state machines add trigger outgoing crinvalidjoin setupheadanddesc addsupporteddecision umldecision state_machines addtrigger public boolean predicate2 object dm designer dsgr if model get facade isa pseudostate dm return no problem object k model get facade get kind dm if model get facade equals pseudostate kind k model get pseudostate kind get join return no problem collection outgoing model get facade get outgoings dm collection incoming model get facade get incomings dm int n outgoing outgoing null 0 outgoing size int n incoming incoming null 0 incoming size if n outgoing 1 return problem found if n incoming 1 return problem found return no problem getfacade isapseudostate no_problem getfacade getkind getfacade equalspseudostatekind getpseudostatekind getjoin no_problem getfacade getoutgoings getfacade getincomings noutgoing nincoming noutgoing problem_found nincoming problem_found no_problem public set object get criticized design materials set object ret new hash set object ret add model get meta types get pseudostate return ret getcriticizeddesignmaterials hashset getmetatypes getpseudostate constructor for uml classifier role base list model public uml classifier role base list model super base umlclassifierrolebaselistmodel umlclassifierrolebaselistmodel see org argouml uml ui uml model element list model2 build model list protected void build model list set all elements model get facade get bases get target umlmodelelementlistmodel2 buildmodellist buildmodellist setallelements getfacade getbases gettarget see org argouml uml ui uml model element list model2 is valid element object protected boolean is valid element object elem return model get facade isa classifier elem model get facade get bases get target contains elem umlmodelelementlistmodel2 isvalidelement isvalidelement getfacade isaclassifier getfacade getbases gettarget constructor for uml include base list model public uml include base list model super base umlincludebaselistmodel umlincludebaselistmodel see org argouml uml ui uml model element list model2 build model list protected void build model list super build model list add element model get facade get base get target umlmodelelementlistmodel2 buildmodellist buildmodellist buildmodellist addelement getfacade getbase gettarget the constructor public list set list collections synchronized list new array list t set new hash set t listset synchronizedlist arraylist hashset the constructor param n the initial capacity of the list set public list set int n list collections synchronized list new array list t n set new hash set t n listset listset synchronizedlist arraylist hashset the constructor param o1 the first object to add public list set t o1 list collections synchronized list new array list t set new hash set t add o1 listset synchronizedlist arraylist hashset param iter an enumeration of objects to be added public void add all elements enumeration t iter while iter has more elements add iter next element addallelements hasmoreelements nextelement param iter an iterator of objects to be added public void add all elements iterator t iter while iter has next add iter next addallelements hasnext param iter an iterator of objects to be added param p the predicate the objects have to fulfill to be added public void add all elements such that iterator t iter org argouml util predicate p if p instanceof org argouml util predicate true add all elements iter else while iter has next t e iter next if p evaluate e add e addallelementssuchthat predicatetrue addallelements hasnext param s a listset of objects to be added param p the predicate the objects have to fulfill to be added public void add all elements such that list set t s org argouml util predicate p synchronized s mutex add all elements such that s iterator p addallelementssuchthat listset addallelementssuchthat public boolean remove object o synchronized mutex boolean result contains o if o null list remove o set remove o return result param o the object to be removed public void remove element object o if o null list remove o removeelement remove all objects public void remove all elements clear removeallelements public boolean contains object o synchronized mutex if o null return set contains o return false param p the predicate the objects have to fulfill return true if at least one object in the listset fulfills the predicate public boolean contains such that org argouml util predicate p return find such that p null containssuchthat findsuchthat return the first object that causes the given predicate to return true param p the predicate the objects have to fulfill return the found object or null public object find such that org argouml util predicate p synchronized list for object o list if p evaluate o return o return null findsuchthat not violate the contract together with link equals object override public int hash code return 0 hashcode override public boolean equals object o if o instanceof list set return false list set set list set o if set size size return false synchronized list for object obj list if set contains obj return false return true listset listset listset see java util collection size public int size return list size override public string to string string builder sb new string builder set synchronized list for iterator it iterator it has next sb append it next if it has next sb append sb append return sb to string tostring stringbuilder stringbuilder hasnext hasnext tostring reply the set of all objects that can be reached from the receiving set by taking steps defined by the given child generator the result includes the elements of the original set in order to avoid very deep searches which are often programming mistakes only paths of length tc limit or less are considered param cg the given childgenerator return the resulting listset public list set t transitive closure org argouml util child generator cg return transitive closure cg tc limit org argouml util predicate true get instance childgenerator tc_limit listset transitiveclosure childgenerator transitiveclosure tc_limit predicatetrue getinstance reply the set of all objects that can be reached from the receiving set by taking steps defined by the given child generator the result does not include the elements of the original set in order to avoid very deep searches which are often programming mistakes only paths of length tc limit or less are considered param cg the given childgenerator return the resulting listset public list set t reachable org argouml util child generator cg return reachable cg tc limit org argouml util predicate true get instance childgenerator tc_limit listset childgenerator tc_limit predicatetrue getinstance reply the set of all objects that can be reached from the receiving set by taking steps defined by the given child generator the result does not include the elements of the original set in order to avoid very deep searches which are often programming mistakes only paths of given max length or less are considered only paths consisting of elements which all cause predicate evaluate to return true are considered param cg the given childgenerator param max the maximum depth param predicate the predicate the objects have to fulfill return the resulting listset public list set t reachable org argouml util child generator cg int max org argouml util predicate predicate list set t kids new list set t synchronized list for object r list kids add all elements such that cg child iterator r predicate return kids transitive closure cg max predicate childgenerator listset childgenerator listset listset addallelementssuchthat childiterator transitiveclosure reply the set of all objects that can be reached from the receiving set by taking steps defined by the given child generator the result includes the elements of the original set in order to avoid very deep searches which are often programming mistakes only paths of given max length or less are considered only paths consisting of elements which all cause predicate evaluate to return true are considered param cg the given childgenerator param max the maximum depth param predicate the predicate the objects have to fulfill return the resulting listset public list set t transitive closure org argouml util child generator cg int max org argouml util predicate predicate int iter count 0 int last size 1 list set t touched new list set t list set t frontier list set t recent this touched add all this while iter count max touched size last size iter count last size touched size frontier new list set t synchronized recent for t recent element recent iterator frontier children cg child iterator recent element frontier add all elements such that frontier children predicate touched add all frontier recent frontier return touched childgenerator listset transitiveclosure childgenerator itercount lastsize listset listset listset listset addall itercount lastsize itercount lastsize listset recentelement frontierchildren childiterator recentelement addallelementssuchthat frontierchildren addall see java util collection is empty public boolean is empty return list is empty isempty isempty isempty see java util collection iterator public iterator t iterator return list iterator return mutex object to synchronize on for iteration public object mutex return list see java util collection to array public object to array return list to array toarray toarray toarray see java util collection to array java lang object public a a to array a arg0 return list to array arg0 toarray toarray toarray public boolean add t arg0 synchronized mutex boolean result set contains arg0 if result set add arg0 list add arg0 return result public boolean contains all collection arg0 synchronized mutex return set contains all arg0 containsall containsall see java util collection add all java util collection public boolean add all collection extends t arg0 return list add all arg0 addall addall addall see java util collection retain all java util collection public boolean retain all collection arg0 return list retain all arg0 retainall retainall retainall public boolean remove all collection arg0 boolean result false for iterator iter arg0 iterator iter has next result result remove iter next return result removeall hasnext public void clear synchronized mutex list clear set clear see java util list add all int java util collection public boolean add all int arg0 collection extends t arg1 return list add all arg0 arg1 addall addall addall see java util list get int public t get int index return list get index see java util list set int java lang object public t set int arg0 t o throw new unsupported operation exception set method not supported unsupportedoperationexception public void add int arg0 t arg1 synchronized mutex if set contains arg1 list add arg0 arg1 public t remove int index synchronized mutex t removed element list remove index set remove removed element return removed element removedelement removedelement removedelement see java util list index of java lang object public int index of object o return list index of o indexof indexof indexof see java util list last index of java lang object public int last index of object o return list last index of o lastindexof lastindexof lastindexof see java util list list iterator public list iterator t list iterator return list list iterator listiterator listiterator listiterator listiterator see java util list list iterator int public list iterator t list iterator int index return list list iterator index listiterator listiterator listiterator listiterator see java util list sub list int int public list t sub list int from index int to index return sub list from index to index sublist sublist fromindex toindex sublist fromindex toindex constructor public prop panel element import super label element import lookup icon element import add field translator localize label alias get alias text field add get visibility panel add get modifiers panel add separator add field translator localize label imported element get single row scroll new element import imported element list model add field translator localize label package get single row scroll new element import package list model add action new action navigate container element add action get delete action proppanelelementimport lookupicon elementimport addfield getaliastextfield getvisibilitypanel getmodifierspanel addseparator addfield getsinglerowscroll elementimportimportedelementlistmodel addfield getsinglerowscroll elementimportpackagelistmodel addaction actionnavigatecontainerelement addaction getdeleteaction return a textfield for the alias protected j component get alias text field if alias text field null alias text field new uml text field2 alias document return alias text field jcomponent getaliastextfield aliastextfield aliastextfield umltextfield2 aliasdocument aliastextfield public j panel get modifiers panel if modifiers panel null modifiers panel create border panel translator localize label modifiers modifiers panel add new uml element import is specification checkbox return modifiers panel jpanel getmodifierspanel modifierspanel modifierspanel createborderpanel modifierspanel umlelementimportisspecificationcheckbox modifierspanel constructor for uml generalizable element root check box public uml element import is specification checkbox super translator localize checkbox is specification action set element ownership specification get instance is specification umlgeneralizableelementrootcheckbox umlelementimportisspecificationcheckbox actionsetelementownershipspecification getinstance isspecification public void build model if get target null set selected model get facade is specification get target buildmodel gettarget setselected getfacade isspecification gettarget constructor for uml model element name document public uml element import alias document super alias umlmodelelementnamedocument umlelementimportaliasdocument protected void set property string text object t get target if t null model get model management helper set alias get target text setproperty gettarget getmodelmanagementhelper setalias gettarget see org argouml uml ui uml plain text document get property protected string get property return model get facade get alias get target umlplaintextdocument getproperty getproperty getfacade getalias gettarget constructor public element import imported element list model super imported element elementimportimportedelementlistmodel importedelement protected void build model list if get target null remove all elements add element model get facade get imported element get target buildmodellist gettarget removeallelements addelement getfacade getimportedelement gettarget protected boolean is valid element object element return model get facade isa element import get target isvalidelement getfacade isaelementimport gettarget constructor public element import package list model super package elementimportpackagelistmodel protected void build model list if get target null remove all elements add element model get facade get package get target buildmodellist gettarget removeallelements addelement getfacade getpackage gettarget protected boolean is valid element object element return model get facade isa element import get target isvalidelement getfacade isaelementimport gettarget return returns the the instance public static cl operation compartment get the instance return the instance theinstance cloperationcompartment gettheinstance theinstance see org argouml ui clarifier set fig org tigris gef presentation fig public void set fig fig f fig f setfig setfig see org argouml ui clarifier set to do item org argouml cognitive to do item public void set to do item to do item i settodoitem todoitem settodoitem todoitem public void paint icon component c graphics g int x int y if fig instanceof operations compartment container operations compartment container fc operations compartment container fig added by eric lefevre 13 mar 1999 we must check if the fig text for operations is drawn before drawing things over it if fc is operations visible fig null return rectangle fr fc get operations bounds int left fr x 10 int height fr y fr height 7 int right fr x fr width 10 g set color color red int i left while true g draw line i height i wave length height wave height i wave length if i right break g draw line i height wave height i wave length height i wave length if i right break g draw line i height i wave length height wave height 2 i wave length if i right break g draw line i height wave height 2 i wave length height i wave length if i right break fig null painticon operationscompartmentcontainer operationscompartmentcontainer operationscompartmentcontainer figtext isoperationsvisible getoperationsbounds setcolor drawline wave_length wave_height wave_length drawline wave_height wave_length wave_length drawline wave_length wave_height wave_length drawline wave_height wave_length wave_length see javax swing icon get icon width public int get icon width return 0 geticonwidth geticonwidth see javax swing icon get icon height public int get icon height return 0 geticonheight geticonheight public boolean hit int x int y if fig instanceof operations compartment container return false operations compartment container fc operations compartment container fig rectangle fr fc get operations bounds boolean res fr contains x y fig null return res operationscompartmentcontainer operationscompartmentcontainer operationscompartmentcontainer getoperationsbounds the constructor public action new use case super button new usecase put value action name translator localize button new usecase actionnewusecase putvalue public void action performed action event e object target target manager get instance get model target if model get facade isa use case target object ns model get facade get namespace target if ns null object use case model get use cases factory create use case model get core helper add owned element ns use case target manager get instance set target use case super action performed e actionperformed actionevent targetmanager getinstance getmodeltarget getfacade isausecase getfacade getnamespace usecase getusecasesfactory createusecase getcorehelper addownedelement usecase targetmanager getinstance settarget usecase actionperformed the constructor param role the given association role public association role notation object role if model get facade isa association role role throw new illegal argument exception this is not an association role associationrole associationrolenotation getfacade isaassociationrole illegalargumentexception associationrole public void initialise listener property change listener listener object model element add element listener listener model element new string name base object assoc model get facade get base model element if assoc null add element listener listener assoc name initialiselistener propertychangelistener modelelement addelementlistener modelelement getfacade getbase modelelement addelementlistener constructor for uml comment annotated element list model public uml comment annotated element list model super annotated element umlcommentannotatedelementlistmodel umlcommentannotatedelementlistmodel annotatedelement protected void build model list if get target null set all elements model get facade get annotated elements get target buildmodellist gettarget setallelements getfacade getannotatedelements gettarget protected boolean is valid element object element return model get facade isa model element element model get facade get annotated elements get target contains element isvalidelement getfacade isamodelelement getfacade getannotatedelements gettarget see org argouml ui explorer rules perspective rule get rule name public string get rule name return translator localize misc collaboration diagram perspectiverule getrulename getrulename public collection get children object parent if model get facade isa collaboration parent return collections empty set project p project manager get manager get current project if p null return collections empty set set argo diagram res new hash set argo diagram for argo diagram d p get diagram list if d instanceof uml collaboration diagram uml collaboration diagram d get namespace parent res add d also show unattached sequence diagrams if d instanceof uml sequence diagram model get facade get represented classifier parent null model get facade get represented operation parent null parent uml sequence diagram d get namespace res add d return res getchildren getfacade isacollaboration empty_set projectmanager getmanager getcurrentproject empty_set argodiagram hashset argodiagram argodiagram getdiagramlist umlcollaborationdiagram umlcollaborationdiagram getnamespace umlsequencediagram getfacade getrepresentedclassifier getfacade getrepresentedoperation umlsequencediagram getnamespace see org argouml ui explorer rules perspective rule get dependencies java lang object public set get dependencies object parent todo what return collections empty set perspectiverule getdependencies getdependencies empty_set constructor for uml association end navigable check box public uml action asynchronous check box super translator localize checkbox asynchronous action set action asynchronous get instance is asynchronous umlassociationendnavigablecheckbox umlactionasynchronouscheckbox actionsetactionasynchronous getinstance isasynchronous public void build model if get target null set selected model get facade is asynchronous get target buildmodel gettarget setselected getfacade isasynchronous gettarget the constructor public decision model decisions add decision unspec decisionmodel return the list of decisions public list decision get decision list return decisions getdecisionlist this function sets the priority of an existing decision or if the decision does not exist yet it creates a new one param decision the given decision param priority the new priority public synchronized void set decision priority string decision int priority decision d find decision decision if null d d new decision decision priority decisions add d return d set priority priority set changed notify observers decision decision model listener setdecisionpriority finddecision setpriority setchanged notifyobservers if the given decision is already defined do nothing if it is not already defined set it to the given initial priority param decision the existing decision param priority the priority public void define decision string decision int priority decision d find decision decision if d null set decision priority decision priority definedecision finddecision setdecisionpriority the designer has indicated that he is now interested in the given decision param d the interesting decision public void start considering decision d decisions remove d decisions add d startconsidering the designer has indicated that he is not interested in the given decision right now param d the uninteresting decision public void stop considering decision d decisions remove d stopconsidering finds a decision with a specific name param dec name the decision name return a decision or null if not found protected decision find decision string dec name for decision d decisions if dec name equals d get name return d return null decname finddecision decname decname getname the constructor problems dialog frame frame string errors super frame set resizable true set modal true set title translator localize dialog title import problems dimension scr size toolkit get default toolkit get screen size get content pane set layout new border layout 0 0 the introducing label north label new j label translator localize label import problems get content pane add north label border layout north the text box containing the problem messages j editor pane text area new j editor pane text area set text errors j panel center panel new j panel new border layout center panel add new j scroll pane text area center panel set preferred size new dimension 600 200 get content pane add center panel continue and abort buttons continue button new j button translator localize button continue abort button new j button translator localize button abort j panel bottom panel new j panel bottom panel add continue button bottom panel add abort button get content pane add bottom panel border layout south continue button request focus in window listeners continue button add action listener this abort button add action listener this add window listener new window adapter public void window closing window event evt dispose dialog pack dimension content pane size get content pane get size set location scr size width 2 content pane size width 2 scr size height 2 content pane size height 2 problemsdialog setresizable setmodal settitle scrsize getdefaulttoolkit getscreensize getcontentpane setlayout borderlayout northlabel jlabel getcontentpane northlabel borderlayout jeditorpane textarea jeditorpane textarea settext jpanel centerpanel jpanel borderlayout centerpanel jscrollpane textarea centerpanel setpreferredsize getcontentpane centerpanel continuebutton jbutton abortbutton jbutton jpanel bottompanel jpanel bottompanel continuebutton bottompanel abortbutton getcontentpane bottompanel borderlayout continuebutton requestfocusinwindow continuebutton addactionlistener abortbutton addactionlistener addwindowlistener windowadapter windowclosing windowevent disposedialog contentpanesize getcontentpane getsize setlocation scrsize contentpanesize scrsize contentpanesize abort button add action listener this add window listener new window adapter public void window closing window event evt dispose dialog abortbutton addactionlistener addwindowlistener windowadapter windowclosing windowevent disposedialog public void action performed action event e if e get source equals abort button aborted true dispose dialog actionperformed actionevent getsource abortbutton disposedialog returns whether the abort button was pressed return aborted public boolean is aborted return aborted isaborted private void dispose dialog set visible false dispose disposedialog setvisible the constructor public uml derived check box todo this is a tagged value name which will never trigger an event super facade derived tag umlderivedcheckbox derived_tag return all ports on a node or edge supplied as argument p the only objects on our diagram that have any ports are use cases and actors and they each have one themself p param node or edge a model element for whom the list of ports is wanted return a list of the ports found public list get ports object node or edge if model get facade isa actor node or edge list result new array list result add node or edge return result else if model get facade isa use case node or edge list result new array list result add node or edge return result return collections empty list nodeoredge getports nodeoredge getfacade isaactor nodeoredge arraylist nodeoredge getfacade isausecase nodeoredge arraylist nodeoredge empty_list return the node or edge that owns the given port p in our implementation the only objects with ports use themselves as the port so are there own owner p param port the port whose owner is wanted return the owner of the port public object get owner object port return port getowner return all edges going to given port p the only objects with ports on the use case diagram are actors and use cases in each case we find the attached association ends and build a list of them as the incoming ports p param port the port for which we want to know the incoming edges return a list of objects which are the incoming edges public list get in edges object port if model get facade isa actor port model get facade isa use case port list result new array list collection ends model get facade get association ends port if ends null return collections empty list for object ae ends result add model get facade get association ae return result return collections empty list getinedges getfacade isaactor getfacade isausecase arraylist getfacade getassociationends empty_list getfacade getassociation empty_list return all edges going from the given port p em needs more work em this would seem superficially to be identical to link get in edges but in our implementation we return an empty list p param port the port for which we want to know the outgoing edges return a list of objects which are the outgoing edges currently return the empty list public list get out edges object port return collections empty list getinedges getoutedges empty_list determine if the given node can validly be placed on this graph p this is simply a matter of determining if the node is an actor or use case p em note em this is inconsistent with link add node which will not allow a node to be added to the graph if it is already there p param node the node to be considered return code true code if the given object is a valid node in this graph code false code otherwise override public boolean can add node object node if model get facade isa association node model get facade isa nary association node a binary association is not a node so reject return false if super can add node node return true if contains node node return false return model get facade isa actor node model get facade isa use case node model get facade isa package node addnode canaddnode getfacade isaassociation getfacade isanaryassociation canaddnode containsnode getfacade isaactor getfacade isausecase getfacade isapackage determine if the given edge can validly be placed on this graph p we cannot do so if the edge is already on the graph unlike nodes they may not appear more than once p otherwise for all valid types of edge binary association generalization extend include dependency we get the two ends if they are both nodes already on the graph we are ok otherwise we cannot place the edge on the graph p param edge the edge to be considered return code true code if the given object is a valid edge in this graph code false code otherwise override public boolean can add edge object edge if edge null return false if contains edge edge return false get the two ends of any valid edge object source model element null object dest model element null if model get facade isa association edge only allow binary associations collection conns model get facade get connections edge iterator iter conns iterator if conns size 2 return false object association end0 iter next object association end1 iter next give up if the assocation ends don t have a type defined if association end0 null association end1 null return false source model element model get facade get type association end0 dest model element model get facade get type association end1 else if model get facade isa generalization edge source model element model get facade get specific edge dest model element model get facade get general edge else if model get facade isa extend edge source model element model get facade get base edge dest model element model get facade get extension edge else if model get facade isa include edge source model element model get facade get base edge dest model element model get facade get addition edge else if model get facade isa dependency edge a dependency potentially has many clients and suppliers we only consider the first of each not clear that we should really accept the case where there is more than one of either collection clients model get facade get clients edge collection suppliers model get facade get suppliers edge if clients null clients is empty suppliers null suppliers is empty return false source model element clients iterator next dest model element suppliers iterator next else if edge instanceof comment edge source model element comment edge edge get source dest model element comment edge edge get destination else return false both ends must be defined and nodes that are on the graph already if source model element null dest model element null log error edge rejected its ends are not attached to anything return false if contains node source model element contains edge source model element log error edge rejected its source end is attached to source model element but this is not in the graph model return false if contains node dest model element contains edge dest model element log error edge rejected its destination end is attached to dest model element but this is not in the graph model return false return true canaddedge containsedge sourcemodelelement destmodelelement getfacade isaassociation getfacade getconnections associationend0 associationend1 associationend0 associationend1 sourcemodelelement getfacade gettype associationend0 destmodelelement getfacade gettype associationend1 getfacade isageneralization sourcemodelelement getfacade getspecific destmodelelement getfacade getgeneral getfacade isaextend sourcemodelelement getfacade getbase destmodelelement getfacade getextension getfacade isainclude sourcemodelelement getfacade getbase destmodelelement getfacade getaddition getfacade isadependency getfacade getclients getfacade getsuppliers isempty isempty sourcemodelelement destmodelelement commentedge sourcemodelelement commentedge getsource destmodelelement commentedge getdestination sourcemodelelement destmodelelement containsnode sourcemodelelement containsedge sourcemodelelement sourcemodelelement containsnode destmodelelement containsedge destmodelelement destmodelelement add the given node to the graph if valid p we add the node if it is not already on the graph and assuming it to be an actor or use case add it to the owned elements for the model p em needs more work em in adding the node to the owned elements of the model namespace we are implicitly making it public visibility it could be private to this namespace p em note em this method is inconsistent with link can add node which will allow a node to be added to the graph if it is already there p param node the node to be added to the graph override public void add node object node log debug adding usecase node give up if we are already on the graph this is a bit inconistent with can add node above if can add node node return add the node check that it is an actor or use case and add it to the model namespace get nodes add node if model get facade isauml element node model get facade get namespace node null model get core helper add owned element get home model node tell gef its changed fire node added node canaddnode addnode canaddnode canaddnode getnodes getfacade isaumlelement getfacade getnamespace getcorehelper addownedelement gethomemodel firenodeadded add the given edge to the graph if valid p we add the edge if it is not already on the graph and assuming it to be an association generalization extend include or dependency add it to the owned elements for the model p em needs more work em in adding the edge to the owned elements of the model namespace we are implicitly making it public visibility it could be private to this namespace p param edge the edge to be added to the graph override public void add edge object edge if edge null throw new illegal argument exception cannot add a null edge if get dest port edge null get source port edge null throw new illegal argument exception the source and dest port should be provided on an edge if log is info enabled log info adding an edge of type edge get class get name to use case diagram if can add edge edge log info attempt to add edge rejected return add the element and place it in the namespace of the model get edges add edge todo assumes public if model get facade isauml element edge model get facade get namespace edge null model get core helper add owned element get home model edge tell gef fire edge added edge addedge illegalargumentexception getdestport getsourceport illegalargumentexception isinfoenabled getclass getname canaddedge getedges getfacade isaumlelement getfacade getnamespace getcorehelper addownedelement gethomemodel fireedgeadded add the various types of edge that may be connected with the given node p for use cases we may find extend and include relationships for classifiers effectively actors and use cases we may find associations for generalizable elements effectively actors and use cases again we may find generalizations and specializations for model elements effectively actors and use cases again we may find dependencies p param node the node whose edges are to be added override public void add node related edges object node super add node related edges node if model get facade isa use case node list relations new array list relations add all model get facade get includes node relations add all model get facade get includers node relations add all model get facade get extends node relations add all model get facade get extenders node for object relation relations if can add edge relation add edge relation if model get facade isa classifier node collection ends model get facade get association ends node for object ae ends if can add edge model get facade get association ae add edge model get facade get association ae if model get facade isa generalizable element node collection gn model get facade get generalizations node for object g gn if can add edge g add edge g collection sp model get facade get specializations node for object s sp if can add edge s add edge s if model get facade isauml element node collection dependencies new array list model get facade get client dependencies node dependencies add all model get facade get supplier dependencies node for object dependency dependencies if can add edge dependency add edge dependency modelelements addnoderelatededges addnoderelatededges getfacade isausecase arraylist addall getfacade getincludes addall getfacade getincluders addall getfacade getextends addall getfacade getextenders canaddedge addedge getfacade isaclassifier getfacade getassociationends canaddedge getfacade getassociation addedge getfacade getassociation getfacade isageneralizableelement getfacade getgeneralizations canaddedge addedge getfacade getspecializations canaddedge addedge getfacade isaumlelement arraylist getfacade getclientdependencies addall getfacade getsupplierdependencies canaddedge addedge determine if the two given ports can be connected by a kind of edge to be determined by the ports p em note em there appears to be a problem with the implementation since it suggests actors cannot connect in fact generalization is permitted and this works suggesting this method is not actually invoked in the current implementation of argouml p param fromp the source port of the connection param top the destination port of the connection return code true code if the two given ports can be connected by a kind of edge to be determined by the ports code false code otherwise override public boolean can connect object fromp object top suggest that actors may not connect see java doc comment about this if model get facade isa actor fromp model get facade isa actor top return false everything else is ok return true canconnect javadoc getfacade isaactor getfacade isaactor called when a property of interest has been changed in this case the owned elements of the model provided to implement the link vetoable change listener interface p we could throw a property veto exception if we wished to allow the change to be rolled back but we don t p param pce the event that triggered us and from which we can extract the name of the property that triggered us public void vetoable change property change event pce only interested in the owned element property either something has been added to the namespace for this model or removed in the latter case the something will be in the old value of the property which is the collection of owned elements and the new value will be the element import describing the model element and the model from which it was removed if owned element equals pce get property name list old owned list pce get old value object eo m element import pce get new value object me model get facade get model element eo if the element import is in the old owned it means it must have been removed make sure the associated model element is removed if old owned contains eo log debug model removed me remove a node if model get facade isa actor me model get facade isa use case me remove node me else if model get facade isa association me model get facade isa generalization me model get facade isa extend me model get facade isa include me model get facade isa dependency me remove an edge remove edge me else something was added nothing for us to worry about log debug model added me vetoablechangelistener propertyvetoexception vetoablechange propertychangeevent ownedelement ownedelement getpropertyname oldowned getoldvalue melementimport getnewvalue getfacade getmodelelement oldowned getfacade isaactor getfacade isausecase removenode getfacade isaassociation getfacade isageneralization getfacade isaextend getfacade isainclude getfacade isadependency removeedge constructor for uml classifier role base list model public uml classifier package imports list model super element import this is the right event umlclassifierrolebaselistmodel umlclassifierpackageimportslistmodel elementimport see org argouml uml ui uml model element list model2 build model list protected void build model list set all elements model get facade get imported elements get target umlmodelelementlistmodel2 buildmodellist buildmodellist setallelements getfacade getimportedelements gettarget protected boolean is valid element object elem if model get facade isa element import elem return false return model get facade get package elem get target isvalidelement getfacade isaelementimport getfacade getpackage gettarget todo should this really be overriding the super class tfm public void property change property change event e if is valid event e remove all elements set building model true build model list set building model false if get size 0 fire interval added this 0 get size 1 propertychange propertychangeevent isvalidevent removeallelements setbuildingmodel buildmodellist setbuildingmodel getsize fireintervaladded getsize constructor for uml state machine submachine state list model public uml state machine submachine state list model super submachine state umlstatemachinesubmachinestatelistmodel umlstatemachinesubmachinestatelistmodel submachinestate see org argouml uml ui uml model element list model2 build model list protected void build model list set all elements model get facade get submachine states get target umlmodelelementlistmodel2 buildmodellist buildmodellist setallelements getfacade getsubmachinestates gettarget see org argouml uml ui uml model element list model2 is valid element object protected boolean is valid element object element return model get facade get submachine states get target contains element umlmodelelementlistmodel2 isvalidelement isvalidelement getfacade getsubmachinestates gettarget private static final undo manager instance new default undo manager private default undo manager super undomanager defaultundomanager defaultundomanager get the undo manager singleton instance deprecated the default undo manager is only temporarily a singleton until changes are made to gef at which point there will be one undo manager per argouml project and this method will disappear return the singleton undo manager deprecated public static undo manager get instance return instance undomanager defaultundomanager undomanager getinstance public synchronized object execute command command add command command return command execute addcommand public synchronized void add command command command project manager get manager set save enabled true if undo max 0 return if command is undoable undo stack clear new interaction true flag the command as to whether it is first in a chain final interaction macro command if new interaction undo stack is empty redo stack clear new interaction false if undo stack size undo max undo stack remove 0 macro command new interaction new interaction label undo stack push macro command else macro command undo stack peek macro command add command command addcommand projectmanager getmanager setsaveenabled undomax isundoable undostack newinteraction macrocommand newinteraction undostack isempty redostack newinteraction undostack undomax undostack macrocommand newinteractionlabel undostack macrocommand macrocommand undostack macrocommand addcommand public void set undo max int max undo max max setundomax undomax public synchronized void undo final interaction command undo stack pop command undo if command is redoable redo stack clear redo stack push command undostack isredoable redostack redostack public synchronized void redo final interaction command redo stack pop command execute undo stack push command redostack undostack public synchronized void start interaction string label log debug starting interaction label this new interaction label label new interaction true startinteraction newinteractionlabel newinteraction public void add property change listener property change listener listener listeners add listener addpropertychangelistener propertychangelistener public void remove property change listener property change listener listener listeners remove listener removepropertychangelistener propertychangelistener private void fire final string property final object value for property change listener listener listeners listener property change new property change event this property value propertychangelistener propertychange propertychangeevent private string label interaction string lbl label lbl public void undo final list iterator command it commands list iterator commands size while it has previous it previous undo listiterator listiterator hasprevious public object execute final iterator command it commands iterator while it has next it next execute return null hasnext public boolean is undoable final iterator command it commands iterator while it has next final command command it next if command is undoable return false return true isundoable hasnext isundoable public boolean is redoable final iterator command it commands iterator while it has next final command command it next if command is redoable return false return true isredoable hasnext isredoable private void add command command command commands add command addcommand todo i18n private string get undo label if is undoable return undo label else return can t undo label getundolabel isundoable todo i18n private string get redo label if is redoable return redo label else return can t redo label getredolabel isredoable list command get commands return new array list command commands getcommands arraylist public interaction stack string label prop string added prop string removed prop string size prop label property label prop added property added prop removed property removed prop size property size prop interactionstack labelprop addedprop removedprop sizeprop labelproperty labelprop addedproperty addedprop removedproperty removedprop sizeproperty sizeprop public interaction push interaction item super push item fire label fire added property item fire size property size return item firelabel addedproperty sizeproperty public interaction pop interaction item super pop fire label fire removed property item fire size property size return item firelabel removedproperty sizeproperty private void fire label fire label property get label firelabel labelproperty getlabel protected abstract string get label getlabel public undo stack super undo label undo added undo removed undo size undostack undolabel undoadded undoremoved undosize public interaction push interaction item super push item if item is undoable fire undoable true return item isundoable public interaction pop interaction item super pop if size 0 peek is undoable fire undoable false return item isundoable public void clear super clear fire undo size size fire undoable false undosize protected string get label if empty return translator localize action undo else return peek get undo label getlabel getundolabel public redo stack super redo label redo added redo removed redo size redostack redolabel redoadded redoremoved redosize public interaction push interaction item super push item if item is redoable fire redoable true return item isredoable public interaction pop interaction item super pop if size 0 peek is redoable fire redoable false return item isredoable public void clear super clear fire redo size size fire redoable false redosize protected string get label if empty return translator localize action redo else return peek get redo label getlabel getredolabel constructor for action new uninterpreted action protected action new uninterpreted action super put value action name translator localize button new uninterpretedaction actionnewuninterpretedaction actionnewuninterpretedaction putvalue see org argouml uml ui behavior common behavior action new action create action protected object create action return model get common behavior factory create uninterpreted action common_behavior actionnewaction createaction createaction getcommonbehaviorfactory createuninterpretedaction return returns the singleton public static action new uninterpreted action get instance return singleton actionnewuninterpretedaction getinstance public static action new action get button instance action new action a new action new uninterpreted action public void action performed action event e object target target manager get instance get model target if model get facade isa transition target return set target target super action performed e a put value short description a get value action name object icon resource loader wrapper lookup icon resource uninterpreted action a put value small icon icon a put value role roles effect return a actionnewaction getbuttoninstance actionnewaction actionnewuninterpretedaction actionperformed actionevent targetmanager getinstance getmodeltarget getfacade isatransition settarget actionperformed putvalue short_description getvalue resourceloaderwrapper lookupiconresource uninterpretedaction putvalue small_icon putvalue public void action performed action event e object target target manager get instance get model target if model get facade isa transition target return set target target super action performed e actionperformed actionevent targetmanager getinstance getmodeltarget getfacade isatransition settarget actionperformed the constructor param name the uml object public model element name notation uml object name super name modelelementnamenotationuml public void parse object model element string text try notation utility uml parse model element model element text catch parse exception pe string msg statusmsg bar error parsing node modelelement object args pe get localized message integer value of pe get error offset argo event pump fire event new argo help event argo event types help changed this translator message format msg args modelelement notationutilityuml parsemodelelement modelelement parseexception getlocalizedmessage valueof geterroroffset argoeventpump fireevent argohelpevent argoeventtypes help_changed messageformat see org argouml notation providers notation provider get parsing help public string get parsing help return parsing help fig nodemodelelement notationprovider getparsinghelp getparsinghelp public string to string object model element map args return to string model element is value fully handle stereotypes args is value use guillemets args is value visibility visible args is value path visible args tostring modelelement tostring modelelement isvalue fullyhandlestereotypes isvalue useguillemets isvalue visibilityvisible isvalue pathvisible private string to string object model element boolean handle stereotypes boolean use guillemets boolean show visibility boolean show path string name model get facade get name model element string buffer sb new string buffer if handle stereotypes sb append notation utility uml generate stereotype model element use guillemets if show visibility sb append generate visibility model element if show path sb append notation utility uml generate path model element if name null sb append name return sb to string tostring modelelement handlestereotypes useguillemets showvisibility showpath getfacade getname modelelement stringbuffer stringbuffer handlestereotypes notationutilityuml generatestereotype modelelement useguillemets showvisibility generatevisibility modelelement showpath notationutilityuml generatepath modelelement tostring param model element the uml element to generate for param args arguments that influence the generation return a string which represents the stereotypes deprecated for 0 27 3 by tfmorris deprecated protected string generate stereotypes object model element map args return notation utility uml generate stereotype model element args modelelement generatestereotypes modelelement notationutilityuml generatestereotype modelelement param model element the uml element to generate for param args arguments that influence the generation return a string which represents the path deprecated for 0 27 3 by tfmorris deprecated protected string generate path object model element map args string builder s new string builder if is value path visible args object p model element stack stack new stack object ns model get facade get namespace p while ns null model get facade isa model ns stack push model get facade get name ns ns model get facade get namespace ns while stack is empty s append string stack pop if s length 0 s last index of s length 1 s append return s to string modelelement generatepath modelelement stringbuilder stringbuilder isvalue pathvisible modelelement getfacade getnamespace getfacade isamodel getfacade getname getfacade getnamespace isempty lastindexof tostring param model element the uml element to generate for param args arguments that influence the generation return a string representing the visibility deprecated for 0 27 3 by tfmorris deprecated protected string generate visibility object model element map args if is value visibility visible args return generate visibility model element else return modelelement generatevisibility modelelement isvalue visibilityvisible generatevisibility modelelement private string generate visibility object model element string s notation utility uml generate visibility2 model element when nothing is generated omit the space if s length 0 s s return s generatevisibility modelelement notationutilityuml generatevisibility2 modelelement override public string to string object model element notation settings settings return to string model element settings is fully handle stereotypes settings is use guillemets settings is show visibilities settings is show paths tostring modelelement notationsettings tostring modelelement isfullyhandlestereotypes isuseguillemets isshowvisibilities isshowpaths construct a new action add association role param aggregation kind the required aggregation for the association param unidirectional true if this is to create a unidirectional association param name the action description public action add association role object aggregation kind boolean unidirectional string name super mode create poly edge class edge class model get meta types get association role name mode args put aggregation aggregation kind mode args put unidirectional boolean value of unidirectional actionaddassociationrole aggregationkind actionaddassociationrole aggregationkind modecreatepolyedge edgeclass getmetatypes getassociationrole modeargs aggregationkind modeargs valueof the constructor param aggregation kind the required aggregation for the association param unidirectional true if this is to create a unidirectional association param name the action description param icon name the name of the icon file public action add association role object aggregation kind boolean unidirectional string name string icon name super mode create poly edge class edge class model get meta types get association role name mode args put aggregation aggregation kind mode args put unidirectional boolean value of unidirectional icon icon resource loader wrapper lookup icon resource icon name icon name if icon null put value action small icon icon aggregationkind iconname actionaddassociationrole aggregationkind iconname modecreatepolyedge edgeclass getmetatypes getassociationrole modeargs aggregationkind modeargs valueof resourceloaderwrapper lookupiconresource iconname iconname putvalue small_icon param map this map contains the values for the spacing paint lines and paint dots param name the name for this action private action adjust grid final map string comparable map final string name super my map map put value action name name paintlines paintdots actionadjustgrid mymap putvalue public void action performed final action event e final editor editor globals cur editor if editor null final layer grid editor get layer manager find layer named grid if grid instanceof layer grid if my map null kludge required by gef s use of hash map in the api todo this can be removed if they ever fix gef to use maps if my map instanceof hash map grid adjust hash map string comparable my map else grid adjust new hash map string comparable my map configuration set string argo key grid string get value id actionperformed actionevent cureditor getlayermanager findlayernamed layergrid mymap hashmap mymap hashmap hashmap mymap hashmap mymap setstring key_grid getvalue static void set group final button group group my group group setgroup buttongroup mygroup this executes one of the actions based on the stored argouml configuration this function is intended for the initial setting of the grid when argouml is started p additionally the button group is searched for the right action and when found the button s model initialised static void init string id configuration get string argo key grid default id list action actions create adjust grid actions false for action a actions if a get value id equals id a action performed null if my group null for enumeration e my group get elements e has more elements abstract button ab abstract button e next element action action ab get action if action instanceof action adjust grid string currentid string action get value id if id equals currentid my group set selected ab get model true return return buttongroup getstring key_grid default_id createadjustgridactions getvalue actionperformed mygroup mygroup getelements hasmoreelements abstractbutton abstractbutton nextelement getaction actionadjustgrid getvalue mygroup setselected getmodel this function is the one and only location that defines the number of grid settings and their content constraint one of the actions should have the id defaultid since this is used in init param long strings return list of actions which adjust the grid static list action create adjust grid actions final boolean long strings list action result new array list action result add build grid action long strings action adjust grid lines 16 menu item lines 16 16 true true 01 key event vk 1 result add build grid action long strings action adjust grid lines 8 menu item lines 8 8 true true 02 key event vk 2 result add build grid action long strings action adjust grid dots 16 menu item dots 16 16 false true 03 key event vk 3 result add build grid action long strings action adjust grid dots 32 menu item dots 32 32 false true 04 key event vk 4 result add build grid action long strings action adjust grid none menu item none 16 false false 05 key event vk 5 return result longstrings createadjustgridactions longstrings arraylist buildgridaction longstrings keyevent vk_1 buildgridaction longstrings keyevent vk_2 buildgridaction longstrings keyevent vk_3 buildgridaction longstrings keyevent vk_4 buildgridaction longstrings keyevent vk_5 param property the name not yet localised param spacing the spacing distance param paint lines show lines param paint dots show dots param id identifier param key key code return the action public static action build grid action final string property final int spacing final boolean paint lines final boolean paint dots final string id final int key string name translator localize property hash map string comparable map1 new hash map string comparable 4 map1 put spacing integer value of spacing map1 put paint lines boolean value of paint lines map1 put paint dots boolean value of paint dots action action new action adjust grid map1 name action put value id id action put value shortcut key stroke get key stroke key default mask return action paintlines paintdots keycode buildgridaction paintlines paintdots hashmap hashmap valueof paintlines valueof paintlines paintdots valueof paintdots actionadjustgrid putvalue putvalue keystroke getkeystroke default_mask constructor for action add classifier role base protected action add event as deferrable event super set multi select true actionaddclassifierrolebase actionaddeventasdeferrableevent setmultiselect protected list get choices list vec new array list todo the namespace of created events is currently the model i think this is wrong they should be in the namespace of the activitygraph vec add all model get model management helper get all model elements of kind model get facade get namespace get target model get meta types get event vec add all model get model management helper get all model elements of kind model get facade get model get target model get meta types get event return vec getchoices arraylist addall getmodelmanagementhelper getallmodelelementsofkind getfacade getnamespace gettarget getmetatypes getevent addall getmodelmanagementhelper getallmodelelementsofkind getfacade getmodel gettarget getmetatypes getevent protected list get selected list vec new array list collection events model get facade get deferrable events get target if events null vec add all events return vec getselected arraylist getfacade getdeferrableevents gettarget addall protected string get dialog title return translator localize dialog title add events getdialogtitle override protected void do it collection selected object state get target if model get facade isa state state return collection old ones new array list model get facade get deferrable events state collection to be removed new array list old ones for object o selected if old ones contains o to be removed remove o else model get state machines helper add deferrable event state o for object o to be removed model get state machines helper remove deferrable event state o doit gettarget getfacade isastate oldones arraylist getfacade getdeferrableevents toberemoved arraylist oldones oldones toberemoved getstatemachineshelper adddeferrableevent toberemoved getstatemachineshelper removedeferrableevent the constructor public action add classifier role super model get meta types get classifier role button new classifierrole actionaddclassifierrole getmetatypes getclassifierrole public object make node object node null editor ce globals cur editor graph model gm ce get graph model if gm instanceof collab diagram graph model object collaboration collab diagram graph model gm get home model node model get collaborations factory build classifier role collaboration else throw new illegal state exception graphmodel is not a collaboration diagram graph model return node makenode cureditor graphmodel getgraphmodel collabdiagramgraphmodel collabdiagramgraphmodel gethomemodel getcollaborationsfactory buildclassifierrole illegalstateexception construct a profile for uml modeling throws profile exception suppress warnings unchecked profileuml throws profile exception formating strategy new java formating strategy profile model loader new resource model loader profile reference profile reference null try profile reference new core profile reference profile file catch malformedurl exception e throw new profile exception exception while creating profile reference e model profile model loader load model profile reference if model null model new array list model add model get model management factory create model load well formedness rules profileexception suppresswarnings profileexception formatingstrategy javaformatingstrategy profilemodelloader resourcemodelloader profilereference profilereference profilereference coreprofilereference profile_file malformedurlexception profileexception profilemodelloader loadmodel profilereference arraylist getmodelmanagementfactory createmodel loadwellformednessrules private void load well formedness rules set critic critics new hash set critic critics add new cr assoc name conflict critics add new cr attr name conflict critics add new cr circular assoc class critics add new cr circular inheritance critics add new cr class must be abstract critics add new cr cross namespace assoc critics add new cr dup param name critics add new cr dup role names critics add new cr name confusion critics add new cr invalid history critics add new cr invalid synch critics add new cr invalid join trigger or guard critics add new cr invalid pseudo state trigger critics add new cr invalid initial critics add new cr invalid join critics add new cr invalid fork critics add new cr invalid branch critics add new cr multiple deep history states critics add new cr multiple shallow history states critics add new cr fork outgoing transition critics add new cr join incoming transition critics add new cr final subclassed critics add new cr illegal generalization critics add new cr interface all public critics add new cr interface oper only critics add new cr multiple agg critics add new crn way agg critics add new cr name conflictac critics add new cr opp end conflict critics add new cr multi composite critics add new cr name conflict critics add new cr opp end vs attr missing wf rs association class 4 5 3 2 1 try critics add new crocl context association class inv self all connections for all ar self all features for all f f ocl is kind of structural feature implies ar name f name the names of the association ends and the structural features do not overlap null to do item high priority null null http www uml org catch invalid ocl exception e e print stack trace 4 5 3 2 2 try critics add new crocl context association class inv self all connections for all ar ar participant self an association class cannot be defined between itself and something else null to do item high priority null null http www uml org catch invalid ocl exception e e print stack trace behavioral feature 4 5 3 5 2 it works but a bug in namespace contents prevents it from working when the type of the parameter comes from a profile try agency register new crocl context behavioral feature inv self parameter for all p self owner namespace all contents includes p type the type of the parameters should be included in the namespace of the classifier null to do item high priority null null http www uml org catch invalid ocl exception e e print stack trace classfier 4 5 3 8 5 try critics add new crocl context classifier inv self opposite association ends for all o not self all attributes union self all contents collect q q name includes o name the name of an opposite association end may not be the same as the name of an attribute or a model element contained in the classifier null to do item high priority null null http www uml org catch invalid ocl exception e e print stack trace data type 4 5 3 12 1 try critics add new crocl context data type inv self all features for all f f ocl is kind of operation and f ocl as type operation is query a data type can only contain operations which all must be queries null to do item high priority null null http www uml org catch invalid ocl exception e e print stack trace generalizable element 4 5 3 20 1 try critics add new crocl context generalizable element inv self is root implies self generalization is empty a root cannot have any generalizations null to do item high priority null null http www uml org catch invalid ocl exception e e print stack trace 4 5 3 20 4 try critics add new crocl context generalizable element inv self generalization for all g self namespace all contents includes g parent the parent must be included in the namespace of the generalizable element null to do item high priority null null http www uml org catch invalid ocl exception e e print stack trace namespace 4 5 3 26 2 try critics add new crocl context namespace inv self all contents select x x ocl is kind of association for all a1 a2 a1 name a2 name and a1 connection participant a2 connection participant implies a1 a2 all associations must have a unique combination of name and associated classifiers in the namespace null to do item high priority null null http www uml org catch invalid ocl exception e e print stack trace set critics critics loadwellformednessrules hashset crassocnameconflict crattrnameconflict crcircularassocclass crcircularinheritance crclassmustbeabstract crcrossnamespaceassoc crdupparamname crduprolenames crnameconfusion crinvalidhistory crinvalidsynch crinvalidjointriggerorguard crinvalidpseudostatetrigger crinvalidinitial crinvalidjoin crinvalidfork crinvalidbranch crmultipledeephistorystates crmultipleshallowhistorystates crforkoutgoingtransition crjoinincomingtransition crfinalsubclassed crillegalgeneralization crinterfaceallpublic crinterfaceoperonly crmultipleagg crnwayagg crnameconflictac croppendconflict crmulticomposite crnameconflict croppendvsattr wfrs associationclass allconnections forall allfeatures forall ocliskindof structuralfeature associationends structuralfeatures todoitem high_priority invalidoclexception printstacktrace associationclass allconnections forall associationclass todoitem high_priority invalidoclexception printstacktrace behavioralfeature forall allcontents todoitem high_priority invalidoclexception printstacktrace oppositeassociationends forall allattributes allcontents associationend modelelement todoitem high_priority invalidoclexception printstacktrace datatype datatype allfeatures forall ocliskindof oclastype isquery datatype todoitem high_priority invalidoclexception printstacktrace generalizableelement generalizableelement isroot isempty todoitem high_priority invalidoclexception printstacktrace generalizableelement forall allcontents generalizableelement todoitem high_priority invalidoclexception printstacktrace allcontents ocliskindof forall todoitem high_priority invalidoclexception printstacktrace setcritics override public formating strategy get formating strategy return formating strategy formatingstrategy getformatingstrategy formatingstrategy override public string get display name return name getdisplayname override public collection get profile packages return model getprofilepackages override public default type strategy get default type strategy return new default type strategy public object get default attribute type return model utils find type in model integer model iterator next public object get default parameter type return model utils find type in model integer model iterator next public object get default return type return null defaulttypestrategy getdefaulttypestrategy defaulttypestrategy getdefaultattributetype modelutils findtypeinmodel getdefaultparametertype modelutils findtypeinmodel getdefaultreturntype public default type strategy get default type strategy return new default type strategy public object get default attribute type return model utils find type in model integer model iterator next defaulttypestrategy getdefaulttypestrategy defaulttypestrategy getdefaultattributetype modelutils findtypeinmodel public object get default parameter type return model utils find type in model integer model iterator next getdefaultparametertype modelutils findtypeinmodel public object get default return type return null getdefaultreturntype construct a new fig subactivity state param owner owning uml element param bounds position and size param settings rendering settings public fig shallow history state object owner rectangle bounds diagram settings settings super owner bounds settings figsubactivitystate figshallowhistorystate diagramsettings main constructor deprecated for 0 27 4 by tfmorris use link fig shallow history state object rectangle diagram settings suppress warnings deprecation deprecated public fig shallow history state super figshallowhistorystate diagramsettings suppresswarnings figshallowhistorystate see org argouml uml diagram state ui fig history state geth public string geth return h fighistorystate the constructor which links the fig into the existing uml element param gm ignored param node the uml element deprecated for 0 27 4 by tfmorris use link fig shallow history state object rectangle diagram settings suppress warnings deprecation deprecated public fig shallow history state graph model gm object node super gm node figshallowhistorystate diagramsettings suppresswarnings figshallowhistorystate graphmodel the constructor public cr invalid fork trigger or guard setup head and desc add supported decision uml decision state machines add trigger trigger add trigger guard crinvalidforktriggerorguard setupheadanddesc addsupporteddecision umldecision state_machines addtrigger addtrigger public boolean predicate2 object dm designer dsgr if model get facade isa transition dm return no problem object tr dm object t model get facade get trigger tr object g model get facade get guard tr object sv model get facade get source tr if model get facade isa pseudostate sv return no problem object k model get facade get kind sv if model get facade equals pseudostate kind k model get pseudostate kind get fork return no problem boolean has trigger t null model get facade get name t null model get facade get name t length 0 if has trigger return problem found boolean no guard g null model get facade get expression g null model get facade get body model get facade get expression g null model get facade get body model get facade get expression g to string length 0 if no guard return problem found return no problem getfacade isatransition no_problem getfacade gettrigger getfacade getguard getfacade getsource getfacade isapseudostate no_problem getfacade getkind getfacade equalspseudostatekind getpseudostatekind getfork no_problem hastrigger getfacade getname getfacade getname hastrigger problem_found noguard getfacade getexpression getfacade getbody getfacade getexpression getfacade getbody getfacade getexpression tostring noguard problem_found no_problem public set object get criticized design materials set object ret new hash set object ret add model get meta types get transition return ret getcriticizeddesignmaterials hashset getmetatypes gettransition main constructor for shortcut field param text the initial text of the field param columns the number of columns public shortcut field string text int columns super null text columns trap focus traversal keys also this set focus traversal keys keyboard focus manager forward traversal keys collections empty set this set focus traversal keys keyboard focus manager backward traversal keys collections empty set let s add the key printing logic this add key listener new key listener private int current key code 0 public void key pressed key event ke ke consume j text field tf j text field ke get source tf set text to string ke public void key released key event ke ke consume j text field tf j text field ke get source switch current key code case key event vk alt case key event vk alt graph case key event vk control case key event vk shift tf set text return public void key typed key event ke ke consume private string to string key event ke current key code ke get key code int key code current key code string modif text key event utils get modifiers text ke get modifiers if equals modif text no modifiers let s check if the key is valid if key event utils is action event ke return key event utils get key text key code else return else switch key code case key event vk alt case key event vk alt graph case key event vk control case key event vk shift return modif text middle of shortcut default modif text key event utils get key text ke get key code fire shortcut changed event modif text return modif text shortcutfield shortcutfield setfocustraversalkeys keyboardfocusmanager forward_traversal_keys empty_set setfocustraversalkeys keyboardfocusmanager backward_traversal_keys empty_set addkeylistener keylistener currentkeycode keypressed keyevent jtextfield jtextfield getsource settext tostring keyreleased keyevent jtextfield jtextfield getsource currentkeycode keyevent vk_alt keyevent vk_alt_graph keyevent vk_control keyevent vk_shift settext keytyped keyevent tostring keyevent currentkeycode getkeycode keycode currentkeycode modiftext keyeventutils getmodifierstext getmodifiers modiftext keyeventutils isactionevent keyeventutils getkeytext keycode keycode keyevent vk_alt keyevent vk_alt_graph keyevent vk_control keyevent vk_shift modiftext modiftext keyeventutils getkeytext getkeycode fireshortcutchangedevent modiftext modiftext private int current key code 0 public void key pressed key event ke ke consume j text field tf j text field ke get source tf set text to string ke currentkeycode keypressed keyevent jtextfield jtextfield getsource settext tostring public void key released key event ke ke consume j text field tf j text field ke get source switch current key code case key event vk alt case key event vk alt graph case key event vk control case key event vk shift tf set text return keyreleased keyevent jtextfield jtextfield getsource currentkeycode keyevent vk_alt keyevent vk_alt_graph keyevent vk_control keyevent vk_shift settext public void key typed key event ke ke consume keytyped keyevent private string to string key event ke current key code ke get key code int key code current key code string modif text key event utils get modifiers text ke get modifiers if equals modif text no modifiers let s check if the key is valid if key event utils is action event ke return key event utils get key text key code else return else switch key code case key event vk alt case key event vk alt graph case key event vk control case key event vk shift return modif text middle of shortcut default modif text key event utils get key text ke get key code fire shortcut changed event modif text return modif text tostring keyevent currentkeycode getkeycode keycode currentkeycode modiftext keyeventutils getmodifierstext getmodifiers modiftext keyeventutils isactionevent keyeventutils getkeytext keycode keycode keyevent vk_alt keyevent vk_alt_graph keyevent vk_control keyevent vk_shift modiftext modiftext keyeventutils getkeytext getkeycode fireshortcutchangedevent modiftext modiftext adds a shortcut changed listener to the listener list param listener the shortcut changed listener to be added public void add shortcut changed listener shortcut changed listener listener listener list add shortcut changed listener class listener shortcutchangedlistener shortcutchangedlistener addshortcutchangedlistener shortcutchangedlistener listenerlist shortcutchangedlistener inform listeners of any shortcut notifications param text the text of the field protected void fire shortcut changed event string text shortcut changed event event null guaranteed to return a non null array object listeners listener list get listener list key stroke key stroke shortcut mgr decode key stroke text process the listeners last to first notifying those that are interested in this event for int i listeners length 2 i 0 i 2 if listeners i shortcut changed listener class lazily create the event if event null event new shortcut changed event this key stroke shortcut changed listener listeners i 1 shortcut change event fireshortcutchangedevent shortcutchangedevent listenerlist getlistenerlist keystroke keystroke shortcutmgr decodekeystroke shortcutchangedlistener shortcutchangedevent keystroke shortcutchangedlistener shortcutchange constructs a uml image panel param text field the textfield the user can edit param show icon boolean which must be true if an icon is to be shown public uml image panel j text field text field boolean show icon set layout new border layout the text field text field set border border factory create bevel border bevel border lowered if show icon we don t want to show some nasty gray background color now do we image icon label set opaque true image icon label set background the text field get background add image icon label border layout west add the text field border layout center the text field add focus listener uml editable combo box this umlimagepanel textfield showicon umlimagepanel jtextfield textfield showicon setlayout borderlayout thetextfield textfield setborder borderfactory createbevelborder bevelborder showicon imageiconlabel setopaque imageiconlabel setbackground thetextfield getbackground imageiconlabel borderlayout thetextfield borderlayout thetextfield addfocuslistener umleditablecombobox public void set text string text the text field set text text settext thetextfield settext public string get text return the text field get text gettext thetextfield gettext sets the icon calls repaint to redraw the panel param i the icon to be shown public void set icon icon i if i null image icon label set icon i necessary to create distance between the textfield and the icon image icon label set border border factory create empty border 0 2 0 2 else image icon label set icon null image icon label set border null image icon label invalidate validate repaint seticon imageiconlabel seticon imageiconlabel setborder borderfactory createemptyborder imageiconlabel seticon imageiconlabel setborder imageiconlabel public void select all the text field select all selectall thetextfield selectall public void add action listener action listener l the text field add action listener l addactionlistener actionlistener thetextfield addactionlistener public void remove action listener action listener l the text field remove action listener l removeactionlistener actionlistener thetextfield removeactionlistener constructor for uml combo box editor param show icon true if an icon is to be shown public uml combo box editor boolean show icon super panel new uml image panel editor show icon set show icon show icon umlcomboboxeditor showicon umlcomboboxeditor showicon umlimagepanel showicon setshowicon showicon public void set item object an object if uml combo box model2 get model contains an object editor set text uml list cell renderer2 get renderer make text an object if the show icon an object null panel set icon resource loader wrapper get instance lookup icon an object else super set item an object setitem anobject umlcomboboxmodel2 getmodel anobject settext umllistcellrenderer2 getrenderer maketext anobject theshowicon anobject seticon resourceloaderwrapper getinstance lookupicon anobject setitem anobject returns the show icon return boolean public boolean is show icon return the show icon showicon isshowicon theshowicon sets the show icon param show icon the show icon to set public void set show icon boolean show icon the show icon show icon showicon showicon showicon setshowicon showicon theshowicon showicon see javax swing combo box editor get editor component public component get editor component return panel comboboxeditor geteditorcomponent geteditorcomponent see javax swing combo box editor add action listener java awt event action listener public void add action listener action listener l panel add action listener l comboboxeditor addactionlistener actionlistener addactionlistener actionlistener addactionlistener see javax swing combo box editor remove action listener java awt event action listener public void remove action listener action listener l panel remove action listener l comboboxeditor removeactionlistener actionlistener removeactionlistener actionlistener removeactionlistener see javax swing combo box editor select all public void select all super select all comboboxeditor selectall selectall selectall see javax swing combo box editor get item public object get item return panel get text comboboxeditor getitem getitem gettext public uml editable combo box uml combo box model2 model action select action boolean show icon super model select action show icon set editable true set editor new uml combo box editor show icon get editor add action listener this umleditablecombobox umlcomboboxmodel2 selectaction showicon selectaction showicon seteditable seteditor umlcomboboxeditor showicon geteditor addactionlistener action public uml editable combo box uml combo box model2 arg0 action select action this arg0 select action true umleditablecombobox umlcomboboxmodel2 selectaction selectaction public void action performed action event e super action performed e if e get source instanceof j text field object old value get selected item combo box editor editor get editor object item editor get item do on edit item next statement is necessary to update the textfield if the selection is equal to what was allready selected if old value get selected item get editor set item get selected item actionperformed actionevent actionperformed getsource jtextfield oldvalue getselecteditem comboboxeditor geteditor getitem doonedit oldvalue getselecteditem geteditor setitem getselecteditem this method is called after the user has edited the editable textfield and has press enter action performed determines that the action is about editing the textfield and calls this method afterwards param item the item in the comboboxeditor in this case it s the text of the editable textfield actionperformed see java awt event focus listener focus gained java awt event focus event public final void focus gained focus event arg0 ignored focuslistener focusgained focusevent focusgained focusevent see java awt event focus listener focus lost java awt event focus event public final void focus lost focus event arg0 do on edit get editor get item focuslistener focuslost focusevent focuslost focusevent doonedit geteditor getitem the constructor public wizme name param s the instructions public void set instructions string s instructions s wizmename setinstructions param b if true then the wizard step needs userinput i e it must be edited create a new panel for the given step see org argouml cognitive critics wizard make panel int public j panel make panel int new step switch new step case 1 if step1 null step1 new wiz step text field this instructions label offer suggestion return step1 return null makepanel jpanel makepanel newstep newstep wizsteptextfield offersuggestion see org argouml uml cognitive critics uml wizard set suggestion java lang string public void set suggestion string s orig suggest s super set suggestion s umlwizard setsuggestion setsuggestion origsuggest setsuggestion return false if the user has not edited the text and they were required to see org argouml cognitive critics wizard can go next public boolean can go next if super can go next return false if step1 null boolean changed orig suggest equals step1 get text if must edit changed return false return true cangonext cangonext cangonext origsuggest gettext mustedit public void do action int old step log debug do action old step switch old step case 1 string new name get suggestion if step1 null new name step1 get text try object me get model element model get core helper set name me new name catch exception pve log error could not set name pve break doaction oldstep doaction oldstep oldstep newname getsuggestion newname gettext getmodelelement getcorehelper setname newname return returns the instructions protected string get instructions return instructions getinstructions constructor for uml state machine context list model public uml state machine context combo box model super context false umlstatemachinecontextlistmodel umlstatemachinecontextcomboboxmodel protected void build model list collection elements new array list project p project manager get manager get current project for object model p get user defined model list elements add all model get model management helper get all model elements of kind model model get meta types get classifier elements add all model get model management helper get all model elements of kind model model get meta types get behavioral feature set elements elements buildmodellist arraylist projectmanager getmanager getcurrentproject getuserdefinedmodellist addall getmodelmanagementhelper getallmodelelementsofkind getmetatypes getclassifier addall getmodelmanagementhelper getallmodelelementsofkind getmetatypes getbehavioralfeature setelements see org argouml uml ui uml combo box model2 is valid element object protected boolean is valid element object element return model get facade isa classifier element model get facade isa behavioral feature element umlcomboboxmodel2 isvalidelement isvalidelement getfacade isaclassifier getfacade isabehavioralfeature see org argouml uml ui uml combo box model2 get selected model element protected object get selected model element return model get facade get context get target umlcomboboxmodel2 getselectedmodelelement getselectedmodelelement getfacade getcontext gettarget public void model changed uml change event evt do nothing by design modelchanged umlchangeevent construct a property panel for uml parameter elements public prop panel parameter super label parameter lookup icon parameter add field translator localize label name get name text field add field translator localize label owner get behavioral feature scroll add separator add field translator localize label type new uml combo box2 new uml parameter type combo box model action set parameter type get instance uml expression model2 default model new uml default value expression model this default value j panel default panel create border panel translator localize label parameter default value default panel add new j scroll pane new uml expression body field default model true default panel add new uml expression language field default model false add default panel add new uml parameter direction kind radio button panel translator localize label parameter kind true add action new action navigate container element up down are only enabled if the parameter list is ordered add action new action navigate up previous down public list get family object parent return model get facade get parameters list parent public object get parent object child return model get facade get model element container child public boolean is enabled return model get facade isa behavioral feature get target model get facade isa event get target super is enabled add action new action navigate up next down public list get family object parent return model get facade get parameters list parent public object get parent object child return model get facade get model element container child public boolean is enabled return model get facade isa behavioral feature get target model get facade isa event get target super is enabled add action new action new parameter add action new action add data type add action new action add enumeration add action new action new stereotype add action get delete action proppanelparameter lookupicon addfield getnametextfield addfield getbehavioralfeaturescroll addseparator addfield umlcombobox2 umlparametertypecomboboxmodel actionsetparametertype getinstance umlexpressionmodel2 defaultmodel umldefaultvalueexpressionmodel defaultvalue jpanel defaultpanel createborderpanel defaultpanel jscrollpane umlexpressionbodyfield defaultmodel defaultpanel umlexpressionlanguagefield defaultmodel defaultpanel umlparameterdirectionkindradiobuttonpanel addaction actionnavigatecontainerelement addaction actionnavigateuppreviousdown getfamily getfacade getparameterslist getparent getfacade getmodelelementcontainer isenabled getfacade isabehavioralfeature gettarget getfacade isaevent gettarget isenabled addaction actionnavigateupnextdown getfamily getfacade getparameterslist getparent getfacade getmodelelementcontainer isenabled getfacade isabehavioralfeature gettarget getfacade isaevent gettarget isenabled addaction actionnewparameter addaction actionadddatatype addaction actionaddenumeration addaction actionnewstereotype addaction getdeleteaction up down are only enabled if the parameter list is ordered add action new action navigate up previous down public list get family object parent return model get facade get parameters list parent addaction actionnavigateuppreviousdown getfamily getfacade getparameterslist public object get parent object child return model get facade get model element container child getparent getfacade getmodelelementcontainer public boolean is enabled return model get facade isa behavioral feature get target model get facade isa event get target super is enabled isenabled getfacade isabehavioralfeature gettarget getfacade isaevent gettarget isenabled add action new action navigate up next down public list get family object parent return model get facade get parameters list parent addaction actionnavigateupnextdown getfamily getfacade getparameterslist public object get parent object child return model get facade get model element container child getparent getfacade getmodelelementcontainer public boolean is enabled return model get facade isa behavioral feature get target model get facade isa event get target super is enabled isenabled getfacade isabehavioralfeature gettarget getfacade isaevent gettarget isenabled returns the behavioral feature scroll return j panel public j panel get behavioral feature scroll if beh feature scroll null if beh feature model null beh feature model new uml parameter behavioral feat list model beh feature scroll get single row scroll beh feature model return beh feature scroll jpanel jpanel getbehavioralfeaturescroll behfeaturescroll behfeaturemodel behfeaturemodel umlparameterbehavioralfeatlistmodel behfeaturescroll getsinglerowscroll behfeaturemodel behfeaturescroll the constructor param container the container of uml user interface components param property name the name of the property public uml default value expression model uml user interface container container string property name super container property name propertyname umldefaultvalueexpressionmodel umluserinterfacecontainer propertyname propertyname public object get expression object target target manager get instance get target if target null return null return model get facade get default value target getexpression targetmanager getinstance gettarget getfacade getdefaultvalue public void set expression object expression object target target manager get instance get target if target null throw new illegal state exception there is no target for get container model get core helper set default value target expression setexpression targetmanager getinstance gettarget illegalstateexception getcontainer getcorehelper setdefaultvalue see org argouml uml ui uml expression model2 new expression public object new expression return model get data types factory create expression umlexpressionmodel2 newexpression newexpression getdatatypesfactory createexpression see org argouml ui explorer rules perspective rule get rule name public string get rule name return translator localize misc project profileconfiguration perspectiverule getrulename getrulename public collection get children object parent if parent instanceof project collection l new array list l add project parent get profile configuration return l return collections empty list getchildren arraylist getprofileconfiguration empty_list see org argouml ui explorer rules perspective rule get dependencies java lang object public set get dependencies object parent todo what return collections empty set perspectiverule getdependencies getdependencies empty_set public list object get ports object node or edge list object res new array list object if model get facade isa classifier node or edge res add node or edge if model get facade isa instance node or edge res add node or edge if model get facade isa model node or edge res add node or edge if model get facade isa stereotype node or edge res add node or edge if model get facade isa signal node or edge res add node or edge return res getports nodeoredge arraylist getfacade isaclassifier nodeoredge nodeoredge getfacade isainstance nodeoredge nodeoredge getfacade isamodel nodeoredge nodeoredge getfacade isastereotype nodeoredge nodeoredge getfacade isasignal nodeoredge nodeoredge see org tigris gef graph base graph model get owner java lang object public object get owner object port return port basegraphmodel getowner getowner return all edges going to given port read model element param port model element to query return list of incoming connections public list get in edges object port list object edges new array list object top of the hierarchy is me if model get facade isa model element port iterator it model get facade get supplier dependencies port iterator while it has next edges add it next then generalizable element if model get facade isa generalizable element port iterator it model get facade get specializations port iterator while it has next edges add it next then classifier package if model get facade isa classifier port model get facade isa package port iterator it model get facade get association ends port iterator while it has next object next assoc end it next navigable only want incoming if model get facade is navigable next assoc end edges add next assoc end if model get facade isa instance port iterator it model get facade get link ends port iterator while it has next edges add it next return edges getinedges arraylist getfacade isamodelelement getfacade getsupplierdependencies hasnext getfacade isageneralizableelement getfacade getspecializations hasnext getfacade isaclassifier getfacade isapackage getfacade getassociationends hasnext nextassocend getfacade isnavigable nextassocend nextassocend getfacade isainstance getfacade getlinkends hasnext public list get out edges object port list object edges new array list object top of the hierarchy is me if model get facade isa model element port iterator it model get facade get client dependencies port iterator while it has next edges add it next then generalizable element if model get facade isa generalizable element port iterator it model get facade get generalizations port iterator while it has next edges add it next then classifier if model get facade isa classifier port iterator it model get facade get association ends port iterator while it has next object this end it next object assoc model get facade get association this end if assoc null iterator it2 model get facade get association ends assoc iterator while it2 has next object next assoc end it2 next if this end equals next assoc end model get facade is navigable next assoc end edges add next assoc end return edges getoutedges arraylist getfacade isamodelelement getfacade getclientdependencies hasnext getfacade isageneralizableelement getfacade getgeneralizations hasnext getfacade isaclassifier getfacade getassociationends hasnext thisend getfacade getassociation thisend getfacade getassociationends hasnext nextassocend thisend nextassocend getfacade isnavigable nextassocend nextassocend override public boolean can add node object node if model get facade isa association node model get facade isa nary association node a binary association is not a node so reject log debug a binary association cannot be added as a node return false if super can add node node contains node node return true if contains node node log error addition of node of type node get class get name rejected because its already in the graph model return false if model get facade isa association node n b a node which is an association is either a n ary association or the class part of an association class collection ends model get facade get connections node iterator iter ends iterator while iter has next object classifier model get facade get classifier iter next if contains node classifier log error addition of node of type node get class get name rejected because it is connected to a classifier that is not in the diagram return false return true todo this logic may well be worth moving into the model component provide a similar grid to the connections grid if model get facade isa model node return false issue 3774 if model get facade isa classifier role node return false return model get facade isa classifier node model get facade isa package node model get facade isa stereotype node model get facade isa signal node model get facade isa instance node canaddnode getfacade isaassociation getfacade isanaryassociation canaddnode containsnode containsnode getclass getname getfacade isaassociation associationclass getfacade getconnections hasnext getfacade getclassifier containsnode getclass getname connectionsgrid getfacade isamodel getfacade isaclassifierrole getfacade isaclassifier getfacade isapackage getfacade isastereotype getfacade isasignal getfacade isainstance override public boolean can add edge object edge if edge null return false if contains edge edge return false object source model element null object dest model element null if model get facade isa association edge collection conns model get facade get connections edge if conns size 2 log error association rejected must have at least 2 ends return false iterator iter conns iterator object association end0 iter next object association end1 iter next if association end0 null association end1 null log error association rejected an end is null return false source model element model get facade get type association end0 dest model element model get facade get type association end1 else if model get facade isa association end edge source model element model get facade get association edge dest model element model get facade get type edge if source model element null dest model element null log error association end rejected an end is null return false if contains edge source model element contains node source model element log error association end rejected the source model element source model element get class get name must be on the diagram return false if contains node dest model element log error association end rejected the destination model element must be on the diagram return false else if model get facade isa generalization edge source model element model get facade get specific edge dest model element model get facade get general edge else if model get facade isa dependency edge collection clients model get facade get clients edge collection suppliers model get facade get suppliers edge if clients null suppliers null return false source model element clients iterator next dest model element suppliers iterator next else if model get facade isa link edge collection roles model get facade get connections edge if roles size 2 return false iterator iter roles iterator object link end0 iter next object link end1 iter next if link end0 null link end1 null return false source model element model get facade get instance link end0 dest model element model get facade get instance link end1 else if edge instanceof comment edge source model element comment edge edge get source dest model element comment edge edge get destination else return false if source model element null dest model element null log error edge rejected its ends are not attached to anything return false if contains node source model element contains edge source model element log error edge rejected its source end is attached to source model element but this is not in the graph model return false if contains node dest model element contains edge dest model element log error edge rejected its destination end is attached to dest model element but this is not in the graph model return false return true canaddedge containsedge sourcemodelelement destmodelelement getfacade isaassociation getfacade getconnections associationend0 associationend1 associationend0 associationend1 sourcemodelelement getfacade gettype associationend0 destmodelelement getfacade gettype associationend1 getfacade isaassociationend sourcemodelelement getfacade getassociation destmodelelement getfacade gettype sourcemodelelement destmodelelement containsedge sourcemodelelement containsnode sourcemodelelement sourcemodelelement getclass getname containsnode destmodelelement getfacade isageneralization sourcemodelelement getfacade getspecific destmodelelement getfacade getgeneral getfacade isadependency getfacade getclients getfacade getsuppliers sourcemodelelement destmodelelement getfacade isalink getfacade getconnections linkend0 linkend1 linkend0 linkend1 sourcemodelelement getfacade getinstance linkend0 destmodelelement getfacade getinstance linkend1 commentedge sourcemodelelement commentedge getsource destmodelelement commentedge getdestination sourcemodelelement destmodelelement containsnode sourcemodelelement containsedge sourcemodelelement sourcemodelelement containsnode destmodelelement containsedge destmodelelement destmodelelement override public void add node object node if can add node node return get nodes add node todo this is probably an undesirable side effect unless the user confirms it placing an element on a second diagram is going to potentially change its namespace tfm 20061208 if model get facade isa model element node model get facade get namespace node null model get core helper add owned element get home model node fire node added node addnode canaddnode getnodes getfacade isamodelelement getfacade getnamespace getcorehelper addownedelement gethomemodel firenodeadded add the given edge to the graph if of the correct type throws illegal argument exception if edge is null or either of its ends are null param edge the edge to be added override public void add edge object edge if edge null throw new illegal argument exception cannot add a null edge if get dest port edge null get source port edge null throw new illegal argument exception the source and dest port should be provided on an edge if log is info enabled log info adding an edge of type edge get class get name to class diagram if can add edge edge log info attempt to add edge rejected return get edges add edge todo assumes public todo this is probably an undesirable side effect unless the user confirms it placing an element on a second diagram is going to potentially change its namespace tfm 20061208 if model get facade isa model element edge model get facade get namespace edge null model get facade isa association end edge model get core helper add owned element get home model edge fire edge added edge illegalargumentexception addedge illegalargumentexception getdestport getsourceport illegalargumentexception isinfoenabled getclass getname canaddedge getedges getfacade isamodelelement getfacade getnamespace getfacade isaassociationend getcorehelper addownedelement gethomemodel fireedgeadded add the edges from the given node for example this method lets you add an existing association between two figclassifiers param node the model element to query for connections override public void add node related edges object node super add node related edges node if model get facade isa classifier node collection ends model get facade get association ends node iterator iter ends iterator while iter has next object association model get facade get association iter next if model get facade isa nary association association can add edge association add edge association if model get facade isa generalizable element node collection generalizations model get facade get generalizations node iterator iter generalizations iterator while iter has next object generalization iter next if can add edge generalization add edge generalization return collection specializations model get facade get specializations node iter specializations iterator while iter has next object specialization iter next if can add edge specialization add edge specialization return if model get facade isa association node collection ends model get facade get connections node iterator iter ends iterator while iter has next object association end iter next if can add edge association end add edge association end addnoderelatededges addnoderelatededges getfacade isaclassifier getfacade getassociationends hasnext getfacade getassociation getfacade isanaryassociation canaddedge addedge getfacade isageneralizableelement getfacade getgeneralizations hasnext canaddedge addedge getfacade getspecializations hasnext canaddedge addedge getfacade isaassociation getfacade getconnections hasnext associationend canaddedge associationend addedge associationend public void vetoable change property change event pce throws property veto exception if owned element equals pce get property name list old owned list pce get old value object element import pce get new value object model element model get facade get model element element import m model element model element element import get model element if old owned contains element import log debug model removed model element if model get facade isa classifier model element remove node model element if model get facade isa package model element remove node model element if model get facade isa association model element remove edge model element if model get facade isa dependency model element remove edge model element if model get facade isa generalization model element remove edge model element else log debug model added model element vetoablechange propertychangeevent propertyvetoexception ownedelement getpropertyname oldowned getoldvalue elementimport getnewvalue modelelement getfacade getmodelelement elementimport mmodelelement modelelement elementimport getmodelelement oldowned elementimport modelelement getfacade isaclassifier modelelement removenode modelelement getfacade isapackage modelelement removenode modelelement getfacade isaassociation modelelement removeedge modelelement getfacade isadependency modelelement removeedge modelelement getfacade isageneralization modelelement removeedge modelelement modelelement when rerouting an edge this is the first method to be called by selection reroute edge in order to determine whether the graphmodel will allow the change p restricted to class association changes for now param new node this is the new node that one of the ends is dragged to param old node this is the existing node that is already connected param edge this is the edge that is being dragged rerouted return whether or not the rerouting is allowed override public boolean can change connected node object new node object old node object edge prevent no changes if new node old node return false check parameter types if model get facade isa class new node model get facade isa class old node model get facade isa association edge return false return true selectionrerouteedge newnode oldnode canchangeconnectednode newnode oldnode newnode oldnode getfacade isaclass newnode getfacade isaclass oldnode getfacade isaassociation reroutes the connection to the old node to be connected to the new node delegates to reroutexxx for each of the 4 possible edges in a class diagram association dependency generalization link todo this should probably be in superclass many figs can be on several diagram types param new node this is the new node that one of the ends is dragged to param old node this is the existing node that is already connected param edge this is the edge that is being dragged rerouted param is source tells us which end is being rerouted override public void change connected node object new node object old node object edge boolean is source if model get facade isa association edge reroute association new node old node edge is source else if model get facade isa generalization edge reroute generalization new node old node edge is source else if model get facade isa dependency edge reroute dependency new node old node edge is source else if model get facade isa link edge reroute link new node old node edge is source newnode oldnode issource changeconnectednode newnode oldnode issource getfacade isaassociation rerouteassociation newnode oldnode issource getfacade isageneralization reroutegeneralization newnode oldnode issource getfacade isadependency reroutedependency newnode oldnode issource getfacade isalink reroutelink newnode oldnode issource helper method for change connected node todo this should probably be in superclass associations can be on several diagram types private void reroute association object new node object old node object edge boolean is source check param types only some connections are legal uml connections if model get facade isa classifier new node model get facade isa classifier old node return can t have a connection between 2 interfaces get the other end type object other node null if is source other node model get core helper get destination edge else other node model get core helper get source edge if model get facade isa interface new node model get facade isa interface other node return cast the params object edge assoc edge object the end null object the other end null collection connections model get facade get connections edge assoc iterator iter connections iterator if is source rerouting the source the end iter next the other end iter next else rerouting the destination the other end iter next the end iter next set the new end type model get core helper set type the end new node changeconnectednode rerouteassociation newnode oldnode issource getfacade isaclassifier newnode getfacade isaclassifier oldnode othernode issource othernode getcorehelper getdestination othernode getcorehelper getsource getfacade isainterface newnode getfacade isainterface othernode edgeassoc theend theotherend getfacade getconnections edgeassoc issource theend theotherend theotherend theend getcorehelper settype theend newnode helper method for change connected node p empty at the moment private void reroute generalization object new node object old node object edge boolean is source empty at the moment changeconnectednode reroutegeneralization newnode oldnode issource helper method for change connected node p empty at the moment private void reroute dependency object new node object old node object edge boolean is source empty at the moment changeconnectednode reroutedependency newnode oldnode issource helper method for change connected node p empty at the moment private void reroute link object new node object old node object edge boolean is source empty at the moment changeconnectednode reroutelink newnode oldnode issource construct a new fig subactivity state param owner owning uml element param bounds position and size param settings rendering settings public fig history state object owner rectangle bounds diagram settings settings super owner bounds settings init figs figsubactivitystate fighistorystate diagramsettings initfigs main constructor deprecated for 0 27 4 by tfmorris use link fig history state object rectangle diagram settings suppress warnings deprecation deprecated public fig history state init figs fighistorystate diagramsettings suppresswarnings fighistorystate initfigs private void init figs set editable false set big port new fig circle x y width height debug color debug color head new fig circle x y width height line color fill color h new fig text x y width 10 height 10 h set font get settings get font plain h set text geth h set text color text color h set filled false h set line width 0 add figs to the fig node in back to front order add fig get big port add fig head add fig h set blink ports false make port invisible unless mouse enters initfigs seteditable setbigport figcircle debug_color debug_color figcircle line_color fill_color figtext setfont getsettings getfontplain settext settextcolor text_color setfilled setlinewidth fignode addfig getbigport addfig addfig setblinkports the constructor that hooks the fig into the uml modelelement param gm ignored param node the uml element deprecated for 0 27 4 by tfmorris use link fig history state object rectangle diagram settings suppress warnings deprecation deprecated public fig history state suppress warnings unused graph model gm object node this set owner node fighistorystate diagramsettings suppresswarnings fighistorystate suppresswarnings graphmodel setowner override set bounds to keep shapes looking right inherit doc override protected void set standard bounds int x int y int width int height if get name fig null return rectangle old bounds get bounds get big port set bounds x y width height head set bounds x y width height this h set bounds x y width 10 height 10 this h calc bounds calc bounds x x y y w w h h update edges fire prop change bounds old bounds get bounds setbounds inheritdoc setstandardbounds getnamefig oldbounds getbounds getbigport setbounds setbounds setbounds calcbounds calcbounds _x _y _w _h updateedges firepropchange oldbounds getbounds this should return the text shown at the center of the history state return the text at the center h or h see org argouml uml diagram ui fig node model element place string override public string place string return h fignodemodelelement placestring placestring override public object clone fig history state fig clone fig history state super clone iterator it fig clone get figs iterator fig clone set big port fig circle it next fig clone head fig circle it next fig clone h fig text it next return fig clone fighistorystate figclone fighistorystate figclone getfigs figclone setbigport figcircle figclone figcircle figclone figtext figclone history states are fixed size return false override public boolean is resizable return false isresizable see org tigris gef presentation fig set line color java awt color override public void set line color color col head set line color col setlinecolor setlinecolor setlinecolor see org tigris gef presentation fig get line color override public color get line color return head get line color getlinecolor getlinecolor getlinecolor see org tigris gef presentation fig set fill color java awt color override public void set fill color color col head set fill color col setfillcolor setfillcolor setfillcolor see org tigris gef presentation fig get fill color override public color get fill color return head get fill color getfillcolor getfillcolor getfillcolor ignored figure has fixed rendering param f ignored override public void set filled boolean f ignored setfilled override public boolean is filled return true isfilled see org tigris gef presentation fig set line width int override public void set line width int w head set line width w setlinewidth setlinewidth setlinewidth see org tigris gef presentation fig get line width override public int get line width return head get line width getlinewidth getlinewidth getlinewidth see java awt event mouse listener mouse clicked java awt event mouse event override public void mouse clicked mouse event me ignored mouselistener mouseclicked mouseevent mouseclicked mouseevent class constructor param title the title of the help window public help box string title super title dimension scr size toolkit get default toolkit get screen size set location scr size width 2 400 scr size height 2 300 get content pane set layout new border layout 0 0 set size 800 600 panes new j editor pane pages length for int i 0 i pages length i panes i new j editor pane panes i set editable false panes i set size 780 580 panes i add hyperlink listener this url paneurl null try paneurl new url pages i 1 catch malformedurl exception e log warn pages i 0 url malformed pages i 1 if paneurl null try panes i set page paneurl catch io exception e log warn attempted to read a bad url paneurl else log warn couldn t find pages i 0 put the current pane in a scroll pane j scroll pane pane scroll pane new j scroll pane panes i pane scroll pane set vertical scroll bar policy j scroll pane vertical scrollbar always pane scroll pane set preferred size new dimension 800 600 pane scroll pane set minimum size new dimension 400 300 tabs add tab pages i 0 null pane scroll pane pages i 2 get content pane add tabs border layout center helpbox scrsize getdefaulttoolkit getscreensize setlocation scrsize scrsize getcontentpane setlayout borderlayout setsize jeditorpane jeditorpane seteditable setsize addhyperlinklistener malformedurlexception setpage ioexception jscrollpane panescrollpane jscrollpane panescrollpane setverticalscrollbarpolicy jscrollpane vertical_scrollbar_always panescrollpane setpreferredsize panescrollpane setminimumsize addtab panescrollpane getcontentpane borderlayout public void hyperlink update hyperlink event event if event get event type hyperlink event event type activated j editor pane pane j editor pane event get source try pane set page event geturl catch io exception ioe log warn could not fetch requested url hyperlinkupdate hyperlinkevent geteventtype hyperlinkevent eventtype jeditorpane jeditorpane getsource setpage ioexception the constructor param message the uml element public message notation object message if model get facade isa message message throw new illegal argument exception this is not an message messagenotation getfacade isamessage illegalargumentexception public void initialise listener property change listener listener object uml message add element listener listener uml message new string activator predecessor successor sender receiver action name object action model get facade get action uml message if action null add element listener listener action new string remove recurrence script actual argument signal operation list args model get facade get actual arguments action for object argument args add element listener listener argument new string remove value if model get facade isa call action action object operation model get facade get operation action if model get facade isa operation operation add element listener listener operation new string name if model get facade isa send action action object signal model get facade get signal action if model get facade isa signal signal add element listener listener signal new string name initialiselistener propertychangelistener umlmessage addelementlistener umlmessage getfacade getaction umlmessage addelementlistener actualargument getfacade getactualarguments addelementlistener getfacade isacallaction getfacade getoperation getfacade isaoperation addelementlistener getfacade isasendaction getfacade getsignal getfacade isasignal addelementlistener see org argouml ui explorer rules perspective rule get rule name public string get rule name return translator localize misc class associated class perspectiverule getrulename getrulename public collection get children object parent if model get facade isa class parent return model get facade get associated classes parent return collections empty set getchildren getfacade isaclass getfacade getassociatedclasses empty_set public set get dependencies object parent if model get facade isa class parent set set new hash set set add parent return set return collections empty set getdependencies getfacade isaclass hashset empty_set the constructor public dismiss to do item dialog super translator localize dialog title dismiss todo item dialog ok cancel option true j label instr label new j label translator localize label remove item bad goal button new j radio button translator localize button not relevant to my goals bad dec button new j radio button translator localize button not of concern at moment explain button new j radio button translator localize button reason given below bad goal button set mnemonic translator localize button not relevant to my goals mnemonic char at 0 bad dec button set mnemonic translator localize button not of concern at moment mnemonic char at 0 explain button set mnemonic translator localize button reason given below mnemonic char at 0 j panel content new j panel grid bag layout gb new grid bag layout grid bag constraints c new grid bag constraints c fill grid bag constraints both c weightx 1 0 c gridwidth 2 content set layout gb explanation new j text area 6 40 explanation set line wrap true explanation set wrap style word true j scroll pane explain new j scroll pane explanation c gridx 0 c gridy 0 gb set constraints instr label c content add instr label c gridy 1 c insets new insets 5 0 0 0 gb set constraints bad goal button c content add bad goal button c gridy 2 gb set constraints bad dec button c content add bad dec button c gridy 3 gb set constraints explain button c content add explain button c gridy 4 c weighty 1 0 gb set constraints explain c content add explain set content content get ok button add action listener new action listener public void action performed action event e if bad goal button get model is selected bad goal e else if bad dec button get model is selected bad dec e else if explain button get model is selected explain e else log warn dissmiss to do item dialog unknown action e action group new button group action group add bad goal button action group add bad dec button action group add explain button action group set selected explain button get model true explanation set text translator localize label enter rationale here bad goal button add action listener new action listener public void action performed action event e explanation set enabled false bad dec button add action listener new action listener public void action performed action event e explanation set enabled false explain button add action listener new action listener public void action performed action event e explanation set enabled true explanation request focus explanation select all dismisstodoitemdialog ok_cancel_option jlabel instrlabel jlabel badgoalbutton jradiobutton baddecbutton jradiobutton explainbutton jradiobutton badgoalbutton setmnemonic charat baddecbutton setmnemonic charat explainbutton setmnemonic charat jpanel jpanel gridbaglayout gridbaglayout gridbagconstraints gridbagconstraints gridbagconstraints setlayout jtextarea setlinewrap setwrapstyleword jscrollpane jscrollpane setconstraints instrlabel instrlabel setconstraints badgoalbutton badgoalbutton setconstraints baddecbutton baddecbutton setconstraints explainbutton explainbutton setconstraints setcontent getokbutton addactionlistener actionlistener actionperformed actionevent badgoalbutton getmodel isselected badgoal baddecbutton getmodel isselected baddec explainbutton getmodel isselected dissmisstodoitemdialog actiongroup buttongroup actiongroup badgoalbutton actiongroup baddecbutton actiongroup explainbutton actiongroup setselected explainbutton getmodel settext badgoalbutton addactionlistener actionlistener actionperformed actionevent setenabled baddecbutton addactionlistener actionlistener actionperformed actionevent setenabled explainbutton addactionlistener actionlistener actionperformed actionevent setenabled requestfocus selectall get ok button add action listener new action listener public void action performed action event e if bad goal button get model is selected bad goal e else if bad dec button get model is selected bad dec e else if explain button get model is selected explain e else log warn dissmiss to do item dialog unknown action e getokbutton addactionlistener actionlistener actionperformed actionevent badgoalbutton getmodel isselected badgoal baddecbutton getmodel isselected baddec explainbutton getmodel isselected dissmisstodoitemdialog bad goal button add action listener new action listener public void action performed action event e explanation set enabled false badgoalbutton addactionlistener actionlistener actionperformed actionevent setenabled bad dec button add action listener new action listener public void action performed action event e explanation set enabled false baddecbutton addactionlistener actionlistener actionperformed actionevent setenabled explain button add action listener new action listener public void action performed action event e explanation set enabled true explanation request focus explanation select all explainbutton addactionlistener actionlistener actionperformed actionevent setenabled requestfocus selectall param t the new target object to do item public void set target object t target to do item t todoitem settarget todoitem public void set visible boolean b super set visible b if b explanation request focus explanation select all setvisible setvisible requestfocus selectall private void bad goal action event e cat debug bad goal goals dialog d new goals dialog d set visible true badgoal actionevent goalsdialog goalsdialog setvisible private void bad dec action event e cat debug bad decision design issues dialog d new design issues dialog d set visible true baddec actionevent designissuesdialog designissuesdialog setvisible private void explain action event e todo make a new history item to do list list designer the designer get to do list try list explicitly resolve target explanation get text designer fire property change designer model todoitem dismissed null null catch unresolvable exception ure log error resolve failed ure ure j option pane show message dialog this ure get message translator localize optionpane dismiss failed j option pane error message actionevent todolist thedesigner gettodolist explicitlyresolve gettext firepropertychange model_todoitem_dismissed unresolvableexception joptionpane showmessagedialog getmessage joptionpane error_message constructor for prop panel state machine public prop panel state machine this label statemachine lookup icon state machine proppanelstatemachine proppanelstatemachine lookupicon statemachine the constructor param name the title of the properties panel to be shown at the top param icon icon for property panel public prop panel state machine string name image icon icon super name icon initialize proppanelstatemachine imageicon initialize the panel with fields and stuff protected void initialize add field label name get name text field add field label namespace get namespace selector the context in which the statemachine resides uml combo box2 context combo box new uml combo box2 get context combo box model action set context state machine get instance add field label context new uml combo box navigator translator localize label context navigate tooltip context combo box the top state j list top list new uml linked list new uml state machine top list model add field label top state new j scroll pane top list add separator the transitions the statemachine has j list transition list new uml linked list new uml state machine transition list model add field label transition new j scroll pane transition list the submachinestates maybe this should be a mutable linked list but that s for the future to decide j list submachine state list new uml linked list new uml state machine submachine state list model add field label submachinestate new j scroll pane submachine state list add action new action navigate namespace add action new action new stereotype add action get delete action addfield getnametextfield addfield getnamespaceselector umlcombobox2 contextcombobox umlcombobox2 getcontextcomboboxmodel actionsetcontextstatemachine getinstance addfield umlcomboboxnavigator contextcombobox jlist toplist umllinkedlist umlstatemachinetoplistmodel addfield jscrollpane toplist addseparator jlist transitionlist umllinkedlist umlstatemachinetransitionlistmodel addfield jscrollpane transitionlist jlist submachinestatelist umllinkedlist umlstatemachinesubmachinestatelistmodel addfield jscrollpane submachinestatelist addaction actionnavigatenamespace addaction actionnewstereotype addaction getdeleteaction protected uml combo box model2 get context combo box model return new uml state machine context combo box model umlcomboboxmodel2 getcontextcomboboxmodel umlstatemachinecontextcomboboxmodel constructor for prop panel stub state public prop panel stub state super label stub state lookup icon stub state add field label name get name text field add field label container get container scroll j combo box referencestate box new uml combo box2 new uml stub state combo box model action set stub state reference state get instance add field label referencestate new uml combo box navigator translator localize tooltip nav stubstate referencestate box add separator add field label incoming get incoming scroll add field label outgoing get outgoing scroll proppanelstubstate proppanelstubstate lookupicon stubstate addfield getnametextfield addfield getcontainerscroll jcombobox referencestatebox umlcombobox2 umlstubstatecomboboxmodel actionsetstubstatereferencestate getinstance addfield umlcomboboxnavigator referencestatebox addseparator addfield getincomingscroll addfield getoutgoingscroll constructor public uml diagram name document super name umldiagramnamedocument protected void set property string text object target diagram utils get active diagram if target instanceof argo diagram try argo diagram target set name text catch property veto exception e todo what shall we do with the exception setproperty diagramutils getactivediagram argodiagram argodiagram setname propertyvetoexception protected string get property object target diagram utils get active diagram if target instanceof argo diagram return argo diagram target get name return getproperty diagramutils getactivediagram argodiagram argodiagram getname public class init cognitiveui implements init subsystem public void init do nothing initcognitiveui initsubsystem public list abstract argoj panel get details tabs list abstract argoj panel result new array list abstract argoj panel result add new tab to do return result abstractargojpanel getdetailstabs abstractargojpanel arraylist abstractargojpanel tabtodo public list gui settings tab interface get project settings tabs return collections empty list guisettingstabinterface getprojectsettingstabs emptylist public list gui settings tab interface get settings tabs return collections empty list guisettingstabinterface getsettingstabs emptylist public boolean can add node object node if contains node node return false if model get facade isa partition node return true return super can add node node canaddnode containsnode getfacade isapartition canaddnode construct a new property panel for a guard public prop panel guard super label guard lookup icon guard add field label name get name text field add field label transition new j scroll pane get single row scroll new uml guard transition list model add separator j panel expr panel create border panel label expression uml expression model2 expression model new uml expression expression model this expression j text area ebf new uml expression body field expression model true ebf set font look and feel mgr get instance get standard font ebf set rows 1 expr panel add new j scroll pane ebf expr panel add new uml expression language field expression model true add expr panel add action new action navigate transition add action new action new stereotype add action get delete action proppanelguard lookupicon addfield getnametextfield addfield jscrollpane getsinglerowscroll umlguardtransitionlistmodel addseparator jpanel exprpanel createborderpanel umlexpressionmodel2 expressionmodel umlexpressionexpressionmodel jtextarea umlexpressionbodyfield expressionmodel setfont lookandfeelmgr getinstance getstandardfont setrows exprpanel jscrollpane exprpanel umlexpressionlanguagefield expressionmodel exprpanel addaction actionnavigatetransition addaction actionnewstereotype addaction getdeleteaction constructor public action manage profiles super translator localize action manage profiles resource loader wrapper lookup icon action manage profiles set the tooltip string put value action short description translator localize action manage profiles actionmanageprofiles resourceloaderwrapper lookupicon putvalue short_description public void action performed action event e if profiles tab null iterator iter gui get instance get project settings tabs iterator while iter has next gui settings tab interface stp gui settings tab interface iter next if stp instanceof project settings tab profile profiles tab project settings tab profile stp if dialog null dialog new project settings dialog dialog show dialog profiles tab actionperformed actionevent profilestab getinstance getprojectsettingstabs hasnext guisettingstabinterface guisettingstabinterface projectsettingstabprofile profilestab projectsettingstabprofile projectsettingsdialog showdialog profilestab the constructor param operation the operation we represent public operation notation java object operation super operation operationnotationjava public void parse object model element string text argo event pump fire event new argo help event argo event types help changed this parsing in java not yet supported modelelement argoeventpump fireevent argohelpevent argoeventtypes help_changed see org argouml notation providers notation provider get parsing help public string get parsing help return parsing in java not yet supported notationprovider getparsinghelp getparsinghelp override public string to string object model element notation settings settings return to string model element tostring modelelement notationsettings tostring modelelement suppress warnings deprecation deprecated public string to string object model element map args return to string model element suppresswarnings tostring modelelement tostring modelelement private string to string object model element string buffer sb new string buffer 80 string name str null boolean constructor false iterator its model get facade get stereotypes model element iterator string name while its has next object o its next name model get facade get name o if create equals name break if create equals name constructor name str model get facade get name model get facade get owner model element constructor true else name str model get facade get name model element sb append generate concurrency model element sb append generate abstractness model element sb append notation utility java generate changeability model element sb append notation utility java generate scope model element sb append notation utility java generate visibility model element pick out return type collection return params model get core helper get return parameters model element object rp if return params size 0 rp null else rp return params iterator next if return params size 1 log warn java generator only handles one return parameter found return params size for model get facade get name model element if rp null constructor object return type model get facade get type rp if return type null sb append void else sb append notation utility java generate classifier ref return type append name and params list params new array list model get facade get parameters model element params remove rp sb append name str append if params null for int i 0 i params size i if i 0 sb append sb append notation utility java generate parameter params get i sb append collection c model get facade get raised signals model element if c is empty iterator it c iterator boolean first true while it has next object signal it next if model get facade isa exception signal continue if first sb append throws else sb append sb append model get facade get name signal first false return sb to string tostring modelelement stringbuffer stringbuffer namestr getfacade getstereotypes modelelement hasnext getfacade getname namestr getfacade getname getfacade getowner modelelement namestr getfacade getname modelelement generateconcurrency modelelement generateabstractness modelelement notationutilityjava generatechangeability modelelement notationutilityjava generatescope modelelement notationutilityjava generatevisibility modelelement returnparams getcorehelper getreturnparameters modelelement returnparams returnparams returnparams returnparams getfacade getname modelelement returntype getfacade gettype returntype notationutilityjava generateclassifierref returntype arraylist getfacade getparameters modelelement namestr notationutilityjava generateparameter getfacade getraisedsignals modelelement isempty hasnext getfacade isaexception getfacade getname tostring generates synchronized keyword for guarded operations param op the operation return string the synchronized keyword if the operation is guarded else private static string generate concurrency object op if model get facade get concurrency op null model get concurrency kind get guarded equals model get facade get concurrency op return synchronized return generateconcurrency getfacade getconcurrency getconcurrencykind getguarded getfacade getconcurrency generate abstract keyword for an abstract operation param op the operation return the generated string private static string generate abstractness object op if model get facade is abstract op return abstract return generateabstractness getfacade isabstract constructor for uml state machine context list model public uml state machine context list model super context umlstatemachinecontextlistmodel umlstatemachinecontextlistmodel see org argouml uml ui uml model element list model2 build model list protected void build model list remove all elements add element model get facade get context get target umlmodelelementlistmodel2 buildmodellist buildmodellist removeallelements addelement getfacade getcontext gettarget see org argouml uml ui uml model element list model2 is valid element object protected boolean is valid element object element return element model get facade get context get target umlmodelelementlistmodel2 isvalidelement isvalidelement getfacade getcontext gettarget the constructor param model element the modelelement we represent public model element name notation object model element if model get facade isa model element model element throw new illegal argument exception this is not a model element modelelement modelelementnamenotation modelelement getfacade isamodelelement modelelement illegalargumentexception modelelement public void initialise listener property change listener listener object model element listen to the modelelement itself add element listener listener model element new string name visibility listen to name changes in the path usefull for e g package object ns model get facade get namespace model element while ns null model get facade isa model ns add element listener listener ns new string name namespace ns model get facade get namespace ns initialiselistener propertychangelistener modelelement addelementlistener modelelement getfacade getnamespace modelelement getfacade isamodel addelementlistener getfacade getnamespace the constructor deprecated by for 0 27 4 by tfmorris use link abstract fig component object rectangle diagram settings suppress warnings deprecation deprecated public abstract fig component super init figs abstractfigcomponent diagramsettings suppresswarnings abstractfigcomponent initfigs private void init figs cover new fig rect bx 10 default width default height line color fill color upper rect new fig rect 0 2 finger height finger width finger height line color fill color lower rect new fig rect 0 5 finger height finger width finger height line color fill color get name fig set line width 0 get name fig set filled false get name fig set text place string add fig get big port add fig cover add fig get stereotype fig add fig get name fig add fig upper rect add fig lower rect initfigs figrect default_width default_height line_color fill_color upperrect figrect finger_height finger_width finger_height line_color fill_color lowerrect figrect finger_height finger_width finger_height line_color fill_color getnamefig setlinewidth getnamefig setfilled getnamefig settext placestring addfig getbigport addfig addfig getstereotypefig addfig getnamefig addfig upperrect addfig lowerrect construct a new abstract fig component param owner owning uml element param bounds position and size param settings render settings public abstract fig component object owner rectangle bounds diagram settings settings super owner bounds settings init figs abstractfigcomponent abstractfigcomponent diagramsettings initfigs the constructor that hooks the fig into an existing uml element param gm ignored param node the uml element deprecated by for 0 27 4 by tfmorris use link abstract fig component object rectangle diagram settings suppress warnings deprecation deprecated public abstract fig component suppress warnings unused graph model gm object node this set owner node abstractfigcomponent diagramsettings suppresswarnings abstractfigcomponent suppresswarnings graphmodel setowner override public object clone abstract fig component fig clone abstract fig component super clone iterator it fig clone get figs iterator fig clone set big port fig rect it next fig clone cover fig rect it next it next fig clone set name fig fig text it next fig clone upper rect fig rect it next fig clone lower rect fig rect it next return fig clone abstractfigcomponent figclone abstractfigcomponent figclone getfigs figclone setbigport figrect figclone figrect figclone setnamefig figtext figclone upperrect figrect figclone lowerrect figrect figclone override protected void model changed property change event mee super model changed mee if mee instanceof association change event mee instanceof attribute change event rendering changed update listeners get owner get owner damage modelchanged propertychangeevent modelchanged associationchangeevent attributechangeevent renderingchanged updatelisteners getowner getowner override protected void update listeners object old owner object new owner super update listeners old owner new owner if new owner null collection c model get facade get stereotypes new owner iterator i c iterator while i has next object st i next add element listener st name updatelisteners oldowner newowner updatelisteners oldowner newowner newowner getfacade getstereotypes newowner hasnext addelementlistener override public void set line color color c cover set line color c get stereotype fig set filled false get stereotype fig set line width 0 get name fig set filled false get name fig set line width 0 upper rect set line color c lower rect set line color c setlinecolor setlinecolor getstereotypefig setfilled getstereotypefig setlinewidth getnamefig setfilled getnamefig setlinewidth upperrect setlinecolor lowerrect setlinecolor override public dimension get minimum size dimension stereo dim get stereotype fig get minimum size dimension name dim get name fig get minimum size int h math max stereo dim height name dim height overlap 4 finger height int w math max stereo dim width name dim width finger width return new dimension w h getminimumsize stereodim getstereotypefig getminimumsize namedim getnamefig getminimumsize stereodim namedim finger_height stereodim namedim finger_width override protected void set standard bounds int x int y int w int h if get name fig null return rectangle old bounds get bounds get big port set bounds x bx y w bx h cover set bounds x bx y w bx h dimension stereo dim get stereotype fig get minimum size dimension name dim get name fig get minimum size int half height finger height 2 upper rect set bounds x y h 3 half height finger width finger height lower rect set bounds x y 2 h 3 half height finger width finger height get stereotype fig set bounds x finger width 1 y 1 w finger width 2 stereo dim height get name fig set bounds x finger width 1 y stereo dim height overlap 1 w finger width 2 name dim height x x y y w w h h fire prop change bounds old bounds get bounds update edges setstandardbounds getnamefig oldbounds getbounds getbigport setbounds setbounds stereodim getstereotypefig getminimumsize namedim getnamefig getminimumsize halfheight finger_height upperrect setbounds halfheight finger_width finger_height lowerrect setbounds halfheight finger_width finger_height getstereotypefig setbounds finger_width finger_width stereodim getnamefig setbounds finger_width stereodim finger_width namedim _x _y _w _h firepropchange oldbounds getbounds updateedges override public boolean get use trap rect return true getusetraprect override public rectangle get handle box rectangle r get bounds return new rectangle r x bx r y r width bx r height gethandlebox getbounds override public void set handle box int x int y int w int h set bounds x bx y w bx h sethandlebox setbounds see org argouml ui explorer rules perspective rule get rule name public string get rule name return translator localize misc class state machine perspectiverule getrulename getrulename public collection get children object parent if model get facade isa model element parent return model get facade get behaviors parent return collections empty set getchildren getfacade isamodelelement getfacade getbehaviors empty_set public set get dependencies object parent if model get facade isa model element parent set set new hash set set add parent return set return collections empty set getdependencies getfacade isamodelelement hashset empty_set static initializer register all appropriate notations public void init notation provider factory2 npf notation provider factory2 get instance notation name name notation find notation java notation make notation java null resource loader wrapper lookup icon resource java notation npf add notation provider notation provider factory2 type name name model element name notation java class npf add notation provider notation provider factory2 type attribute name attribute notation java class npf add notation provider notation provider factory2 type operation name operation notation java class npf add notation provider notation provider factory2 type association end name name association end name notation java class npf add notation provider notation provider factory2 type association name name association name notation java class notationproviderfactory2 notationproviderfactory2 getinstance notationname findnotation makenotation resourceloaderwrapper lookupiconresource javanotation addnotationprovider notationproviderfactory2 type_name modelelementnamenotationjava addnotationprovider notationproviderfactory2 type_attribute attributenotationjava addnotationprovider notationproviderfactory2 type_operation operationnotationjava addnotationprovider notationproviderfactory2 type_association_end_name associationendnamenotationjava addnotationprovider notationproviderfactory2 type_association_name associationnamenotationjava public list gui settings tab interface get project settings tabs return collections empty list guisettingstabinterface getprojectsettingstabs emptylist public list gui settings tab interface get settings tabs return collections empty list guisettingstabinterface getsettingstabs emptylist public list abstract argoj panel get details tabs return collections empty list abstractargojpanel getdetailstabs emptylist constructor note that this checks if the file name in path and in public reference are the same param the path the system path to the profile file param public reference see link get public reference public profile reference string the path url public reference file file new file the path file file from public reference new file public reference get path assert file get name equals file from public reference get name file name in path and in public reference are different path the path url public reference publicreference thepath publicreference getpublicreference profilereference thepath publicreference thepath filefrompublicreference publicreference getpath getname filefrompublicreference getname publicreference thepath publicreference return the path to the profile being in principle this path the system path to the profile file public string get path return path getpath return the public reference by which the profile will be known in models that depend on it i e this reference will prefix the i ds of the profile model elements referred in the xmi of models that depend on the profile for which the constructed profile reference is used public url get public reference return url ids profilereference getpublicreference private enumeration enumeration public enumeration iterator enumeration e enumeration e enumerationiterator public boolean has next return enumeration has more elements hasnext hasmoreelements public object next return enumeration next element nextelement public void remove throw new unsupported operation exception unsupportedoperationexception constructor public uml container resident list model super resident umlcontainerresidentlistmodel see org argouml uml ui uml model element list model2 build model list protected void build model list set all elements model get facade get residents get target umlmodelelementlistmodel2 buildmodellist buildmodellist setallelements getfacade getresidents gettarget see org argouml uml ui uml model element list model2 is valid element object protected boolean is valid element object o return model get facade isa component o model get facade isa instance o umlmodelelementlistmodel2 isvalidelement isvalidelement getfacade isacomponent getfacade isainstance the constructor param action state the uml action state public action state notation uml object action state super action state actionstate actionstate actionstatenotationuml actionstate actionstate public void parse object model element string text object entry model get facade get entry model element string language if entry null entry model get common behavior factory build uninterpreted action model element else object script model get facade get script entry if script null language model get data types helper get language script object action expression model get data types factory create action expression language text model get common behavior helper set script entry action expression modelelement getfacade getentry modelelement getcommonbehaviorfactory builduninterpretedaction modelelement getfacade getscript getdatatypeshelper getlanguage actionexpression getdatatypesfactory createactionexpression getcommonbehaviorhelper setscript actionexpression see org argouml notation providers notation provider get parsing help public string get parsing help return parsing help fig actionstate notationprovider getparsinghelp getparsinghelp deprecated override public string to string object model element map args return to string model element tostring modelelement tostring modelelement private string to string object model element string ret object action model get facade get entry model element if action null object expression model get facade get script action if expression null ret string model get facade get body expression return ret null ret tostring modelelement getfacade getentry modelelement getfacade getscript getfacade getbody override public string to string object model element notation settings settings return to string model element tostring modelelement notationsettings tostring modelelement the constructor public argo token table super 32 argotokentable protected void setup tokens add token string argo integer value of token argo add token string authorname integer value of token authorname add token string authoremail integer value of token authoremail add token string version integer value of token version add token string description integer value of token description add token string searchpath integer value of token searchpath add token string member integer value of token member add token string historyfile integer value of token historyfile add token string documentation integer value of token documentation add token string settings integer value of token settings add token string notationlanguage integer value of token notationlanguage add token string showboldnames integer value of token showboldnames add token string useguillemots integer value of token useguillemots add token string showvisibility integer value of token showvisibility add token string showmultiplicity integer value of token showmultiplicity add token string hidebidirectionalarrows integer value of token hidebidirectionalarrows add token string showinitialvalue integer value of token showinitialvalue add token string showproperties integer value of token showproperties add token string showtypes integer value of token showtypes add token string showstereotypes integer value of token showstereotypes add token string showsingularmultiplicities integer value of token showsingularmultiplicities add token string defaultshadowwidth integer value of token defaultshadowwidth add token string fontname integer value of token fontname add token string fontsize integer value of token fontsize add token string generation output dir integer value of token generation output dir add token string showassociationnames integer value of token showassociationnames add token string active diagram integer value of token active diagram setuptokens addtoken string_argo valueof token_argo addtoken string_authorname valueof token_authorname addtoken string_authoremail valueof token_authoremail addtoken string_version valueof token_version addtoken string_description valueof token_description addtoken string_searchpath valueof token_searchpath addtoken string_member valueof token_member addtoken string_historyfile valueof token_historyfile addtoken string_documentation valueof token_documentation addtoken string_settings valueof token_settings addtoken string_notationlanguage valueof token_notationlanguage addtoken string_showboldnames valueof token_showboldnames addtoken string_useguillemots valueof token_useguillemots addtoken string_showvisibility valueof token_showvisibility addtoken string_showmultiplicity valueof token_showmultiplicity addtoken string_hidebidirectionalarrows valueof token_hidebidirectionalarrows addtoken string_showinitialvalue valueof token_showinitialvalue addtoken string_showproperties valueof token_showproperties addtoken string_showtypes valueof token_showtypes addtoken string_showstereotypes valueof token_showstereotypes addtoken string_showsingularmultiplicities valueof token_showsingularmultiplicities addtoken string_defaultshadowwidth valueof token_defaultshadowwidth addtoken string_fontname valueof token_fontname addtoken string_fontsize valueof token_fontsize addtoken string_generation_output_dir valueof token_generation_output_dir addtoken string_showassociationnames valueof token_showassociationnames addtoken string_active_diagram valueof token_active_diagram new action add extend extension point constructor for action add extend extension point protected action add extend extension point super actionaddextendextensionpoint actionaddextendextensionpoint actionaddextendextensionpoint override protected void do it collection selected model get use cases helper set extension points get target selected doit getusecaseshelper setextensionpoints gettarget protected list get choices list ret new array list if get target null object extend m extend get target collection c model get facade get extension points model get facade get base extend ret add all c return ret getchoices arraylist gettarget mextend gettarget getfacade getextensionpoints getfacade getbase addall protected string get dialog title return translator localize dialog title add extensionpoints getdialogtitle protected list get selected list ret new array list ret add all model get facade get extension points get target return ret getselected arraylist addall getfacade getextensionpoints gettarget return returns the singleton public static action add extend extension point get instance return singleton actionaddextendextensionpoint getinstance creates a new instance of associations node param p the parent public inheritance node object p parent p associationsnode inheritancenode return the parent node public object get parent return parent getparent see java lang object to string public string to string return inheritance tostring tostring see org argouml ui explorer weak explorer node subsumes java lang object public boolean subsumes object obj return obj instanceof inheritance node weakexplorernode inheritancenode retrieve the version number of the application return the version number public static string get version return version getversion retrieve the online html manual of argouml for a critic you need to append the critic class name this syntax is synchronized with ol li tags in the manual li name of the argouml site li how the manual is deployed on the site ol so this must be updated when any of these change return the url public static string get manual for critic return http argouml stats tigris org documentation manual stable version single argomanual html critics getmanualforcritic stableversion retrieve the url of the online manual of argouml return the url public static string get online manual return http argouml stats tigris org nonav documentation manual stable version getonlinemanual stableversion retrieve the url of the location for online support for argouml return the url public static string get online support return http argouml tigris org nonav support html getonlinesupport don t allow instantiation private application version applicationversion param v the version to set param sv the stable version to set public static void init string v string sv assert version null version v assert stable version null stable version sv stableversion stableversion the constructor param urls an array of urls private import class loader url urls super urls importclassloader try and return the existing instance if one exists return the instance throws malformedurl exception when the url is bad public static import class loader get instance throws malformedurl exception if instance null string path configuration get string argo key user import classpath system get property user dir return get instance getur ls path else return instance malformedurlexception importclassloader getinstance malformedurlexception getstring key_user_import_classpath getproperty getinstance geturls there is no default constructor for url classloader so we should provide urls when creating the instance we create a new instance in this method param urls the ur ls return the instance of this class throws malformedurl exception when the url is bad public static import class loader get instance url urls throws malformedurl exception instance new import class loader urls return instance urlclassloader urls malformedurlexception importclassloader getinstance malformedurlexception importclassloader param f the file to be added throws malformedurl exception when the url is bad public void add file file f throws malformedurl exception addurl f touri tourl malformedurlexception addfile malformedurlexception remove the given file but we can t remove the last file param f the file to be removed public void remove file file f url url null try url f touri tourl catch malformedurl exception e log warn could not remove file e return list url urls new array list url for url u getur ls if url equals u urls add u can t remove the last file if urls size 0 return can t remove from existing one so create new one instance new import class loader url urls to array removefile malformedurlexception arraylist geturls importclassloader toarray add the file for which a path is given param path the path in string format public void set path string path string tokenizer st new string tokenizer path st count tokens while st has more tokens string token st next token try this add file new file token catch malformedurl exception e log warn could not set path e setpath stringtokenizer stringtokenizer counttokens hasmoretokens nexttoken addfile malformedurlexception add the files for which the paths are given and return in url format param path the paths in string format return the ur ls public static url getur ls string path java util list url url list new array list url string tokenizer st new string tokenizer path while st has more tokens string token st next token try url list add new file token touri tourl catch malformedurl exception e log error e url urls new url url list size for int i 0 i urls length i urls i url list get i return urls urls geturls urllist arraylist stringtokenizer stringtokenizer hasmoretokens nexttoken urllist malformedurlexception urllist urllist param paths the paths to the files to be added public void set path object paths for int i 0 i paths length i try this add file new file paths i to string catch exception e log warn could not set path e setpath addfile tostring get the user configured path public void load user path set path configuration get string argo key user import classpath loaduserpath setpath getstring key_user_import_classpath store the user configured path public void save user path configuration set string argo key user import classpath this to string saveuserpath setstring key_user_import_classpath tostring override public string to string url urls this getur ls string builder path new string builder for int i 0 i urls length i path append urls i get file if i urls length 1 path append return path to string tostring geturls stringbuilder stringbuilder getfile tostring public object get child object parent int index if parent instanceof to do list return get goal list get index if parent instanceof goal goal g goal parent list to do item item list designer the designer get to do list get to do item list synchronized item list for to do item item item list if item get poster supports g if index 0 return item index throw new index out of bounds exception get child shouldnt get here go list to goals to items getchild todolist getgoallist todoitem itemlist thedesigner gettodolist gettodoitemlist itemlist todoitem itemlist getposter indexoutofboundsexception getchild golisttogoalstoitems public int get child count object parent if parent instanceof to do list return get goal list size if parent instanceof goal goal g goal parent int count 0 list to do item item list designer the designer get to do list get to do item list synchronized item list for to do item item item list if item get poster supports g count return count return 0 getchildcount todolist getgoallist todoitem itemlist thedesigner gettodolist gettodoitemlist itemlist todoitem itemlist getposter public int get index of child object parent object child if parent instanceof to do list return get goal list index of child if parent instanceof goal instead of making a new list decrement index return when found and index 0 list to do item candidates new array list to do item goal g goal parent list to do item item list designer the designer get to do list get to do item list synchronized item list for to do item item item list if item get poster supports g candidates add item return candidates index of child return 1 getindexofchild todolist getgoallist indexof todoitem arraylist todoitem todoitem itemlist thedesigner gettodolist gettodoitemlist itemlist todoitem itemlist getposter indexof public boolean is leaf object node if node instanceof to do list return false if node instanceof goal get child count node 0 return false return true isleaf todolist getchildcount javax swing tree tree path java lang object public void value for path changed tree path path object new value treepath valueforpathchanged treepath newvalue see javax swing tree tree model add tree model listener javax swing event tree model listener public void add tree model listener tree model listener l treemodel addtreemodellistener treemodellistener addtreemodellistener treemodellistener see javax swing tree tree model remove tree model listener javax swing event tree model listener public void remove tree model listener tree model listener l treemodel removetreemodellistener treemodellistener removetreemodellistener treemodellistener return the goals public list goal get goal list return designer the designer get goal model get goal list getgoallist thedesigner getgoalmodel getgoallist the constructor param ep the represented extensionpoint public extension point notation object ep if model get facade isa extension point ep throw new illegal argument exception this is not an extension point extensionpointnotation getfacade isaextensionpoint illegalargumentexception extensionpoint creates a new diagram interface param editor the editor to operate on public diagram interface editor editor current editor editor layer perspective layer layer perspective editor get layer manager get active layer current project argo diagram layer get diagram get project diagraminterface diagraminterface currenteditor layerperspective layerperspective getlayermanager getactivelayer currentproject argodiagram getdiagram getproject creates a new diagram interface param editor the editor to operate on param project the project being operated on public diagram interface editor editor project project current editor editor diagraminterface diagraminterface currenteditor get the current editor return the current editor editor get editor return current editor geteditor currenteditor mark a diagram as modified so we can layout it after the import is complete p if the diagram is not already marked add it to the list p param diagram the diagram to mark as modified void mark diagram as modified argo diagram diagram if modified diagrams contains diagram modified diagrams add diagram markdiagramasmodified argodiagram modifieddiagrams modifieddiagrams get the list of modified diagrams return the list of modified diagrams public list argo diagram get modified diagram list return modified diagrams argodiagram getmodifieddiagramlist modifieddiagrams reset the list of modified diagrams void reset modified diagrams modified diagrams new array list argo diagram resetmodifieddiagrams modifieddiagrams arraylist argodiagram add a package to the current diagram if the package already has a representation in the current diagram it is not added param new package the package to add public void add package object new package if is in diagram new package if currentgm can add node new package fig package new package fig new fig package new package new rectangle 0 0 0 0 current diagram get diagram settings current layer add new package fig currentgm add node new package current layer put in position new package fig newpackage addpackage newpackage isindiagram newpackage canaddnode newpackage figpackage newpackagefig figpackage newpackage currentdiagram getdiagramsettings currentlayer newpackagefig addnode newpackage currentlayer putinposition newpackagefig check if a given package has a representation in the current diagram param p the package to lookup in the current diagram return true if this package has a figure in the current diagram false otherwise public boolean is in diagram object p if current diagram null return false else return current diagram get nodes contains p isindiagram currentdiagram currentdiagram getnodes check if this diagram already exists in the project p param name package name converted to class name return true if diagram exists in project public boolean is diagram in project string name if current project null throw new runtime exception current project not set yet return current project get diagram get diagram name name null isdiagraminproject currentproject runtimeexception currentproject getdiagram getdiagramname create a diagram name from a package name param package name the package name return the name for the diagram private string get diagram name string package name todo this transformation is java specific we need a more language notation scheme for specifying qualified names possible algorithm replace all punctuation with our internal separator replace multiple separators with a single instance for languages like c what about i18n tfm return package name replace diagram name separator diagram name separator diagram name suffix packagename getdiagramname packagename packagename diagram_name_separator diagram_name_separator diagram_name_suffix select a class diagram as the current diagram creating it if necessary param p the package param name the fully qualified name of this package public void select class diagram object p string name check if this diagram already exists in the project if current project null throw new runtime exception current project not set yet argo diagram m current project get diagram get diagram name name if m null the diagram already exists in this project select it as the current target set current diagram m else otherwise create a new classdiagram for the package add class diagram p name selectclassdiagram currentproject runtimeexception argodiagram currentproject getdiagram getdiagramname setcurrentdiagram addclassdiagram add a new class diagram for a package to the project param ns the namespace to contain the diagram if null the root model will be used param name the fully qualified name of the package which is used to generate the diagram name from public void add class diagram object ns string name if current project null throw new runtime exception current project not set yet argo diagram d diagram factory get instance create diagram diagram factory diagram type class ns null current project get root ns null try d set name get diagram name name catch property veto exception pve log error failed to set diagram name pve current project add member d set current diagram d addclassdiagram currentproject runtimeexception argodiagram diagramfactory getinstance creatediagram diagramfactory diagramtype currentproject getroot setname getdiagramname propertyvetoexception currentproject addmember setcurrentdiagram add a class to the current diagram param new class the new class to add to the editor param minimise minimise the class fig by hiding compartiments of attributes and operations public void add class object new class boolean minimise add classifier new class minimise newclass addclass newclass addclassifier newclass add a classier to the current diagram param classifier the new class or interface to add to the editor param minimise minimise the class fig by hiding compartments of attributes and operations private void add classifier object classifier boolean minimise if the classifier is not in the current diagram add it if currentgm can add node classifier fig classifier box new fig if model get facade isa class classifier new fig new fig class classifier new rectangle 0 0 0 0 current diagram get diagram settings else if model get facade isa interface classifier new fig new fig interface classifier new rectangle 0 0 0 0 current diagram get diagram settings else return the following calls are order dependent not sure why but the layer add must come before the model add or we ll end up with duplicate figures in the diagram tfm current layer add new fig currentgm add node classifier current layer put in position new fig new fig set operations visible minimise if model get facade isa class classifier fig class new fig set attributes visible minimise new fig rendering changed else the class is in the diagram so we are on a second pass find the fig for this class can update its visible state fig classifier box existing fig null list figs current layer get contents no edges for int i 0 i figs size i fig fig fig figs get i if classifier fig get owner existing fig fig classifier box fig existing fig rendering changed add edges for a 2 pass r e process we might have already added the class but not its edges currentgm add node related edges classifier addclassifier canaddnode figclassifierbox newfig getfacade isaclass newfig figclass currentdiagram getdiagramsettings getfacade isainterface newfig figinterface currentdiagram getdiagramsettings currentlayer newfig addnode currentlayer putinposition newfig newfig setoperationsvisible getfacade isaclass figclass newfig setattributesvisible newfig renderingchanged figclassifierbox existingfig currentlayer getcontentsnoedges getowner existingfig figclassifierbox existingfig renderingchanged addnoderelatededges add a interface to the current diagram param new interface the interface to add param minimise minimise the class fig by hiding compartiments of attributes and operations public void add interface object new interface boolean minimise add classifier new interface minimise newinterface addinterface newinterface addclassifier newinterface creates class diagram under the root is used for classes out of packages public void create root class diagram select class diagram null createrootclassdiagram selectclassdiagram selects a diagram without affecting the gui param diagram the diagram public void set current diagram argo diagram diagram if diagram null throw new runtime exception you can t select a null diagram currentgm class diagram graph model diagram get graph model current layer diagram get layer current diagram diagram current project diagram get project mark diagram as modified diagram setcurrentdiagram argodiagram runtimeexception classdiagramgraphmodel getgraphmodel currentlayer getlayer currentdiagram currentproject getproject markdiagramasmodified public class button action new call event extends button action new event protected object create event object ns return model get state machines factory build call event ns buttonactionnewcallevent buttonactionnewevent createevent getstatemachinesfactory buildcallevent protected string get key name return button new callevent getkeyname protected string get icon name return call event geticonname callevent the constructor deprecated for 0 27 3 by tfmorris use link fig abstraction object diagram settings suppress warnings deprecation deprecated public fig abstraction super set dest arrow head create end arrow figabstraction diagramsettings suppresswarnings figabstraction setdestarrowhead createendarrow create the arrow head for the abstraction this overrides the superclass to create a filled arrow head return the arrow head protected arrow head create end arrow final arrow head arrow new arrow head triangle arrow set fill color fill color return arrow arrowhead createendarrow arrowhead arrowheadtriangle setfillcolor fill_color the constructor param edge the owning uml element deprecated for 0 27 3 by tfmorris use link fig abstraction object diagram settings suppress warnings deprecation deprecated public fig abstraction object edge this set owner edge figabstraction diagramsettings suppresswarnings figabstraction setowner construct a fig param owner owning uml element param settings render settings public fig abstraction object owner diagram settings settings super owner settings figabstraction diagramsettings param x location x param y location y param w width param h height param expand only true if fig should never contract deprecated for 0 27 3 by tfmorris use link fig name with abstract and bold object rectangle diagram settings boolean suppress warnings deprecation deprecated public fig name with abstract and bold int x int y int w int h boolean expand only super x y w h expand only expandonly fignamewithabstractandbold diagramsettings suppresswarnings fignamewithabstractandbold expandonly expandonly construct a name fig that shows whether associated item is abstract italics or bold param owner owning uml element param bounds position and size param settings rendering settings param expand only true if fig should never contract public fig name with abstract and bold object owner rectangle bounds diagram settings settings boolean expand only super owner bounds settings expand only expandonly fignamewithabstractandbold diagramsettings expandonly expandonly override protected int get fig font style boolean show bold name get settings is show bold names int bold style show bold name font bold font plain return super get fig font style bold style getfigfontstyle showboldname getsettings isshowboldnames boldstyle showboldname getfigfontstyle boldstyle constructor param edge the fig edge public classdiagram inheritance edge fig edge edge super edge calculate the higher and lower figs high get dest fig node low get source fig node offset 0 classdiagraminheritanceedge figedge getdestfignode getsourcefignode return the vertical offset public int get vertical offset return getv gap 2 10 get offset getverticaloffset getvgap getoffset return the center of the high node public int get center high return int high get location getx high get size width 2 get offset getcenterhigh getlocation getsize getoffset return the center of the low node public int get center low return int low get location getx low get size width 2 get offset getcenterlow getlocation getsize getoffset return the gap with the node one level down public int get down gap return int low get location gety get vertical offset getdowngap getlocation getverticaloffset see org argouml uml diagram layout layouted edge layout layout the edges in a way that they form a nice inheritance tree try to implement these nice zigzag lines between classes and works well when the row difference is one author markus klink since 0 9 6 public void layout now we construct the zig zag inheritance line get underlying fig fig fig get underlying fig int center high get center high int center low get center low the amount of the sidestep int difference center high center low if center points are close enough we just adjust the endpoints of the line a little bit otherwise we add a jog in the middle to deal with the offset todo epsilon is currently fixed but could probably be computed dynamically as 10 of the width of the narrowest figure or some other value which is visually not noticeable if math abs difference epsilon fig add point center low difference 2 difference 2 int low get location gety fig add point center high difference 2 high get location y high get size height else fig add point center low int low get location gety if log is debug enabled log debug point x center low y low get location y get underlying fig add point center high difference get down gap get underlying fig add point center high get down gap if log is debug enabled log debug point x center high difference y get down gap log debug point x center high y get down gap fig add point center high high get location y high get size height if log is debug enabled log debug point x center high y high get location y high get size height fig set filled false get current edge set fig get underlying fig current edge set between nearest points false layoutededge getunderlyingfig getunderlyingfig centerhigh getcenterhigh centerlow getcenterlow centerhigh centerlow addpoint centerlow getlocation addpoint centerhigh getlocation getsize addpoint centerlow getlocation isdebugenabled centerlow getlocation getunderlyingfig addpoint centerhigh getdowngap getunderlyingfig addpoint centerhigh getdowngap isdebugenabled centerhigh getdowngap centerhigh getdowngap addpoint centerhigh getlocation getsize isdebugenabled centerhigh getlocation getsize setfilled getcurrentedge setfig getunderlyingfig currentedge setbetweennearestpoints set the line offset for this edge param an offset the offset to use for this edge public void set offset int an offset offset an offset anoffset setoffset anoffset anoffset return line offset for this edge public int get offset return offset getoffset the constructor param c the category param d the description public check item string c string d set category c set description d checkitem setcategory setdescription the constructor param c the category param d the description param m the more info url param p the predicate deprecated for 0 26 by tfmorris use link check item string string string predicate suppress warnings deprecation deprecated public check item string c string d string m org tigris gef util predicate p this c d set more infourl m predicate new predicate gef wrapper p checkitem suppresswarnings checkitem setmoreinfourl predicategefwrapper the constructor param c the category param d the description param m the more info url param p the predicate public check item string c string d string m predicate p this c d set more infourl m predicate p checkitem setmoreinfourl return the category public string get category return category getcategory public string get category return category param c the category public void set category string c category c getcategory setcategory public void set category string c category c return the description public string get description return description setcategory getdescription param dm the design material return the description public string get description object dm return expand description dm getdescription return expand description dm param d the description public void set description string d description d setdescription public void set description string d description d return the more info url public string get more infourl return more infourl setdescription getmoreinfourl moreinfourl public string get more infourl return more infourl param m the more info url public void set more infourl string m more infourl m getmoreinfourl moreinfourl setmoreinfourl moreinfourl return the gef predicate deprecated for 0 26 by tfmorris use link get predicate2 suppress warnings deprecation deprecated public org tigris gef util predicate get predicate if predicate instanceof predicate gef wrapper return predicate gef wrapper predicate get gef predicate throw new illegal state exception mixing legacy api and new api is not supported please update your code getpredicate2 suppresswarnings getpredicate predicategefwrapper predicategefwrapper getgefpredicate illegalstateexception return the predicate public predicate get predicate2 return predicate getpredicate2 param p the predicate deprecated for 0 27 3 by tfmorris use link check item set predicate predicate suppress warnings deprecation deprecated public void set predicate org tigris gef util predicate p predicate new predicate gef wrapper p checkitem setpredicate suppresswarnings setpredicate predicategefwrapper param p the predicate public void set predicate predicate p predicate p setpredicate see java lang object hash code override public int hash code return get description hash code hashcode hashcode getdescription hashcode override public boolean equals object o if o instanceof check item return false check item i check item o return get description equals i get description checkitem checkitem checkitem getdescription getdescription see java lang object to string override public string to string return get description tostring tostring getdescription customize expand the description string just before it is displayed i e add offender specific information to the description string e g its name param desc the description param dm the design material return the description the constructor public to do by offender super combobox todo perspective offender add sub tree model new go list to offender to item todobyoffender addsubtreemodel golisttooffendertoitem public void to do items changed to do list event tde log debug to do items changed list to do item items tde get to do item list object path new object 2 path 0 designer the designer get to do list list set all offenders designer the designer get to do list get offenders synchronized all offenders for object off all offenders path 1 off int n matching items 0 synchronized items for to do item item items list set offenders item get offenders if offenders contains off continue n matching items if n matching items 0 continue int child indices new int n matching items object children new object n matching items n matching items 0 synchronized items for to do item item items list set offenders item get offenders if offenders contains off continue child indices n matching items get index of child off item children n matching items item n matching items fire tree nodes changed this path child indices children todoitemschanged todolistevent todoitemschanged todoitem gettodoitemlist thedesigner gettodolist listset alloffenders thedesigner gettodolist getoffenders alloffenders alloffenders nmatchingitems todoitem listset getoffenders nmatchingitems nmatchingitems childindices nmatchingitems nmatchingitems nmatchingitems todoitem listset getoffenders childindices nmatchingitems getindexofchild nmatchingitems nmatchingitems firetreenodeschanged childindices public void to do items added to do list event tde log debug to do item added list to do item items tde get to do item list object path new object 2 path 0 designer the designer get to do list list set all offenders designer the designer get to do list get offenders synchronized all offenders for object off all offenders path 1 off int n matching items 0 todo this first loop just to count the items appears redundant to me tfm 20070630 synchronized items for to do item item items list set offenders item get offenders if offenders contains off continue n matching items if n matching items 0 continue int child indices new int n matching items object children new object n matching items n matching items 0 synchronized items for to do item item items list set offenders item get offenders if offenders contains off continue child indices n matching items get index of child off item children n matching items item n matching items fire tree nodes inserted this path child indices children todoitemsadded todolistevent todoitemadded todoitem gettodoitemlist thedesigner gettodolist listset alloffenders thedesigner gettodolist getoffenders alloffenders alloffenders nmatchingitems todoitem listset getoffenders nmatchingitems nmatchingitems childindices nmatchingitems nmatchingitems nmatchingitems todoitem listset getoffenders childindices nmatchingitems getindexofchild nmatchingitems nmatchingitems firetreenodesinserted childindices public void to do items removed to do list event tde log debug to do item removed list to do item items tde get to do item list object path new object 2 path 0 designer the designer get to do list list set all offenders designer the designer get to do list get offenders synchronized all offenders for object off all offenders boolean any in off false synchronized items for to do item item items list set offenders item get offenders todo this looks o n 2 if offenders contains off any in off true break if any in off continue log debug to do item removed updating priority node path 1 off fire tree nodes changed this path child indices children fire tree structure changed path todoitemsremoved todolistevent todoitemremoved todoitem gettodoitemlist thedesigner gettodolist listset alloffenders thedesigner gettodolist getoffenders alloffenders alloffenders anyinoff todoitem listset getoffenders anyinoff anyinoff todoitemremoved prioritynode firetreenodeschanged childindices firetreestructurechanged see org argouml cognitive to do list listener to do list changed org argouml cognitive to do list event public void to do list changed to do list event tde todolistlistener todolistchanged todolistevent todolistchanged todolistevent the constructor param f the fig public selection classifier role fig f super f selectionclassifierrole make sure that the north facing handles cannot be dragged as part of a resize inherit doc public void drag handle int mx int my int anx int any handle hand if get content is resizable return switch hand index case handle northwest case handle north case handle northeast return default super drag handle mx my anx any hand inheritdoc draghandle getcontent isresizable draghandle override protected object get new node int index return null getnewnode override protected icon get icons return null geticons override protected string get instructions int index return null getinstructions override protected object get new edge type int index return null getnewedgetype override protected object get new node type int index return null getnewnodetype constructor for uml message predecessor list model public uml message predecessor list model super predecessor umlmessagepredecessorlistmodel umlmessagepredecessorlistmodel protected void build model list object message get target remove all elements iterator it model get facade get predecessors message iterator while it has next add element it next buildmodellist gettarget removeallelements getfacade getpredecessors hasnext addelement protected boolean is valid element object elem return model get facade isa message elem model get facade get interaction elem model get facade get interaction get target model get facade get activator elem model get facade get activator get target isvalidelement getfacade isamessage getfacade getinteraction getfacade getinteraction gettarget getfacade getactivator getfacade getactivator gettarget return unique instance public static ocl expression evaluator get instance if instance null instance new default ocl evaluator return instance oclexpressionevaluator getinstance defaultoclevaluator public object evaluate map string object vt model interpreter mi string ocl throws invalid ocl exception xxx this seems to be a bug of the parser it always requires a context log debug ocl ocl if ocl contains ore todo convert this to some sensible logging system out println voila lexer lexer new lexer new pushback reader new string reader context x inv ocl 2 ocl parser parser new ocl parser lexer start tree null try tree parser parse catch exception e throw new invalid ocl exception ocl evaluate expression ee new evaluate expression vt mi tree apply ee return ee get value modelinterpreter invalidoclexception pushbackreader stringreader oclparser oclparser invalidoclexception evaluateexpression evaluateexpression getvalue construct a default property panel for an action public prop panel action sequence this label action sequence lookup icon action sequence proppanelactionsequence lookupicon actionsequence construct an action sequence property panel with the given name and icon param name the name of the properties panel param icon the icon to be shown next to the name public prop panel action sequence string name image icon icon super name icon initialize actionsequence proppanelactionsequence imageicon the initialization of the panel with its fields and stuff public void initialize add field translator localize label name get name text field j list actions list new uml mutable linked list new uml action sequence action list model new action add action null new new action remove action true j list actions list new uml action sequence action list actions list set visible row count 5 actions scroll new j scroll pane actions list add field translator localize label actions actions scroll add action new action navigate container element add action new action new stereotype add action get delete action addfield getnametextfield jlist actionslist umlmutablelinkedlist umlactionsequenceactionlistmodel actionaddaction actionremoveaction jlist actionslist umlactionsequenceactionlist actionslist setvisiblerowcount actionsscroll jscrollpane actionslist addfield actionsscroll addaction actionnavigatecontainerelement addaction actionnewstereotype addaction getdeleteaction constructor public uml action sequence action list model super action umlactionsequenceactionlistmodel protected void build model list if get target null set all elements model get facade get actions get target buildmodellist gettarget setallelements getfacade getactions gettarget see org argouml uml ui uml model element list model2 is valid element java lang object protected boolean is valid element object element return model get facade isa action element umlmodelelementlistmodel2 isvalidelement isvalidelement getfacade isaaction protected void move down int index object target get target list c model get facade get actions target if index c size 1 object item c get index model get common behavior helper remove action target item model get common behavior helper add action target index 1 item movedown gettarget getfacade getactions getcommonbehaviorhelper removeaction getcommonbehaviorhelper addaction see org argouml uml ui uml model element ordered list model2 move to bottom int override protected void move to bottom int index object target get target list c model get facade get actions target if index c size 1 object item c get index model get common behavior helper remove action target item model get common behavior helper add action target c size item umlmodelelementorderedlistmodel2 movetobottom movetobottom gettarget getfacade getactions getcommonbehaviorhelper removeaction getcommonbehaviorhelper addaction see org argouml uml ui uml model element ordered list model2 move to top int override protected void move to top int index object target get target list c model get facade get actions target if index 0 object item c get index model get common behavior helper remove action target item model get common behavior helper add action target 0 item umlmodelelementorderedlistmodel2 movetotop movetotop gettarget getfacade getactions getcommonbehaviorhelper removeaction getcommonbehaviorhelper addaction construct an action to remove an action public action remove action super translator localize menu popup remove actionremoveaction override public void action performed action event e super action performed e object action get object to remove if action null object as get target if model get facade isa action sequence as model get common behavior helper remove action as action actionperformed actionevent actionperformed getobjecttoremove gettarget getfacade isaactionsequence getcommonbehaviorhelper removeaction construct a default object with a new uml action sequence action list model public uml action sequence action list super new uml action sequence action list model umlactionsequenceactionlistmodel umlactionsequenceactionlist umlactionsequenceactionlistmodel see org argouml uml ui uml mutable linked list get popup menu override public j popup menu get popup menu return new popup menu new action action new action roles member this umlmutablelinkedlist getpopupmenu jpopupmenu getpopupmenu popupmenunewaction actionnewaction constructs a new popupmenu the given parameter role determines what the purpose is of the actions that can be created via this popupmenu the parameter must comply to the interface roles defined on action new action param role the role param list the list public popup menu new action sequence action string role uml mutable linked list list super j menu new menu new j menu new menu set text translator localize action new new menu add action new call action get instance action new call action get instance set target list get target action new call action get instance put value action new action role role add new menu add separator action remove model element singleton set object to remove action new action get action role list get target add action remove model element singleton actionnewaction popupmenunewactionsequenceaction umlmutablelinkedlist jmenu newmenu jmenu newmenu settext newmenu actionnewcallaction getinstance actionnewcallaction getinstance settarget gettarget actionnewcallaction getinstance putvalue actionnewaction newmenu addseparator actionremovemodelelement setobjecttoremove actionnewaction getaction gettarget actionremovemodelelement public class init activity diagram implements init subsystem public list abstract argoj panel get details tabs return collections empty list initactivitydiagram initsubsystem abstractargojpanel getdetailstabs emptylist public list gui settings tab interface get project settings tabs return collections empty list guisettingstabinterface getprojectsettingstabs emptylist public list gui settings tab interface get settings tabs return collections empty list guisettingstabinterface getsettingstabs emptylist public void init set up the property panels for activity diagrams prop panel factory diagram factory new activity diagram prop panel factory prop panel factory manager add prop panel factory diagram factory proppanelfactory diagramfactory activitydiagramproppanelfactory proppanelfactorymanager addproppanelfactory diagramfactory constructor public uml instance sender stimulus list model todo not sure this is the right event name it was stimuli3 which was left over from uml 1 3 and definitely won t work tfm 20061108 super stimulus umlinstancesenderstimuluslistmodel see org argouml uml ui uml model element list model2 build model list protected void build model list remove all elements add element model get facade get sent stimuli get target umlmodelelementlistmodel2 buildmodellist buildmodellist removeallelements addelement getfacade getsentstimuli gettarget see org argouml uml ui uml model element list model2 is valid element object protected boolean is valid element object element return model get facade get sent stimuli get target contains element umlmodelelementlistmodel2 isvalidelement isvalidelement getfacade getsentstimuli gettarget construct a new classdiagram node representing the given fig param f represents the figure in the diagram that peers this layout node public classdiagram node fig node f set figure f classdiagramnode classdiagramnode fignode setfigure add a new downlinked node to this node param new downlink the node to be added with a dowlink public void add downlink classdiagram node new downlink downlinks add new downlink newdownlink adddownlink classdiagramnode newdownlink newdownlink add a constant to the rank of this node param n the value to add public void add rank int n set rank n get rank addrank setrank getrank add an uplink to this node param new uplink represents the new uplinks public void add uplink classdiagram node new uplink uplinks add new uplink newuplink adduplink classdiagramnode newuplink newuplink calculate the weight of this node the function distinguishes between note nodes and standard nodes because a note should be positioned to the right of its first related node if it exists therefor the weight is a function of the weight of the related node for standard nodes the weight is a function of up downlinks column and uplink factor return the weight of this node public float calculate weight weight 0 for classdiagram node node uplinks weight math max weight node get weight uplink factor 1 1 math max 1 node get column uplink factor weight get subtree weight 1 math max 1 get column uplink factor return weight calculateweight classdiagramnode getweight uplink_factor getcolumn uplink_factor getsubtreeweight getcolumn uplink_factor the natural order for classdiagram nodes is defined by the following order ul li first standalone then linked nodes li first packages then interfaces classes notes li increasing rank rownumber li decreasing weight li name of model object li increasing hashcode for uniqueness ul see java lang comparable compare to java lang object public int compare to object arg0 classdiagram node node classdiagram node arg0 int result 0 result boolean value of node is standalone compare to boolean value of is standalone if result 0 result this get type order numer node get type order numer if result 0 result this get rank node get rank if result 0 result int math signum node get weight this get weight if result 0 result string value of this get figure get owner compare to string value of node get figure get owner if result 0 result node hash code this hash code log debug result node1 this node2 node return result classdiagramnodes compareto compareto classdiagramnode classdiagramnode valueof isstandalone compareto valueof isstandalone gettypeordernumer gettypeordernumer getrank getrank getweight getweight valueof getfigure getowner compareto valueof getfigure getowner hashcode hashcode return the column of this node public int get column return column getcolumn return the downlinks of this node public list classdiagram node get down nodes return downlinks classdiagramnode getdownnodes get the offset which shall be used for edges with this node as parent return the offset public int get edge offset return edge offset getedgeoffset edgeoffset get the underlying figure of this node return the figure public fig node get figure return figure fignode getfigure get the level in the inheritance hierarchy for this node return the level public int get level int result 0 for classdiagram node node uplinks result node this result math max node get level 1 result return result getlevel classdiagramnode getlevel get the location of the underlying figure in the diagram return the location public point get location return get figure get location getlocation getfigure getlocation get the current placement hint x coordinate in the row return the placement hint for this node public int get placement hint return placement hint getplacementhint placementhint return the rank for this node public int get rank return rank norank get level rank getrank getlevel return the size of the figure associated with this layout node return the size of the associated figure public dimension get size return get figure get size getsize getfigure getsize get the weight of the subtree defined by this node impact on weight is decreasing with increasing hierarchical distance return the weight of the subtree private float get subtree weight float w 1 for classdiagram node node downlinks w node get subtree weight uplink factor return w getsubtreeweight classdiagramnode getsubtreeweight uplink_factor get the type order number of this node this number may be used to influence the sort order of classdiagram nodes return type order number public int get type order numer int result 99 if get figure instanceof fig package result 0 else if get figure instanceof fig interface result 1 return result classdiagramnodes gettypeordernumer getfigure figpackage getfigure figinterface get the uplinks of this node return the uplinks of this node public list classdiagram node get up nodes return uplinks classdiagramnode getupnodes return the weight of this node which is used for positioning in a row return the weight of this node public float get weight return weight getweight check if this node is associated with a note return result of test public boolean is comment return get figure instanceof fig comment iscomment getfigure figcomment check if this node is associated with a package return result of test public boolean is package return get figure instanceof fig package ispackage getfigure figpackage test whether this node has no connection to other nodes return code true code if node has no connections code false code otherwise return result of test public boolean is standalone return uplinks is empty downlinks is empty isstandalone isempty isempty set the column of this node a re calculation of the weight is performed because the column is an input parameter for the weight param new column the new column public void set column int new column column new column calculate weight newcolumn setcolumn newcolumn newcolumn calculateweight set the offset for edges to this node param new offset offset for edges with this node as one endpoint public void set edge offset int new offset edge offset new offset newoffset setedgeoffset newoffset edgeoffset newoffset set the fig represented by this node param new figure represents the new value of figure public void set figure fig node new figure figure new figure newfigure setfigure fignode newfigure newfigure set the location of the fig associated with this node param new location represents the new location for this figure suppress warnings unchecked public void set location point new location point old location get figure get location get figure set location new location int x trans new location x old location x int y trans new location y old location y for fig fig list fig get figure get enclosed figs fig translate x trans y trans newlocation suppresswarnings setlocation newlocation oldlocation getfigure getlocation getfigure setlocation newlocation xtrans newlocation oldlocation ytrans newlocation oldlocation getfigure getenclosedfigs xtrans ytrans a placementhint gives an indication where it might be feasible to place this node it is used by the layouter and there is no guarantee that it will be used param hint x coordinate of the desired placement public void set placement hint int hint placement hint hint setplacementhint placementhint set the rank param new rank represents the new value of rank public void set rank int new rank rank new rank newrank setrank newrank newrank set the weight for this node param w the new weight of this node public void set weight float w weight w setweight extends classdiagram edge the constructor param edge the fig edge public classdiagram note edge fig edge edge super edge classdiagramedge classdiagramnoteedge figedge note edges are drawn directly between the linked nodes using vertically centered points on the right resp left hand side of the nodes see org argouml uml diagram static structure layout classdiagram edge layout public void layout use left and right up and down fig fs get source fig node fig fd get dest fig node if fs get location x fd get location x add points fs fd else add points fd fs fig poly fig get underlying fig fig set filled false get current edge set fig fig noteedges static_structure classdiagramedge getsourcefignode getdestfignode getlocation getlocation addpoints addpoints figpoly getunderlyingfig setfilled getcurrentedge setfig add points to the underlying fig poly param fs source fig of this edge param fd destination fig of this edge private void add points fig fs fig fd fig poly fig get underlying fig point p fs get location p translate fs get width fs get height 2 fig add point p p fd get location p translate 0 fd get height 2 fig add point p figpoly addpoints figpoly getunderlyingfig getlocation getwidth getheight addpoint getlocation getheight addpoint constructor for action new action protected action new action super actionnewaction actionnewaction implementors should create a concrete action like a call action in this method return object callaction public void action performed action event e super action performed e object action create action if get value role equals roles exit model get state machines helper set exit get target action else if get value role equals roles entry model get state machines helper set entry get target action else if get value role equals roles do model get state machines helper set do activity get target action else if get value role equals roles action model get collaborations helper set action get target action else if get value role equals roles effect model get state machines helper set effect get target action else if get value role equals roles member model get common behavior helper add action get target action target manager get instance set target action actionperformed actionevent actionperformed createaction getvalue getstatemachineshelper setexit gettarget getvalue getstatemachineshelper setentry gettarget getvalue getstatemachineshelper setdoactivity gettarget getvalue getcollaborationshelper setaction gettarget getvalue getstatemachineshelper seteffect gettarget getvalue getcommonbehaviorhelper addaction gettarget targetmanager getinstance settarget param role the role the action plays param t the transition or state to get the action for return the action public static object get action string role object t if role equals roles exit return model get facade get exit t else if role equals roles entry return model get facade get entry t else if role equals roles do return model get facade get do activity t else if role equals roles action return model get facade get action t else if role equals roles effect return model get facade get effect t else if role equals roles member return model get facade get actions t return null getaction getfacade getexit getfacade getentry getfacade getdoactivity getfacade getaction getfacade geteffect getfacade getactions see javax swing plaf metal metal theme get name public string get name return large fonts metaltheme getname getname see javax swing plaf metal metal theme get primary1 protected colorui resource get primary1 return primary1 metaltheme getprimary1 coloruiresource getprimary1 see javax swing plaf metal metal theme get primary2 protected colorui resource get primary2 return primary2 metaltheme getprimary2 coloruiresource getprimary2 see javax swing plaf metal metal theme get primary3 protected colorui resource get primary3 return primary3 metaltheme getprimary3 coloruiresource getprimary3 see javax swing plaf metal metal theme get secondary1 protected colorui resource get secondary1 return secondary1 metaltheme getsecondary1 coloruiresource getsecondary1 see javax swing plaf metal metal theme get secondary2 protected colorui resource get secondary2 return secondary2 metaltheme getsecondary2 coloruiresource getsecondary2 see javax swing plaf metal metal theme get secondary3 protected colorui resource get secondary3 return secondary3 metaltheme getsecondary3 coloruiresource getsecondary3 see javax swing plaf metal metal theme get control text font public fontui resource get control text font return control font metaltheme getcontroltextfont fontuiresource getcontroltextfont controlfont see javax swing plaf metal metal theme get system text font public fontui resource get system text font return system font metaltheme getsystemtextfont fontuiresource getsystemtextfont systemfont see javax swing plaf metal metal theme get user text font public fontui resource get user text font return user font metaltheme getusertextfont fontuiresource getusertextfont userfont see javax swing plaf metal metal theme get menu text font public fontui resource get menu text font return control font metaltheme getmenutextfont fontuiresource getmenutextfont controlfont see javax swing plaf metal metal theme get sub text font public fontui resource get sub text font return small font metaltheme getsubtextfont fontuiresource getsubtextfont smallfont see javax swing plaf metal metal theme get window title font public fontui resource get window title font return window title font metaltheme getwindowtitlefont fontuiresource getwindowtitlefont windowtitlefont constructor for uml classifier feature list model public uml class operation list model super feature umlclassifierfeaturelistmodel umlclassoperationlistmodel protected void build model list if get target null list ops and receps model get facade get operations and receptions get target set all elements ops and receps buildmodellist gettarget opsandreceps getfacade getoperationsandreceptions gettarget setallelements opsandreceps see org argouml uml ui uml model element list model2 is valid element object protected boolean is valid element object element return model get facade get operations and receptions get target contains element umlmodelelementlistmodel2 isvalidelement isvalidelement getfacade getoperationsandreceptions gettarget protected void move down int index1 int index2 index1 1 object clss get target list c model get facade get operations and receptions clss if index1 c size 1 object op1 c get index1 object op2 c get index2 list f model get facade get features clss index2 f index of op2 model get core helper remove feature clss op1 model get core helper add feature clss index2 op1 movedown gettarget getfacade getoperationsandreceptions getfacade getfeatures indexof getcorehelper removefeature getcorehelper addfeature see org argouml uml ui uml model element ordered list model2 move to bottom int override protected void move to bottom int index object clss get target list c model get facade get operations and receptions clss if index c size 1 object mem1 c get index model get core helper remove feature clss mem1 model get core helper add feature clss c size 1 mem1 umlmodelelementorderedlistmodel2 movetobottom movetobottom gettarget getfacade getoperationsandreceptions getcorehelper removefeature getcorehelper addfeature see org argouml uml ui uml model element ordered list model2 move to top int override protected void move to top int index object clss get target list c model get facade get operations and receptions clss if index 0 object mem1 c get index model get core helper remove feature clss mem1 model get core helper add feature clss 0 mem1 umlmodelelementorderedlistmodel2 movetotop movetotop gettarget getfacade getoperationsandreceptions getcorehelper removefeature getcorehelper addfeature item listener focus listener key listener public style panel fig association class itemlistener focuslistener keylistener stylepanelfigassociationclass bounding box is editable although this is style panel for an fig edge model element override protected void has editable bounding box boolean value super has editable bounding box true figedgemodelelement haseditableboundingbox haseditableboundingbox override protected void set targetb box fig target get panel target can t do anything if we don t have a fig if target null return parse the boundary box text null is returned if it is empty or invalid which causes no change otherwise we tell gef we are making a change make the change and tell gef we ve finished rectangle bounds parseb box if bounds null return get class box because we will set it s bounding box rectangle old association bounds target get bounds if fig association class target get association class null target fig association class target get association class if target get bounds equals bounds old association bounds equals bounds target set bounds bounds x bounds y bounds width bounds height target end trans settargetbbox getpaneltarget parsebbox oldassociationbounds getbounds figassociationclass getassociationclass figassociationclass getassociationclass getbounds oldassociationbounds setbounds endtrans override public void refresh super refresh the boundary box as held in the target fig and as listed in the boundary box style field null if we don t have anything valid fig target get panel target get class box because we will set it s bounding box in text field if fig association class target get association class null target fig association class target get association class rectangle fig bounds target get bounds rectangle style bounds parseb box only reset the text if the two are not the same i e the fig has moved rather than we ve just edited the text when set targetb box will have made them the same note that style bounds could be null so we do the test this way round if fig bounds equals style bounds getb box field set text fig bounds x fig bounds y fig bounds width fig bounds height getpaneltarget figassociationclass getassociationclass figassociationclass getassociationclass figbounds getbounds stylebounds parsebbox settargetbbox stylebounds figbounds stylebounds getbboxfield settext figbounds figbounds figbounds figbounds main constructor deprecated for 0 27 3 by tfmorris use link fig association role object diagram settings suppress warnings deprecation deprecated public fig association role super messages new fig message group add path item messages new path item placement this messages 50 10 figassociationrole diagramsettings suppresswarnings figassociationrole figmessagegroup addpathitem pathitemplacement constructor for fig association role param edge the owning uml element param lay the layer deprecated for 0 27 3 by tfmorris use link fig association role object diagram settings suppress warnings deprecation deprecated public fig association role object edge layer lay this set layer lay set owner edge figassociationrole figassociationrole diagramsettings suppresswarnings figassociationrole setlayer setowner construct an association role fig with the given onwer and render settings param owner owning uml element param settings render settings public fig association role object owner diagram settings settings super owner settings messages new fig message group owner settings add path item messages new path item placement this messages 50 10 associationrole figassociationrole diagramsettings figmessagegroup addpathitem pathitemplacement see org argouml uml diagram ui fig edge model element get notation provider type protected int get notation provider type return notation provider factory2 type association role figedgemodelelement getnotationprovidertype getnotationprovidertype notationproviderfactory2 type_association_role param message the message to be added public void add message fig message message messages add fig message update path item locations messages damage addmessage figmessage addfig updatepathitemlocations override public void compute route impl super compute route impl messages update arrows computerouteimpl computerouteimpl updatearrows constructor for fig message group deprecated for 0 27 3 by tfmorris use link fig message group object diagram settings suppress warnings deprecation deprecated public fig message group super figmessagegroup figmessagegroup diagramsettings suppresswarnings figmessagegroup constructor for fig message group param figs deprecated for 0 27 3 by tfmorris use link fig message group object diagram settings suppress warnings deprecation deprecated public fig message group list argo fig figs super figs figmessagegroup figmessagegroup diagramsettings suppresswarnings figmessagegroup argofig the constructor param owner the uml message object param settings rendering properties public fig message group object owner diagram settings settings super owner settings figmessagegroup diagramsettings private void update fig positions collection figs get figs the figs that make up this group iterator it figs iterator if figs is empty fig message previous fig null for int i 0 it has next i fig message fig message fig message it next int y if i 0 y previous fig gety previous fig get height 5 else y gety fig message set location getx y fig message end trans previous fig fig message updatefigpositions getfigs isempty figmessage previousfig hasnext figmessage figmessage figmessage previousfig previousfig getheight figmessage setlocation figmessage endtrans previousfig figmessage public void calc bounds super calc bounds collection figs get figs if figs is empty fig last null fig first null x first getx y first gety w 0 iterator it figs iterator int size figs size for int i 0 i size i fig fig fig it next if i 0 first fig if i size 1 last fig if fig get width w w fig get width h last gety last get height first gety else w 0 h 0 calcbounds calcbounds getfigs isempty _x _y _w getwidth _w _w getwidth _h getheight _w _h override public void add fig fig f super add fig f update fig positions update arrows calc bounds addfig addfig updatefigpositions updatearrows calcbounds void update arrows for fig message fm list fig message get figs fm update arrow updatearrows figmessage figmessage getfigs updatearrow construct a property panel for a element residence public prop panel element residence super label element residence lookup icon element residence add get visibility panel add separator add field translator localize label container get single row scroll new element residence container list model add field translator localize label resident get single row scroll new element residence resident list model add action new action navigate container element add action get delete action elementresidence proppanelelementresidence lookupicon elementresidence getvisibilitypanel addseparator addfield getsinglerowscroll elementresidencecontainerlistmodel addfield getsinglerowscroll elementresidenceresidentlistmodel addaction actionnavigatecontainerelement addaction getdeleteaction constructor for element residence container list model public element residence container list model super container elementresidencecontainerlistmodel elementresidencecontainerlistmodel protected void build model list if get target null remove all elements add element model get facade get container get target buildmodellist gettarget removeallelements addelement getfacade getcontainer gettarget protected boolean is valid element object element return model get facade isa element residence get target isvalidelement getfacade isaelementresidence gettarget constructor for element residence resident list model public element residence resident list model super resident elementresidenceresidentlistmodel elementresidenceresidentlistmodel protected void build model list if get target null remove all elements add element model get facade get resident get target buildmodellist gettarget removeallelements addelement getfacade getresident gettarget protected boolean is valid element object element return model get facade isa element residence get target isvalidelement getfacade isaelementresidence gettarget default constructor will become protected all subclasses should have their constructors invoke the 3 arg version of the constructor deprecated for 0 27 2 by tfmorris use link uml diagram string object graph model or another explicit constructor suppress warnings deprecation deprecated public uml diagram super umldiagram graphmodel suppresswarnings umldiagram param ns the uml namespace of this diagram deprecated for 0 27 2 by tfmorris use link uml diagram string object graph model deprecated public uml diagram object ns this if model get facade isa namespace ns throw new illegal argument exception todo should we require a graph model in the constructor since our implementations of set namespace are going to try and set the namespace on the graphmodel as well set namespace ns umldiagram graphmodel umldiagram getfacade isanamespace illegalargumentexception graphmodel setnamespace setnamespace param name the name of the diagram param ns the uml namespace of this diagram deprecated for 0 27 2 by tfmorris use link uml diagram string object graph model deprecated public uml diagram string name object ns this ns try set name name catch property veto exception pve log fatal name not allowed in construction of diagram umldiagram graphmodel umldiagram setname propertyvetoexception construct a new argouml diagram this is the fully specified form of the constructor typically used by subclasses param name the name of the new diagram param graph model graph model to associate with diagram param ns the namespace which will own the diagram public uml diagram string name object ns graph model graph model super name graph model new layer perspective name graph model set namespace ns graphmodel umldiagram graphmodel graphmodel graphmodel layerperspective graphmodel setnamespace construct an unnamed diagram using the given graph model param graph model graph model to associate with diagram public uml diagram graph model graph model super graph model new layer perspective graph model graphmodel graphmodel umldiagram graphmodel graphmodel graphmodel layerperspective graphmodel method called by pgml parser during diagram load to initialize a diagram after it s been constructed order of method invocations currently is ul li 0 arg constructor li set diagram settings li initialize object uml element representing owner home model li set name string li set scale double li set show single multiplicity boolean ul param owner uml model element representing owner namespace home model see org tigris gef base diagram initialize java lang object override public void initialize object owner super initialize owner the following is the default implementation for diagrams of which the owner is a namespace if model get facade isa namespace owner set namespace owner setdiagramsettings setname setscale setshowsinglemultiplicity getfacade isanamespace setnamespace public string get class and modelid string s super get class and modelid if get owner null return s string id uuid helper getuuid get owner return s id getclassandmodelid getclassandmodelid getowner uuidhelper getowner get the toolbar for the diagram return the diagram toolbar public j tool bar getj tool bar if tool bar null init tool bar tool bar set name misc toolbar diagram return tool bar jtoolbar getjtoolbar toolbar inittoolbar toolbar setname toolbar create the toolbar based on actions for the specific diagram subclass see org tigris gef base diagram init tool bar public void init tool bar tool bar factory factory new tool bar factory get actions factory set rollover true factory set floatable false tool bar factory create tool bar tool bar put client property tool bar tool tip select tool translator localize action select inittoolbar inittoolbar toolbarfactory toolbarfactory getactions setrollover setfloatable toolbar createtoolbar toolbar putclientproperty toolbar tooltipselecttool return actions available for building toolbar or similar return an array of available actions public object get actions object manipulate actions get manipulate actions object uml actions get uml actions object comment actions get comment actions object shape actions get shape actions object actions new object manipulate actions length uml actions length comment actions length shape actions length int posn 0 system arraycopy manipulate actions source 0 source position actions destination posn destination position manipulate actions length number of objects to be copied posn manipulate actions length system arraycopy uml actions 0 actions posn uml actions length posn uml actions length system arraycopy comment actions 0 actions posn comment actions length posn comment actions length system arraycopy shape actions 0 actions posn shape actions length return actions getactions manipulateactions getmanipulateactions umlactions getumlactions commentactions getcommentactions shapeactions getshapeactions manipulateactions umlactions commentactions shapeactions manipulateactions manipulateactions manipulateactions umlactions umlactions umlactions commentactions commentactions commentactions shapeactions shapeactions implement in the ancestor to get a structure of actions for appending the uml creation tools to the toolbar return the actions structure get a structure of actions for appending the manipulation mode tools to the toolbar return the actions structure private object get manipulate actions object actions new radio action action select new radio action action broom null return actions getmanipulateactions radioaction actionselect radioaction actionbroom get a structure of actions for appending the comment tools to the toolbar return the actions structure private object get comment actions object actions null action comment action comment link return actions getcommentactions actioncomment actioncommentlink get a structure of actions for appending primitive drawing tools to the toolbar return the actions structure private object get shape actions object actions null get shape popup actions return actions getshapeactions getshapepopupactions get a structure of actions for showing in the shape primitives popup tool button return the actions structure private object get shape popup actions object actions action rectangle actionr rectangle action circle action line action text action poly action spline action ink tool bar utility manage default actions diagram shape return actions getshapepopupactions actionrectangle actionrrectangle actioncircle actionline actiontext actionpoly actionspline actionink toolbarutility managedefault set the given action as the selected action ie pressed down on the diagram toolbar all other actions become unselected param the action the action to become selected public void set selected action action the action selected action the action int tool count tool bar get component count for int i 0 i tool count i component c tool bar get component i if c instanceof tool button tool button tb tool button c action action tb get real action if action instanceof radio action action radio action action get action action other action the action if the action instanceof radio action other action radio action the action get action if action null action equals other action tb set selected false button model bm tb get model bm set rollover false bm set selected false bm set armed false bm set pressed false if tool bar manager always use standard rollover tb set border painted false else tb set selected true button model bm tb get model bm set rollover true if tool bar manager always use standard rollover tb set border painted true theaction setselectedaction theaction selectedaction theaction toolcount toolbar getcomponentcount toolcount toolbar getcomponent toolbutton toolbutton toolbutton getrealaction radioaction radioaction getaction otheraction theaction theaction radioaction otheraction radioaction theaction getaction otheraction setselected buttonmodel getmodel setrollover setselected setarmed setpressed toolbarmanager alwaysusestandardrollover setborderpainted setselected buttonmodel getmodel setrollover toolbarmanager alwaysusestandardrollover setborderpainted get the selected action return the selected action public action get selected action return selected action getselectedaction selectedaction unselect all the toolbar buttons public void deselect all tools set selected action action select action select action performed null deselectalltools setselectedaction actionselect actionselect actionperformed factory method to build an action for creating a node in the diagram param model element identifies the model element type to make param descr the description to give this action return the action to create a new node protected action make create node action object model element string descr return new radio action new cmd create node model element descr modelelement makecreatenodeaction modelelement radioaction cmdcreatenode modelelement factory method to build an action for creating an edge in the diagram param model element identifies the model element type to make param descr the description to give this action return the action to create a new node protected action make create edge action object model element string descr return new radio action new action set mode mode create poly edge class edge class model element descr modelelement makecreateedgeaction modelelement radioaction actionsetmode modecreatepolyedge edgeclass modelelement factory method to build an action for creating an edge in the diagram param mode class the mode class to instantiate drawing param meta type identifies the model element type to make param descr the description to give this action return the action to create a new node protected action make create dependency action class mode class object meta type string descr return new radio action new action set mode mode class edge class meta type descr modeclass metatype makecreatedependencyaction modeclass metatype radioaction actionsetmode modeclass edgeclass metatype factory method to build an action for creating an edge in the diagram return the action to create a new generalization mode protected action make create generalization action return new radio action new action set mode mode create generalization class edge class model get meta types get generalization button new generalization makecreategeneralizationaction radioaction actionsetmode modecreategeneralization edgeclass getmetatypes getgeneralization factory method to build an action for creating an association edge in the diagram param aggregation kind the type of aggregation for this association param unidirectional true if this is a one way association param descr the description to give this action return the action to create a new association protected action make create association action object aggregation kind boolean unidirectional string descr return new radio action new action set add association mode aggregation kind unidirectional descr aggregationkind makecreateassociationaction aggregationkind radioaction actionsetaddassociationmode aggregationkind factory method to build an action for creating an association end edge in the diagram param descr the description to give this action return the action to create a new association protected action make create association end action string descr return new radio action new action set add association end mode descr makecreateassociationendaction radioaction actionsetaddassociationendmode factory method to build an action for creating an edge in the diagram param descr the description to give this action return the action to create a new node protected action make create association class action string descr return new radio action new action set add association class mode descr makecreateassociationclassaction radioaction actionsetaddassociationclassmode reset the diagram serial counter to the initial value this should e g be done when the menuitem file new is activated deprecated for 0 27 3 by tfmorris this is a noop diagram name duplication is checked for and managed at the project level deprecated public void reset diagram serial resetdiagramserial return returns the diagram serial deprecated for 0 27 3 by tfmorris this is always returns 1 diagram naming is managed at the project level deprecated protected int get next diagram serial return 1 diagramserial getnextdiagramserial return a string that can be used as a label for this kind of diagram public abstract string get label name getlabelname see org argouml ui explorer relocatable is relocation allowed java lang object public abstract boolean is relocation allowed object base isrelocationallowed isrelocationallowed see org argouml ui explorer relocatable relocate java lang object public abstract boolean relocate object base override public final void set project project p super set project p uml mutable graph support gm uml mutable graph support get graph model gm set project p setproject setproject umlmutablegraphsupport umlmutablegraphsupport getgraphmodel setproject create a new diagram name return string protected string get new diagram name todo add unnamed or new or something localized of course return unnamed get label name getnewdiagramname getlabelname method to test it the diagram can accept a certain object this should be overridden by any diagram that wants to accept a certain type of object all other diagrams should not bother since the default answer is false ie don t accept the object param object to accept the object which acceptability will be checked return true if it can accept it false otherwise public boolean does accept suppress warnings unused object object to accept return false objecttoaccept doesaccept suppresswarnings objecttoaccept handles elements dropped over param dropped object the dropped object param location the location in the diagram where the object is dropped return the object that has been added to the diagram suppress warnings unused public fig node drop object dropped object point location return null droppedobject suppresswarnings fignode droppedobject gets the instructions to be displayed on the status bar param dropped object the object for which instructions will be given return the instructions public string get instructions object dropped object return translator localize misc message click on diagram to add new object model get facade to string dropped object droppedobject getinstructions droppedobject getfacade tostring droppedobject creates a diagram specific see org tigris gef base mode place that allows the diagram to place an accepted type of object see does accept object as it should this is required 1 since a diagram may receive an object that can t be placed as is but needs some transformation and 2 diagrams in modules should be independent from the main app and should use their own implementation of mode place if it s required param gf todo param instructions a help string for the user return the created mode place public mode place get mode place graph factory gf string instructions return new mode place gf instructions modeplace doesaccept modeplace modeplace modeplace getmodeplace graphfactory modeplace create a nary association diamond shaped fig node on this diagram param model element the model element this fig node is to represent param bounds the position and size for the diamond node param settings the diagram setting for presentation return the fig node of the diamond representing the model element protected fig node create nary association node final object model element final rectangle bounds final diagram settings settings final fig node association diamond fig new fig node association model element bounds settings if model get facade isa association class model element bounds null final fig class association class class box fig new fig class association class model element bounds settings final fig edge association class dash edge fig new fig edge association class class box fig diamond fig settings class box fig rendering changed todo why isn t this calculation for location working point location bounds get location location y location y diamond fig get height 32 if location y 16 location y 16 class box fig set location location this add diamond fig this add class box fig this add dash edge fig return diamond fig fignode modelelement fignode fignode fignode createnaryassociationnode modelelement diagramsettings fignodeassociation diamondfig fignodeassociation modelelement getfacade isaassociationclass modelelement figclassassociationclass classboxfig figclassassociationclass modelelement figedgeassociationclass dashedgefig figedgeassociationclass classboxfig diamondfig classboxfig renderingchanged getlocation diamondfig getheight classboxfig setlocation diamondfig classboxfig dashedgefig diamondfig constructor public action activity diagram super action activity diagram actionactivitydiagram create the diagram param namespace the namespace in which to create the diagram return the newly created and initialized diagram protected argo diagram create diagram object namespace object context target manager get instance get model target if model get activity graphs helper is adding activity graph allowed context model get model management helper is read only context context namespace object graph model get activity graphs factory build activity graph context return diagram factory get instance create diagram diagram factory diagram type activity model get facade get namespace graph graph argodiagram creatediagram targetmanager getinstance getmodeltarget getactivitygraphshelper isaddingactivitygraphallowed getmodelmanagementhelper isreadonly getactivitygraphsfactory buildactivitygraph diagramfactory getinstance creatediagram diagramfactory diagramtype getfacade getnamespace see org argouml ui explorer rules perspective rule get rule name public string get rule name return translator localize misc profileconfiguration profile perspectiverule getrulename getrulename public collection get children object parent if parent instanceof profile configuration return profile configuration parent get profiles return collections empty set getchildren profileconfiguration profileconfiguration getprofiles empty_set see org argouml ui explorer rules perspective rule get dependencies java lang object public set get dependencies object parent todo what return collections empty set perspectiverule getdependencies getdependencies empty_set the constructor settings tab preferences set layout new border layout j panel top new j panel top set layout new grid bag layout grid bag constraints check constraints new grid bag constraints check constraints anchor grid bag constraints line start check constraints gridy 0 check constraints gridx 0 check constraints gridwidth 1 check constraints gridheight 1 check constraints insets new insets 4 10 0 10 check constraints gridy 2 j check box j new j check box translator localize label splash chk splash j top add chk splash check constraints check constraints gridy j check box j2 new j check box translator localize label reload recent chk reload recent j2 top add chk reload recent check constraints check constraints gridy j check box j3 new j check box translator localize label strip diagrams chk strip diagrams j3 top add chk strip diagrams check constraints check constraints fill grid bag constraints horizontal add top border layout north settingstabpreferences setlayout borderlayout jpanel jpanel setlayout gridbaglayout gridbagconstraints checkconstraints gridbagconstraints checkconstraints gridbagconstraints line_start checkconstraints checkconstraints checkconstraints checkconstraints checkconstraints checkconstraints jcheckbox jcheckbox chksplash chksplash checkconstraints checkconstraints jcheckbox jcheckbox chkreloadrecent chkreloadrecent checkconstraints checkconstraints jcheckbox jcheckbox chkstripdiagrams chkstripdiagrams checkconstraints checkconstraints gridbagconstraints borderlayout public void handle settings tab refresh chk splash set selected configuration get boolean argo key splash true chk reload recent set selected configuration get boolean argo key reload recent project false chk strip diagrams set selected configuration get boolean argo key xmi strip diagrams false handlesettingstabrefresh chksplash setselected getboolean key_splash chkreloadrecent setselected getboolean key_reload_recent_project chkstripdiagrams setselected getboolean key_xmi_strip_diagrams public void handle settings tab save configuration set boolean argo key splash chk splash is selected configuration set boolean argo key reload recent project chk reload recent is selected configuration set boolean argo key xmi strip diagrams chk strip diagrams is selected handlesettingstabsave setboolean key_splash chksplash isselected setboolean key_reload_recent_project chkreloadrecent isselected setboolean key_xmi_strip_diagrams chkstripdiagrams isselected see gui settings tab interface handle settings tab cancel public void handle settings tab cancel handle settings tab refresh guisettingstabinterface handlesettingstabcancel handlesettingstabcancel handlesettingstabrefresh see org argouml ui gui settings tab interface handle reset to default public void handle reset to default do nothing these buttons are not shown guisettingstabinterface handleresettodefault handleresettodefault see gui settings tab interface get tab panel public j panel get tab panel return this guisettingstabinterface gettabpanel jpanel gettabpanel see gui settings tab interface get tab key public string get tab key return tab preferences guisettingstabinterface gettabkey gettabkey the use of this method in the top level package prevents that the subsystem would depend on the gui param subsystem the subsystem to be initialised static void init subsystem init subsystem subsystem subsystem init for gui settings tab interface tab subsystem get settings tabs gui get instance add settings tab tab for gui settings tab interface tab subsystem get project settings tabs gui get instance add project settings tab tab for abstract argoj panel tab subsystem get details tabs all tabs are added at the end except a tab to do target details pane project browser get instance get details pane add tab tab tab instanceof tab to do target initsubsystem initsubsystem guisettingstabinterface getsettingstabs getinstance addsettingstab guisettingstabinterface getprojectsettingstabs getinstance addprojectsettingstab abstractargojpanel getdetailstabs tabtodotarget detailspane projectbrowser getinstance getdetailspane addtab tabtodotarget constructor for uml include list model param event name the name of the event to listen to which triggers us to update the list model from the uml data public uml include list model string event name super event name model get pump add class model event listener this model get meta types get namespace owned element umlincludelistmodel eventname umlincludelistmodel eventname eventname getpump addclassmodeleventlistener getmetatypes getnamespace ownedelement protected void build model list if is empty remove all elements buildmodellist isempty removeallelements see org argouml uml ui uml model element list model2 is valid element java lang object protected boolean is valid element object element return model get facade isa use case element umlmodelelementlistmodel2 isvalidelement isvalidelement getfacade isausecase public class button action new signal event extends button action new event protected object create event object ns return model get state machines factory build signal event ns buttonactionnewsignalevent buttonactionnewevent createevent getstatemachinesfactory buildsignalevent protected string get key name return button new signalevent getkeyname protected string get icon name return signal event geticonname signalevent org argouml application api abstract argoj panel the constructor deprecated public abstract argoj panel super abstractargojpanel abstractargojpanel the constructor param title the name as a localized string deprecated public abstract argoj panel string title super title abstractargojpanel the constructor param title the name a localized string param t if true remove tab from parent j tabbed pane deprecated public abstract argoj panel string title boolean t super title t jtabbedpane abstractargojpanel static initializer register all appropriate critics public void init public list gui settings tab interface get project settings tabs return collections empty list guisettingstabinterface getprojectsettingstabs emptylist public list gui settings tab interface get settings tabs return collections empty list guisettingstabinterface getsettingstabs emptylist public list abstract argoj panel get details tabs return collections empty list abstractargojpanel getdetailstabs emptylist public class project factory private project factory super projectfactory projectfactory create a new empty project return a new not initialised project public project create project return new project impl createproject projectimpl create a project with the given uri as its location param uri the uri to use as the name location of the project return a newly created project public project create project uri uri return new project impl uri createproject projectimpl public static project factory get instance return instance projectfactory getinstance constructor for uml stub state combo box model public uml stub state combo box model super stubstate true umlstubstatecomboboxmodel umlstubstatecomboboxmodel protected boolean is valid element object element return model get facade isa state vertex element model get facade isa concurrent region element model get facade get name element null isvalidelement getfacade isastatevertex getfacade isaconcurrentregion getfacade getname protected void build model list remove all elements object state machine null if model get facade isa submachine state model get facade get container get target state machine model get facade get submachine model get facade get container get target if state machine null array list v array list model get state machines helper get all possible subvertices model get facade get top state machine array list v2 array list v clone iterator it v2 iterator while it has next object o it next if is valid element o v remove o set elements v buildmodellist removeallelements statemachine getfacade isasubmachinestate getfacade getcontainer gettarget statemachine getfacade getsubmachine getfacade getcontainer gettarget statemachine arraylist arraylist getstatemachineshelper getallpossiblesubvertices getfacade gettop statemachine arraylist arraylist hasnext isvalidelement setelements protected object get selected model element string object name null object container null if get target null object name model get facade get reference state get target container model get facade get container get target if container null model get facade isa submachine state container model get facade get submachine container null return model get state machines helper get stateby name object name model get facade get top model get facade get submachine container return null getselectedmodelelement objectname gettarget objectname getfacade getreferencestate gettarget getfacade getcontainer gettarget getfacade isasubmachinestate getfacade getsubmachine getstatemachineshelper getstatebyname objectname getfacade gettop getfacade getsubmachine the constructor since this constructor does not set the necessary instructions textfield label and default value it is private private wiz step text field instructions set editable false instructions set wrap style word true instructions set border null instructions set background get main panel get background get main panel set border new etched border grid bag layout gb new grid bag layout get main panel set layout gb grid bag constraints c new grid bag constraints c ipadx 3 c ipady 3 c weightx 0 0 c weighty 0 0 c anchor grid bag constraints east todo should have an image of a wizard or some logo j label image new j label image set margin new insets 0 0 0 0 image set icon get wizard icon image set border null c gridx 0 c gridheight 4 c gridy 0 gb set constraints image c get main panel add image c weightx 1 0 c gridx 2 c gridheight 1 c gridwidth 3 c gridy 0 c fill grid bag constraints horizontal gb set constraints instructions c get main panel add instructions c gridx 1 c gridy 1 c weightx 0 0 c gridwidth 1 c fill grid bag constraints none spacer panel spacer new spacer panel gb set constraints spacer c get main panel add spacer c gridx 2 c gridy 2 c weightx 0 0 c gridwidth 1 gb set constraints label c get main panel add label c weightx 1 0 c fill grid bag constraints horizontal c gridx 3 c gridy 2 gb set constraints field c get main panel add field c gridx 1 c gridy 3 c gridheight grid bag constraints remainder spacer panel spacer2 new spacer panel gb set constraints spacer2 c mainpanel add spacer2 field get document add document listener this wizsteptextfield seteditable setwrapstyleword setborder setbackground getmainpanel getbackground getmainpanel setborder etchedborder gridbaglayout gridbaglayout getmainpanel setlayout gridbagconstraints gridbagconstraints gridbagconstraints jlabel jlabel setmargin seticon getwizardicon setborder setconstraints getmainpanel gridbagconstraints setconstraints getmainpanel gridbagconstraints spacerpanel spacerpanel setconstraints getmainpanel setconstraints getmainpanel gridbagconstraints setconstraints getmainpanel gridbagconstraints spacerpanel spacerpanel setconstraints _mainpanel getdocument adddocumentlistener the constructor param w the wizard ignored param instr the instructions param lab the label for the textfield param val the initial value for the textfield public wiz step text field wizard w string instr string lab string val this store wizard instructions set text instr label set text lab field set text val wizsteptextfield settext settext settext return the resulting text public string get text return field get text gettext gettext no arguments constructor public j link button this null null null jlinkbutton constructor param action the action to perform upon the button being hit public j link button action action this set action action jlinkbutton setaction param text the button label param icon the icon to be shown in the button param url the url that will be linked from the button public j link button string text icon icon url url super text icon link behavior system default link color color blue color pressed color red visited link color new color 128 0 128 if text null url null set text url to external form set linkurl url set cursor cursor get predefined cursor 12 set border painted false set content area filled false set rollover enabled true add action listener default action jlinkbutton linkbehavior system_default linkcolor colorpressed visitedlinkcolor settext toexternalform setlinkurl setcursor getpredefinedcursor setborderpainted setcontentareafilled setrolloverenabled addactionlistener defaultaction override public void updateui setui basic link buttonui createui this basiclinkbuttonui override public string getui classid return link buttonui getuiclassid linkbuttonui protected void setup tool tip text string tip null if buttonurl null tip buttonurl to external form set tool tip text tip setuptooltiptext toexternalform settooltiptext int get link behavior return link behavior getlinkbehavior linkbehavior color get link color return link color getlinkcolor linkcolor color get active link color return color pressed getactivelinkcolor colorpressed color get disabled link color return disabled link color getdisabledlinkcolor disabledlinkcolor color get visited link color return visited link color getvisitedlinkcolor visitedlinkcolor url get linkurl return buttonurl getlinkurl void set linkurl url url url url old buttonurl buttonurl url setup tool tip text fire property change linkurl url old url revalidate repaint setlinkurl urlold setuptooltiptext firepropertychange urlold boolean is link visited return is link visited islinkvisited islinkvisited protected string param string string str if link behavior always underline str always underline else if link behavior hover underline str hover underline else if link behavior never underline str never underline else str system default string color str link color null link color to string string color press str color pressed null color pressed to string string disabled link color str disabled link color null disabled link color to string string visited link color str visited link color null visited link color to string string buttonurl str buttonurl null buttonurl to string string is link visited str is link visited true false return super param string link behavior str linkurl buttonurl str link color color str active link color color press str disabled link color disabled link color str visited link color visited link color str linkvisited string is link visited str paramstring linkbehavior always_underline always_underline linkbehavior hover_underline hover_underline linkbehavior never_underline never_underline system_default colorstr linkcolor linkcolor tostring colorpressstr colorpressed colorpressed tostring disabledlinkcolorstr disabledlinkcolor disabledlinkcolor tostring visitedlinkcolorstr visitedlinkcolor visitedlinkcolor tostring buttonurlstr tostring islinkvisitedstr islinkvisited paramstring linkbehavior buttonurlstr linkcolor colorstr activelinkcolor colorpressstr disabledlinkcolor disabledlinkcolorstr visitedlinkcolor visitedlinkcolorstr linkvisitedstring islinkvisitedstr private static final basic link buttonui ui new basic link buttonui basic link buttonui basiclinkbuttonui basiclinkbuttonui basiclinkbuttonui public static componentui createui j component jcomponent return ui jcomponent protected void paint text graphics g j component com rectangle rect string s j link button bn j link button com button model bn model bn get model bn get foreground if bn model is enabled if bn model is pressed bn set foreground bn get active link color else if bn is link visited bn set foreground bn get visited link color else bn set foreground bn get link color else if bn get disabled link color null bn set foreground bn get disabled link color super paint text g com rect s int behaviour bn get link behavior boolean draw line false if behaviour j link button hover underline if bn model is rollover draw line true else if behaviour j link button always underline behaviour j link button system default draw line true if draw line return font metrics fm g get font metrics int x rect x get text shift offset int y rect y fm get ascent fm get descent get text shift offset 1 if bn model is enabled g set color bn get foreground g draw line x y x rect width 1 y else g set color bn get background brighter g draw line x y x rect width 1 y painttext jcomponent jlinkbutton jlinkbutton buttonmodel bnmodel getmodel getforeground bnmodel isenabled bnmodel ispressed setforeground getactivelinkcolor islinkvisited setforeground getvisitedlinkcolor setforeground getlinkcolor getdisabledlinkcolor setforeground getdisabledlinkcolor painttext getlinkbehavior drawline jlinkbutton hover_underline bnmodel isrollover drawline jlinkbutton always_underline jlinkbutton system_default drawline drawline fontmetrics getfontmetrics gettextshiftoffset getascent getdescent gettextshiftoffset bnmodel isenabled setcolor getforeground drawline setcolor getbackground drawline the constructor public go list to offender to item set list predicate org argouml util predicate new predicate not in trash golisttooffendertoitem setlistpredicate predicatenotintrash see javax swing tree tree model get child java lang object int public object get child object parent int index todo this should only be building list up to index return get children list parent get index treemodel getchild getchild getchildrenlist see javax swing tree tree model get child count java lang object public int get child count object parent return get children list parent size treemodel getchildcount getchildcount getchildrenlist java lang object java lang object public int get index of child object parent object child return get children list parent index of child getindexofchild getchildrenlist indexof public boolean is leaf object node if node instanceof to do list return false todo this is a very expensive way to do this if get child count node 0 return false list to do item item list designer the designer get to do list get to do item list synchronized item list for to do item item item list if item get offenders contains node return false return true isleaf todolist getchildcount todoitem itemlist thedesigner gettodolist gettodoitemlist itemlist todoitem itemlist getoffenders get a list of children note that unlike its predecessor get children this never returns null if there are no children it will return an empty list param parent the parent object to check return a list of children for the given object public list to do item get children list object parent if parent equals last parent return cached children list last parent parent list set to do item all offenders new list set to do item list set to do item designer offenders designer the designer get to do list get offenders synchronized designer offenders all offenders add all elements such that designer offenders get predicate if parent instanceof to do list cached children list all offenders return cached children list otherwise parent must be an offending design material if all offenders contains parent list to do item result new array list to do item list to do item item list designer the designer get to do list get to do item list synchronized item list for to do item item item list list set offs new list set offs add all elements such that item get offenders get predicate if offs contains parent result add item cached children list result return cached children list cached children list collections empty list return cached children list getchildren todoitem getchildrenlist lastparent cachedchildrenlist lastparent listset todoitem alloffenders listset todoitem listset todoitem designeroffenders thedesigner gettodolist getoffenders designeroffenders alloffenders addallelementssuchthat designeroffenders getpredicate todolist cachedchildrenlist alloffenders cachedchildrenlist alloffenders todoitem arraylist todoitem todoitem itemlist thedesigner gettodolist gettodoitemlist itemlist todoitem itemlist listset listset addallelementssuchthat getoffenders getpredicate cachedchildrenlist cachedchildrenlist cachedchildrenlist emptylist cachedchildrenlist javax swing tree tree path java lang object public void value for path changed tree path path object new value treepath valueforpathchanged treepath newvalue see javax swing tree tree model add tree model listener javax swing event tree model listener public void add tree model listener tree model listener l treemodel addtreemodellistener treemodellistener addtreemodellistener treemodellistener see javax swing tree tree model remove tree model listener javax swing event tree model listener public void remove tree model listener tree model listener l treemodel removetreemodellistener treemodellistener removetreemodellistener treemodellistener the constructor param component instance the uml component instance public component instance notation uml object component instance super component instance componentinstance componentinstance componentinstancenotationuml componentinstance componentinstance parse a line of the form name base component p the base component part is a comma separated list of components p note that stereotypes are not supported inherit doc public void parse object model element string text strip any trailing semi colons string s text trim if s length 0 return if s char at s length 1 s s substring 0 s length 2 string name string bases string tokenizer tokenizer null if s index of 0 1 name s substring 0 s index of trim bases s substring s index of 1 trim else name s tokenizer new string tokenizer bases list object classifiers new array list object object ns model get facade get namespace model element if ns null while tokenizer has more elements string new base tokenizer next token object cls model get facade lookup in ns new base trim if cls null classifiers add cls model get common behavior helper set classifiers model element classifiers model get core helper set name model element name inheritdoc modelelement charat stringtokenizer indexof indexof indexof stringtokenizer arraylist getfacade getnamespace modelelement hasmoreelements newbase nexttoken getfacade lookupin newbase getcommonbehaviorhelper setclassifiers modelelement getcorehelper setname modelelement see org argouml notation providers notation provider get parsing help public string get parsing help return parsing help fig componentinstance notationprovider getparsinghelp getparsinghelp suppress warnings deprecation deprecated public string to string object model element map args return to string model element suppresswarnings tostring modelelement tostring modelelement private string to string object model element string name str if model get facade get name model element null name str model get facade get name model element trim construct bases string comma separated string builder base str format name list model get facade get classifiers model element if name str length 0 base str length 0 return base str new string builder base str to string trim if base str length 1 return name str trim return name str trim base str to string tostring modelelement namestr getfacade getname modelelement namestr getfacade getname modelelement stringbuilder basestr formatnamelist getfacade getclassifiers modelelement namestr basestr basestr stringbuilder basestr tostring basestr namestr namestr basestr tostring override public string to string object model element notation settings settings return to string model element tostring modelelement notationsettings tostring modelelement constructor for uml transition trigger list model public uml signal event signal list model super signal umltransitiontriggerlistmodel umlsignaleventsignallistmodel see org argouml uml ui uml model element list model2 build model list protected void build model list remove all elements add element model get facade get signal get target umlmodelelementlistmodel2 buildmodellist buildmodellist removeallelements addelement getfacade getsignal gettarget see org argouml uml ui uml model element list model2 is valid element object protected boolean is valid element object element return element model get facade get signal get target umlmodelelementlistmodel2 isvalidelement isvalidelement getfacade getsignal gettarget the constructor param enum literal the uml element public enumeration literal notation object enum literal if model get facade isa enumeration literal enum literal throw new illegal argument exception this is not an enumeration literal enumliteral enumerationliteralnotation enumliteral getfacade isaenumerationliteral enumliteral illegalargumentexception override public void initialise listener property change listener listener object model element add element listener listener model element new string remove stereotype collection c model get facade get stereotypes model element for object st c add element listener listener st name initialiselistener propertychangelistener modelelement addelementlistener modelelement getfacade getstereotypes modelelement addelementlistener the constructor private designer decisions new decision model goals new goal model agency new agency prefs new properties to do list new to do list to do list spawn validity checker this user working false critiquing interval 8000 critiquecpu percent 10 hot queue new array list object hot reason queue new array list long add queue new array list object add reason queue new array list long remove queue new array list object longest add 0 longest hot 0 warm queue new array list object child generator new empty child generator critique lock 0 decisionmodel goalmodel todolist todolist todolist spawnvaliditychecker userworking critiquinginterval critiquecpupercent hotqueue arraylist hotreasonqueue arraylist addqueue arraylist addreasonqueue arraylist removequeue arraylist longestadd longesthot warmqueue arraylist childgenerator emptychildgenerator critiquelock return the designer singleton public static designer the designer return the designer singleton thedesigner thedesignersingleton start a separate thread to continually select and execute critics that are relevant to this designer s work param root the rootobject the critiques will check public void spawn critiquer object root todo really should be a separate class critiquer thread new thread this critiquing thread critiquer thread set daemon true critiquer thread set priority thread current thread get priority 1 critiquer thread start critiquing root root spawncritiquer critiquerthread critiquingthread critiquerthread setdaemon critiquerthread setpriority currentthread getpriority critiquerthread critiquingroot continuously select and execute critics against this designer s design link spawn critiquer object is used to start a thread that runs this public void run try while true local variables what do they do long critique start time long cutoff time int min warm elements 5 int size the critiquing thread should wait if disabled synchronized this while configuration get boolean designer auto critique true try this wait catch interrupted exception ignore log error interrupted exception ignore why if critiquing root null get auto critique critique lock 0 why synchronized this critique start time system current time millis cutoff time critique start time 3000 size add queue size for int i 0 i size i hot queue add add queue get i hot reason queue add add reason queue get i add queue clear add reason queue clear longest hot math max longest hot hot queue size agency determine active critics this while hot queue size 0 object dm hot queue get 0 long reason code hot reason queue get 0 hot queue remove 0 hot reason queue remove 0 agency apply all critics dm the designer reason code long value size remove queue size for int i 0 i size i warm queue remove remove queue get i remove queue clear if warm queue size 0 warm queue add critiquing root while warm queue size 0 system current time millis cutoff time min warm elements 0 if min warm elements 0 min warm elements object dm warm queue get 0 warm queue remove 0 try agency apply all critics dm the designer java util enumeration subd ms child generator gen dm while subd ms has more elements object nextdm subd ms next element if warm queue contains nextdm warm queue add nextdm catch invalid element exception e don t let a transient error kill the thread log warn element dm caused an invalid element exception ignoring for this pass else critique start time system current time millis critique duration system current time millis critique start time long cycle duration critique duration 100 critiquecpu percent long sleep duration math min cycle duration critique duration 3000 sleep duration math max sleep duration 1000 log debug sleep duration sleep duration try thread sleep sleep duration catch interrupted exception ignore log error interrupted exception ignore catch exception e log error critic thread killed by exception e spawncritiquer critiquestarttime cutofftime minwarmelements getboolean auto_critique interruptedexception interruptedexception critiquingroot getautocritique critiquelock critiquestarttime currenttimemillis cutofftime critiquestarttime addqueue hotqueue addqueue hotreasonqueue addreasonqueue addqueue addreasonqueue longesthot longesthot hotqueue determineactivecritics hotqueue hotqueue reasoncode hotreasonqueue hotqueue hotreasonqueue applyallcritics thedesigner reasoncode longvalue removequeue warmqueue removequeue removequeue warmqueue warmqueue critiquingroot warmqueue currenttimemillis cutofftime minwarmelements minwarmelements minwarmelements warmqueue warmqueue applyallcritics thedesigner subdms childgenerator subdms hasmoreelements subdms nextelement warmqueue warmqueue invalidelementexception invalidelementexception critiquestarttime currenttimemillis critiqueduration currenttimemillis critiquestarttime cycleduration critiqueduration critiquecpupercent sleepduration cycleduration critiqueduration sleepduration sleepduration sleepduration sleepduration sleepduration interruptedexception interruptedexception a modelelement has been changed now we give it priority to be checked by the critics asap todo why is is synchronised todo what about when objects are first created param dm the design material param reason the reason public synchronized void critiqueasap object dm string reason long r code critic reason code for reason if user working return todo should we be doing anything on deleted elements this throws an exception on remove events skip for now tfm if remove equals reason return log debug critiqueasap dm int add queue index add queue index of dm if add queue index 1 add queue add dm long reason code obj new long r code add reason queue add reason code obj else long reason code obj add reason queue get add queue index long rc reason code obj long value r code long new reason code obj new long rc add reason queue set add queue index new reason code obj remove queue add dm longest add math max longest add add queue size rcode reasoncodefor userworking addqueueindex addqueue indexof addqueueindex addqueue reasoncodeobj rcode addreasonqueue reasoncodeobj reasoncodeobj addreasonqueue addqueueindex reasoncodeobj longvalue rcode newreasoncodeobj addreasonqueue addqueueindex newreasoncodeobj removequeue longestadd longestadd addqueue look for potential problems or open issues in the given design this is currently done by invoking the agency param des the design to be checked public void critique object des agency apply all critics des this applyallcritics adds a property change listener param pcl the property change listener to add public static void add listener property change listener pcl if pcs null pcs new property change support the designer log debug add property change listener pcl pcs add property change listener pcl addlistener propertychangelistener propertychangesupport thedesigner addpropertychangelistener addpropertychangelistener removes a property change listener param p the class to remove as a property change listener public static void remove listener property change listener p if pcs null log debug remove property change listener pcs remove property change listener p removelistener propertychangelistener removepropertychangelistener removepropertychangelistener setter for save action param the save action the new save action public static void set save action action the save action save action the save action saveaction thesaveaction saveaction setsaveaction thesaveaction saveaction thesaveaction param property the property name param old value the old value param new value the new value public static void fire property change string property object old value object new value if pcs null pcs fire property change property old value new value if model todoitem added equals property model todoitem dismissed equals property if save action null save action set enabled true oldvalue newvalue firepropertychange oldvalue newvalue firepropertychange oldvalue newvalue model_todoitem_added model_todoitem_dismissed saveaction saveaction setenabled public void property change property change event pce if pce get property name equals argo key user fullname get key designer name pce get new value to string else critiqueasap pce get source pce get property name propertychange propertychangeevent getpropertyname key_user_fullname getkey designername getnewvalue tostring getsource getpropertyname ask this designer s agency to select which critics should be active public void determine active critics agency determine active critics this determineactivecritics determineactivecritics auto critique and critiquing interval are two prameters that control how the critiquing thread operates if auto critique is false then now critiquing is done in the background the critiquing interval determines how often the critiquing thread executes the concept of an interval between runs will become less important as argo is redesigned to be more trigger driven return auto critique public boolean get auto critique return configuration get boolean designer auto critique true autocritique critiquinginterval autocritique critiquinginterval autocritique getautocritique getboolean auto_critique see get auto critique param b true to set auto critique on false for off public void set auto critique boolean b configuration set boolean designer auto critique b synchronized this if b this notify all getautocritique setautocritique setboolean auto_critique notifyall get the critiquing interval return the interval public int get critiquing interval return critiquing interval getcritiquinginterval critiquinginterval set the critiquing interval param i the new interval public void set critiquing interval int i critiquing interval i setcritiquinginterval critiquinginterval disable critiquing public static void disable critiquing synchronized the designer the designer critique lock disablecritiquing thedesigner thedesigner critiquelock enable critiquing public static void enable critiquing synchronized the designer the designer critique lock enablecritiquing thedesigner thedesigner critiquelock clear all critiquing results public static void clear critiquing synchronized the designer the designer to do list remove all elements v71 the designer hot queue clear the designer hot reason queue clear the designer add queue clear the designer add reason queue clear the designer remove queue clear the designer warm queue clear clear out queues clearcritiquing thedesigner thedesigner todolist removeallelements thedesigner hotqueue thedesigner hotreasonqueue thedesigner addqueue thedesigner addreasonqueue thedesigner removequeue thedesigner warmqueue param d the critiquing root public static void set critiquing root object d synchronized the designer critiquing root d don t clear everything here breaks loading setcritiquingroot thedesigner critiquingroot return the critiquing root public static object get critiquing root synchronized the designer return critiquing root getcritiquingroot thedesigner critiquingroot return the childgenerator public child generator get child generator return child generator childgenerator getchildgenerator childgenerator param cg the childgenerator public void set child generator child generator cg child generator cg setchildgenerator childgenerator childgenerator return the decisions public decision model get decision model return decisions decisionmodel getdecisionmodel return the goals public goal model get goal model return goals goalmodel getgoalmodel return the goals public list goal get goal list return goals get goal list getgoallist getgoallist this method returns true p to do item s that are posted by the designer are assumed to be valid until the designer explicitly removes them perhaps in the future the designer could specify a condition to determine when his items expire see to do item see org argouml cognitive critic still valid see org argouml cognitive poster still valid org argouml cognitive to do item org argouml cognitive designer param i the todo item param d the designer return true if still valid todoitem todoitem stillvalid stillvalid todoitem see org argouml cognitive poster supports org argouml cognitive decision public boolean supports decision d return d decision unspec see org argouml cognitive poster get supported decisions public list decision get supported decisions return unspecified decision getsupporteddecisions getsupporteddecisions unspecifieddecision see org argouml cognitive poster supports org argouml cognitive goal public boolean supports goal g return true see org argouml cognitive poster get supported goals public list goal get supported goals return unspecified goal getsupportedgoals getsupportedgoals unspecifiedgoal see org argouml cognitive poster contains knowledge type java lang string public boolean contains knowledge type string type return type equals designer s containsknowledgetype containsknowledgetype see org argouml cognitive poster expand java lang string list set public string expand string desc list set offs return desc listset listset see org argouml cognitive poster get clarifier public icon get clarifier return clarifier getclarifier getclarifier get the generic clarifier for this designer poster param clar the clarifier icon public void set clarifier icon clar clarifier clar setclarifier return this designer s to do list a list of pending problems and issues that the designer might be interested in see to do list public to do list get to do list return to do list todolist todolist todolist gettodolist todolist remove all the items in the given list from my list param list the items to be removed public void remove to do items to do list list to do list remove all list removetodoitems todolist todolist removeall reply the designers personal preferences currently not used return the preferences public properties get prefs return prefs getprefs param d the decision return true if the given decision is considered public boolean is considering decision d return d get priority 0 isconsidering getpriority record the extent to which the designer is considering the given decision param decision the decision param priority the priority public void set decision priority string decision int priority decisions set decision priority decision priority setdecisionpriority setdecisionpriority record the extent to which the designer desires the given goal param goal the given goal return true if this goal is desired public boolean has goal string goal return goals has goal goal hasgoal hasgoal param goal the given goal param priority the priority public void set goal priority string goal int priority goals set goal priority goal priority setgoalpriority setgoalpriority param goal the goal i me the designer desire public void start desiring string goal goals start desiring goal startdesiring startdesiring param goal the goal that is not desired any more public void stop desiring string goal goals stop desiring goal stopdesiring stopdesiring see org argouml cognitive poster snooze public void snooze do nothing see org argouml cognitive poster unsnooze public void unsnooze do nothing reply the agency object that is helping this designer return my agency public agency get agency return agency getagency inform the human designer using this system that the given to do item should be considered this can be disruptive if the item is urgent or more commonly it is added to his to do list so that he can consider it at his leisure param item the todo item public void inform to do item item to do list add element item todoitem todolist todoitem todolist addelement set the name of this designer param name the designer name public void set designer name string name designer name name setdesignername designername query the name of the designer return the designer name public string get designer name return designer name getdesignername designername override public string to string todo this should be the name of the designer that created the todoitem not the current username return get designer name tostring getdesignername java lang object public void fix it to do item item object arg fixit todoitem see org argouml cognitive poster can fix it org argouml cognitive to do item public boolean can fix it to do item item return false canfixit todoitem canfixit todoitem param working true if the user is working i e this is not the startup phase of argouml public static void set user working boolean working user working working setuserworking userworking return true if the user is working i e this is not the startup phase of argouml public static boolean is user working return user working isuserworking userworking static class empty child generator implements child generator reply a enumeration of the children of the given object param o the object return the enumeration public enumeration gen object o return enumeration empty the instance emptychildgenerator childgenerator enumerationempty theinstance the constructor param message the uml object public message notation uml object message super message messagenotationuml override public string to string object model element notation settings settings return to string model element true tostring modelelement notationsettings tostring modelelement suppress warnings deprecation deprecated public string to string final object model element final map args return to string model element true suppresswarnings tostring modelelement tostring modelelement the constructor for this class br br by default cruml looks for localized strings under the code critics code prefix since profiles cannot include their strings at the code critics profile code file located at the argouml source code this class allows critics defined on profile plug ins to define look for localized strings at other files param prefix the prefix of the localized strings public cr profile final string prefix super if prefix null equals prefix this localization prefix critics else this localization prefix prefix setup head and desc crprofile localizationprefix localizationprefix setupheadanddesc override protected string get localized string string key string suffix return translator localize localization prefix key suffix getlocalizedstring localizationprefix the constructor public cr name confusion setup head and desc add supported decision uml decision naming set knowledge types critic kt presentation set knowledge types critic kt syntax add trigger name crnameconfusion setupheadanddesc addsupporteddecision umldecision setknowledgetypes kt_presentation setknowledgetypes kt_syntax addtrigger public boolean predicate2 object dm designer dsgr if model get facade isa model element dm model get facade isa association dm uml 1 4 spec is ambiguous english says no association or generalization but ocl only includes association model get facade isa generalization dm return no problem object me dm list set offs compute offenders me if offs size 1 return problem found return no problem getfacade isamodelelement getfacade isaassociation getfacade isageneralization no_problem listset computeoffenders problem_found no_problem param dm the given modelelement return the list set of offenders public list set compute offenders object dm object ns model get facade get namespace dm list set res new list set dm string n model get facade get name dm if n null n equals return res string dm name str n if dm name str null dm name str length 0 return res string stripped2 strip dm name str if ns null return res collection oes model get facade get owned elements ns if oes null return res iterator elems oes iterator while elems has next object me2 elems next if me2 dm model get facade isa association me2 continue string me name model get facade get name me2 if me name null me name equals continue string compare name me name if confusable stripped2 strip compare name dm name str equals compare name res add me2 return res listset listset computeoffenders getfacade getnamespace listset listset getfacade getname dmnamestr dmnamestr dmnamestr dmnamestr getfacade getownedelements hasnext getfacade isaassociation mename getfacade getname mename mename comparename mename comparename dmnamestr comparename override public to do item to do item object dm designer dsgr object me dm list set offs compute offenders me return new uml to do item this offs dsgr todoitem todoitem listset computeoffenders umltodoitem override public boolean still valid to do item i designer dsgr if is active return false list set offs i get offenders object dm offs get 0 if predicate dm dsgr return false list set new offs compute offenders dm boolean res offs equals new offs return res stillvalid todoitem isactive listset getoffenders listset newoffs computeoffenders newoffs param stripped1 given string 1 param stripped2 given string 2 return true if the both given strings are confusingly similar public boolean confusable string stripped1 string stripped2 int count diffs count diffs stripped1 stripped2 return count diffs 1 countdiffs countdiffs countdiffs param s1 given string 1 param s2 given string 2 return positive int representing the number of different chars or if the lengths differ more than 2 this length difference public int count diffs string s1 string s2 int len math min s1 length s2 length int count math abs s1 length s2 length if count 2 return count for int i 0 i len i if s1 char at i s2 char at i count return count countdiffs charat charat param s the given string return the string s with all non letters digits stripped off public string strip string s string buffer res new string buffer s length int len s length for int i 0 i len i char c s char at i if character is letter or digit c res append character to lower case c else if c i 1 s char at i 1 res append return res to string stringbuffer stringbuffer charat isletterordigit tolowercase charat tostring see org argouml cognitive poster get clarifier override public icon get clarifier return cl class name get the instance getclarifier getclarifier clclassname gettheinstance override public void init wizard wizard w if w instanceof wiz many names to do item item to do item w get to do item wiz many names w set model elements item get offenders initwizard wizmanynames todoitem todoitem gettodoitem wizmanynames setmodelelements getoffenders see org argouml cognitive critics critic get wizard class org argouml cognitive to do item public class get wizard class to do item item return wiz many names class getwizardclass todoitem getwizardclass todoitem wizmanynames public set object get criticized design materials set object ret new hash set object ret add model get meta types get classifier ret add model get meta types get state return ret getcriticizeddesignmaterials hashset getmetatypes getclassifier getmetatypes getstate public action set classifier role multiplicity super actionsetclassifierrolemultiplicity public void set selected item object item object target if target null model get facade isa classifier role target if model get facade isa multiplicity item if item equals model get facade get multiplicity target model get core helper set multiplicity target item else if item instanceof string if item equals model get facade to string model get facade get multiplicity target model get core helper set multiplicity target model get data types factory create multiplicity string item else model get core helper set multiplicity target null setselecteditem getfacade isaclassifierrole getfacade isamultiplicity getfacade getmultiplicity getcorehelper setmultiplicity getfacade tostring getfacade getmultiplicity getcorehelper setmultiplicity getdatatypesfactory createmultiplicity getcorehelper setmultiplicity return returns the singleton public static action set classifier role multiplicity get instance return singleton actionsetclassifierrolemultiplicity getinstance the constructor public cr too many states setup head and desc add supported decision uml decision state machines set threshold states threshold add trigger substate crtoomanystates setupheadanddesc addsupporteddecision umldecision state_machines setthreshold states_threshold addtrigger public boolean predicate2 object dm designer dsgr if model get facade isa composite state dm return no problem collection subs model get facade get subvertices dm if subs size get threshold return no problem return problem found getfacade isacompositestate no_problem getfacade getsubvertices getthreshold no_problem problem_found public set object get criticized design materials set object ret new hash set object ret add model get meta types get composite state return ret getcriticizeddesignmaterials hashset getmetatypes getcompositestate return the instance singleton public static perspective manager get instance if instance null instance new perspective manager return instance perspectivemanager getinstance perspectivemanager creates a new instance of perspective manager private perspective manager perspective listeners new array list perspective manager listener perspectives new array list explorer perspective rules new array list perspective rule load rules perspectivemanager perspectivemanager perspectivelisteners arraylist perspectivemanagerlistener arraylist explorerperspective arraylist perspectiverule loadrules param listener the listener to be added public void add listener perspective manager listener listener perspective listeners add listener addlistener perspectivemanagerlistener perspectivelisteners param listener the listener to be removed public void remove listener perspective manager listener listener perspective listeners remove listener removelistener perspectivemanagerlistener perspectivelisteners param perspective the perspective to be added public void add perspective explorer perspective perspective perspectives add perspective for perspective manager listener listener perspective listeners listener add perspective perspective addperspective explorerperspective perspectivemanagerlistener perspectivelisteners addperspective param new perspectives the collection of perspectives to be added public void add all perspectives collection explorer perspective new perspectives for explorer perspective new perspective new perspectives add perspective new perspective newperspectives addallperspectives explorerperspective newperspectives explorerperspective newperspective newperspectives addperspective newperspective param perspective the perspective to be removed public void remove perspective explorer perspective perspective perspectives remove perspective for perspective manager listener listener perspective listeners listener remove perspective perspective removeperspective explorerperspective perspectivemanagerlistener perspectivelisteners removeperspective remove all perspectives public void remove all perspectives list explorer perspective pers new array list explorer perspective pers add all get perspectives for explorer perspective perspective pers remove perspective perspective removeallperspectives explorerperspective arraylist explorerperspective addall getperspectives explorerperspective removeperspective return the list of all perspectives public list explorer perspective get perspectives return perspectives explorerperspective getperspectives tries to load user defined perspectives if it can t it loads the predefined default perspectives public void load user perspectives string user perspectives configuration get string argo key user explorer perspectives string tokenizer pst new string tokenizer user perspectives if pst has more tokens load user perspectives while pst has more tokens string perspective pst next token string tokenizer perspective details new string tokenizer perspective get the perspective name string perspective name perspective details next token explorer perspective user defined perspective new explorer perspective perspective name make sure there are some rules if perspective details has more tokens get the rules while perspective details has more tokens get the rule name string rule name perspective details next token create the rule try class rule class class for name rule name perspective rule rule perspective rule rule class new instance user defined perspective add rule rule catch class not found exception e log error could not create rule rule name you can try to refresh the perspectives to the default settings e catch instantiation exception e log error could not create rule rule name you can try to refresh the perspectives to the default settings e catch illegal access exception e log error could not create rule rule name you can try to refresh the perspectives to the default settings e else rule name but no rules continue add the perspective add perspective user defined perspective else no user defined perspectives load default perspectives one last check that some loaded if get perspectives size 0 load default perspectives loaduserperspectives userperspectives getstring key_user_explorer_perspectives stringtokenizer stringtokenizer userperspectives hasmoretokens hasmoretokens nexttoken stringtokenizer perspectivedetails stringtokenizer perspectivename perspectivedetails nexttoken explorerperspective userdefinedperspective explorerperspective perspectivename perspectivedetails hasmoretokens perspectivedetails hasmoretokens rulename perspectivedetails nexttoken ruleclass forname rulename perspectiverule perspectiverule ruleclass newinstance userdefinedperspective addrule classnotfoundexception rulename instantiationexception rulename illegalaccessexception rulename addperspective userdefinedperspective loaddefaultperspectives getperspectives loaddefaultperspectives loads a pre defined default set of perspectives public void load default perspectives collection explorer perspective c get default perspectives add all perspectives c loaddefaultperspectives explorerperspective getdefaultperspectives addallperspectives return a collection of default perspectives i e the predefined ones public collection explorer perspective get default perspectives explorer perspective class perspective new explorer perspective combobox item class centric class perspective add rule new go project to model class perspective add rule new go project to profile configuration class perspective add rule new go profile configuration to profile class perspective add rule new go profile to model class perspective add rule new go profile to critics class perspective add rule new go critics to critic class perspective add rule new go project to roots class perspective add rule new go namespace to classifier and package class perspective add rule new go namespace to diagram class perspective add rule new go class to summary class perspective add rule new go summary to association class perspective add rule new go summary to attribute class perspective add rule new go summary to operation class perspective add rule new go summary to inheritance class perspective add rule new go summary to incoming dependency class perspective add rule new go summary to outgoing dependency explorer perspective package perspective new explorer perspective combobox item package centric package perspective add rule new go project to model package perspective add rule new go project to profile configuration package perspective add rule new go profile configuration to profile package perspective add rule new go profile to model package perspective add rule new go profile to critics package perspective add rule new go critics to critic package perspective add rule new go project to roots package perspective add rule new go namespace to owned elements package perspective add rule new go package to element import package perspective add rule new go namespace to diagram package perspective add rule new go use case to extension point package perspective add rule new go classifier to structural feature package perspective add rule new go classifier to behavioral feature package perspective add rule new go enumeration to literals package perspective add rule new go collaboration to interaction package perspective add rule new go interaction to messages package perspective add rule new go message to action package perspective add rule new go signal to reception package perspective add rule new go link to stimuli package perspective add rule new go stimulus to action package perspective add rule new go classifier to collaboration package perspective add rule new go operation to collaboration package perspective add rule new go model element to comment package perspective add rule new go collaboration to diagram removed the next one due to issue 2165 package perspective add rule new go operation to collaboration diagram package perspective add rule new go behavioral feature to state machine works for both statediagram as activitygraph package perspective add rule new go statemachine to diagram package perspective add rule new go state machine to state package perspective add rule new go composite state to subvertex package perspective add rule new go state to internal trans package perspective add rule new go state to do activity package perspective add rule new go state to entry package perspective add rule new go state to exit package perspective add rule new go classifier to sequence diagram package perspective add rule new go operation to sequence diagram package perspective add rule new go classifier to instance package perspective add rule new go state to incoming trans package perspective add rule new go state to outgoing trans package perspective add rule new go submachine state to state machine package perspective add rule new go stereotype to tag definition package perspective add rule new go model element to behavior package perspective add rule new go model element to contained lost elements explorer perspective diagram perspective new explorer perspective combobox item diagram centric diagram perspective add rule new go project to model diagram perspective add rule new go project to profile configuration diagram perspective add rule new go profile configuration to profile diagram perspective add rule new go profile to model diagram perspective add rule new go profile to critics diagram perspective add rule new go critics to critic diagram perspective add rule new go model to diagrams diagram perspective add rule new go diagram to node diagram perspective add rule new go diagram to edge diagram perspective add rule new go use case to extension point diagram perspective add rule new go classifier to structural feature diagram perspective add rule new go classifier to behavioral feature explorer perspective inheritance perspective new explorer perspective combobox item inheritance centric inheritance perspective add rule new go project to model inheritance perspective add rule new go project to profile configuration class perspective add rule new go profile configuration to profile class perspective add rule new go profile to model class perspective add rule new go profile to critics class perspective add rule new go critics to critic inheritance perspective add rule new go model to base elements inheritance perspective add rule new go generalizable element to specialized explorer perspective associations perspective new explorer perspective combobox item class associations associations perspective add rule new go project to model associations perspective add rule new go project to profile configuration associations perspective add rule new go profile configuration to profile associations perspective add rule new go profile to model associations perspective add rule new go profile to critics associations perspective add rule new go critics to critic associations perspective add rule new go namespace to diagram associations perspective add rule new go package to class associations perspective add rule new go class to associated class explorer perspective residence perspective new explorer perspective combobox item residence centric residence perspective add rule new go project to model residence perspective add rule new go project to profile configuration residence perspective add rule new go profile configuration to profile residence perspective add rule new go profile to model residence perspective add rule new go profile to critics residence perspective add rule new go critics to critic residence perspective add rule new go model to node residence perspective add rule new go node to resident component residence perspective add rule new go component to resident model element explorer perspective state perspective new explorer perspective combobox item state centric state perspective add rule new go project to state machine state perspective add rule new go statemachine to diagram state perspective add rule new go state machine to state state perspective add rule new go composite state to subvertex state perspective add rule new go state to incoming trans state perspective add rule new go state to outgoing trans state perspective add rule new go transitionto effect state perspective add rule new go transition to guard explorer perspective transitions perspective new explorer perspective combobox item transitions centric transitions perspective add rule new go project to state machine transitions perspective add rule new go statemachine to diagram transitions perspective add rule new go state machine to transition transitions perspective add rule new go transition to source transitions perspective add rule new go transition to target transitions perspective add rule new go transitionto effect transitions perspective add rule new go transition to guard explorer perspective composition perspective new explorer perspective combobox item composite centric composition perspective add rule new go project to model composition perspective add rule new go project to profile configuration composition perspective add rule new go profile configuration to profile composition perspective add rule new go profile to model composition perspective add rule new go profile to critics composition perspective add rule new go critics to critic composition perspective add rule new go project to roots composition perspective add rule new go model element to contents composition perspective add rule new go model element to contained diagrams collection explorer perspective c new array list explorer perspective c add package perspective c add class perspective c add diagram perspective c add inheritance perspective c add associations perspective c add residence perspective c add state perspecti explorerperspective getdefaultperspectives explorerperspective classperspective explorerperspective classperspective addrule goprojecttomodel classperspective addrule goprojecttoprofileconfiguration classperspective addrule goprofileconfigurationtoprofile classperspective addrule goprofiletomodel classperspective addrule goprofiletocritics classperspective addrule gocriticstocritic classperspective addrule goprojecttoroots classperspective addrule gonamespacetoclassifierandpackage classperspective addrule gonamespacetodiagram classperspective addrule goclasstosummary classperspective addrule gosummarytoassociation classperspective addrule gosummarytoattribute classperspective addrule gosummarytooperation classperspective addrule gosummarytoinheritance classperspective addrule gosummarytoincomingdependency classperspective addrule gosummarytooutgoingdependency explorerperspective packageperspective explorerperspective packageperspective addrule goprojecttomodel packageperspective addrule goprojecttoprofileconfiguration packageperspective addrule goprofileconfigurationtoprofile packageperspective addrule goprofiletomodel packageperspective addrule goprofiletocritics packageperspective addrule gocriticstocritic packageperspective addrule goprojecttoroots packageperspective addrule gonamespacetoownedelements packageperspective addrule gopackagetoelementimport packageperspective addrule gonamespacetodiagram packageperspective addrule gousecasetoextensionpoint packageperspective addrule goclassifiertostructuralfeature packageperspective addrule goclassifiertobehavioralfeature packageperspective addrule goenumerationtoliterals packageperspective addrule gocollaborationtointeraction packageperspective addrule gointeractiontomessages packageperspective addrule gomessagetoaction packageperspective addrule gosignaltoreception packageperspective addrule golinktostimuli packageperspective addrule gostimulustoaction packageperspective addrule goclassifiertocollaboration packageperspective addrule gooperationtocollaboration packageperspective addrule gomodelelementtocomment packageperspective addrule gocollaborationtodiagram packageperspective addrule gooperationtocollaborationdiagram packageperspective addrule gobehavioralfeaturetostatemachine packageperspective addrule gostatemachinetodiagram packageperspective addrule gostatemachinetostate packageperspective addrule gocompositestatetosubvertex packageperspective addrule gostatetointernaltrans packageperspective addrule gostatetodoactivity packageperspective addrule gostatetoentry packageperspective addrule gostatetoexit packageperspective addrule goclassifiertosequencediagram packageperspective addrule gooperationtosequencediagram packageperspective addrule goclassifiertoinstance packageperspective addrule gostatetoincomingtrans packageperspective addrule gostatetooutgoingtrans packageperspective addrule gosubmachinestatetostatemachine packageperspective addrule gostereotypetotagdefinition packageperspective addrule gomodelelementtobehavior packageperspective addrule gomodelelementtocontainedlostelements explorerperspective diagramperspective explorerperspective diagramperspective addrule goprojecttomodel diagramperspective addrule goprojecttoprofileconfiguration diagramperspective addrule goprofileconfigurationtoprofile diagramperspective addrule goprofiletomodel diagramperspective addrule goprofiletocritics diagramperspective addrule gocriticstocritic diagramperspective addrule gomodeltodiagrams diagramperspective addrule godiagramtonode diagramperspective addrule godiagramtoedge diagramperspective addrule gousecasetoextensionpoint diagramperspective addrule goclassifiertostructuralfeature diagramperspective addrule goclassifiertobehavioralfeature explorerperspective inheritanceperspective explorerperspective inheritanceperspective addrule goprojecttomodel inheritanceperspective addrule goprojecttoprofileconfiguration classperspective addrule goprofileconfigurationtoprofile classperspective addrule goprofiletomodel classperspective addrule goprofiletocritics classperspective addrule gocriticstocritic inheritanceperspective addrule gomodeltobaseelements inheritanceperspective addrule gogeneralizableelementtospecialized explorerperspective associationsperspective explorerperspective associationsperspective addrule goprojecttomodel associationsperspective addrule goprojecttoprofileconfiguration associationsperspective addrule goprofileconfigurationtoprofile associationsperspective addrule goprofiletomodel associationsperspective addrule goprofiletocritics associationsperspective addrule gocriticstocritic associationsperspective addrule gonamespacetodiagram associationsperspective addrule gopackagetoclass associationsperspective addrule goclasstoassociatedclass explorerperspective residenceperspective explorerperspective residenceperspective addrule goprojecttomodel residenceperspective addrule goprojecttoprofileconfiguration residenceperspective addrule goprofileconfigurationtoprofile residenceperspective addrule goprofiletomodel residenceperspective addrule goprofiletocritics residenceperspective addrule gocriticstocritic residenceperspective addrule gomodeltonode residenceperspective addrule gonodetoresidentcomponent residenceperspective addrule gocomponenttoresidentmodelelement explorerperspective stateperspective explorerperspective stateperspective addrule goprojecttostatemachine stateperspective addrule gostatemachinetodiagram stateperspective addrule gostatemachinetostate stateperspective addrule gocompositestatetosubvertex stateperspective addrule gostatetoincomingtrans stateperspective addrule gostatetooutgoingtrans stateperspective addrule gotransitiontoeffect stateperspective addrule gotransitiontoguard explorerperspective transitionsperspective explorerperspective transitionsperspective addrule goprojecttostatemachine transitionsperspective addrule gostatemachinetodiagram transitionsperspective addrule gostatemachinetotransition transitionsperspective addrule gotransitiontosource transitionsperspective addrule gotransitiontotarget transitionsperspective addrule gotransitiontoeffect transitionsperspective addrule gotransitiontoguard explorerperspective compositionperspective explorerperspective compositionperspective addrule goprojecttomodel compositionperspective addrule goprojecttoprofileconfiguration compositionperspective addrule goprofileconfigurationtoprofile compositionperspective addrule goprofiletomodel compositionperspective addrule goprofiletocritics compositionperspective addrule gocriticstocritic compositionperspective addrule goprojecttoroots compositionperspective addrule gomodelelementtocontents compositionperspective addrule gomodelelementtocontaineddiagrams explorerperspective arraylist explorerperspective packageperspective classperspective diagramperspective inheritanceperspective associationsperspective residenceperspective stateperspecti get the predefined rules p this is a hard coded rules library for now since it is quite a lot of work to get all possible rule names in org argouml ui explorer rules from the classpath which would also not allow adding rules from other locations public void load rules perspective rule rule names array new go assoc role to messages new go behavioral feature to state diagram new go behavioral feature to state machine new go classifier to behavioral feature new go classifier to collaboration new go classifier to instance new go classifier to sequence diagram new go classifier to state machine new go classifier to structural feature new go class to associated class new go class to navigable class new go class to summary new go collaboration to diagram new go collaboration to interaction new go component to resident model element new go composite state to subvertex new go diagram to edge new go diagram to node new go element to machine new go enumeration to literals new go generalizable element to specialized new go interaction to messages new go link to stimuli new go message to action new go model element to comment new go model element to behavior new go model element to contents new go model element to contained diagrams new go model element to contained lost elements new go model to base elements new go model to collaboration new go model to diagrams new go model to elements new go model to node new go namespace to classifier and package new go namespace to diagram new go namespace to owned elements new go node to resident component new go operation to collaboration diagram new go operation to collaboration new go operation to sequence diagram new go package to class new go package to element import new go project to collaboration new go project to diagram new go project to model new go project to state machine new go project to profile configuration new go profile configuration to profile new go profile to model new go profile to critics new go critics to critic new go project to roots new go signal to reception new go state machine to top new go statemachine to diagram new go state machine to state new go state machine to transition new go state to do activity new go state to downstream new go state to entry new go state to exit new go state to incoming trans new go state to internal trans new go state to outgoing trans new go stereotype to tag definition new go stimulus to action new go summary to association new go summary to attribute new go summary to incoming dependency new go summary to inheritance new go summary to operation new go summary to outgoing dependency new go transition to source new go transition to target new go transitionto effect new go transition to guard new go use case to extension point new go submachine state to state machine rules arrays as list rule names array loadrules perspectiverule rulenamesarray goassocroletomessages gobehavioralfeaturetostatediagram gobehavioralfeaturetostatemachine goclassifiertobehavioralfeature goclassifiertocollaboration goclassifiertoinstance goclassifiertosequencediagram goclassifiertostatemachine goclassifiertostructuralfeature goclasstoassociatedclass goclasstonavigableclass goclasstosummary gocollaborationtodiagram gocollaborationtointeraction gocomponenttoresidentmodelelement gocompositestatetosubvertex godiagramtoedge godiagramtonode goelementtomachine goenumerationtoliterals gogeneralizableelementtospecialized gointeractiontomessages golinktostimuli gomessagetoaction gomodelelementtocomment gomodelelementtobehavior gomodelelementtocontents gomodelelementtocontaineddiagrams gomodelelementtocontainedlostelements gomodeltobaseelements gomodeltocollaboration gomodeltodiagrams gomodeltoelements gomodeltonode gonamespacetoclassifierandpackage gonamespacetodiagram gonamespacetoownedelements gonodetoresidentcomponent gooperationtocollaborationdiagram gooperationtocollaboration gooperationtosequencediagram gopackagetoclass gopackagetoelementimport goprojecttocollaboration goprojecttodiagram goprojecttomodel goprojecttostatemachine goprojecttoprofileconfiguration goprofileconfigurationtoprofile goprofiletomodel goprofiletocritics gocriticstocritic goprojecttoroots gosignaltoreception gostatemachinetotop gostatemachinetodiagram gostatemachinetostate gostatemachinetotransition gostatetodoactivity gostatetodownstream gostatetoentry gostatetoexit gostatetoincomingtrans gostatetointernaltrans gostatetooutgoingtrans gostereotypetotagdefinition gostimulustoaction gosummarytoassociation gosummarytoattribute gosummarytoincomingdependency gosummarytoinheritance gosummarytooperation gosummarytooutgoingdependency gotransitiontosource gotransitiontotarget gotransitiontoeffect gotransitiontoguard gousecasetoextensionpoint gosubmachinestatetostatemachine aslist rulenamesarray add a rule to the list of rules param rule the perspective rule to be added public void add rule perspective rule rule rules add rule perspectiverule addrule perspectiverule remove a rule from the list param rule the perspective rule to be removed public void remove rule perspective rule rule rules remove rule perspectiverule removerule perspectiverule return the collection of rules public collection perspective rule get rules return rules perspectiverule getrules save the user perspectives in the argouml configuration public void save user perspectives configuration set string argo key user explorer perspectives this to string saveuserperspectives setstring key_user_explorer_perspectives tostring return string representation of the perspectives in the same format as saved in the user properties see java lang object to string override public string to string string buffer p new string buffer for explorer perspective perspective get perspectives string name perspective to string p append name append for perspective rule rule perspective get list p append rule get class get name append p delete char at p length 1 p append p delete char at p length 1 return p to string tostring tostring stringbuffer stringbuffer explorerperspective getperspectives tostring perspectiverule getlist getclass getname deletecharat deletecharat tostring creates a new instance of wiz add constructor public wiz add constructor super wizaddconstructor wizaddconstructor public void do action int old step object oper collection saved targets switch old step case 1 string new name get suggestion if step1 null new name step1 get text object me get model element saved targets target manager get instance get targets object return type project manager get manager get current project get default return type oper model get core factory build operation2 me return type new name model get core helper add stereotype oper get create stereotype oper target manager get instance set targets saved targets break doaction oldstep savedtargets oldstep newname getsuggestion newname gettext getmodelelement savedtargets targetmanager getinstance gettargets returntype projectmanager getmanager getcurrentproject getdefaultreturntype getcorefactory buildoperation2 returntype newname getcorehelper addstereotype getcreatestereotype targetmanager getinstance settargets savedtargets finds the create stereotype for an object param obj is the object the stereotype should be applicable to return a suitable stereotype or null private object get create stereotype object obj return project manager get manager get current project get profile configuration find stereotype for object create obj getcreatestereotype projectmanager getmanager getcurrentproject getprofileconfiguration findstereotypeforobject param s set a new instruction string public void set instructions string s instructions s setinstructions create a new panel for the given step param new step the step return the panel public j panel make panel int new step switch new step case 1 if step1 null step1 new wiz step text field this instructions label offer suggestion return step1 return null newstep jpanel makepanel newstep newstep wizsteptextfield offersuggestion reply a collection of the children of the given object see org tigris gef util child generator gen java lang object public enumeration gen object o list res new array list if o instanceof project project p project o res add all p get user defined model list res add all p get diagram list else if o instanceof diagram diagram d diagram o res add all d get graph model get nodes res add all d get graph model get edges else if model get facade isa model element o res add all model get facade get model element contents o return collections enumeration res childgenerator arraylist addall getuserdefinedmodellist addall getdiagramlist addall getgraphmodel getnodes addall getgraphmodel getedges getfacade isamodelelement addall getfacade getmodelelementcontents return returns the singleton public static child gen find get singleton return singleton childgenfind getsingleton creates a new instance of name order public name order collator set strength collator primary nameorder nameorder setstrength public int compare object obj1 object obj2 if obj1 instanceof default mutable tree node default mutable tree node node default mutable tree node obj1 obj1 node get user object if obj2 instanceof default mutable tree node default mutable tree node node default mutable tree node obj2 obj2 node get user object return compare user objects obj1 obj2 defaultmutabletreenode defaultmutabletreenode defaultmutabletreenode getuserobject defaultmutabletreenode defaultmutabletreenode defaultmutabletreenode getuserobject compareuserobjects alphabetic ordering of user object names instead of type names param obj diagram or base param obj1 diagram or base return 0 if invalid params 0 if the objects are equally named a positive or negative int if the names differ protected int compare user objects object obj object obj1 this is safe because get name always returns a string of some type return collator compare get name obj get name obj1 compareuserobjects getname getname getname get the name of the diagram or model element param obj the item to fetch name from return the name private string get name object obj string name if obj instanceof diagram name diagram obj get name else if obj instanceof profile configuration name profile configuration else if obj instanceof profile name profile obj get display name else if model get facade isa model element obj try name model get facade get name obj catch invalid element exception e name translator localize misc name deleted else name if name null return return name getname getname profileconfiguration getdisplayname getfacade isamodelelement getfacade getname invalidelementexception see java lang object to string override public string to string return translator localize combobox order by name tostring tostring public void run designer dsgr designer the designer subsystem utility init subsystem new init cognitive critics subsystem utility init subsystem new init pattern critics org argouml uml cognitive checklist init init set the icon for this poster dsgr set clarifier resource loader wrapper lookup icon resource post itd0 dsgr set designer name configuration get string argo key user fullname configuration add listener argo key user fullname dsgr mvw project p project manager get manager get current project dsgr spawn critiquer p dsgr set child generator new child genuml for object model p get user defined model list model get pump add model event listener dsgr model log info spawned critiquing thread dsgr get decision model start considering uml decision class selection dsgr get decision model start considering uml decision behavior dsgr get decision model start considering uml decision naming dsgr get decision model start considering uml decision storage dsgr get decision model start considering uml decision inheritance dsgr get decision model start considering uml decision containment dsgr get decision model start considering uml decision planned extensions dsgr get decision model start considering uml decision state machines dsgr get decision model start considering uml decision patterns dsgr get decision model start considering uml decision relationships dsgr get decision model start considering uml decision instanciation dsgr get decision model start considering uml decision modularity dsgr get decision model start considering uml decision expected usage dsgr get decision model start considering uml decision methods dsgr get decision model start considering uml decision code gen dsgr get decision model start considering uml decision stereotypes designer set user working true thedesigner subsystemutility initsubsystem initcognitivecritics subsystemutility initsubsystem initpatterncritics setclarifier resourceloaderwrapper lookupiconresource postitd0 setdesignername getstring key_user_fullname addlistener key_user_fullname projectmanager getmanager getcurrentproject spawncritiquer setchildgenerator childgenuml getuserdefinedmodellist getpump addmodeleventlistener getdecisionmodel startconsidering umldecision class_selection getdecisionmodel startconsidering umldecision getdecisionmodel startconsidering umldecision getdecisionmodel startconsidering umldecision getdecisionmodel startconsidering umldecision getdecisionmodel startconsidering umldecision getdecisionmodel startconsidering umldecision planned_extensions getdecisionmodel startconsidering umldecision state_machines getdecisionmodel startconsidering umldecision getdecisionmodel startconsidering umldecision getdecisionmodel startconsidering umldecision getdecisionmodel startconsidering umldecision getdecisionmodel startconsidering umldecision expected_usage getdecisionmodel startconsidering umldecision getdecisionmodel startconsidering umldecision code_gen getdecisionmodel startconsidering umldecision setuserworking the constructor public cr useless abstract setup head and desc add supported decision uml decision inheritance add supported goal goal get unspecified goal add trigger specialization add trigger is abstract cruselessabstract setupheadanddesc addsupporteddecision umldecision addsupportedgoal getunspecifiedgoal addtrigger addtrigger isabstract override public boolean predicate2 object dm designer dsgr if model get facade isa class dm return false object cls dm if model get facade is abstract cls return false original class was not abstract list set derived new list set cls reachable new child gen derived classes for object c derived if model get facade is abstract c return false found a concrete subclass return true no concrete subclasses defined this class is useless getfacade isaclass getfacade isabstract listset listset childgenderivedclasses getfacade isabstract override public set object get criticized design materials set object ret new hash set object ret add model get meta types getuml class return ret getcriticizeddesignmaterials hashset getmetatypes getumlclass class child gen derived classes implements child generator public iterator child iterator object o object c o collection specs new array list model get facade get specializations c if specs null return collections empty set iterator list spec classes new array list specs size for object g specs object ge model get facade get specific g if ge null spec classes add ge return spec classes iterator childgenderivedclasses childgenerator childiterator arraylist getfacade getspecializations emptyset specclasses arraylist getfacade getspecific specclasses specclasses constructor public uml generalization child list model super child umlgeneralizationchildlistmodel protected void build model list if get target null return remove all elements add element model get facade get specific get target buildmodellist gettarget removeallelements addelement getfacade getspecific gettarget see org argouml uml ui uml model element list model2 is valid element object protected boolean is valid element object o return model get facade get specific get target o umlmodelelementlistmodel2 isvalidelement isvalidelement getfacade getspecific gettarget constructor public action state diagram super action state diagram actionstatediagram protected argo diagram create diagram object namespace object target target manager get instance get model target if model get facade isauml element target model get model management helper is read only target target namespace object machine null if model get state machines helper is adding statemachine allowed target the target is a valid context machine model get state machines factory build state machine target else if model get facade isa state machine target has no diagram yet target this target is a statemachine for which no diagram exists yet so let s use it machine target else let s just build a statemachine and put it in a suitable namespace machine model get state machines factory create state machine if model get facade isa namespace target namespace target model get core helper set namespace machine namespace model get state machines factory build composite state on state machine machine return diagram factory get instance create diagram diagram factory diagram type state model get facade get namespace machine machine argodiagram creatediagram targetmanager getinstance getmodeltarget getfacade isaumlelement getmodelmanagementhelper isreadonly getstatemachineshelper isaddingstatemachineallowed getstatemachinesfactory buildstatemachine getfacade isastatemachine hasnodiagramyet getstatemachinesfactory createstatemachine getfacade isanamespace getcorehelper setnamespace getstatemachinesfactory buildcompositestateonstatemachine diagramfactory getinstance creatediagram diagramfactory diagramtype getfacade getnamespace private boolean has no diagram yet object machine project p project manager get manager get current project for argo diagram d p get diagram list if d instanceof uml state diagram if uml state diagram d get state machine machine return false return true hasnodiagramyet projectmanager getmanager getcurrentproject argodiagram getdiagramlist umlstatediagram umlstatediagram getstatemachine constructor for uml model element name document public uml model element name document super name umlmodelelementnamedocument umlmodelelementnamedocument see org argouml uml ui uml plain text document set property java lang string protected void set property string text model get core helper set name get target text umlplaintextdocument setproperty setproperty getcorehelper setname gettarget see org argouml uml ui uml plain text document get property protected string get property return model get facade get name get target umlplaintextdocument getproperty getproperty getfacade getname gettarget main constructor for a link fig enumeration deprecated by for 0 27 4 by tfmorris use link fig enumeration object rectangle diagram settings suppress warnings deprecation deprecated public fig enumeration super enable size checking true set suppress calc bounds false add fig get literals compartment this creates the compartment set bounds get bounds figenumeration figenumeration diagramsettings suppresswarnings figenumeration enablesizechecking setsuppresscalcbounds addfig getliteralscompartment setbounds getbounds constructor for use if this figure is created for an existing interface node in the metamodel param gm not actually used in the current implementation param node the uml object being placed deprecated by for 0 27 4 by tfmorris use link fig enumeration object rectangle diagram settings suppress warnings deprecation deprecated public fig enumeration suppress warnings unused graph model gm object node this enable size checking true set enum literals visible true set owner node literals compartment populate set bounds get bounds figenumeration diagramsettings suppresswarnings figenumeration suppresswarnings graphmodel enablesizechecking setenumliteralsvisible setowner literalscompartment setbounds getbounds construct a new abstract fig component param owner owning uml element param bounds position and size param settings render settings public fig enumeration object owner rectangle bounds diagram settings settings super owner bounds settings enable size checking true set suppress calc bounds false add fig get literals compartment this creates the compartment set enum literals visible true literals compartment populate set bounds get bounds abstractfigcomponent figenumeration diagramsettings enablesizechecking setsuppresscalcbounds addfig getliteralscompartment setenumliteralsvisible literalscompartment setbounds getbounds override protected string get keyword return enumeration getkeyword see org argouml uml diagram static structure ui fig data type make selection override public selection make selection return new selection enumeration this static_structure figdatatype makeselection makeselection selectionenumeration override public object clone fig enumeration clone fig enumeration super clone clone literals compartment fig enum literals compartment literals compartment clone return clone figenumeration figenumeration literalscompartment figenumliteralscompartment literalscompartment override protected argoj menu build add menu argoj menu add menu super build add menu action add enumeration literal new action add enumeration literal add enumeration literal set enabled is single target add menu add add enumeration literal return add menu argojmenu buildaddmenu argojmenu addmenu buildaddmenu addenumerationliteral actionaddenumerationliteral addenumerationliteral setenabled issingletarget addmenu addenumerationliteral addmenu override protected void model changed property change event mee super model changed mee if mee instanceof association change event mee instanceof attribute change event rendering changed update listeners get owner get owner modelchanged propertychangeevent modelchanged associationchangeevent attributechangeevent renderingchanged updatelisteners getowner getowner override public void rendering changed super rendering changed if get owner null update enum literals renderingchanged renderingchanged getowner updateenumliterals override protected void update listeners object old owner object new owner set object l new hash set object if new owner null add the listeners to the new owner l add new object new owner null and its stereotypes for object stereo model get facade get stereotypes new owner l add new object stereo null and its features for object feat model get facade get features new owner l add new object feat null and the stereotypes of its features for object stereo model get facade get stereotypes feat l add new object stereo null and its enumeration literals for object literal model get facade get enumeration literals new owner l add new object literal null and now add listeners to them all update element listeners l updatelisteners oldowner newowner hashset newowner newowner newowner getfacade getstereotypes newowner getfacade getfeatures newowner getfacade getstereotypes enumerationliterals getfacade getenumerationliterals newowner updateelementlisteners update i e redraw the compartment with the literals protected void update enum literals if literals compartment is visible return literals compartment populate todo make set bounds calc bounds and update bounds consistent set bounds get bounds updateenumliterals literalscompartment isvisible literalscompartment setbounds calcbounds updatebounds setbounds getbounds override public dimension get minimum size start with the minimum for our parent dimension a size super get minimum size if literals compartment null a size add child dimensions a size literals compartment return a size getminimumsize asize getminimumsize literalscompartment asize addchilddimensions asize literalscompartment asize override protected void set standard bounds final int x final int y final int width final int height save our old boundaries so it can be used in property message later rectangle old bounds get bounds int w math max width get minimum size width int h math max height get minimum size height set bounds of big box get big port set bounds x y w h border fig set bounds x y w h int current height 0 if get stereotype fig is visible int stereotype height get stereotype fig get minimum size height get stereotype fig set bounds x y w stereotype height current height stereotype height int name height get name fig get minimum size height get name fig set bounds x y current height w name height current height name height int visible compartments get operations fig is visible 1 0 if get literals compartment is visible visible compartments int literals height get literals compartment get minimum size height literals height math max literals height h current height visible compartments get literals compartment set bounds x line width y current height w line width literals height current height literals height if get operations fig is visible int operations height get operations fig get minimum size height operations height math max operations height h current height get operations fig set bounds x y current height w operations height current height operations height now force calculation of the bounds of the figure update the edges and trigger anyone who s listening to see if the bounds property has changed calc bounds update edges fire prop change bounds old bounds get bounds setstandardbounds oldbounds getbounds getminimumsize getminimumsize getbigport setbounds borderfig setbounds currentheight getstereotypefig isvisible stereotypeheight getstereotypefig getminimumsize getstereotypefig setbounds stereotypeheight currentheight stereotypeheight nameheight getnamefig getminimumsize getnamefig setbounds currentheight nameheight currentheight nameheight visiblecompartments getoperationsfig isvisible getliteralscompartment isvisible visiblecompartments literalsheight getliteralscompartment getminimumsize literalsheight literalsheight currentheight visiblecompartments getliteralscompartment setbounds line_width currentheight line_width literalsheight currentheight literalsheight getoperationsfig isvisible operationsheight getoperationsfig getminimumsize operationsheight operationsheight currentheight getoperationsfig setbounds currentheight operationsheight currentheight operationsheight calcbounds updateedges firepropchange oldbounds getbounds return the fig for the enumeration literals compartment public fig enum literals compartment get literals compartment set bounds will be called from our superclass constructor before our constructor has run so make sure this gets set up if needed if literals compartment null literals compartment new fig enum literals compartment get owner default compartment bounds get settings return literals compartment enumerationliterals figenumliteralscompartment getliteralscompartment literalscompartment literalscompartment figenumliteralscompartment getowner default_compartment_bounds getsettings literalscompartment return true if the literals compartment is visible public boolean is enum literals visible return literals compartment is visible isenumliteralsvisible literalscompartment isvisible param is visible true will show the enumeration literal compartment public void set enum literals visible boolean is visible set compartment visible literals compartment is visible isvisible setenumliteralsvisible isvisible setcompartmentvisible literalscompartment isvisible return the bounds of the enumeration literals compartment public rectangle get enum literals bounds return literals compartment get bounds enumerationliterals getenumliteralsbounds literalscompartment getbounds construct a new fig submachine state param owner owning uml element param bounds position and size param settings rendering settings public fig submachine state object owner rectangle bounds diagram settings settings super owner bounds settings include new fig single line text owner new rectangle x0 y0 width include height settings true init figs figsubmachinestate figsubmachinestate diagramsettings figsinglelinetext include_height initfigs the constructor deprecated for 0 27 4 by tfmorris use link fig submachine state object rectangle diagram settings suppress warnings deprecation deprecated public fig submachine state super include new fig single line text x0 y0 width include height true init figs figsubmachinestate diagramsettings suppresswarnings figsubmachinestate figsinglelinetext include_height initfigs private void init figs cover new figr rect get initialx get initialy get initial width get initial height line color fill color get big port set line width 0 divider new fig line get initialx get initialy 2 get name fig get bounds height 1 get initial width 1 get initialy 2 get name fig get bounds height 1 line color include set text place string include set bounds get initialx 2 get initialy 2 get initial width 4 include get bounds height include set editable false include set bot margin 4 leave some space below the include divider2 new fig line get initialx get initialy 2 get name fig get bounds height 1 get initial width 1 get initialy 2 get name fig get bounds height 1 line color circle1 new figr rect get initialx get initial width 55 get initialy get initial height 15 20 10 line color fill color circle2 new figr rect get initialx get initial width 25 get initialy get initial height 15 20 10 line color fill color circle1tocircle2 new fig line get initialx get initial width 35 get initialy get initial height 10 get initialx get initial width 25 get initialy get initial height 10 line color add fig get big port add fig cover add fig get name fig add fig divider add fig include add fig divider2 add fig get internal add fig circle1 add fig circle2 add fig circle1tocircle2 set bounds get bounds initfigs figrrect getinitialx getinitialy getinitialwidth getinitialheight line_color fill_color getbigport setlinewidth figline getinitialx getinitialy getnamefig getbounds getinitialwidth getinitialy getnamefig getbounds line_color settext placestring setbounds getinitialx getinitialy getinitialwidth getbounds seteditable setbotmargin figline getinitialx getinitialy getnamefig getbounds getinitialwidth getinitialy getnamefig getbounds line_color figrrect getinitialx getinitialwidth getinitialy getinitialheight line_color fill_color figrrect getinitialx getinitialwidth getinitialy getinitialheight line_color fill_color figline getinitialx getinitialwidth getinitialy getinitialheight getinitialx getinitialwidth getinitialy getinitialheight line_color addfig getbigport addfig addfig getnamefig addfig addfig addfig addfig getinternal addfig addfig addfig setbounds getbounds the constructor param gm ignored param node the owner uml object deprecated for 0 27 4 by tfmorris use link fig submachine state object rectangle diagram settings deprecated public fig submachine state suppress warnings unused graph model gm object node this set owner node figsubmachinestate diagramsettings figsubmachinestate suppresswarnings graphmodel setowner suppress warnings deprecation deprecated override public void set owner object node super set owner node update include suppresswarnings setowner setowner updateinclude override public object clone fig submachine state fig clone fig submachine state super clone iterator it fig clone get figs iterator fig clone set big port fig rect it next fig clone cover fig rect it next fig clone set name fig fig text it next fig clone divider fig line it next fig clone include fig text it next fig clone divider2 fig line it next fig clone set internal fig text it next return fig clone figsubmachinestate figclone figsubmachinestate figclone getfigs figclone setbigport figrect figclone figrect figclone setnamefig figtext figclone figline figclone figtext figclone figline figclone setinternal figtext figclone override public dimension get minimum size dimension name dim get name fig get minimum size dimension internal dim get internal get minimum size dimension include dim include get minimum size int h space top name dim height space middle include dim height space middle internal dim height space bottom int waux math max name dim width internal dim width 2 margin int w math max waux include dim width 50 return new dimension w h getminimumsize namedim getnamefig getminimumsize internaldim getinternal getminimumsize includedim getminimumsize space_top namedim space_middle includedim space_middle internaldim space_bottom namedim internaldim includedim see org tigris gef presentation fig get use trap rect override public boolean get use trap rect return true getusetraprect getusetraprect override protected void set standard bounds int x int y int w int h if get name fig null return rectangle old bounds get bounds dimension name dim get name fig get minimum size dimension include dim include get minimum size get name fig set bounds x margin y space top w 2 margin name dim height divider set shape x y divider y name dim height x w 1 y divider y name dim height include set bounds x margin y space top name dim height space top w 2 margin include dim height divider2 set shape x y name dim height divider y include dim height divider y x w 1 y name dim height divider y include dim height divider y get internal set bounds x margin y space top name dim height space top include dim height space middle w 2 margin h space top name dim height space top include dim height space middle space bottom circle1 set bounds x w 55 y h 15 20 10 circle2 set bounds x w 25 y h 15 20 10 circle1tocircle2 set shape x w 35 y h 10 x w 25 y h 10 get big port set bounds x y w h cover set bounds x y w h calc bounds x x y y w w h h update edges fire prop change bounds old bounds get bounds setstandardbounds getnamefig oldbounds getbounds namedim getnamefig getminimumsize includedim getminimumsize getnamefig setbounds space_top namedim setshape divider_y namedim divider_y namedim setbounds space_top namedim space_top includedim setshape namedim divider_y includedim divider_y namedim divider_y includedim divider_y getinternal setbounds space_top namedim space_top includedim space_middle space_top namedim space_top includedim space_middle space_bottom setbounds setbounds setshape getbigport setbounds setbounds calcbounds _x _y _w _h updateedges firepropchange oldbounds getbounds override public void set line color color col cover set line color col divider set line color col divider2 set line color col circle1 set line color col circle2 set line color col circle1tocircle2 set line color col setlinecolor setlinecolor setlinecolor setlinecolor setlinecolor setlinecolor setlinecolor see org tigris gef presentation fig get line color override public color get line color return cover get line color getlinecolor getlinecolor getlinecolor see org tigris gef presentation fig set fill color java awt color override public void set fill color color col cover set fill color col setfillcolor setfillcolor setfillcolor see org tigris gef presentation fig get fill color override public color get fill color return cover get fill color getfillcolor getfillcolor getfillcolor override public void set filled boolean f cover set filled f get big port set filled f setfilled setfilled getbigport setfilled override public boolean is filled return cover is filled isfilled isfilled override public void set line width int w cover set line width w divider set line width w divider2 set line width w setlinewidth setlinewidth setlinewidth setlinewidth see org tigris gef presentation fig get line width override public int get line width return cover get line width getlinewidth getlinewidth getlinewidth protected void model changed property change event mee super model changed mee if get owner null return if mee get source equals get owner if mee get property name equals submachine update include if mee get old value null update listenersx get owner mee get old value else if mee get source model get facade get submachine get owner the machine state has got a new name if mee get property name equals name update include the machine state has been deleted from model if mee get property name equals top update listeners get owner null modelchanged propertychangeevent modelchanged getowner getsource getowner getpropertyname updateinclude getoldvalue updatelistenersx getowner getoldvalue getsource getfacade getsubmachine getowner getpropertyname updateinclude getpropertyname updatelisteners getowner override protected void update listeners object old owner object new owner super update listeners old owner new owner if new owner null object new sm model get facade get submachine new owner if new sm null add element listener new sm updatelisteners oldowner newowner updatelisteners oldowner newowner newowner newsm getfacade getsubmachine newowner newsm addelementlistener newsm private void update listenersx object new owner object oldv this update listeners get owner new owner if oldv null remove element listener oldv updatelistenersx newowner updatelisteners getowner newowner removeelementlistener private void update include include set text generate submachine get owner calc bounds set bounds get bounds damage updateinclude settext generatesubmachine getowner calcbounds setbounds getbounds private string generate submachine object m object c model get facade get submachine m string s include if c null model get facade get name c null model get facade get name c length 0 return s return s model get facade get name c generatesubmachine getfacade getsubmachine getfacade getname getfacade getname getfacade getname see org argouml uml diagram state ui fig state get initial height protected int get initial height return 150 figstate getinitialheight getinitialheight see org argouml uml diagram state ui fig state get initial width protected int get initial width return 180 figstate getinitialwidth getinitialwidth see org argouml uml diagram state ui fig state get initialx protected int get initialx return 0 figstate getinitialx getinitialx see org argouml uml diagram state ui fig state get initialy protected int get initialy return 0 figstate getinitialy getinitialy constructor param model the single item list model public uml single row selector list model model super new border layout scroll new scroll list model 1 add scroll preferred size scroll get preferred size scroll set vertical scroll bar policy j scroll pane vertical scrollbar never scroll set horizontal scroll bar policy j scroll pane horizontal scrollbar never umlsinglerowselector listmodel borderlayout scrolllist preferredsize getpreferredsize setverticalscrollbarpolicy jscrollpane vertical_scrollbar_never sethorizontalscrollbarpolicy jscrollpane horizontal_scrollbar_never make sure the control is always a fixed height return the minimum size as the height of one row in a j list public dimension get minimum size dimension size super get minimum size size height preferred size height return size jlist getminimumsize getminimumsize preferredsize make sure the control is always a fixed height return the maximum size as the height of one row in a j list public dimension get maximum size dimension size super get maximum size size height preferred size height return size jlist getmaximumsize getmaximumsize preferredsize return the preferred size as the height of one row in a j list public dimension get preferred size return preferred size jlist getpreferredsize preferredsize construct an empty node row with the given row number param a row number the row number of this row public node row int a row number row number a row number noderow arownumber noderow arownumber rownumber arownumber add a node to this node row param node the node to be added public void add node classdiagram node node node set rank row number node set column nodes size nodes add node noderow addnode classdiagramnode setrank rownumber setcolumn splittable are packages and standalone nodes a split is performed if the maximum width is reached or when a type change occurs from package to not package from standalone to not standalone ul li packages li after standalone ul split this row into two if ul li at least one standalone node is available li and the given maximum row width is exceeded li or a non standalone element is detected ul return the new node row or null if this row is not split param max width the maximum allowed row width param gap the horizontal gab between two nodes return node row public node row do split int max width int gap tree set classdiagram node ts new tree set classdiagram node nodes if ts size 2 return null classdiagram node first node ts first if first node is standalone return null classdiagram node last node ts last if first node is standalone last node is standalone first node is package last node is package get width gap max width return null boolean has package first node is package node row new row new node row row number 1 classdiagram node split null int width 0 int count 0 for iterator classdiagram node iter ts iterator iter has next width max width count 2 classdiagram node node iter next split split null split is standalone node split split split null has package split is package has package split is standalone node split width node get size width gap count nodes new array list classdiagram node ts head set split for classdiagram node n ts tail set split new row add node n if log is debug enabled log debug row split this row width get width gap next row s width new row get width gap return new row noderow maxwidth noderow noderow dosplit maxwidth treeset classdiagramnode treeset classdiagramnode classdiagramnode firstnode firstnode isstandalone classdiagramnode lastnode firstnode isstandalone lastnode isstandalone firstnode ispackage lastnode ispackage getwidth maxwidth haspackage firstnode ispackage noderow newrow noderow rownumber classdiagramnode classdiagramnode hasnext maxwidth classdiagramnode isstandalone haspackage ispackage haspackage isstandalone getsize arraylist classdiagramnode headset classdiagramnode tailset newrow addnode isdebugenabled getwidth newrow getwidth newrow return returns the nodes public list classdiagram node get node list return nodes classdiagramnode getnodelist return returns the row number public int get row number return row number rownumber getrownumber rownumber get the width for this row using the given horizontal gap between nodes param gap the horizontal gap between nodes return the width of this row public int get width int gap int result 0 for classdiagram node node nodes result node get size width gap if log is debug enabled log debug width of row row number result return result getwidth classdiagramnode getsize isdebugenabled rownumber set the row number of this row param row num the row number to set public void set row number int row num this row number row num adjust row nodes rownum rownumber setrownumber rownum rownumber rownum adjustrownodes adjust the properties for all nodes in this row rank column offset for edges private void adjust row nodes int col 0 int num nodes with downlinks 0 list classdiagram node list new array list classdiagram node for classdiagram node node this node set rank row number node set column col if node get down nodes is empty num nodes with downlinks list add node int offset num nodes with downlinks e gap 2 for classdiagram node node list node set edge offset offset offset e gap adjustrownodes numnodeswithdownlinks classdiagramnode arraylist classdiagramnode classdiagramnode setrank rownumber setcolumn getdownnodes isempty numnodeswithdownlinks numnodeswithdownlinks e_gap classdiagramnode setedgeoffset e_gap return an iterator for the nodes of this row sorted by their natural order see java lang iterable iterator public iterator classdiagram node iterator return new tree set classdiagram node nodes iterator classdiagramnode treeset classdiagramnode constructor for the layouter takes a diagram as input to extract all layouted objects which will be layouted param the diagram the diagram to layout public classdiagram layouter argo diagram the diagram diagram the diagram for fig fig diagram get layer get contents if fig get enclosing fig null add classdiagram model element factory singleton get instance fig layoutedobjects thediagram classdiagramlayouter argodiagram thediagram thediagram getlayer getcontents getenclosingfig classdiagrammodelelementfactory getinstance add an object to layout param obj represents the object to layout public void add layouted object obj todo check for duplicates is this possible layouted objects add obj if obj instanceof classdiagram node layouted class nodes add classdiagram node obj else if obj instanceof classdiagram edge layouted edges add classdiagram edge obj layoutedobject layoutedobjects classdiagramnode layoutedclassnodes classdiagramnode classdiagramedge layoutededges classdiagramedge get the horizontal gap between nodes return the horizontal gap between nodes private int geth gap return h gap gethgap h_gap return the minimum diagram size after the layout process return the minimum diagram size after the layout process public dimension get minimum diagram size int width 0 height 0 int h gap2 geth gap 2 int v gap2 getv gap 2 for classdiagram node node layouted class nodes width math max width node get location x int node get size get width h gap2 height math max height node get location y int node get size get height v gap2 return new dimension width height getminimumdiagramsize hgap2 gethgap vgap2 getvgap classdiagramnode layoutedclassnodes getlocation getsize getwidth hgap2 getlocation getsize getheight vgap2 return the object with a given index from the layouter param index represents the index of this object in the layouter return the layouted object for the given index public layouted object get object int index return layouted objects get index layoutedobject layoutedobject getobject layoutedobjects return all the objects currently participating in the layout process return an array holding all the object in the layouter public layouted object get objects return layouted object layouted objects to array layoutedobject getobjects layoutedobject layoutedobjects toarray get the vertical gap between nodes return the vertical gap between nodes private int getv gap return v gap getvgap v_gap lay out the current diagram public void layout long s system current time millis setup links rank and weight nodes place nodes place edges log debug layout duration system current time millis s currenttimemillis setuplinks rankandweightnodes placenodes placeedges currenttimemillis all layouted objects of type edge are placed using an edge type specific layout algorithm the offset from a em centered em edge is taken from the parent node to avoid overlaps see classdiagram edge private void place edges classdiagram edge setv gap getv gap classdiagram edge seth gap geth gap for classdiagram edge edge layouted edges if edge instanceof classdiagram inheritance edge classdiagram node parent fig nodes get edge get dest fig node classdiagram inheritance edge edge set offset parent get edge offset edge layout layoutedobjects classdiagramedge placeedges classdiagramedge setvgap getvgap classdiagramedge sethgap gethgap classdiagramedge layoutededges classdiagraminheritanceedge classdiagramnode fignodes getdestfignode classdiagraminheritanceedge setoffset getedgeoffset set the placement coordinate for a given node param node to be placed private void place node classdiagram node node list classdiagram node uplinks node get up nodes list classdiagram node downlinks node get down nodes int width node get size width double x offset width geth gap int bumpx geth gap 2 x offset curw 2 int x pos new math max x pos bumpx uplinks size 1 node get placement hint 1 node set location new point x pos new y pos if log is debug enabled log debug place node row node get rank col node get column weight node get weight position x pos new y pos x pos x pos hint node get placement hint if there s only a single child and we re it s only parent set a hint for where to place it when we get to its row if downlinks size 1 classdiagram node down node downlinks get 0 if down node get up nodes get 0 equals node down node set placement hint x pos new x pos int math max node get placement hint width x pos x offset placenode classdiagramnode classdiagramnode getupnodes classdiagramnode getdownnodes getsize xoffset gethgap gethgap xoffset xposnew xpos getplacementhint setlocation xposnew ypos isdebugenabled placenode getrank getcolumn getweight xposnew ypos xpos xpos getplacementhint classdiagramnode downnode downnode getupnodes downnode setplacementhint xposnew xpos getplacementhint xpos xoffset place the node rows in the diagram private void place nodes todo place comments near connected classes todo place from middle towards outer edges or place largest groups first int x init 0 y pos getv gap 2 for node row row node rows x pos x init int row height 0 for classdiagram node node row place node node row height math max row height node get size height y pos row height getv gap center parents noderows placenodes xinit ypos getvgap noderow noderows xpos xinit rowheight classdiagramnode placenode rowheight rowheight getsize ypos rowheight getvgap centerparents center parents over their children working from bottom to top private void center parents for int i node rows size 1 i 0 i for classdiagram node node node rows get i list classdiagram node children node get down nodes if children size 0 node set location new point x center children node get size width 2 node get location y todo make another pass to deal with overlaps centerparents noderows classdiagramnode noderows classdiagramnode getdownnodes setlocation xcenter getsize getlocation compute the horizontal center of a list of nodes param nodes the list of nodes return the computed x coordinate private int x center list classdiagram node nodes int left 9999999 int right 0 for classdiagram node node nodes int x node get location x left math min left x right math max right x node get size width return right left 2 xcenter classdiagramnode classdiagramnode getlocation getsize rank the nodes depending on their level position in hierarchy and set their weight to achieve a proper node sequence for the layout rows exceeding the maximum row width are split if standalone nodes are available p weight the other nodes to determine their columns p todo weighting doesn t appear to be working as intended because multiple groups of children specializations get intermixed in name order rather than being grouped by their parent generalization tfm 20070314 private void rank and weight nodes list classdiagram node comments new array list classdiagram node node rows clear tree set classdiagram node node tree new tree set classdiagram node layouted class nodes boolean has packages false todo move package in row to node row for classdiagram node node node tree if node is package has packages true else if has packages has packages false current rank 1 if node is comment comments add node else int row num node get rank for int i node rows size i row num i node rows add new node row row num node rows get row num add node node for classdiagram node node comments int row ind node get up nodes is empty 0 node get up nodes get 0 get rank node rows get row ind add node node for int row 0 row node rows size node row dia row node rows get row dia row set row number row dia row dia row do split max row width h gap if dia row null node rows add row dia row rankandweightnodes classdiagramnode arraylist classdiagramnode noderows treeset classdiagramnode nodetree treeset classdiagramnode layoutedclassnodes haspackages noderow classdiagramnode nodetree ispackage haspackages haspackages haspackages currentrank iscomment rownum getrank noderows rownum noderows noderow rownum noderows rownum addnode classdiagramnode rowind getupnodes isempty getupnodes getrank noderows rowind addnode noderows noderow diarow noderows diarow setrownumber diarow diarow dosplit max_row_width h_gap diarow noderows diarow remove an object from the layout process param obj represents the object to remove public void remove layouted object obj layouted objects remove obj layoutedobject layoutedobjects set the up and downlinks for each node based on the edges which are shown in the diagram private void setup links fig nodes clear hash map fig list classdiagram inheritance edge fig parent edges new hash map fig list classdiagram inheritance edge for classdiagram node node layouted class nodes node get up nodes clear node get down nodes clear fig nodes put node get figure node for classdiagram edge edge layouted edges fig parent fig edge get dest fig node classdiagram node child fig nodes get edge get source fig node classdiagram node parent fig nodes get parent fig if edge instanceof classdiagram inheritance edge if parent null child null parent add downlink child child add uplink parent list classdiagram inheritance edge edge list fig parent edges get parent fig if edge list null edge list new array list classdiagram inheritance edge fig parent edges put parent fig edge list edge list add classdiagram inheritance edge edge else log error edge with missing end s edge else if edge instanceof classdiagram note edge if parent is comment parent add uplink child else if child is comment child add uplink parent else log error unexpected parent child constellation for edge edge else if edge instanceof classdiagram association edge associations not supported yet todo create appropriate classdiagram edge else log error unsupported edge type setuplinks fignodes hashmap classdiagraminheritanceedge figparentedges hashmap classdiagraminheritanceedge classdiagramnode layoutedclassnodes getupnodes getdownnodes fignodes getfigure classdiagramedge layoutededges parentfig getdestfignode classdiagramnode fignodes getsourcefignode classdiagramnode fignodes parentfig classdiagraminheritanceedge adddownlink adduplink classdiagraminheritanceedge edgelist figparentedges parentfig edgelist edgelist arraylist classdiagraminheritanceedge figparentedges parentfig edgelist edgelist classdiagraminheritanceedge classdiagramnoteedge iscomment adduplink iscomment adduplink classdiagramassociationedge classdiagramedge constructor for uml use case extend list model public uml use case extend list model super extend umlusecaseextendlistmodel umlusecaseextendlistmodel see org argouml uml ui uml model element list model2 build model list protected void build model list set all elements model get facade get extends get target umlmodelelementlistmodel2 buildmodellist buildmodellist setallelements getfacade getextends gettarget see org argouml uml ui uml model element list model2 is valid element object protected boolean is valid element object o return model get facade get extends get target contains o umlmodelelementlistmodel2 isvalidelement isvalidelement getfacade getextends gettarget public string format element object element object namespace string value null if element null value else object element ns model get facade get namespace element if element is an association end use the namespace of containing association if model get facade isa association end element object assoc model get facade get association element if assoc null element ns model get facade get namespace assoc if element ns namespace value model get facade get name element if value null value length 0 value default name element namespace else string buffer buffer new string buffer string path sep get path separator build path buffer element path sep value buffer to string return value formatelement elementns getfacade getnamespace associationend getfacade isaassociationend getfacade getassociation elementns getfacade getnamespace elementns getfacade getname defaultname stringbuffer stringbuffer pathsep getpathseparator buildpath pathsep tostring param assoc end the given association end name param namespace the namespace return the default name for the given associationend protected string default assoc end name object assoc end object namespace string name null object type model get facade get type assoc end if type null name format element type namespace else name unknown type object mult model get facade get multiplicity assoc end if mult null string buffer buf new string buffer name buf append buf append integer to string model get facade get lower mult buf append int upper model get facade get upper mult if upper 0 buf append integer to string upper else buf append buf append name buf to string return name assocend defaultassocendname assocend getfacade gettype assocend formatelement getfacade getmultiplicity assocend stringbuffer stringbuffer tostring getfacade getlower getfacade getupper tostring tostring create a default association name from its ends param assoc the given association param ns the namespace return the default association name protected string default assoc name object assoc object ns string buffer buf new string buffer iterator iter model get facade get connections assoc iterator for int i 0 iter has next i if i 0 buf append buf append default assoc end name iter next ns return buf to string defaultassocname stringbuffer stringbuffer getfacade getconnections hasnext defaultassocendname tostring param gen the given generalization param namespace the namespace return the default generalization name protected string default generalization name object gen object namespace object child model get facade get specific gen object parent model get facade get general gen string buffer buf new string buffer buf append format element child namespace buf append extends buf append format element parent namespace return buf to string defaultgeneralizationname getfacade getspecific getfacade getgeneral stringbuffer stringbuffer formatelement formatelement tostring param element the given modelelement param namespace the namespace return a default name for this modelelement protected string default name object element object namespace string name null if model get facade isa association end element name default assoc end name element namespace else if model get facade isa association element name default assoc name element namespace if model get facade isa generalization element name default generalization name element namespace if name null name anon return name defaultname getfacade isaassociationend defaultassocendname getfacade isaassociation defaultassocname getfacade isageneralization defaultgeneralizationname return the path separator currently protected string get path separator return getpathseparator param buffer out the buffer that will contain the path build param element the given modelelement param path sep the path separator character s private void build path string buffer buffer object element string path sep if element null object parent model get facade get namespace element if parent null parent element build path buffer parent path sep buffer append path sep string name model get facade get name element if name null name length 0 name default name element null buffer append name pathsep buildpath stringbuffer pathsep getfacade getnamespace buildpath pathsep pathsep getfacade getname defaultname return the string that separates elements protected string get element separator return getelementseparator return the string that represents an empty collection protected string get empty collection return empty getemptycollection public string format collection iterator iter object namespace string value null if iter has next string buffer buffer new string buffer string element sep get element separator object obj null for int i 0 iter has next i if i 0 buffer append element sep obj iter next if model get facade isa model element obj buffer append format element obj namespace else buffer append obj to string value buffer to string else value get empty collection return value formatcollection hasnext stringbuffer stringbuffer elementsep getelementseparator hasnext elementsep getfacade isamodelelement formatelement tostring tostring getemptycollection constructor public action set association end multiplicity super actionsetassociationendmultiplicity public void set selected item object item object target if target null model get facade isa association end target if model get facade isa multiplicity item if item equals model get facade get multiplicity target model get core helper set multiplicity target item else if item instanceof string if item equals model get facade to string model get facade get multiplicity target model get core helper set multiplicity target model get data types factory create multiplicity string item else model get core helper set multiplicity target null setselecteditem getfacade isaassociationend getfacade isamultiplicity getfacade getmultiplicity getcorehelper setmultiplicity getfacade tostring getfacade getmultiplicity getcorehelper setmultiplicity getdatatypesfactory createmultiplicity getcorehelper setmultiplicity return returns the singleton public static action set association end multiplicity get instance return singleton actionsetassociationendmultiplicity getinstance the constructor param x x param y y param w width param h height deprecated for 0 27 3 by tfmorris use link fig attributes compartment object rectangle diagram settings suppress warnings deprecation deprecated public fig attributes compartment int x int y int w int h super x y w h figattributescompartment diagramsettings suppresswarnings figattributescompartment constructor param owner owning uml element param bounds bounding rectangle param settings render settings public fig attributes compartment object owner rectangle bounds diagram settings settings super owner bounds settings super populate figattributescompartment diagramsettings see org argouml uml diagram ui fig editable compartment get uml collection protected collection get uml collection object cls get owner return model get facade get structural features cls figeditablecompartment getumlcollection getumlcollection getowner getfacade getstructuralfeatures see org argouml uml diagram ui fig editable compartment get notation type protected int get notation type return notation provider factory2 type attribute figeditablecompartment getnotationtype getnotationtype notationproviderfactory2 type_attribute protected void create model element object classifier get group get owner project project get project object attr type project get default attribute type object attr model get core factory build attribute2 classifier attr type target manager get instance set target attr createmodelelement getgroup getowner getproject attrtype getdefaultattributetype getcorefactory buildattribute2 attrtype targetmanager getinstance settarget suppress warnings deprecation deprecated override protected fig single line text with notation create fig text object owner rectangle bounds diagram settings settings notation provider np return new fig attribute owner bounds settings np suppresswarnings figsinglelinetextwithnotation createfigtext diagramsettings notationprovider figattribute override protected fig single line text with notation create fig text object owner rectangle bounds diagram settings settings return new fig attribute owner bounds settings figsinglelinetextwithnotation createfigtext diagramsettings figattribute private static class selection feature extends selection constructor for selection feature param f the fig public selection feature fig f super f selectionfeature selectionfeature selectionfeature org tigris gef presentation handle public void drag handle int mx int my int anx int any handle h does nothing draghandle org tigris gef presentation handle public void hit handle rectangle r handle h does nothing hithandle constructor for fig feature param x x param y x param w w param h h param a fig the fig param np the notation provider for the text deprecated for 0 27 3 by tfmorris use link fig feature object rectangle diagram settings notation provider suppress warnings deprecation deprecated public fig feature int x int y int w int h fig a fig notation provider np super x y w h a fig np figfeature afig figfeature diagramsettings notationprovider suppresswarnings figfeature afig notationprovider afig construct a feature fig deprecated by mvw in v0 27 3 use the constructor without np parameter param owner owning uml element param bounds position and size param settings rendering settings param np notation provider deprecated public fig feature object owner rectangle bounds diagram settings settings notation provider np super owner bounds settings np update owner scope model get facade is static owner model get pump add model event listener this owner event name figfeature diagramsettings notationprovider updateownerscope getfacade isstatic getpump addmodeleventlistener event_name construct a feature fig param owner owning uml element param bounds position and size param settings rendering settings public fig feature object owner rectangle bounds diagram settings settings super owner bounds settings update owner scope model get facade is static owner model get pump add model event listener this owner event name figfeature diagramsettings updateownerscope getfacade isstatic getpump addmodeleventlistener event_name suppress warnings deprecation deprecated override public void set owner object owner super set owner owner if owner null update owner scope model get facade is static owner model get pump add model event listener this owner event name suppresswarnings setowner setowner updateownerscope getfacade isstatic getpump addmodeleventlistener event_name override public void remove from diagram model get pump remove model event listener this get owner event name super remove from diagram removefromdiagram getpump removemodeleventlistener getowner event_name removefromdiagram override public void property change property change event pce super property change pce if event name equals pce get property name todo this needs to be modified for uml 2 x update owner scope model get scope kind get classifier equals pce get new value propertychange propertychangeevent propertychange event_name getpropertyname updateownerscope getscopekind getclassifier getnewvalue see org tigris gef presentation fig make selection override public selection make selection return new selection feature this makeselection makeselection selectionfeature see org tigris gef presentation fig text set text filled boolean override public void set text filled boolean filled super set text filled false figtext settextfilled settextfilled settextfilled see org tigris gef presentation fig set filled boolean override public void set filled boolean filled super set filled false setfilled setfilled setfilled underline if the scope is classifier param is classifier true will cause underlining protected void update owner scope boolean is classifier set underline is classifier isclassifier updateownerscope isclassifier setunderline isclassifier the constructor public action new actor super button new actor put value action name translator localize button new actor actionnewactor putvalue public void action performed action event e object target target manager get instance get model target if model get facade isa actor target object model project manager get manager get current project get model target manager get instance set target model get use cases factory build actor target model super action performed e actionperformed actionevent targetmanager getinstance getmodeltarget getfacade isaactor projectmanager getmanager getcurrentproject getmodel targetmanager getinstance settarget getusecasesfactory buildactor actionperformed constructor public action about argouml super translator localize action about argouml resource loader wrapper lookup icon action about argouml actionaboutargouml resourceloaderwrapper lookupicon public void action performed action event ae j frame jframe argo frame get instance about box box new about box jframe true box set location relative to jframe box set visible true actionperformed actionevent jframe argoframe getinstance aboutbox aboutbox setlocationrelativeto setvisible the constructor param model element the uml model param x the x coordinate of the location param y the y coordinate of the location deprecated for 0 27 3 by tfmorris use link fig model object rectangle diagram settings suppress warnings deprecation deprecated public fig model object model element int x int y super model element x y construct figs modelelement figmodel diagramsettings suppresswarnings figmodel modelelement modelelement constructfigs private void construct figs int xpoints 125 130 135 125 int ypoints 45 40 45 45 polygon polygon new polygon xpoints ypoints 4 fig poly set polygon polygon fig poly set filled false add fig fig poly set bounds get bounds update edges constructfigs figpoly setpolygon figpoly setfilled addfig figpoly setbounds getbounds updateedges the constructor that hooks the fig into the uml modelelement param gm ignored param node the u ml element deprecated for 0 27 3 by tfmorris use link fig model object rectangle diagram settings deprecated public fig model suppress warnings unused graph model gm object node this node 0 0 uml figmodel diagramsettings figmodel suppresswarnings graphmodel construct a model fig param owner owning uml element param bounds position and size param settings rendering settings public fig model object owner rectangle bounds diagram settings settings super owner bounds settings construct figs figmodel diagramsettings constructfigs override protected void set standard bounds int x int y int w int h if fig poly null rectangle old bounds get bounds fig poly translate x old bounds x w old bounds width y old bounds y super set standard bounds x y w h setstandardbounds figpoly oldbounds getbounds figpoly oldbounds oldbounds oldbounds setstandardbounds see org argouml ui explorer rules perspective rule get rule name public string get rule name return translator localize misc behavioral feature statemachine perspectiverule getrulename getrulename public collection get children object parent if model get facade isa behavioral feature parent return model get facade get behaviors parent return collections empty set getchildren getfacade isabehavioralfeature getfacade getbehaviors empty_set public set get dependencies object parent if model get facade isa behavioral feature parent set set new hash set set add parent return set return collections empty set getdependencies getfacade isabehavioralfeature hashset empty_set constructor for this action public action open project super translator localize action open project resource loader wrapper lookup icon action open project set the tooltip string put value action short description translator localize action open project actionopenproject resourceloaderwrapper lookupicon putvalue short_description performs the action of opening a project param e an event public void action performed action event e super action performed e project p project manager get manager get current project persistence manager pm persistence manager get instance if project browser get instance ask confirmation and save return next line does give user home back but this is not compliant with how the project uri works and therefore open and save project as give different starting directories string directory globals get last directory j file chooser chooser null if p null p geturi null file file new file p geturi if file get parent file null chooser new j file chooser file get parent else chooser new j file chooser if chooser null chooser new j file chooser chooser set dialog title translator localize filechooser open project chooser set accept all file filter used false adding project files icon chooser set file view project file view get instance pm set open file chooser filter chooser string fn configuration get string persistence manager key open project path if fn length 0 chooser set selected file new file fn int retval chooser show open dialog argo frame get instance if retval j file chooser approve option file the file chooser get selected file if the file can read try adding the extension from the chosen filter file filter ffilter chooser get file filter if ffilter instanceof abstract file persister abstract file persister afp abstract file persister ffilter file m new file the file get path afp get extension if m can read the file m if the file can read try adding the default extension file n new file the file get path pm get default extension if n can read the file n if the file null configuration set string persistence manager key open project path the file get path project browser get instance load project with progress monitor the file true actionperformed actionevent actionperformed projectmanager getmanager getcurrentproject persistencemanager persistencemanager getinstance projectbrowser getinstance askconfirmationandsave getlastdirectory jfilechooser getparentfile jfilechooser getparent jfilechooser jfilechooser setdialogtitle setacceptallfilefilterused setfileview projectfileview getinstance setopenfilechooserfilter getstring persistencemanager key_open_project_path setselectedfile showopendialog argoframe getinstance jfilechooser approve_option thefile getselectedfile thefile canread filefilter getfilefilter abstractfilepersister abstractfilepersister abstractfilepersister thefile getpath getextension canread thefile thefile canread thefile getpath getdefaultextension canread thefile thefile setstring persistencemanager key_open_project_path thefile getpath projectbrowser getinstance loadprojectwithprogressmonitor thefile execute this action from the command line see org argouml application api command line interface do command string param argument is the url of the project we load return true if it is ok public boolean do command string argument return project browser get instance load project new file argument false null commandlineinterface docommand docommand projectbrowser getinstance loadproject public class init deployment diagram implements init subsystem public list abstract argoj panel get details tabs return collections empty list initdeploymentdiagram initsubsystem abstractargojpanel getdetailstabs emptylist public list gui settings tab interface get project settings tabs return collections empty list guisettingstabinterface getprojectsettingstabs emptylist public list gui settings tab interface get settings tabs return collections empty list guisettingstabinterface getsettingstabs emptylist public void init set up the property panels for deployment diagrams prop panel factory diagram factory new deployment diagram prop panel factory prop panel factory manager add prop panel factory diagram factory proppanelfactory diagramfactory deploymentdiagramproppanelfactory proppanelfactorymanager addproppanelfactory diagramfactory private constructor to not allow instantiation private configuration factory configurationfactory returns the instance of the singleton return the only instance of the configuration factory public static final i configuration factory get instance return singleton iconfigurationfactory getinstance returns the customized configuration for the user return a concrete class which extends configuration handler and can be used to access and manipulate the configuration public configuration handler get configuration handler todo allow other configuration handlers return handler configurationhandler configurationhandler getconfigurationhandler public collection get children object parent if model get facade isa state parent model get facade get entry parent null collection children new array list children add model get facade get entry parent return children return collections empty set getchildren getfacade isastate getfacade getentry arraylist getfacade getentry empty_set public set get dependencies object parent if model get facade isa state parent set set new hash set set add parent return set return collections empty set getdependencies getfacade isastate hashset empty_set see org argouml ui explorer rules perspective rule get rule name public string get rule name return translator localize misc state entry perspectiverule getrulename getrulename the constructor param et the event type param src the sourc that triggered the event public argo event int et object src super src event type et argoevent eventtype return the event type public int get event type return event type geteventtype eventtype indicates the start of the range for any events return the first id reserved for events indicates the end of the range for notation events p todo remove this not used anyway return the last id reserved for events public int get event end range return get event start range 0 argo event end get event start range 99 geteventendrange geteventstartrange argo_event_end geteventstartrange provides formatted description of the event return the formatted information public string to string return get class get name event type get event start range get event end range super to string tostring getclass getname eventtype geteventstartrange geteventendrange tostring param name to be localized param has icon true if an icon is to be shown public to do item action string name boolean has icon super translator localize name has icon resource loader wrapper lookup icon name null set the tooltip string put value action short description translator localize name hasicon todoitemaction hasicon hasicon resourceloaderwrapper lookupicon putvalue short_description return returns the remembered target protected object get remembered target return remembered target rememberedtarget getrememberedtarget rememberedtarget param target the target public void update enabled object target if target null set enabled false return remembered target target set enabled is enabled target updateenabled setenabled rememberedtarget setenabled isenabled param target the current target return true if the action icon should be enabled i e not downlighted public boolean is enabled object target return target instanceof to do item isenabled todoitem default constructor deprecated for 0 27 3 by tfmorris use link fig exception object rectangle diagram settings suppress warnings deprecation deprecated public fig exception super figexception diagramsettings suppresswarnings figexception the constructor param gm the graph model param node the uml object deprecated for 0 27 3 by tfmorris use link fig exception object rectangle diagram settings suppress warnings deprecation deprecated public fig exception graph model gm object node super gm node graphmodel figexception diagramsettings suppresswarnings figexception graphmodel construct an exception fig param owner owning exception param bounds position and size param settings render settings public fig exception object owner rectangle bounds diagram settings settings super owner bounds settings figexception diagramsettings override public selection make selection return new selection exception this makeselection selectionexception contructs a new figlink and sets the owner of the figlink param owner is the owner public fig message object owner super text group new fig text group text group add fig get name fig text group add fig get stereotype fig add path item text group new path item placement this text group 50 10 set owner owner figmessage textgroup figtextgroup textgroup addfig getnamefig textgroup addfig getstereotypefig addpathitem textgroup pathitemplacement textgroup setowner constructor here for saving and loading purposes public fig message this null figmessage returns the action attached to this link if any p return the action attached to this link or null if there isn t any public object get action object owner get owner if owner null model get facade isa message owner return model get facade get action owner return null getaction getowner getfacade isamessage getfacade getaction public fig get source port fig fig result super get source port fig if result instanceof fig classifier role temp fig get owner null result get source fig classifier role create fig message port get owner fig classifier role temp fig result set source port fig result return result getsourceportfig getsourceportfig figclassifierrole tempfig getowner getsourcefigclassifierrole createfigmessageport getowner figclassifierrole tempfig setsourceportfig public fig get dest port fig fig result super get dest port fig if result instanceof fig classifier role temp fig get owner null result get dest fig classifier role create fig message port get owner fig classifier role temp fig result set dest port fig result return result getdestportfig getdestportfig figclassifierrole tempfig getowner getdestfigclassifierrole createfigmessageport getowner figclassifierrole tempfig setdestportfig computes the route of this link fig message and computes the connectionpoints of the figlink to the ports this depends on the action attached to the owner of the link fig message also adds fig activations etc or moves the link fig classifier role s if necessary p see org tigris gef presentation fig edge compute route public void compute route impl fig source fig get source port fig fig dest fig get dest port fig if source fig instanceof fig message port dest fig instanceof fig message port fig message port srcmp fig message port source fig fig message port destmp fig message port dest fig point start point source fig connection point destmp get center point end point dest fig connection point srcmp get center if it is a self message if is self message if start point x source fig get center x start point x source fig get width end point x start point x set end points start point end point if this is the first time it is laid out will only have 2 points add the middle point if get num points 2 insert point 0 start point x sequence diagram layer object distance 3 start point y end point y 2 else otherwise move the middle point int middlex start point x sequence diagram layer object distance 3 int middley start point y end point y 2 point p get point 1 if p x middlex p y middley set point new handle 1 middlex middley else set end points start point end point calc bounds layout edge figmessage figmessage figactivations figclassifierrole figedge computeroute computerouteimpl sourcefig getsourceportfig destfig getdestportfig sourcefig figmessageport destfig figmessageport figmessageport figmessageport sourcefig figmessageport figmessageport destfig startpoint sourcefig connectionpoint getcenter endpoint destfig connectionpoint getcenter isselfmessage startpoint sourcefig getcenter startpoint sourcefig getwidth endpoint startpoint setendpoints startpoint endpoint getnumpoints insertpoint startpoint sequencediagramlayer object_distance startpoint endpoint startpoint sequencediagramlayer object_distance startpoint endpoint getpoint setpoint setendpoints startpoint endpoint calcbounds layoutedge private boolean is self message fig message port srcmp fig message port get source port fig fig message port destmp fig message port get dest port fig return srcmp get node get fig classifier role destmp get node get fig classifier role isselfmessage figmessageport figmessageport getsourceportfig figmessageport figmessageport getdestportfig getnode getfigclassifierrole getnode getfigclassifierrole return the node for the source port fig public message node get source message node return fig message port get source port fig get node messagenode getsourcemessagenode figmessageport getsourceportfig getnode return the node for the destination port fig public message node get dest message node return fig message port get dest port fig get node messagenode getdestmessagenode figmessageport getdestportfig getnode returns the message belonging to this link if there is one otherwise null p return the message public object get message return get owner getmessage getowner protected void layout edge if get source port fig instanceof fig message port get dest port fig instanceof fig message port fig message port get source port fig get node null fig message port get dest port fig get node null sequence diagram layer get layer update activations editor editor globals cur editor if editor null we only need to check null so that junit test passes nasty but sd implementation should die anyway globals cur editor damage all layoutedge getsourceportfig figmessageport getdestportfig figmessageport figmessageport getsourceportfig getnode figmessageport getdestportfig getnode sequencediagramlayer getlayer updateactivations cureditor cureditor damageall override protected object get source object owner get owner if owner null return null return model get facade get sender owner getsource getowner getfacade getsender override protected object get destination object owner get owner if owner null return null return model get facade get receiver owner getdestination getowner getfacade getreceiver call superclass to update text then recalculate group bounds see org argouml uml diagram ui fig edge model element update name text override protected void update name text super update name text text group calc bounds figedgemodelelement updatenametext updatenametext updatenametext textgroup calcbounds call superclass to update text then recalculate group bounds see org argouml uml diagram ui fig edge model element update stereotype text override protected void update stereotype text super update stereotype text text group calc bounds figedgemodelelement updatestereotypetext updatestereotypetext updatestereotypetext textgroup calcbounds return the source figobject public fig classifier role get source fig classifier role return fig classifier role get source fig node figclassifierrole getsourcefigclassifierrole figclassifierrole getsourcefignode return the destination fig object public fig classifier role get dest fig classifier role return fig classifier role get dest fig node figclassifierrole getdestfigclassifierrole figclassifierrole getdestfignode this won t work so this implementation does nothing inherit doc see org argouml uml diagram ui fig edge model element determine fig nodes override protected boolean determine fig nodes return true inheritdoc figedgemodelelement determinefignodes determinefignodes see org tigris gef presentation fig make selection override public selection make selection return new selection message this makeselection makeselection selectionmessage the constructor public action navigate up previous down super button go up previous down true put value action small icon resource loader wrapper lookup icon resource navigate up previous actionnavigateuppreviousdown putvalue small_icon resourceloaderwrapper lookupiconresource navigateupprevious protected object navigate to object source object up get parent source list family get family up assert family contains source iterator it family iterator object previous null while it has next object child it next if child source return previous previous child return null navigateto getparent getfamily hasnext get the list of elements that we are navigating through param parent the parent element that owns all elements in the list return the list get the parent of the list of elements that we are navigating through param child the childelement of which we seek the previous element return the parent element public class action perspective config extends abstract action the constructor translate the name and set icon public action perspective config super translator localize action configure perspectives resource loader wrapper lookup icon action configure perspectives set the tooltip string put value action short description translator localize action configure perspectives actionperspectiveconfig abstractaction actionperspectiveconfig resourceloaderwrapper lookupicon putvalue short_description see java awt event action listener action performed java awt event action event public void action performed action event ae perspective configurator ncd new perspective configurator ncd set visible true actionlistener actionperformed actionevent actionperformed actionevent perspectiveconfigurator perspectiveconfigurator setvisible creates a new ocl critic param ocl constraint ocl expression param headline headline param description description param more infourl the info url param knowledge types the knowledge types param supported decisions the decisions param priority the priority throws invalid ocl exception if the ocl is not valid todo do these need to be lists or can they be simple collections public crocl string ocl constraint string headline string description integer priority list decision supported decisions list string knowledge types string more infourl throws invalid ocl exception interpreter new ocl interpreter ocl constraint new uml14 model interpreter this ocl ocl constraint add supported decision uml decision planned extensions set priority to do item high priority list string triggers interpreter get triggers design materials interpreter get criticized design materials for string string triggers add trigger string if headline null super set headline ocl expression else super set headline headline if description null super set description else super set description description if priority null set priority to do item high priority else set priority priority if supported decisions null for decision d supported decisions add supported decision d if knowledge types null for string k knowledge types add knowledge type k if more infourl null set more infourl more infourl oclconstraint moreinfourl knowledgetypes supporteddecisions invalidoclexception oclconstraint supporteddecisions knowledgetypes moreinfourl invalidoclexception oclinterpreter oclconstraint uml14modelinterpreter oclconstraint addsupporteddecision umldecision planned_extensions setpriority todoitem high_priority gettriggers designmaterials getcriticizeddesignmaterials addtrigger setheadline setheadline setdescription setdescription setpriority todoitem high_priority setpriority supporteddecisions supporteddecisions addsupporteddecision knowledgetypes knowledgetypes addknowledgetype moreinfourl setmoreinfourl moreinfourl see org argouml cognitive critic get criticized design materials override public set object get criticized design materials return design materials getcriticizeddesignmaterials getcriticizeddesignmaterials designmaterials override public boolean predicate2 object dm designer dsgr if interpreter applicable dm return no problem else if interpreter check dm return no problem else return problem found no_problem no_problem problem_found return the ocl constraint public string getocl return ocl constructor for uml stereotype tag definition list model public uml stereotype tag definition list model super defined tag todo add reference value for tagged values which have a non primitive type umlstereotypetagdefinitionlistmodel umlstereotypetagdefinitionlistmodel definedtag referencevalue protected void build model list if get target null set all elements model get facade get tag definitions get target buildmodellist gettarget setallelements getfacade gettagdefinitions gettarget protected boolean is valid element object element return model get facade isa tag definition element model get facade get tag definitions get target contains element isvalidelement getfacade isatagdefinition getfacade gettagdefinitions gettarget fig birth activation int x int y super x y fig life line width sequence diagram layer link distance 4 todo for some reason this doesn t implement argo fig so we don t have access to our standard colors set fill color color black figbirthactivation figlifeline sequencediagramlayer link_distance argofig setfillcolor constructor for prop panel state vertex param name the name of the tabpanel shown at the top param icon the icon of the tabpanel shown at the top public prop panel state vertex string name image icon icon super name icon j list incoming list new uml linked list new uml state vertex incoming list model incoming scroll new j scroll pane incoming list j list outgoing list new uml linked list new uml state vertex outgoing list model outgoing scroll new j scroll pane outgoing list container scroll get single row scroll new uml state vertex container list model add action new action navigate container element add extra buttons add action new action new stereotype add action get delete action proppanelstatevertex proppanelstatevertex imageicon jlist incominglist umllinkedlist umlstatevertexincominglistmodel incomingscroll jscrollpane incominglist jlist outgoinglist umllinkedlist umlstatevertexoutgoinglistmodel outgoingscroll jscrollpane outgoinglist containerscroll getsinglerowscroll umlstatevertexcontainerlistmodel addaction actionnavigatecontainerelement addextrabuttons addaction actionnewstereotype addaction getdeleteaction overrule this to add extra buttons protected void add extra buttons addextrabuttons return returns the incoming scroll protected j scroll pane get incoming scroll return incoming scroll incomingscroll jscrollpane getincomingscroll incomingscroll return returns the outgoing scroll protected j scroll pane get outgoing scroll return outgoing scroll outgoingscroll jscrollpane getoutgoingscroll outgoingscroll return returns the container scroll protected j panel get container scroll return container scroll containerscroll jpanel getcontainerscroll containerscroll constructor public action help super translator localize action help resource loader wrapper lookup icon action help actionhelp resourceloaderwrapper lookupicon public void action performed action event ae help box box new help box translator localize action help box set location relative to jframe box set visible true actionperformed actionevent helpbox helpbox setlocationrelativeto setvisible the constructor public action snooze super action snooze critic true actionsnooze override public void action performed action event ae super action performed ae if get remembered target instanceof to do item return to do item item to do item get remembered target poster p item get poster p snooze tab to do increment num hushes actionperformed actionevent actionperformed getrememberedtarget todoitem todoitem todoitem getrememberedtarget getposter tabtodo incrementnumhushes construct a new selection component for the given fig param f the given fig public selection component fig f super f selectioncomponent selectioncomponent override protected icon get icons if model get model management helper is read only get content get owner return new icon null dep dep right null null return icons geticons getmodelmanagementhelper isreadonly getcontent getowner depright override protected string get instructions int index return instructions index base getinstructions override protected object get new edge type int index return model get meta types get dependency getnewedgetype getmetatypes getdependency override protected object get new node int index return model get core factory create component getnewnode getcorefactory createcomponent override protected object get new node type int index return model get meta types get component getnewnodetype getmetatypes getcomponent override protected boolean is reverse edge int index if index left index bottom return true return false isreverseedge see gui settings tab interface get tab key public string get tab key return tab shortcuts guisettingstabinterface gettabkey gettabkey public j panel get tab panel if table null set layout new grid bag layout grid bag constraints panel constraints new grid bag constraints panel constraints gridx 0 panel constraints gridy 0 panel constraints anchor grid bag constraints north panel constraints fill grid bag constraints both panel constraints weightx 5 panel constraints weighty 15 let s add the table inside a j scroll pane table new j table new shortcut table model table set auto resize mode j table auto resize last column table set show vertical lines true table set default renderer key stroke class new key stroke cell renderer table set selection mode list selection model single selection table get selection model add list selection listener this j panel table container new j panel new border layout table container set border border factory create titled border translator localize dialog shortcut titled border actions table container add new j scroll pane table add table container panel constraints now let s set up the selected action container custom button add action listener this default button add action listener this none button add action listener this selected container new j panel new grid bag layout selected container set border border factory create titled border translator localize dialog shortcut titled border selected grid bag constraints constraints new grid bag constraints constraints gridx 0 constraints gridy 0 constraints insets new insets 0 5 10 0 none button set action command none name default button set action command default name custom button set action command custom name none button add action listener this default button add action listener this custom button add action listener this button group radio button group new button group radio button group add none button radio button group add default button radio button group add custom button selected container add none button constraints constraints gridx 1 constraints insets new insets 0 5 10 0 selected container add default button constraints constraints gridx 2 constraints insets new insets 0 5 10 0 selected container add custom button constraints constraints gridx 3 constraints weightx 10 0 constraints insets new insets 0 10 10 15 constraints fill grid bag constraints horizontal shortcut field add shortcut changed listener this shortcut field default bg shortcut field get background selected container add shortcut field constraints constraints gridwidth 4 constraints gridy 1 constraints gridx 0 constraints anchor grid bag constraints west constraints insets new insets 0 10 5 10 warning label set foreground color red selected container add warning label constraints panel constraints gridy 1 panel constraints anchor grid bag constraints center panel constraints fill grid bag constraints both panel constraints weightx 1 panel constraints weighty 1 add selected container panel constraints j label restart new j label translator localize label restart application restart set horizontal alignment swing constants center restart set vertical alignment swing constants center restart set border border factory create empty border 10 2 10 2 panel constraints gridy 2 panel constraints anchor grid bag constraints center panel constraints fill grid bag constraints both panel constraints weightx 1 panel constraints weighty 0 add restart panel constraints this enable fields false return this jpanel gettabpanel setlayout gridbaglayout gridbagconstraints panelconstraints gridbagconstraints panelconstraints panelconstraints panelconstraints gridbagconstraints panelconstraints gridbagconstraints panelconstraints panelconstraints jscrollpane jtable shortcuttablemodel setautoresizemode jtable auto_resize_last_column setshowverticallines setdefaultrenderer keystroke keystrokecellrenderer setselectionmode listselectionmodel single_selection getselectionmodel addlistselectionlistener jpanel tablecontainer jpanel borderlayout tablecontainer setborder borderfactory createtitledborder tablecontainer jscrollpane tablecontainer panelconstraints custombutton addactionlistener defaultbutton addactionlistener nonebutton addactionlistener selectedcontainer jpanel gridbaglayout selectedcontainer setborder borderfactory createtitledborder gridbagconstraints gridbagconstraints nonebutton setactioncommand none_name defaultbutton setactioncommand default_name custombutton setactioncommand custom_name nonebutton addactionlistener defaultbutton addactionlistener custombutton addactionlistener buttongroup radiobuttongroup buttongroup radiobuttongroup nonebutton radiobuttongroup defaultbutton radiobuttongroup custombutton selectedcontainer nonebutton selectedcontainer defaultbutton selectedcontainer custombutton gridbagconstraints shortcutfield addshortcutchangedlistener shortcutfielddefaultbg shortcutfield getbackground selectedcontainer shortcutfield gridbagconstraints warninglabel setforeground selectedcontainer warninglabel panelconstraints panelconstraints gridbagconstraints panelconstraints gridbagconstraints panelconstraints panelconstraints selectedcontainer panelconstraints jlabel jlabel sethorizontalalignment swingconstants setverticalalignment swingconstants setborder borderfactory createemptyborder panelconstraints panelconstraints gridbagconstraints panelconstraints gridbagconstraints panelconstraints panelconstraints panelconstraints enablefields enable disable the field of the lower panel param enable whether to enable the fields or not private void enable fields boolean enable shortcut field set editable enable custom button set enabled enable default button set enabled enable none button set enabled enable enablefields shortcutfield seteditable custombutton setenabled defaultbutton setenabled nonebutton setenabled sets the current target param t the new target private void set target object t target action wrapper t let s enable the radiobuttons container enable fields true updating the radiobuttons container s title selected container set border border factory create titled border translator localize dialog shortcut titled border selected partial target get action name shortcut field set text key event utils format key stroke target get current shortcut reset key stroke conflict let s select the correct radio button if target get current shortcut null no shortcuts none none button set selected true shortcut field set enabled false else if target get default shortcut null target get current shortcut equals target get default shortcut current shortcut default default default button set selected true shortcut field set enabled false else customized shortcut custom custom button set selected true shortcut field set enabled true shortcut field request focus settarget actionwrapper enablefields selectedcontainer setborder borderfactory createtitledborder getactionname shortcutfield settext keyeventutils formatkeystroke getcurrentshortcut resetkeystrokeconflict getcurrentshortcut nonebutton setselected shortcutfield setenabled getdefaultshortcut getcurrentshortcut getdefaultshortcut defaultbutton setselected shortcutfield setenabled custombutton setselected shortcutfield setenabled shortcutfield requestfocus see org argouml ui gui settings tab interface handle reset to default public void handle reset to default do nothing these buttons are not shown guisettingstabinterface handleresettodefault handleresettodefault see org argouml ui gui settings tab interface handle settings tab cancel public void handle settings tab cancel do nothing the next time we refresh we will fetch the values again guisettingstabinterface handlesettingstabcancel handlesettingstabcancel public void handle settings tab refresh let s reload the shortcuts actions shortcut mgr get shortcuts table set model new shortcut table model handlesettingstabrefresh shortcutmgr getshortcuts setmodel shortcuttablemodel public void handle settings tab save if get action already assigned shortcut mgr decode key stroke shortcut field get text null conflict detected showing a warning to the user instead of saving shortcuts j option pane show message dialog this translator localize optionpane shortcut save conflict translator localize optionpane shortcut save conflict title j option pane warning message else saving shortcuts shortcut mgr save shortcuts actions handlesettingstabsave getactionalreadyassigned shortcutmgr decodekeystroke shortcutfield gettext joptionpane showmessagedialog joptionpane warning_message shortcutmgr saveshortcuts this is called every time a row is selected it just updates the fields and the buttons status see javax swing event list selection listener value changed javax swing event list selection event public void value changed list selection event lse if lse get value is adjusting return object src lse get source if src table get selection model table get selected row 1 return if a shortcut has been select then we have to check if the actual action is in conflict with other ones if none button is selected action wrapper old action get action already assigned shortcut mgr decode key stroke shortcut field get text if old action null this shortcut was already been assigned to another action let s pop up a message for the user string t message format format translator localize optionpane conflict shortcut new object shortcut field get text old action get action name int response j option pane show confirm dialog this t t j option pane yes no option switch response case j option pane yes option old action set current shortcut null blanking the old action s shortcut and now refreshing the table table set value at old action 1 1 break case j option pane no option re selecting the old row without changing the target and without throwing another list selection event table get selection model remove list selection listener this table get selection model set selection interval last row selected last row selected table get selection model add list selection listener this return let s change the target set target actions table get selected row last row selected table get selected row listselectionlistener valuechanged listselectionevent valuechanged listselectionevent getvalueisadjusting getsource getselectionmodel getselectedrow nonebutton isselected actionwrapper oldaction getactionalreadyassigned shortcutmgr decodekeystroke shortcutfield gettext oldaction messageformat shortcutfield gettext oldaction getactionname joptionpane showconfirmdialog joptionpane yes_no_option joptionpane yes_option oldaction setcurrentshortcut setvalueat oldaction joptionpane no_option listselectionevent getselectionmodel removelistselectionlistener getselectionmodel setselectioninterval lastrowselected lastrowselected getselectionmodel addlistselectionlistener settarget getselectedrow lastrowselected getselectedrow verifies if the given key stroke has already been assigned to another action param key stroke the key stroke to be checked return the action that has already been assigned public action wrapper get action already assigned key stroke key stroke for int i 0 i actions length i if actions i get current shortcut null actions i get current shortcut equals key stroke actions i get action name equals target get action name return actions i duplicate shortcut not found let s check for duplicates key stroke duplicate shortcut mgr get duplicate key stroke if duplicate null there s a duplicate let s recheck if there is a conflict for int i 0 i actions length i if actions i get current shortcut null actions i get current shortcut equals duplicate actions i get action name equals target get action name return actions i return null keystroke keystroke keystroke actionwrapper getactionalreadyassigned keystroke keystroke getcurrentshortcut getcurrentshortcut keystroke getactionname getactionname keystroke shortcutmgr getduplicate keystroke getcurrentshortcut getcurrentshortcut getactionname getactionname this is called every time a panel button custom default none is pressed see java awt event action listener action performed java awt event action event public void action performed action event e reset key stroke conflict if e get source custom button set key stroke value shortcut mgr decode key stroke shortcut field get text shortcut field set enabled true shortcut field request focus else if e get source default button set key stroke value target get default shortcut shortcut field set enabled false check shortcut already assigned target get default shortcut else if e get source none button set key stroke value null shortcut field set enabled false actionlistener actionperformed actionevent actionperformed actionevent resetkeystrokeconflict getsource custombutton setkeystrokevalue shortcutmgr decodekeystroke shortcutfield gettext shortcutfield setenabled shortcutfield requestfocus getsource defaultbutton setkeystrokevalue getdefaultshortcut shortcutfield setenabled checkshortcutalreadyassigned getdefaultshortcut getsource nonebutton setkeystrokevalue shortcutfield setenabled this method simply reset the conflict gui by blanking the warning label and resetting the shortcut s background color private void reset key stroke conflict this warning label set text this shortcut field set background shortcut field default bg resetkeystrokeconflict warninglabel settext shortcutfield setbackground shortcutfielddefaultbg updates the gui with the given new key stroke param new key stroke the key stroke to be set private void set key stroke value key stroke new key stroke string formatted key stroke key event utils format key stroke new key stroke updating the shortcut field shortcut field set text formatted key stroke updating the table data table get model set value at new key stroke table get selected row 1 updating the actions actions table get selected row set current shortcut new key stroke table repaint keystroke newkeystroke keystroke setkeystrokevalue keystroke newkeystroke formattedkeystroke keyeventutils formatkeystroke newkeystroke shortcutfield settext formattedkeystroke getmodel setvalueat newkeystroke getselectedrow getselectedrow setcurrentshortcut newkeystroke listener method for shortcut changed events see org argouml ui cmd shortcut changed listener shortcut change org argouml ui cmd shortcut changed event public void shortcut change shortcut changed event event check shortcut already assigned event get key stroke set key stroke value event get key stroke this selected container repaint shortcutchangedevents shortcutchangedlistener shortcutchange shortcutchangedevent shortcutchange shortcutchangedevent checkshortcutalreadyassigned getkeystroke setkeystrokevalue getkeystroke selectedcontainer update the gui if there is a conflict for the given key stroke param new key stroke the key stroke to be checked private void check shortcut already assigned key stroke new key stroke action wrapper old action get action already assigned new key stroke if old action null the shortcut has already been assigned to another action this shortcut field set background color yellow this warning label set text message format format translator localize misc shortcuts conflict new object key event utils format key stroke old action get current shortcut old action get action name else reset key stroke conflict newkeystroke checkshortcutalreadyassigned keystroke newkeystroke actionwrapper oldaction getactionalreadyassigned newkeystroke oldaction shortcutfield setbackground warninglabel settext messageformat keyeventutils formatkeystroke oldaction getcurrentshortcut oldaction getactionname resetkeystrokeconflict constructor public shortcut table model elements new object actions length 3 for int i 0 i elements length i action wrapper current action actions i elements i 0 current action get action name elements i 1 current action get current shortcut elements i 2 current action get default shortcut shortcuttablemodel actionwrapper currentaction currentaction getactionname currentaction getcurrentshortcut currentaction getdefaultshortcut see javax swing table table model get column count public int get column count return column names length tablemodel getcolumncount getcolumncount columnnames see javax swing table table model get column name int override public string get column name int col return column names col tablemodel getcolumnname getcolumnname columnnames see javax swing table table model get row count public int get row count return elements length tablemodel getrowcount getrowcount see javax swing table table model get value at int int public object get value at int row int col return elements row col tablemodel getvalueat getvalueat sets the value in the cell at code col code and code row code to code ob code if code ob code is an action instance then the code col code and code row code parameters are ignored and the ob action is searched among the elements and the actions see javax swing table table model set value at java lang object int int override public void set value at object ob int row int col if the given object is a key stroke instance then we ca if ob instanceof action wrapper action wrapper new value action action wrapper ob for int i 0 i elements length i if elements i 0 equals new value action get action name elements i 1 new value action get current shortcut repaint break let s update also the actions array for int i 0 i actions length i if actions i get key equals new value action get key actions i set current shortcut new value action get current shortcut break else elements row col ob tablemodel setvalueat setvalueat keystroke actionwrapper actionwrapper newvalueaction actionwrapper newvalueaction getactionname newvalueaction getcurrentshortcut getkey newvalueaction getkey setcurrentshortcut newvalueaction getcurrentshortcut override public class get column class int col switch col case 0 return string class case 1 return key stroke class case 2 return key stroke class default return null getcolumnclass keystroke keystroke see javax swing table table model is cell editable int int override public boolean is cell editable int row int col return false tablemodel iscelleditable iscelleditable construct a table cell rendered for key strokes public key stroke cell renderer super set horizontal alignment javax swing swing constants center keystrokecellrenderer sethorizontalalignment swingconstants format the given key stroke see javax swing table default table cell renderer set value java lang object override public void set value object value if value null value instanceof key stroke value key event utils format key stroke key stroke value super set value value keystroke defaulttablecellrenderer setvalue setvalue keystroke keyeventutils formatkeystroke keystroke setvalue see org argouml ui explorer rules perspective rule get rule name public string get rule name return translator localize misc profile critic perspectiverule getrulename getrulename public collection get children final object parent if parent instanceof collection collection v collection parent if v is empty if v iterator next instanceof critic vector object ret new vector object for object critic v final critic fc critic critic if critic instanceof compound critic object compound new vector critic add all compound critic fc get critic list see java util vector to string public string to string return translator localize misc profile explorer compound ret add compound else ret add critic return ret else return collection parent else return collections empty set return collections empty set getchildren isempty compoundcritic addall compoundcritic getcriticlist tostring tostring empty_set empty_set see java util vector to string public string to string return translator localize misc profile explorer compound tostring tostring see org argouml ui explorer rules perspective rule get dependencies java lang object public set get dependencies object parent todo what return collections empty set perspectiverule getdependencies getdependencies empty_set public collection get children object parent if model get facade isa state parent model get facade get exit parent null collection children new array list children add model get facade get exit parent return children return collections empty set getchildren getfacade isastate getfacade getexit arraylist getfacade getexit empty_set public set get dependencies object parent if model get facade isa state parent set set new hash set set add parent return set return collections empty set getdependencies getfacade isastate hashset empty_set see org argouml ui explorer rules perspective rule get rule name public string get rule name return translator localize misc state exit perspectiverule getrulename getrulename the constructor public action exportxmi super translator localize action export project as xmi actionexportxmi public void action performed action event e persistence manager pm persistence manager get instance show a chooser dialog for the file name only xmi is allowed j file chooser chooser new j file chooser chooser set dialog title translator localize action export project as xmi chooser set file view project file view get instance chooser set approve button text translator localize filechooser export chooser set accept all file filter used true pm set xmi file chooser filter chooser string fn configuration get string persistence manager key project name path if fn length 0 fn persistence manager get instance get base name fn chooser set selected file new file fn int result chooser show save dialog argo frame get instance if result j file chooser approve option file the file chooser get selected file if the file null string name the file get name configuration set string persistence manager key project name path persistence manager get instance get base name the file get path name pm fix xmi extension name the file new file the file get parent name project browser get instance try save with progress monitor false the file actionperformed actionevent persistencemanager persistencemanager getinstance jfilechooser jfilechooser setdialogtitle setfileview projectfileview getinstance setapprovebuttontext setacceptallfilefilterused setxmifilechooserfilter getstring persistencemanager key_project_name_path persistencemanager getinstance getbasename setselectedfile showsavedialog argoframe getinstance jfilechooser approve_option thefile getselectedfile thefile thefile getname setstring persistencemanager key_project_name_path persistencemanager getinstance getbasename thefile getpath fixxmiextension thefile thefile getparent projectbrowser getinstance trysavewithprogressmonitor thefile the constructor public cr subclass reference setup head and desc add supported decision uml decision relationships add supported decision uml decision planned extensions set knowledge types critic kt semantics add trigger specialization add trigger association end crsubclassreference setupheadanddesc addsupporteddecision umldecision addsupporteddecision umldecision planned_extensions setknowledgetypes kt_semantics addtrigger addtrigger associationend override public boolean predicate2 object dm designer dsgr if model get facade isa class dm return no problem object cls dm list set offs compute offenders cls if offs null return problem found return no problem getfacade isaclass no_problem listset computeoffenders problem_found no_problem override public to do item to do item object dm designer dsgr object cls dm list set offs compute offenders cls return new uml to do item this offs dsgr todoitem todoitem listset computeoffenders umltodoitem override public boolean still valid to do item i designer dsgr if is active return false list set offs i get offenders object dm offs get 0 if predicate dm dsgr return false list set new offs compute offenders dm boolean res offs equals new offs return res stillvalid todoitem isactive listset getoffenders listset newoffs computeoffenders newoffs param cls is the uml entity that is being checked return the list of offenders public list set compute offenders object cls collection asc model get facade get association ends cls if asc null asc size 0 return null enumeration descend enum gen descendant classes getsingleton gen cls if descend enum has more elements return null list set descendants new list set while descend enum has more elements descendants add descend enum next element todo gen navigable classes list set offs null for object ae asc object a model get facade get association ae list conn new array list model get facade get connections a if conn size 2 continue object other end conn get 0 if ae conn get 0 other end conn get 1 if model get facade is navigable other end continue object other cls model get facade get type other end if descendants contains other cls if offs null offs new list set offs add cls offs add a offs add other cls return offs listset computeoffenders getfacade getassociationends descendenum gendescendantclasses descendenum hasmoreelements listset listset descendenum hasmoreelements descendenum nextelement gennavigableclasses listset getfacade getassociation arraylist getfacade getconnections otherend otherend getfacade isnavigable otherend othercls getfacade gettype otherend othercls listset othercls public set object get criticized design materials set object ret new hash set object ret add model get meta types getuml class return ret getcriticizeddesignmaterials hashset getmetatypes getumlclass the constructor public action auto critique super translator localize action toggle auto critique null set the tooltip string put value action short description translator localize action toggle auto critique put value selected boolean value of designer the designer get auto critique actionautocritique putvalue short_description putvalue valueof thedesigner getautocritique public void action performed action event ae super action performed ae stop start creating more critics designer d designer the designer boolean b d get auto critique d set auto critique b stop start cleaning up invalid todo items designer the designer get to do list set paused designer the designer get to do list is paused actionperformed actionevent actionperformed thedesigner getautocritique setautocritique todoitems thedesigner gettodolist setpaused thedesigner gettodolist ispaused do not change this method signature param t the uncaught exception public void handle throwable t try log error last chance error handler in awt thread caught t catch throwable t2 ignore any nested exceptions we don t want infinite loop register our exception handler with awt public static void register exception handler system set property sun awt exception handler awt exception handler class get name registerexceptionhandler setproperty awtexceptionhandler getname create a text tab without a toolbar param title the title of the tab public tab text string title this title false tabtext create a text tab and optionally request a toolbar since argo0 9 4 param title the title param with toolbar true if a toolbar is needed public tab text string title boolean with toolbar super title set icon new up arrow icon set layout new border layout text area set font new font monospaced font plain 12 text area set tab size 4 add new j scroll pane text area border layout center text area get document add document listener this if a toolbar was requested create an empty one if with toolbar toolbar new tool bar factory collections empty list create tool bar toolbar set orientation swing constants horizontal toolbar set floatable false toolbar set name get title add toolbar border layout north withtoolbar tabtext withtoolbar seticon uparrowicon setlayout borderlayout textarea setfont textarea settabsize jscrollpane textarea borderlayout textarea getdocument adddocumentlistener withtoolbar toolbarfactory empty_list createtoolbar setorientation swingconstants setfloatable setname gettitle borderlayout private void do generate text parse changes false if get target null text area set enabled false todo localize text area set text nothing selected enabled false else text area set enabled true if is visible string generated text gen text get target if generated text null text area set text generated text enabled true text area set caret position 0 else text area set enabled false todo localize text area set text n a enabled false parse changes true dogeneratetext parsechanges gettarget textarea setenabled textarea settext textarea setenabled isvisible generatedtext gentext gettarget generatedtext textarea settext generatedtext textarea setcaretposition textarea setenabled textarea settext parsechanges public void set target object t target t if is visible do generate text settarget isvisible dogeneratetext see org argouml ui tab target get target public object get target return target tabtarget gettarget gettarget see org argouml ui tab target refresh public void refresh object t target manager get instance get target set target t tabtarget targetmanager getinstance gettarget settarget this tab pane is enabled if there is a target i e the target must not be null inherit doc public boolean should be enabled object t return t null inheritdoc shouldbeenabled the target has changed so let s generate some text to be shown param t the object to be generated make a string of it return the generated text protected string gen text object t return t null nothing selected t to string gentext tostring the user has edited the text in the textfield so let s parse it now and update the model param s the string to parse protected void parse text string s if s null s null log debug parsing text s parsetext public void insert update document event e if parse changes parse text text area get text insertupdate documentevent parsechanges parsetext textarea gettext public void remove update document event e if parse changes parse text text area get text removeupdate documentevent parsechanges parsetext textarea gettext public void changed update document event e if parse changes parse text text area get text changedupdate documentevent parsechanges parsetext textarea gettext see org argouml ui targetmanager target listener target added org argouml ui targetmanager target event public void target added target event e set target e get new target targetlistener targetadded targetevent targetadded targetevent settarget getnewtarget public void target removed target event e how to handle empty target lists probably the tab text should only show an empty pane in that case set target e get new target targetremoved targetevent tabtext settarget getnewtarget see org argouml ui targetmanager target listener target set org argouml ui targetmanager target event public void target set target event e set target e get new target targetlistener targetset targetevent targetset targetevent settarget getnewtarget return returns the toolbar protected j tool bar get toolbar return toolbar jtoolbar gettoolbar param s true if we are enabled protected void set should be enabled boolean s this enabled s setshouldbeenabled return returns true if enabled protected boolean should be enabled return enabled shouldbeenabled sets if text area can be edited param editable if true text area is editable default else not public void set editable boolean editable text area set editable editable seteditable textarea seteditable generates the text whenever this panel becomes visible inherit doc override public void set visible boolean visible super set visible visible if visible do generate text inheritdoc setvisible setvisible dogeneratetext adds a listener param listener the listener to add private void add target listener target listener listener listener list add target listener class listener addtargetlistener targetlistener listenerlist targetlistener removes a target listener param listener the listener to remove private void remove target listener target listener listener listener list remove target listener class listener removetargetlistener targetlistener listenerlist targetlistener gets all of the tab panels from the config loader then adds them to the j tabbed pane p sets the target to null p registers listeners p param compass point the position for which to build the pane param the orientation is the orientation public details pane string compass point orientation the orientation log info making details pane compass point orientation the orientation load tabs compass point the orientation set orientation orientation set layout new border layout set font new font dialog font plain 10 add top level tabbed pane border layout center set target null true top level tabbed pane add mouse listener this top level tabbed pane add change listener this tabpanels configloader jtabbedpane compasspoint theorientation detailspane compasspoint theorientation detailspane compasspoint theorientation loadtabs compasspoint theorientation setorientation setlayout borderlayout setfont topleveltabbedpane borderlayout settarget topleveltabbedpane addmouselistener topleveltabbedpane addchangelistener private void load tabs string direction orientation the orientation if position south to string equals ignore case direction special case for backward compatibility detail equals ignore case direction the south panel always has tabs but they are added later elsewhere has tabs true loadtabs theorientation tostring equalsignorecase equalsignorecase hastabs boolean has tabs return has tabs hastabs hastabs returns the j tabbed pane that contains all details panels return the j tabbed pane j tabbed pane get tabs return top level tabbed pane jtabbedpane jtabbedpane jtabbedpane gettabs topleveltabbedpane param p the panel to be added param at end true add the panel at the end false at the beginning public void add tab abstract argoj panel p boolean at end icon icon p get icon string title translator localize p get title if at end top level tabbed pane add tab title icon p tab panel list add p else top level tabbed pane insert tab title icon p null 0 tab panel list add 0 p atend addtab abstractargojpanel atend geticon gettitle atend topleveltabbedpane addtab tabpanellist topleveltabbedpane inserttab tabpanellist selects the to do tab and sets the target of that tab param item the selected todo item return true if todo tab is really selected deprecated for 0 25 5 by tfmorris send an event that tab to do targets listen to deprecated public boolean set to do item object item enable tabs item for j panel t tab panel list if t instanceof tab to do target tab to do target t set target item top level tabbed pane set selected component t return true return false tabtodotargets settodoitem enabletabs jpanel tabpanellist tabtodotarget tabtodotarget settarget topleveltabbedpane setselectedcomponent selects the prop tab if it is appropriate for the target param target the target object return true if props tab is really selected private boolean select props tab object target if get tab props should be enabled target int index of prop panel top level tabbed pane index of component get tab props top level tabbed pane set selected index index of prop panel last non null tab index of prop panel return true return false selectpropstab gettabprops shouldbeenabled indexofproppanel topleveltabbedpane indexofcomponent gettabprops topleveltabbedpane setselectedindex indexofproppanel lastnonnulltab indexofproppanel sets the target of the details pane to either be a selected model element or the owner model element of a selected fig p decides which panels to enable param target the target object private void set target object target boolean default to properties enable tabs target if target null boolean tab selected false always select properties panel if default to properties is true and if properties panel is appropriate for selected perspective if default to properties last non null tab 0 tab selected select props tab target else select prop panel if current panel is not appropriate for selected target component selected tab top level tabbed pane get component at last non null tab if selected tab instanceof tab target if tab target selected tab should be enabled target top level tabbed pane set selected index last non null tab tab selected true else tab selected select props tab target if tab selected for int i last non null tab 1 i top level tabbed pane get tab count i component tab top level tabbed pane get component at i if tab instanceof tab target if tab target tab should be enabled target top level tabbed pane set selected index i tab target tab set target target last non null tab i tab selected true break default tab todo if tab selected j panel tab tab panel list get 0 if tab instanceof tab to do target for j panel panel tab panel list if panel instanceof tab to do target tab panel break if tab instanceof tab to do target top level tabbed pane set selected component tab tab to do target tab set target target last non null tab top level tabbed pane get selected index else default tab todo j panel tab tab panel list is empty null j panel tab panel list get 0 if tab instanceof tab to do target iterator it tab panel list iterator while it has next object o it next if o instanceof tab to do target tab j panel o break if tab instanceof tab to do target top level tabbed pane set selected component tab tab to do target tab set target target else top level tabbed pane set selected index 1 current target target settarget defaulttoproperties enabletabs tabselected defaulttoproperties defaulttoproperties lastnonnulltab tabselected selectpropstab selectedtab topleveltabbedpane getcomponentat lastnonnulltab selectedtab tabtarget tabtarget selectedtab shouldbeenabled topleveltabbedpane setselectedindex lastnonnulltab tabselected tabselected selectpropstab tabselected lastnonnulltab topleveltabbedpane gettabcount topleveltabbedpane getcomponentat tabtarget tabtarget shouldbeenabled topleveltabbedpane setselectedindex tabtarget settarget lastnonnulltab tabselected tabselected jpanel tabpanellist tabtodotarget jpanel tabpanellist tabtodotarget tabtodotarget topleveltabbedpane setselectedcomponent tabtodotarget settarget lastnonnulltab topleveltabbedpane getselectedindex jpanel tabpanellist isempty jpanel tabpanellist tabtodotarget tabpanellist hasnext tabtodotarget jpanel tabtodotarget topleveltabbedpane setselectedcomponent tabtodotarget settarget topleveltabbedpane setselectedindex currenttarget returns the current model target return the current model target public object get target return current target gettarget currenttarget see java awt component get minimum size override public dimension get minimum size return new dimension 100 100 getminimumsize getminimumsize get the index of the tab with the given name param tab name the name of the required tab return index of the tab of the given name public int get index of named tab string tab name for int i 0 i tab panel list size i string title top level tabbed pane get title at i if title null title equals tab name return i return 1 tabname getindexofnamedtab tabname tabpanellist topleveltabbedpane gettitleat tabname get the number of tabs return the number of tab pages public int get tab count return tab panel list size gettabcount tabpanellist selects a tab by given name param tab name the given name return true if the named tab has been found public boolean select tab named string tab name int index get index of named tab tab name if index 1 top level tabbed pane set selected index index return true return false tabname selecttabnamed tabname getindexofnamedtab tabname topleveltabbedpane setselectedindex helper method to add a property panel for a given class param c the given class param p the given property panel public void add to prop tab class c prop panel p for j panel panel tab panel list if panel instanceof tab props tab props panel add panel c p addtoproptab proppanel jpanel tabpanellist tabprops tabprops addpanel returns the property panel in the details pane return the property panel public tab props get tab props for j panel tab tab panel list if tab instanceof tab props return tab props tab return null tabprops gettabprops jpanel tabpanellist tabprops tabprops returns the tab instance of the specified class param tab class the given class return the tab instance for the given class public abstract argoj panel get tab class extends abstract argoj panel tab class for j panel tab tab panel list if tab get class equals tab class return abstract argoj panel tab return null tabclass abstractargojpanel gettab abstractargojpanel tabclass jpanel tabpanellist getclass tabclass abstractargojpanel reacts to a change in the selected tab by calling refresh for tab to do target s set target on a tab model target or tab fig target instance p called when the user selects a new tab by clicking or otherwise inherit doc public void state changed change event e log debug details pane state changed component sel top level tabbed pane get selected component update the previously selected tab if last non null tab 0 j panel tab tab panel list get last non null tab if tab instanceof target listener not visible any more so remove as listener remove target listener target listener tab object target target manager get instance get single target if sel is the to do tab i e is an instance of tab to do target we don t need to do anything because the to do tab is already dealt with by it s own listener if sel instanceof tab to do target the other tabs need to be updated depending on the selection if sel instanceof tab target tab target sel set target target else if sel instanceof target listener remove target listener target listener sel add target listener target listener sel newly selected tab may have stale target info so generate a new set target event for it to refresh it target listener sel target set new target event this target event target set new object new object target if target null model get facade isauml element target top level tabbed pane get selected index 0 last non null tab top level tabbed pane get selected index tabtodotarget settarget tabmodeltarget tabfigtarget inheritdoc statechanged changeevent detailspane topleveltabbedpane getselectedcomponent lastnonnulltab jpanel tabpanellist lastnonnulltab targetlistener removetargetlistener targetlistener targetmanager getinstance getsingletarget todo tabtodotarget todo tabtodotarget tabtarget tabtarget settarget targetlistener removetargetlistener targetlistener addtargetlistener targetlistener targetlistener targetset targetevent targetevent target_set getfacade isaumlelement topleveltabbedpane getselectedindex lastnonnulltab topleveltabbedpane getselectedindex no action currently executed here called when the user clicks once on a tab param tab the index of the clicked tab public void my single click int tab todo should fire its own event and project browser should register a listener log debug single top level tabbed pane get component at tab to string mysingleclick projectbrowser topleveltabbedpane getcomponentat tostring spawns a new tab called when the user clicks twice on a tab param tab the index of the clicked tab public void my double click int tab todo should fire its own event and project browser should register a listener log debug double top level tabbed pane get component at tab to string j panel t j panel tab panel list element at tab currently this feature is disabled for argouml if t instanceof abstract argoj panel abstract argoj panel t spawn mydoubleclick projectbrowser topleveltabbedpane getcomponentat tostring jpanel jpanel tabpanellist elementat abstractargojpanel abstractargojpanel see java awt event mouse listener mouse pressed java awt event mouse event public void mouse pressed mouse event me empty implementation we only handle mouse clicked mouselistener mousepressed mouseevent mousepressed mouseevent mouseclicked see java awt event mouse listener mouse released java awt event mouse event public void mouse released mouse event me empty implementation we only handle mouse clicked mouselistener mousereleased mouseevent mousereleased mouseevent mouseclicked see java awt event mouse listener mouse entered java awt event mouse event public void mouse entered mouse event me empty implementation we only handle mouse clicked mouselistener mouseentered mouseevent mouseentered mouseevent mouseclicked see java awt event mouse listener mouse exited java awt event mouse event public void mouse exited mouse event me empty implementation we only handle mouse clicked mouselistener mouseexited mouseevent mouseexited mouseevent mouseclicked public void mouse clicked mouse event me int tab top level tabbed pane get selected index if tab 1 rectangle tab bounds top level tabbed pane get bounds at tab if tab bounds contains me getx me gety return if me get click count 1 my single click tab else if me get click count 2 my double click tab mouseclicked mouseevent topleveltabbedpane getselectedindex tabbounds topleveltabbedpane getboundsat tabbounds getclickcount mysingleclick getclickcount mydoubleclick public void set orientation orientation new orientation for j panel t tab panel list if t instanceof orientable orientable o orientable t o set orientation new orientation setorientation neworientation jpanel tabpanellist setorientation neworientation see target listener target added target event public void target added target event e set target e get new target false fire target added e targetlistener targetadded targetevent targetadded targetevent settarget getnewtarget firetargetadded see target listener target removed target event public void target removed target event e set target e get new target false fire target removed e targetlistener targetremoved targetevent targetremoved targetevent settarget getnewtarget firetargetremoved see target listener target set target event public void target set target event e set target e get new target false fire target set e targetlistener targetset targetevent targetset targetevent settarget getnewtarget firetargetset enables disables the tabs on the tabbed card also selects the tab to show param target the target object private void enable tabs object target todo quick return here for target null tfm iterate through the tabbed panels to determine whether they should be enabled for int i 0 i tab panel list size i j panel tab tab panel list get i boolean should enable false if tab instanceof target listener if tab instanceof tab target should enable tab target tab should be enabled target else if tab instanceof tab to do target should enable true todo do we want all enabled tabs to listen or only the one that is selected visible tfm remove target listener target listener tab if should enable add target listener target listener tab top level tabbed pane set enabled at i should enable enabletabs tabpanellist jpanel tabpanellist shouldenable targetlistener tabtarget shouldenable tabtarget shouldbeenabled tabtodotarget shouldenable removetargetlistener targetlistener shouldenable addtargetlistener targetlistener topleveltabbedpane setenabledat shouldenable private void fire target set target event target event guaranteed to return a non null array object listeners listener list get listener list for int i listeners length 2 i 0 i 2 if listeners i target listener class lazily create the event target listener listeners i 1 target set target event firetargetset targetevent targetevent listenerlist getlistenerlist targetlistener targetlistener targetset targetevent private void fire target added target event target event guaranteed to return a non null array object listeners listener list get listener list for int i listeners length 2 i 0 i 2 if listeners i target listener class lazily create the event target listener listeners i 1 target added target event firetargetadded targetevent targetevent listenerlist getlistenerlist targetlistener targetlistener targetadded targetevent private void fire target removed target event target event guaranteed to return a non null array object listeners listener list get listener list for int i listeners length 2 i 0 i 2 if listeners i target listener class lazily create the event target listener listeners i 1 target removed target event firetargetremoved targetevent targetevent listenerlist getlistenerlist targetlistener targetlistener targetremoved targetevent constructor for action new model element constraint protected action new model element constraint super actionnewmodelelementconstraint actionnewmodelelementconstraint see java awt event action listener action performed java awt event action event public void action performed action event e super action performed e model get core factory build constraint get target actionlistener actionperformed actionevent actionperformed actionevent actionperformed getcorefactory buildconstraint gettarget return returns the singleton public static action new model element constraint get instance return singleton actionnewmodelelementconstraint getinstance the constructor param property name the name of the property public uml stimulus action text property string property name the property name property name propertyname umlstimulusactiontextproperty propertyname thepropertyname propertyname param container the container of uml user interface components param new value the new value of the property public void set property uml user interface container container string new value object stimulus container get target if stimulus null string old value get property container if one or the other is null or they are not equal if new value null old value null new value equals old value as long as they aren t both null or a really rare identical string pointer if new value old value object args new value object action model get facade get dispatch action stimulus model get core helper set name action new value to rupdate the diagram set the stimulus name again todo explain that this really works also in the mdr case linus is a sceptic string dummy str model get facade get name stimulus model get core helper set name stimulus dummy str newvalue setproperty umluserinterfacecontainer newvalue gettarget oldvalue getproperty newvalue oldvalue newvalue oldvalue newvalue oldvalue newvalue getfacade getdispatchaction getcorehelper setname newvalue dummystr getfacade getname getcorehelper setname dummystr param container the container of uml user interface components return the property public string get property uml user interface container container string value null object stimulus container get target if stimulus null object action model get facade get dispatch action stimulus if action null value model get facade get name action return value getproperty umluserinterfacecontainer gettarget getfacade getdispatchaction getfacade getname boolean is affected property change event event string source name event get property name return the property name null source name null source name equals the property name isaffected propertychangeevent sourcename getpropertyname thepropertyname sourcename sourcename thepropertyname called when the target has changed void target changed targetchanged the default constructor for this class param node the selected node param key the internationalization key used to label this action param stereotype view the stereotype view that is activated when this action is triggered public action stereotype view fig node model element node string key int stereotype view super key false this target node node this selected stereotype view stereotype view update selection stereotypeview actionstereotypeview fignodemodelelement stereotypeview targetnode selectedstereotypeview stereotypeview updateselection private void update selection put value selected boolean value of target node get stereotype view selected stereotype view updateselection putvalue valueof targetnode getstereotypeview selectedstereotypeview see org argouml uml diagram ui abstract action radio menu item toggle value of target java lang object void toggle value of target object t target node set stereotype view selected stereotype view update selection abstractactionradiomenuitem togglevalueoftarget togglevalueoftarget targetnode setstereotypeview selectedstereotypeview updateselection see org argouml uml diagram ui abstract action radio menu item value of target java lang object object value of target object t if t instanceof fig node model element return integer value of fig node model element t get stereotype view else return t abstractactionradiomenuitem valueoftarget valueoftarget fignodemodelelement valueof fignodemodelelement getstereotypeview the constructor public cr too many classes setup head and desc add supported decision uml decision class selection set threshold class threshold add trigger owned element crtoomanyclasses setupheadanddesc addsupporteddecision umldecision class_selection setthreshold class_threshold addtrigger ownedelement public boolean predicate2 object dm designer dsgr if model get facade isa namespace dm return no problem collection subs model get facade get owned elements dm collection object classes new array list object for object me subs if model get facade isa class me classes add me if classes size get threshold return no problem return problem found getfacade isanamespace no_problem getfacade getownedelements arraylist getfacade isaclass getthreshold no_problem problem_found public set object get criticized design materials set object ret new hash set object ret add model get meta types get namespace return ret getcriticizeddesignmaterials hashset getmetatypes getnamespace construct the action param the meta type the element to be created param target the container that will own the new element param menu descr the description for the menu item label public action create contained model element object the meta type object target string menu descr super menu descr meta type the meta type set target target themetatype menudescr actioncreatecontainedmodelelement themetatype menudescr menudescr metatype themetatype settarget public void action performed action event e object new element model get uml factory build node meta type get target target manager get instance set target new element actionperformed actionevent newelement getumlfactory buildnode metatype gettarget targetmanager getinstance settarget newelement protected import common super modules new hashtable string import interface for import interface importer importer manager get instance get importers modules put importer get name importer if modules is empty throw new runtime exception internal error no importer modules found java is the default module for historical reasons but it s not required to be there current module modules get java if current module null current module modules elements next element importcommon importinterface importinterface importermanager getinstance getimporters getname isempty runtimeexception currentmodule currentmodule currentmodule nextelement see org argouml uml reveng import settings get import level public abstract int get import level importsettings getimportlevel getimportlevel compute and cache the current diagram interface protected void init current diagram diagram interface get current diagram initcurrentdiagram diagraminterface getcurrentdiagram set target diagram p return selected diagram if it is class diagram else return null private diagram interface get current diagram diagram interface result null if globals cur editor get graph model instanceof class diagram graph model result new diagram interface globals cur editor return result diagraminterface getcurrentdiagram diagraminterface cureditor getgraphmodel classdiagramgraphmodel diagraminterface cureditor see org argouml uml reveng import settings get input source encoding public abstract string get input source encoding importsettings getinputsourceencoding getinputsourceencoding get the files we generate it based on their specified file suffixes param monitor progress monitor which can be used to cancel long running request return the list of files to be imported protected list file get file list progress monitor monitor list file files arrays as list get selected files if files size 1 file file files get 0 suffix filter suffix filters selected suffix filter if suffix filters 0 null not a suffix filter selected so we take all suffix filters current module get suffix filters files file import utils get list file is descend selected suffix filters monitor if file is directory set src path file get absolute path else set src path null if is changed only selected filter out all unchanged files object model project manager get manager get current project get model for int i files size 1 i 0 i file f files get i string fn f get absolute path string lm string value of f last modified if lm equals model get facade get tagged value value model fn files remove i return files getfilelist progressmonitor aslist getselectedfiles suffixfilter suffixfilters selectedsuffixfilter suffixfilters suffixfilter suffixfilters currentmodule getsuffixfilters fileimportutils getlist isdescendselected suffixfilters isdirectory setsrcpath getabsolutepath setsrcpath ischangedonlyselected projectmanager getmanager getcurrentproject getmodel getabsolutepath valueof lastmodified getfacade gettaggedvaluevalue set path for processed directory param path the given path public void set src path string path src path path setsrcpath srcpath return path for processed directory public string get src path return src path getsrcpath srcpath private void set last modified project project file file set the last modified value string fn file get absolute path string lm string value of file last modified if lm null model get core helper set tagged value project get model fn lm setlastmodified lastmodified getabsolutepath valueof lastmodified getcorehelper settaggedvalue getmodel see org argouml uml reveng import settings is create diagrams selected public abstract boolean is create diagrams selected importsettings iscreatediagramsselected iscreatediagramsselected see org argouml uml reveng import settings is minimise figs selected public abstract boolean is minimize figs selected importsettings isminimisefigsselected isminimizefigsselected see org argouml uml reveng import settings internal is diagram layout selected public abstract boolean is diagram layout selected importsettingsinternal isdiagramlayoutselected isdiagramlayoutselected see org argouml uml reveng import settings internal is descend selected public abstract boolean is descend selected importsettingsinternal isdescendselected isdescendselected see org argouml uml reveng import settings internal is changed only selected public abstract boolean is changed only selected importsettingsinternal ischangedonlyselected ischangedonlyselected public abstract boolean is changed only selected protected hashtable string import interface get modules return modules ischangedonlyselected importinterface getmodules protected void set selected files final file files selected files files setselectedfiles selectedfiles set the selected file suffix filter param suffix filter the file suffix filter protected void set selected suffix filter final suffix filter suffix filter selected suffix filter suffix filter suffixfilter setselectedsuffixfilter suffixfilter suffixfilter selectedsuffixfilter suffixfilter protected file get selected files file copy new file selected files length for int i 0 i selected files length i copy i selected files i return copy return arrays copy of selected files selected files length getselectedfiles selectedfiles selectedfiles selectedfiles copyof selectedfiles selectedfiles protected void set current module import interface module current module module setcurrentmodule importinterface currentmodule protected import interface get current module return current module importinterface getcurrentmodule currentmodule returns the possible languages in which the user can import the sources return a list of strings with the names of the languages available public list string get languages return collections unmodifiable list new array list string modules key set getlanguages unmodifiablelist arraylist keyset the flag for descend directories recursively this should be asked by the gui for initialization return the flag stored in key import general settings flags key or true if this is null public boolean is descend string flags configuration get string argo key import general settings flags if flags null flags length 0 string tokenizer st new string tokenizer flags if st has more tokens st next token equals false return false return true key_import_general_settings_flags isdescend getstring key_import_general_settings_flags stringtokenizer stringtokenizer hasmoretokens nexttoken the flag for changed new files only this should be asked by the gui for initialization return the flag stored in key import general settings flags key or true if this is null public boolean is changed only string flags configuration get string argo key import general settings flags if flags null flags length 0 string tokenizer st new string tokenizer flags skip tokens st 1 if st has more tokens st next token equals false return false return true key_import_general_settings_flags ischangedonly getstring key_import_general_settings_flags stringtokenizer stringtokenizer skiptokens hasmoretokens nexttoken the flag for create diagrams from imported code this should be asked by the gui for initialization return the flag stored in key import general settings flags key or true if this is null public boolean is create diagrams string flags configuration get string argo key import general settings flags if flags null flags length 0 string tokenizer st new string tokenizer flags skip tokens st 2 if st has more tokens st next token equals false return false return true key_import_general_settings_flags iscreatediagrams getstring key_import_general_settings_flags stringtokenizer stringtokenizer skiptokens hasmoretokens nexttoken the flag for minimise class icons in diagrams this should be asked by the gui for initialization return the flag stored in key import general settings flags key or true if this is null public boolean is minimize figs string flags configuration get string argo key import general settings flags if flags null flags length 0 string tokenizer st new string tokenizer flags skip tokens st 3 if st has more tokens st next token equals false return false return true key_import_general_settings_flags isminimizefigs getstring key_import_general_settings_flags stringtokenizer stringtokenizer skiptokens hasmoretokens nexttoken private void skip tokens string tokenizer st int count for int i 0 i count i if st has more tokens st next token skiptokens stringtokenizer hasmoretokens nexttoken the flag for perform automatic diagram layout this should be asked by the gui for initialization return the flag stored in key import general settings flags key or true if this is null public boolean is diagram layout string flags configuration get string argo key import general settings flags if flags null flags length 0 string tokenizer st new string tokenizer flags skip tokens st 4 if st has more tokens st next token equals false return false return true key_import_general_settings_flags isdiagramlayout getstring key_import_general_settings_flags stringtokenizer stringtokenizer skiptokens hasmoretokens nexttoken the default encoding this should be asked by the gui for initialization return the encoding stored in argo key input source encoding key or if this is null the default system encoding public string get encoding string enc configuration get string argo key input source encoding if enc null enc trim equals non nls 1 enc system get property file encoding non nls 1 return enc key_input_source_encoding getencoding getstring key_input_source_encoding getproperty layouts the diagrams param monitor the progress meter null if not progress updates desired param starting progress the actual progress until now public void layout diagrams progress monitor monitor int starting progress if diagram interface null return if monitor null monitor update sub task imports messages layouting action list argo diagram diagrams diagram interface get modified diagram list int total starting progress diagrams size 10 for int i 0 i diagrams size i argo diagram diagram diagrams get i classdiagram layouter layouter new classdiagram layouter diagram layouter layout int act starting progress i 1 10 int progress max progress prepare max progress import act total if monitor null monitor update progress progress iss set value count files i 1 10 startingprogress layoutdiagrams progressmonitor startingprogress diagraminterface updatesubtask importsmessages layoutingaction argodiagram diagraminterface getmodifieddiagramlist startingprogress argodiagram classdiagramlayouter classdiagramlayouter startingprogress max_progress_prepare max_progress_import updateprogress setvalue countfiles import the selected source modules param monitor a progress monitor to both receive progress updates and to be polled for user requests to cancel protected void do import progress monitor monitor roughly equivalent to and derived from old import do file monitor set maximum progress max progress int progress 0 monitor update sub task translator localize dialog import pre import list file files get file list monitor progress max progress prepare monitor update progress progress if files size 0 monitor notify null action return model get pump stop pumping events boolean critic thread was on designer the designer get auto critique if critic thread was on designer the designer set auto critique false try do import internal files monitor progress finally if critic thread was on designer the designer set auto critique true todo send an event instead of calling explorer directly explorer event adaptor get instance structure changed model get pump start pumping events progressmonitor doimport progressmonitor dofile setmaximumprogress max_progress updatesubtask preimport getfilelist max_progress_prepare updateprogress notifynullaction getpump stoppumpingevents criticthreadwason thedesigner getautocritique criticthreadwason thedesigner setautocritique doimportinternal criticthreadwason thedesigner setautocritique explorereventadaptor getinstance structurechanged getpump startpumpingevents do the import param files left the files to parse param monitor the progress meter param progress the actual progress until now private void do import internal list file files left final progress monitor monitor int progress project project project manager get manager get current project init current diagram final string buffer problems new string buffer collection new elements new hash set try new elements add all current module parse files project files left this monitor catch exception e problems append print to buffer e new style importers don t create diagrams so we ll do it based on the list of new elements that they created if is create diagrams selected add figures to diagrams new elements do layout even if problems occurred during import if is diagram layout selected todo monitor is getting dismissed before layout is complete monitor update main task translator localize dialog import post import monitor update sub task translator localize dialog import layout action layout diagrams monitor progress files left size add messages from caught exceptions if problems null problems length 0 monitor notify message translator localize dialog title import problems non nls 1 translator localize label import problems non nls 1 problems to string monitor update main task translator localize dialog import done monitor update sub task non nls 1 monitor update progress max progress filesleft doimportinternal filesleft progressmonitor projectmanager getmanager getcurrentproject initcurrentdiagram stringbuffer stringbuffer newelements hashset newelements addall currentmodule parsefiles filesleft printtobuffer newelements iscreatediagramsselected addfigurestodiagrams newelements isdiagramlayoutselected updatemaintask postimport updatesubtask layoutaction layoutdiagrams filesleft notifymessage tostring updatemaintask updatesubtask updateprogress max_progress create diagram figures for a collection of model elements param new elements the collection of elements for which figures should be created private void add figures to diagrams collection new elements for object element new elements if model get facade isa classifier element model get facade isa package element object ns model get facade get namespace element if ns null diagram interface create root class diagram else string package name get qualified name ns select the correct diagram implicitly creates it if package name null package name equals diagram interface select class diagram ns package name else diagram interface create root class diagram add the element to the diagram if model get facade isa interface element diagram interface add interface element is minimize figs selected else if model get facade isa class element diagram interface add class element is minimize figs selected else if model get facade isa package element diagram interface add package element newelements addfigurestodiagrams newelements newelements getfacade isaclassifier getfacade isapackage getfacade getnamespace diagraminterface createrootclassdiagram packagename getqualifiedname packagename packagename diagraminterface selectclassdiagram packagename diagraminterface createrootclassdiagram getfacade isainterface diagraminterface addinterface isminimizefigsselected getfacade isaclass diagraminterface addclass isminimizefigsselected getfacade isapackage diagraminterface addpackage return the fully qualified name of a model element in java dot separated format p todo we really need a language independent format here perhaps the list of names that form the hierarchy tfm private string get qualified name object element string buffer sb new string buffer object ns element while ns null string name model get facade get name ns if name null name sb insert 0 name ns model get facade get namespace ns if ns null sb insert 0 return sb to string getqualifiedname stringbuffer stringbuffer getfacade getname getfacade getnamespace tostring private string buffer print to buffer exception e string writer sw new string writer print writer pw new java io print writer sw e print stack trace pw return sw get buffer stringbuffer printtobuffer stringwriter stringwriter printwriter printwriter printstacktrace getbuffer constructs a new sequence diagram with a default name and no namespace namespaces are used to determine the owner of the diagram for diagrams but that s plain misuse public uml sequence diagram todo all super constructors should take a graph model super dirty hack to remove the trash the diagram constructor leaves sequence diagram graph model gm new sequence diagram graph model set graph model gm sequence diagram layer lay new sequence diagram layer this get name gm sequence diagram renderer rend new sequence diagram renderer lay set graph edge renderer rend lay set graph node renderer rend set layer lay umlsequencediagram graphmodel sequencediagramgraphmodel sequencediagramgraphmodel setgraphmodel sequencediagramlayer sequencediagramlayer getname sequencediagramrenderer sequencediagramrenderer setgraphedgerenderer setgraphnoderenderer setlayer the constructor param collaboration the collaboration public uml sequence diagram object collaboration this try set name get new diagram name catch property veto exception pve todo this should check that it s receiving the argument type that it expects sequence diagram graph model get graph model set collaboration collaboration set namespace collaboration see issue 3373 umlsequencediagram setname getnewdiagramname propertyvetoexception sequencediagramgraphmodel getgraphmodel setcollaboration setnamespace override public object get owner return get namespace getowner getnamespace override public string get label name return translator localize label sequence diagram getlabelname must return an array of actions via which the model can be manipulated to use the nested actions feature like the different association types on uml class diagram these nested actions must be in an array of their own p in case of the sequence diagram this method must return the following actions ul li action to create an object li action to add a procedural link li action to add a create link li action to add a asynchronous link li action to add a synchronous link li action to add a return link ul inherit doc protected object get uml actions if actions null actions new object 7 actions 0 new radio action new action add classifier role actions 1 new radio action new action set add message mode model get meta types get call action button new callaction actions 2 new radio action new action set add message mode model get meta types get return action button new returnaction actions 3 new radio action new action set add message mode model get meta types get create action button new createaction actions 4 new radio action new action set add message mode model get meta types get destroy action button new destroyaction hashtable string object args new hashtable string object args put name sequence expand button actions 5 new radio action new action set mode mode expand class args sequence expand button args clear args put name sequence contract button actions 6 new radio action new action set mode mode contract class args sequence contract button return actions umlclassdiagram inheritdoc getumlactions radioaction actionaddclassifierrole radioaction actionsetaddmessagemode getmetatypes getcallaction radioaction actionsetaddmessagemode getmetatypes getreturnaction radioaction actionsetaddmessagemode getmetatypes getcreateaction radioaction actionsetaddmessagemode getmetatypes getdestroyaction sequence_expand_button radioaction actionsetmode modeexpand sequence_expand_button sequence_contract_button radioaction actionsetmode modecontract sequence_contract_button override public object get namespace return sequence diagram graph model get graph model get collaboration getnamespace sequencediagramgraphmodel getgraphmodel getcollaboration override public void set namespace object ns sequence diagram graph model get graph model set collaboration ns super set namespace ns setnamespace sequencediagramgraphmodel getgraphmodel setcollaboration setnamespace method called by project remove diagram to clean up the mess in this diagram when the diagram is removed public void clean up project manager get manager get current project move to trash collab removediagram cleanup projectmanager getmanager getcurrentproject movetotrash override public boolean is relocation allowed object base return model get facade isa collaboration base isrelocationallowed getfacade isacollaboration suppress warnings unchecked public collection get relocation candidates object root return model get model management helper get all model elements of kind with model root model get meta types get collaboration suppresswarnings getrelocationcandidates getmodelmanagementhelper getallmodelelementsofkindwithmodel getmetatypes getcollaboration override public boolean relocate object base sequence diagram graph model get graph model set collaboration base set namespace base damage return true sequencediagramgraphmodel getgraphmodel setcollaboration setnamespace public void encloser changed fig node enclosed fig node old encloser fig node new encloser do nothing encloserchanged fignode fignode oldencloser fignode newencloser see org argouml ui explorer rules perspective rule get rule name public string get rule name return translator localize misc association role messages perspectiverule getrulename getrulename public collection get children object parent if model get facade isa association role parent return collections empty set return model get facade get messages parent getchildren getfacade isaassociationrole empty_set getfacade getmessages public set get dependencies object parent if model get facade isa association role parent set set new hash set set add parent return set return collections empty set getdependencies getfacade isaassociationrole hashset empty_set the constructor public cr utility violated setup head and desc add supported decision uml decision storage add supported decision uml decision stereotypes add supported decision uml decision class selection add trigger stereotype add trigger behavioral feature crutilityviolated setupheadanddesc addsupporteddecision umldecision addsupporteddecision umldecision addsupporteddecision umldecision class_selection addtrigger addtrigger behavioralfeature override public boolean predicate2 object dm designer dsgr we could check for base class of the stereotype but the condition normally covers it all if model get facade isa classifier dm return no problem if model get facade is utility dm return no problem collection classes to check new array list classes to check add all model get core helper get supertypes dm classes to check add all model get core helper get all realized interfaces dm classes to check add dm iterator it classes to check iterator while it has next object o it next if model get facade isa interface o iterator it2 model get facade get attributes o iterator while it2 has next if model get facade is static it2 next return problem found iterator it2 model get facade get operations o iterator while it2 has next if model get facade is static it2 next return problem found return no problem getfacade isaclassifier no_problem getfacade isutility no_problem classestocheck arraylist classestocheck addall getcorehelper getsupertypes classestocheck addall getcorehelper getallrealizedinterfaces classestocheck classestocheck hasnext getfacade isainterface getfacade getattributes hasnext getfacade isstatic problem_found getfacade getoperations hasnext getfacade isstatic problem_found no_problem public set object get criticized design materials set object ret new hash set object ret add model get meta types get classifier return ret getcriticizeddesignmaterials hashset getmetatypes getclassifier constructor for the critic p sets up the resource name which will allow headline and description to be found for the current locale provides a design issue category patterns sets a priority for any to do items low and adds triggers for metaclasses stereotype structural feature and association end public cr consider singleton setup head and desc add supported decision uml decision patterns set priority to do item low priority these may not actually make any difference at present the code behind add trigger needs more work add trigger stereotype add trigger structural feature add trigger association end structuralfeature associationend crconsidersingleton setupheadanddesc addsupporteddecision umldecision setpriority todoitem low_priority addtrigger addtrigger addtrigger structuralfeature addtrigger associationend the trigger for the critic p first check we are already a singleton p otherwise plausible candidates for the singleton design pattern are classes with no instance variables i e non static attributes and no outgoing associations p param dm the link java lang object object to be checked against the critic param dsgr the link org argouml cognitive designer designer creating the model not used this is for future development of argouml return link problem found problem found if the critic is triggered otherwise link no problem no problem override public boolean predicate2 object dm designer dsgr only look at classes if model get facade isa class dm return no problem and not association classes if model get facade isa association class dm return no problem with a name if model get facade get name dm null equals model get facade get name dm return no problem and not incompletely imported if model get facade is primary object dm return no problem abstract classes are hardly ever singletons if model get facade is abstract dm return no problem check for singleton stereotype uninitialised instance variables and outgoing associations as per java doc above if model get facade is singleton dm return no problem if model get facade is utility dm return no problem if there is an attribute which is not static no problem iterator iter model get facade get attributes dm iterator while iter has next if model get facade is static iter next return no problem if there is an outgoing association no problem iterator ends model get facade get association ends dm iterator while ends has next iterator otherends model get facade get other association ends ends next iterator while otherends has next if model get facade is navigable otherends next return no problem return problem found problem_found problem_found no_problem no_problem getfacade isaclass no_problem getfacade isaassociationclass no_problem getfacade getname getfacade getname no_problem getfacade isprimaryobject no_problem getfacade isabstract no_problem javadoc getfacade issingleton no_problem getfacade isutility no_problem getfacade getattributes hasnext getfacade isstatic no_problem getfacade getassociationends hasnext getfacade getotherassociationends hasnext getfacade isnavigable no_problem problem_found construct a class diagram default constructor used by pgml parser during diagram load it should not be used by other callers deprecated only for use by pgml parser deprecated public uml class diagram super new class diagram graph model umlclassdiagram classdiagramgraphmodel construct a new class diagram with the given name owned by the given namespace param name the name for the new diagram param namespace the namespace for the new diagram public uml class diagram string name object namespace super name namespace new class diagram graph model umlclassdiagram classdiagramgraphmodel construct a class diagram owned by the given namespace a default unique diagram name is constructed param m the namespace public uml class diagram object m we re going to change the name immediately so just use super m new class diagram graph model string name get new diagram name try set name name catch property veto exception pve log warn generated diagram name name was vetoed by set name umlclassdiagram classdiagramgraphmodel getnewdiagramname setname propertyvetoexception setname public void set namespace object ns if model get facade isa namespace ns log error illegal argument object ns is not a namespace throw new illegal argument exception illegal argument object ns is not a namespace boolean init null get namespace super set namespace ns class diagram graph model gm class diagram graph model get graph model gm set home model ns if init layer perspective lay new layer perspective mutable model get facade get name ns gm class diagram renderer rend new class diagram renderer singleton lay set graph node renderer rend lay set graph edge renderer rend set layer lay setnamespace getfacade isanamespace illegalargumentexception getnamespace setnamespace classdiagramgraphmodel classdiagramgraphmodel getgraphmodel sethomemodel layerperspective layerperspectivemutable getfacade getname classdiagramrenderer classdiagramrenderer setgraphnoderenderer setgraphedgerenderer setlayer protected object get uml actions object actions get package actions get action class null get association actions get aggregation actions get composition actions get action association end get action generalization null get action interface get action realization null get dependency actions null action add attribute get target follower action add operation get target follower get action association class null get data type actions return actions getumlactions getpackageactions getactionclass getassociationactions getaggregationactions getcompositionactions getactionassociationend getactiongeneralization getactioninterface getactionrealization getdependencyactions actionaddattribute gettargetfollower actionaddoperation gettargetfollower getactionassociationclass getdatatypeactions return the actions for the miscellaneous pulldown menu private object get data type actions object actions get action data type get action enumeration get action stereotype get action signal get action exception tool bar utility manage default actions diagram class datatype return actions getdatatypeactions getactiondatatype getactionenumeration getactionstereotype getactionsignal getactionexception toolbarutility managedefault private object get package actions todo to enable models and subsystems change this flag work started by markus i believe where does this stand bob status as of nov 2008 figs created property panels exist more work required on explorer and assumptions about models not being nested tfm if false object actions get action package get action model get action subsystem tool bar utility manage default actions diagram class package return actions else return get action package getpackageactions getactionpackage getactionmodel getactionsubsystem toolbarutility managedefault getactionpackage return an array of dependency actions in the pattern of which to build a popup toolbutton private object get dependency actions object actions get action dependency get action permission get action usage tool bar utility manage default actions diagram class dependency return actions getdependencyactions getactiondependency getactionpermission getactionusage toolbarutility managedefault return an array of association actions in the pattern of which to build a popup toolbutton private object get association actions this calls the getters to fetch actions even though the action variables are defined is instances of this class this is because any number of action getters could have been overridden in a descendent and it is the action from that overridden method that should be returned in the array object actions get action association get action uni association tool bar utility manage default actions diagram class association return actions getassociationactions getactionassociation getactionuniassociation toolbarutility managedefault private object get aggregation actions object actions get action aggregation get action uni aggregation tool bar utility manage default actions diagram class aggregation return actions getaggregationactions getactionaggregation getactionuniaggregation toolbarutility managedefault private object get composition actions object actions get action composition get action uni composition tool bar utility manage default actions diagram class composition return actions getcompositionactions getactioncomposition getactionunicomposition toolbarutility managedefault see org argouml uml diagram ui uml diagram get label name public string get label name return translator localize label class diagram umldiagram getlabelname getlabelname return returns the action aggregation protected action get action aggregation if action aggregation null action aggregation make create association action model get aggregation kind get aggregate false button new aggregation return action aggregation actionaggregation getactionaggregation actionaggregation actionaggregation makecreateassociationaction getaggregationkind getaggregate actionaggregation return returns the action association protected action get action association if action association null action association make create association action model get aggregation kind get none false button new association return action association actionassociation getactionassociation actionassociation actionassociation makecreateassociationaction getaggregationkind getnone actionassociation return returns the action association protected action get action association end if action association end null action association end make create association end action button new association end return action association end actionassociation getactionassociationend actionassociationend actionassociationend makecreateassociationendaction actionassociationend return returns the action class protected action get action class if action class null action class make create node action model get meta types getuml class button new class return action class actionclass getactionclass actionclass actionclass makecreatenodeaction getmetatypes getumlclass actionclass return returns the action association class protected action get action association class if action association class null action association class make create association class action button new associationclass return action association class actionassociationclass getactionassociationclass actionassociationclass actionassociationclass makecreateassociationclassaction actionassociationclass return returns the action composition protected action get action composition if action composition null action composition make create association action model get aggregation kind get composite false button new composition return action composition actioncomposition getactioncomposition actioncomposition actioncomposition makecreateassociationaction getaggregationkind getcomposite actioncomposition return returns the action depend protected action get action dependency if action dependency null action dependency make create dependency action mode create dependency class model get meta types get dependency button new dependency return action dependency actiondepend getactiondependency actiondependency actiondependency makecreatedependencyaction modecreatedependency getmetatypes getdependency actiondependency return returns the action generalize protected action get action generalization if action generalization null action generalization make create generalization action return action generalization actiongeneralize getactiongeneralization actiongeneralization actiongeneralization makecreategeneralizationaction actiongeneralization return returns the action interface protected action get action interface if action interface null action interface make create node action model get meta types get interface button new interface return action interface actioninterface getactioninterface actioninterface actioninterface makecreatenodeaction getmetatypes getinterface actioninterface return returns the action link protected action get action link if action link null action link make create edge action model get meta types get link link return action link actionlink getactionlink actionlink actionlink makecreateedgeaction getmetatypes getlink actionlink return returns the action model protected action get action model if action model null action model make create node action model get meta types get model model return action model actionmodel getactionmodel actionmodel actionmodel makecreatenodeaction getmetatypes getmodel actionmodel return returns the action package protected action get action package if action package null action package make create node action model get meta types get package button new package return action package actionpackage getactionpackage actionpackage actionpackage makecreatenodeaction getmetatypes getpackage actionpackage return returns the action permission protected action get action permission if action permission null action permission make create dependency action mode create permission class model get meta types get package import button new permission return action permission actionpermission getactionpermission actionpermission actionpermission makecreatedependencyaction modecreatepermission getmetatypes getpackageimport actionpermission return returns the action realize protected action get action realization if action realization null action realization make create edge action model get meta types get abstraction button new realization return action realization actionrealize getactionrealization actionrealization actionrealization makecreateedgeaction getmetatypes getabstraction actionrealization return returns the action subsystem protected action get action subsystem if action subsystem null action subsystem make create node action model get meta types get subsystem subsystem return action subsystem actionsubsystem getactionsubsystem actionsubsystem actionsubsystem makecreatenodeaction getmetatypes getsubsystem actionsubsystem return returns the action uni aggregation protected action get action uni aggregation if action uni aggregation null action uni aggregation make create association action model get aggregation kind get aggregate true button new uniaggregation return action uni aggregation actionuniaggregation getactionuniaggregation actionuniaggregation actionuniaggregation makecreateassociationaction getaggregationkind getaggregate actionuniaggregation return returns the action uni association protected action get action uni association if action uni association null action uni association make create association action model get aggregation kind get none true button new uniassociation return action uni association actionuniassociation getactionuniassociation actionuniassociation actionuniassociation makecreateassociationaction getaggregationkind getnone actionuniassociation return returns the action uni composition protected action get action uni composition if action uni composition null action uni composition make create association action model get aggregation kind get composite true button new unicomposition return action uni composition actionunicomposition getactionunicomposition actionunicomposition actionunicomposition makecreateassociationaction getaggregationkind getcomposite actionunicomposition return returns the action usage protected action get action usage if action usage null action usage make create dependency action mode create usage class model get meta types get usage button new usage return action usage actionusage getactionusage actionusage actionusage makecreatedependencyaction modecreateusage getmetatypes getusage actionusage return returns the action data type private action get action data type if action data type null action data type make create node action model get meta types get data type button new datatype return action data type actiondatatype getactiondatatype actiondatatype actiondatatype makecreatenodeaction getmetatypes getdatatype actiondatatype return returns the action enumeration private action get action enumeration if action enumeration null action enumeration make create node action model get meta types get enumeration button new enumeration return action enumeration actionenumeration getactionenumeration actionenumeration actionenumeration makecreatenodeaction getmetatypes getenumeration actionenumeration return returns the action stereotype private action get action stereotype if action stereotype null action stereotype make create node action model get meta types get stereotype button new stereotype return action stereotype actionstereotype getactionstereotype actionstereotype actionstereotype makecreatenodeaction getmetatypes getstereotype actionstereotype return returns the action stereotype private action get action signal if action signal null action signal make create node action model get meta types get signal button new signal return action signal actionstereotype getactionsignal actionsignal actionsignal makecreatenodeaction getmetatypes getsignal actionsignal return returns the action stereotype private action get action exception if action exception null action exception make create node action model get meta types get exception button new exception return action exception actionstereotype getactionexception actionexception actionexception makecreatenodeaction getmetatypes getexception actionexception see org argouml uml diagram ui uml diagram is relocation allowed java lang object public boolean is relocation allowed object base return model get facade isa namespace base umldiagram isrelocationallowed isrelocationallowed getfacade isanamespace public collection get relocation candidates object root return model get model management helper get all model elements of kind with model root model get meta types get namespace getrelocationcandidates getmodelmanagementhelper getallmodelelementsofkindwithmodel getmetatypes getnamespace public boolean relocate object base set namespace base damage return true setnamespace public void encloser changed fig node enclosed fig node old encloser fig node new encloser do nothing encloserchanged fignode fignode oldencloser fignode newencloser override public boolean does accept object object to accept if model get facade isa class object to accept return true else if model get facade isa interface object to accept return true else if model get facade isa model object to accept return true else if model get facade isa subsystem object to accept return true else if model get facade isa package object to accept return true else if model get facade isa comment object to accept return true else if model get facade isa association object to accept return true else if model get facade isa enumeration object to accept return true else if model get facade isa data type object to accept return true else if model get facade isa stereotype object to accept return true else if model get facade isa exception object to accept return true else if model get facade isa signal object to accept return true else if model get facade isa actor object to accept return true else if model get facade isa use case object to accept return true else if model get facade isa object object to accept return true else if model get facade isa node instance object to accept return true else if model get facade isa component instance object to accept return true else if model get facade isa node object to accept return true else if model get facade isa component object to accept return true return false doesaccept objecttoaccept getfacade isaclass objecttoaccept getfacade isainterface objecttoaccept getfacade isamodel objecttoaccept getfacade isasubsystem objecttoaccept getfacade isapackage objecttoaccept getfacade isacomment objecttoaccept getfacade isaassociation objecttoaccept getfacade isaenumeration objecttoaccept getfacade isadatatype objecttoaccept getfacade isastereotype objecttoaccept getfacade isaexception objecttoaccept getfacade isasignal objecttoaccept getfacade isaactor objecttoaccept getfacade isausecase objecttoaccept getfacade isaobject objecttoaccept getfacade isanodeinstance objecttoaccept getfacade isacomponentinstance objecttoaccept getfacade isanode objecttoaccept getfacade isacomponent objecttoaccept override public fig node drop object dropped object point location fig node fig node null if location is non null convert to a rectangle that we can use rectangle bounds null if location null bounds new rectangle location x location y 0 0 diagram settings settings get diagram settings if model get facade isa association dropped object fig node create nary association node dropped object bounds settings else if model get facade isa class dropped object fig node new fig class dropped object bounds settings else if model get facade isa interface dropped object fig node new fig interface dropped object bounds settings else if model get facade isa model dropped object fig node new fig model dropped object bounds settings else if model get facade isa subsystem dropped object fig node new fig subsystem dropped object bounds settings else if model get facade isa package dropped object fig node new fig package dropped object bounds settings else if model get facade isa comment dropped object fig node new fig comment dropped object bounds settings else if model get facade isa enumeration dropped object fig node new fig enumeration dropped object bounds settings else if model get facade isa data type dropped object fig node new fig data type dropped object bounds settings else if model get facade isa stereotype dropped object fig node new fig stereotype declaration dropped object bounds settings else if model get facade isa exception dropped object fig node new fig exception dropped object bounds settings else if model get facade isa signal dropped object fig node new fig signal dropped object bounds settings else if model get facade isa actor dropped object fig node new fig actor dropped object bounds settings else if model get facade isa use case dropped object fig node new fig use case dropped object bounds settings else if model get facade isa object dropped object fig node new fig object dropped object bounds settings else if model get facade isa node instance dropped object fig node new fig node instance dropped object bounds settings else if model get facade isa component instance dropped object fig node new fig component instance dropped object bounds settings else if model get facade isa node dropped object fig node new figm node dropped object bounds settings else if model get facade isa component dropped object fig node new fig component dropped object bounds settings if fig node null if location is null here the position of the new fig node is set after in org tigris gef base mode place mouse pressed mouse event e if location null fig node set location location x location y log debug dropped object dropped object converted to fig node else log debug dropped object not added dropped object return fig node fignode droppedobject fignode fignode diagramsettings getdiagramsettings getfacade isaassociation droppedobject fignode createnaryassociationnode droppedobject getfacade isaclass droppedobject fignode figclass droppedobject getfacade isainterface droppedobject fignode figinterface droppedobject getfacade isamodel droppedobject fignode figmodel droppedobject getfacade isasubsystem droppedobject fignode figsubsystem droppedobject getfacade isapackage droppedobject fignode figpackage droppedobject getfacade isacomment droppedobject fignode figcomment droppedobject getfacade isaenumeration droppedobject fignode figenumeration droppedobject getfacade isadatatype droppedobject fignode figdatatype droppedobject getfacade isastereotype droppedobject fignode figstereotypedeclaration droppedobject getfacade isaexception droppedobject fignode figexception droppedobject getfacade isasignal droppedobject fignode figsignal droppedobject getfacade isaactor droppedobject fignode figactor droppedobject getfacade isausecase droppedobject fignode figusecase droppedobject getfacade isaobject droppedobject fignode figobject droppedobject getfacade isanodeinstance droppedobject fignode fignodeinstance droppedobject getfacade isacomponentinstance droppedobject fignode figcomponentinstance droppedobject getfacade isanode droppedobject fignode figmnode droppedobject getfacade isacomponent droppedobject fignode figcomponent droppedobject fignode fignode modeplace mousepressed mouseevent fignode setlocation droppedobject fignode droppedobject fignode see org argouml ui explorer rules perspective rule get rule name public string get rule name return translator localize misc state incoming transitions perspectiverule getrulename getrulename public collection get children object parent if model get facade isa state vertex parent return model get facade get incomings parent return collections empty set getchildren getfacade isastatevertex getfacade getincomings empty_set public set get dependencies object parent if model get facade isa state vertex parent set set new hash set set add parent return set return collections empty set getdependencies getfacade isastatevertex hashset empty_set constructor public prop panel critic super image icon null critic class new j text field add field label class critic class critic class set editable false name new j text field add field label name name name set editable false headline new j text field add field label headline headline headline set editable false description new j text area 5 30 add field label description description description set editable false description set line wrap true priority new j text field add field label priority priority priority set editable false ocl new j text area 5 30 ocl label add field label ocl ocl ocl set editable false ocl set line wrap true supported decision new j text field add field label decision supported decision supported decision set editable false knowledge type new j text field add field label knowledge types knowledge type knowledge type set editable false proppanelcritic imageicon criticclass jtextfield addfield criticclass criticclass seteditable jtextfield addfield seteditable jtextfield addfield seteditable jtextarea addfield seteditable setlinewrap jtextfield addfield seteditable jtextarea ocllabel addfield seteditable setlinewrap supporteddecision jtextfield addfield supporteddecision supporteddecision seteditable knowledgetype jtextfield addfield knowledge_types knowledgetype knowledgetype seteditable param t the target see org argouml uml ui prop panel set target java lang object public void set target object t super set target t critic class set text get target get class get canonical name critic c critic get target name set text c get critic name headline set text c get headline description set text c get description template supported decision set text col to string c get supported decisions if c instanceof crocl ocl label set visible true ocl set visible true ocl set text crocl c getocl else ocl label set visible false ocl set visible false priority set text c get priority knowledge type set text col to string c get knowledge types proppanel settarget settarget settarget criticclass settext gettarget getclass getcanonicalname gettarget settext getcriticname settext getheadline settext getdescriptiontemplate supporteddecision settext coltostring getsupporteddecisions ocllabel setvisible setvisible settext ocllabel setvisible setvisible settext getpriority knowledgetype settext coltostring getknowledgetypes private string col to string collection set string r int count 0 for object obj set if count 0 r r obj count return r coltostring don t call this constructor directly it is public since this is necessary for loading use the fig association object layer constructor instead deprecated for 0 27 3 by tfmorris use link fig association object diagram settings suppress warnings deprecation deprecated public fig association super middle group new fig text group note if this needs to be updated during the deprecation period also update the constructor below let s use groups to construct the different text sections at the association if get name fig null middle group add fig get name fig middle group add fig get stereotype fig placed perpendicular to midpoint of edge add path item middle group new path item placement this middle group 50 25 argo fig util mark position this 50 0 90 25 color yellow src mult new fig multiplicity placed at a 45 degree angle close to the end add path item src mult new path item placement this src mult 0 5 135 5 argo fig util mark position this 0 5 135 5 color green note if this needs to be updated during the deprecation period also update the constructor below src group new fig association end annotation this add path item src group new path item placement this src group 0 5 135 5 argo fig util mark position this 0 5 135 5 color blue dest mult new fig multiplicity add path item dest mult new path item placement this dest mult 100 5 45 5 argo fig util mark position this 100 5 45 5 color red note if this needs to be updated during the deprecation period also update the constructor below dest group new fig association end annotation this add path item dest group new path item placement this dest group 100 5 45 5 argo fig util mark position this 100 5 45 5 color orange set between nearest points true figassociation figassociation diagramsettings suppresswarnings figassociation middlegroup figtextgroup getnamefig middlegroup addfig getnamefig middlegroup addfig getstereotypefig addpathitem middlegroup pathitemplacement middlegroup argofigutil markposition srcmult figmultiplicity addpathitem srcmult pathitemplacement srcmult argofigutil markposition srcgroup figassociationendannotation addpathitem srcgroup pathitemplacement srcgroup argofigutil markposition destmult figmultiplicity addpathitem destmult pathitemplacement destmult argofigutil markposition destgroup figassociationendannotation addpathitem destgroup pathitemplacement destgroup argofigutil markposition setbetweennearestpoints constructor used by pgml parser param owner owning uml element param settings rendering settings public fig association object owner diagram settings settings super owner settings create name label owner settings object ends uml objects of association end type model get facade get connections owner to array src mult new fig multiplicity ends 0 settings add path item src mult new path item placement this src mult 0 5 135 5 argo fig util mark position this 0 5 135 5 color green src group new fig association end annotation this ends 0 settings add path item src group new path item placement this src group 0 5 135 5 argo fig util mark position this 0 5 135 5 color blue dest mult new fig multiplicity ends 1 settings add path item dest mult new path item placement this dest mult 100 5 45 5 argo fig util mark position this 100 5 45 5 color red dest group new fig association end annotation this ends 1 settings add path item dest group new path item placement this dest group 100 5 45 5 argo fig util mark position this 100 5 45 5 color orange set between nearest points true initialize notation providers internal owner figassociation diagramsettings createnamelabel associationend getfacade getconnections toarray srcmult figmultiplicity addpathitem srcmult pathitemplacement srcmult argofigutil markposition srcgroup figassociationendannotation addpathitem srcgroup pathitemplacement srcgroup argofigutil markposition destmult figmultiplicity addpathitem destmult pathitemplacement destmult argofigutil markposition destgroup figassociationendannotation addpathitem destgroup pathitemplacement destgroup argofigutil markposition setbetweennearestpoints initializenotationprovidersinternal constructor that hooks the fig to an existing uml element param edge the uml element param lay the layer deprecated for 0 27 3 by tfmorris use link fig association object diagram settings deprecated public fig association object edge layer lay this set owner edge set layer lay figassociation diagramsettings figassociation setowner setlayer create the main draggable label for the association this can be overridden in subclasses to change behaviour todo consider introducing this to fig edge model element and using throughout all edges param owner owning uml element param settings rendering settings protected void create name label object owner diagram settings settings middle group new fig text group owner settings let s use groups to construct the different text sections at the association if get name fig null middle group add fig get name fig middle group add fig get stereotype fig add path item middle group new path item placement this middle group 50 25 argo fig util mark position this 50 0 90 25 color yellow figedgemodelelement createnamelabel diagramsettings middlegroup figtextgroup getnamefig middlegroup addfig getnamefig middlegroup addfig getstereotypefig addpathitem middlegroup pathitemplacement middlegroup argofigutil markposition set the owner param owner ignored see org argouml uml diagram ui fig edge model element set owner java lang object deprecated for 0 27 3 by tfmorris set the owner in the constructor suppress warnings deprecation deprecated override public void set owner object owner super set owner owner object ends model get facade get connections owner to array object source ends 0 object dest ends 1 src group set owner source src mult set owner source dest group set owner dest dest mult set owner dest figedgemodelelement setowner suppresswarnings setowner setowner getfacade getconnections toarray srcgroup setowner srcmult setowner destgroup setowner destmult setowner override public void rendering changed super rendering changed this fixes issue 4987 src mult rendering changed dest mult rendering changed src group rendering changed dest group rendering changed middle group rendering changed renderingchanged renderingchanged srcmult renderingchanged destmult renderingchanged srcgroup renderingchanged destgroup renderingchanged middlegroup renderingchanged override protected void init notation providers object own initialize notation providers internal own initnotationproviders initializenotationprovidersinternal private void initialize notation providers internal object own super init notation providers own src mult init notation providers dest mult init notation providers initializenotationprovidersinternal initnotationproviders srcmult initnotationproviders destmult initnotationproviders override public void update listeners object old owner object new owner set object listeners new hash set object if new owner null listeners add new object new owner new string is abstract remove update element listeners listeners no further listeners required in this case the rest is handled by the notation provider and sub figs updatelisteners oldowner newowner hashset newowner newowner isabstract updateelementlisteners notationprovider see org argouml uml diagram ui fig edge model element get notation provider type override protected int get notation provider type return notation provider factory2 type association name figedgemodelelement getnotationprovidertype getnotationprovidertype notationproviderfactory2 type_association_name override protected void text edited fig text ft if get owner null return super text edited ft collection conn model get facade get connections get owner if conn null conn size 0 return if ft src group get role src group get role text edited else if ft dest group get role dest group get role text edited else if ft src mult src mult text edited else if ft dest mult dest mult text edited textedited figtext getowner textedited getfacade getconnections getowner srcgroup getrole srcgroup getrole textedited destgroup getrole destgroup getrole textedited srcmult srcmult textedited destmult destmult textedited override protected void text edit started fig text ft if ft src group get role src group get role text edit started else if ft dest group get role dest group get role text edit started else if ft src mult src mult text edit started else if ft dest mult dest mult text edit started else super text edit started ft texteditstarted figtext srcgroup getrole srcgroup getrole texteditstarted destgroup getrole destgroup getrole texteditstarted srcmult srcmult texteditstarted destmult destmult texteditstarted texteditstarted choose the arrowhead style for each end p todo this is called from paint would it not better be called from rendering changed protected void apply arrow heads if src group null dest group null this only happens if model change events arrive before we are completely constructed return int source arrow type src group get arrow type int dest arrow type dest group get arrow type if get settings is show bidirectional arrows source arrow type 2 dest arrow type 2 source arrow type 3 dest arrow type 3 set source arrow head fig association end annotation arrow heads source arrow type set dest arrow head fig association end annotation arrow heads dest arrow type renderingchanged applyarrowheads srcgroup destgroup sourcearrowtype srcgroup getarrowtype destarrowtype destgroup getarrowtype getsettings isshowbidirectionalarrows sourcearrowtype destarrowtype sourcearrowtype destarrowtype setsourcearrowhead figassociationendannotation arrow_heads sourcearrowtype setdestarrowhead figassociationendannotation arrow_heads destarrowtype override public vector get pop up actions mouse event me vector pop up actions super get pop up actions me check if multiple items are selected boolean ms target manager get instance get targets size 1 none of the menu items below apply when multiple modelelements are selected if ms return pop up actions x 2 y 2 r 2 equation of a circle point first point this get first point point last point this get last point int length get perimeter length int r squared int 3 length max distance is set at 100 pixels r squared 100 2 if r squared 100 r squared 10000 else r squared r squared int src determining factor get squared distance me get point first point int dest determining factor get squared distance me get point last point if src determining factor r squared src determining factor dest determining factor argoj menu mult menu new argoj menu menu popup multiplicity mult menu add action multiplicity get src mult one mult menu add action multiplicity get src mult zero to one mult menu add action multiplicity get src mult one to many mult menu add action multiplicity get src mult zero to many pop up actions add pop up actions size get popup add offset mult menu argoj menu agg menu new argoj menu menu popup aggregation agg menu add action aggregation get src agg none agg menu add action aggregation get src agg agg menu add action aggregation get src agg composite pop up actions add pop up actions size get popup add offset agg menu else if dest determining factor r squared argoj menu mult menu new argoj menu menu popup multiplicity mult menu add action multiplicity get dest mult one mult menu add action multiplicity get dest mult zero to one mult menu add action multiplicity get dest mult one to many mult menu add action multiplicity get dest mult zero to many pop up actions add pop up actions size get popup add offset mult menu argoj menu agg menu new argoj menu menu popup aggregation agg menu add action aggregation get dest agg none agg menu add action aggregation get dest agg agg menu add action aggregation get dest agg composite pop up actions add pop up actions size get popup add offset agg menu else no particular options for right click in middle of line options available when right click anywhere on line object association get owner if association null navigability menu with suboptions built dynamically to allow navigability from atart to end from end to start or bidirectional collection asc ends model get facade get connections association iterator iter asc ends iterator object asc start iter next object asc end iter next if model get facade isa classifier model get facade get type asc start model get facade isa classifier model get facade get type asc end argoj menu nav menu new argoj menu menu popup navigability nav menu add action navigability new action navigability asc start asc end action navigability bidirectional nav menu add action navigability new action navigability asc start asc end action navigability starttoend nav menu add action navigability new action navigability asc start asc end action navigability endtostart pop up actions add pop up actions size get popup add offset nav menu return pop up actions getpopupactions mouseevent popupactions getpopupactions targetmanager getinstance gettargets popupactions firstpoint getfirstpoint lastpoint getlastpoint getperimeterlength rsquared rsquared rsquared rsquared rsquared rsquared srcdeterminingfactor getsquareddistance getpoint firstpoint destdeterminingfactor getsquareddistance getpoint lastpoint srcdeterminingfactor rsquared srcdeterminingfactor destdeterminingfactor argojmenu multmenu argojmenu multmenu actionmultiplicity getsrcmultone multmenu actionmultiplicity getsrcmultzerotoone multmenu actionmultiplicity getsrcmultonetomany multmenu actionmultiplicity getsrcmultzerotomany popupactions popupactions getpopupaddoffset multmenu argojmenu aggmenu argojmenu aggmenu actionaggregation getsrcaggnone aggmenu actionaggregation getsrcagg aggmenu actionaggregation getsrcaggcomposite popupactions popupactions getpopupaddoffset aggmenu destdeterminingfactor rsquared argojmenu multmenu argojmenu multmenu actionmultiplicity getdestmultone multmenu actionmultiplicity getdestmultzerotoone multmenu actionmultiplicity getdestmultonetomany multmenu actionmultiplicity getdestmultzerotomany popupactions popupactions getpopupaddoffset multmenu argojmenu aggmenu argojmenu aggmenu actionaggregation getdestaggnone aggmenu actionaggregation getdestagg aggmenu actionaggregation getdestaggcomposite popupactions popupactions getpopupaddoffset aggmenu getowner ascends getfacade getconnections ascends ascstart ascend getfacade isaclassifier getfacade gettype ascstart getfacade isaclassifier getfacade gettype ascend argojmenu navmenu argojmenu navmenu actionnavigability newactionnavigability ascstart ascend actionnavigability navmenu actionnavigability newactionnavigability ascstart ascend actionnavigability navmenu actionnavigability newactionnavigability ascstart ascend actionnavigability popupactions popupactions getpopupaddoffset navmenu popupactions updates the multiplicity fields protected void update multiplicity if get owner null src mult get owner null dest mult get owner null src mult set text dest mult set text updatemultiplicity getowner srcmult getowner destmult getowner srcmult settext destmult settext override public void paint graphics g if get owner null log error trying to paint a fig association without an owner else apply arrow heads if get source arrow head null get dest arrow head null get source arrow head set line color get line color get dest arrow head set line color get line color super paint g getowner figassociation applyarrowheads getsourcearrowhead getdestarrowhead getsourcearrowhead setlinecolor getlinecolor getdestarrowhead setlinecolor getlinecolor override public void paint clarifiers graphics g indicate bounds get name fig g indicate bounds src mult g indicate bounds src group get role g indicate bounds dest mult g indicate bounds dest group get role g super paint clarifiers g paintclarifiers indicatebounds getnamefig indicatebounds srcmult indicatebounds srcgroup getrole indicatebounds destmult indicatebounds destgroup getrole paintclarifiers return returns the middle group protected fig text group get middle group return middle group middlegroup figtextgroup getmiddlegroup middlegroup lays out the association edges as any other edge except for special rules for an association that loops back to the same class for this it is snapped back to the bottom right corner if it resized to the point of not being visible see org tigris gef presentation fig edge poly layout edge override protected void layout edge fig node source fig node get source fig node point points get points if points length 3 source fig node null get dest fig node source fig node rectangle rect new rectangle source fig node getx source fig node get width 20 source fig node gety source fig node get height 20 40 40 points new point 5 points 0 new point rect x rect y rect height 2 points 1 new point rect x rect y rect height points 2 new point rect x rect width rect y rect height points 3 new point rect x rect width rect y points 4 new point rect x rect width 2 rect y set points points else super layout edge figedgepoly layoutedge layoutedge fignode sourcefignode getsourcefignode getpoints sourcefignode getdestfignode sourcefignode sourcefignode sourcefignode getwidth sourcefignode sourcefignode getheight setpoints layoutedge if the name is updated update the bounds of the middle group this makes the selection box appear correctly during prop panel edit this is a temporary solution until a better architecture is decided upon see issue 5477 and http argouml tigris org issues show bug cgi id 5621 desc19 see org argouml uml diagram ui fig edge model element update name text protected void update name text super update name text todo without the null check the following throws a npe so many times when it is called from fig edge model element model changed we need to think about it if middle group null middle group calc bounds show_bug figedgemodelelement updatenametext updatenametext updatenametext figedgemodelelement modelchanged middlegroup middlegroup calcbounds suppress warnings deprecation deprecated fig multiplicity super x0 y0 90 20 false new string multiplicity set text filled false set justification fig text justify center suppresswarnings figmultiplicity settextfilled setjustification figtext justify_center fig multiplicity object owner diagram settings settings super owner new rectangle x0 y0 90 20 settings false multiplicity set text filled false set justification fig text justify center figmultiplicity diagramsettings settextfilled setjustification figtext justify_center override protected int get notation provider type return notation provider factory2 type multiplicity getnotationprovidertype notationproviderfactory2 type_multiplicity suppress warnings deprecation deprecated fig ordering super x0 y0 90 20 false ordering set text filled false set justification fig text justify center set editable false suppresswarnings figordering settextfilled setjustification figtext justify_center seteditable fig ordering object owner diagram settings settings super owner new rectangle x0 y0 90 20 settings false ordering set text filled false set justification fig text justify center set editable false figordering diagramsettings settextfilled setjustification figtext justify_center seteditable override protected void set text assert get owner null if get settings get notation settings is show properties set text get ordering name model get facade get ordering get owner else set text damage settext getowner getsettings getnotationsettings isshowproperties settext getorderingname getfacade getordering getowner settext returns the name of the ordering kind param ordering kind the kind of ordering return ordered or the latter if null or unordered private string get ordering name object ordering kind if ordering kind null return if model get facade get name ordering kind null return if equals model get facade get name ordering kind return if unordered equals model get facade get name ordering kind return todo i18n return model get facade get name ordering kind orderingkind orderingkind getorderingname orderingkind orderingkind getfacade getname orderingkind getfacade getname orderingkind getfacade getname orderingkind getfacade getname orderingkind deprecated for 0 27 3 by tfmorris use link fig role fig role object diagram settings suppress warnings deprecation deprecated fig role super x0 y0 90 20 false string null no need to listen to these property changes the notation provider takes care of registering these new string name visibility stereotype set text filled false set justification fig text justify center figrole figrole diagramsettings suppresswarnings figrole notationprovider settextfilled setjustification figtext justify_center fig role object owner diagram settings settings super owner new rectangle x0 y0 90 20 settings false string null no need to listen to these property changes the notation provider takes care of this new string name visibility stereotype set text filled false set justification fig text justify center set text figrole diagramsettings notationprovider settextfilled setjustification figtext justify_center settext protected int get notation provider type return notation provider factory2 type association end name getnotationprovidertype notationproviderfactory2 type_association_end_name property change listener to recalculate bounds of enclosing group whenever any properties of the fig role get changed this is only really needed for the name see issue 5621 param pce the property change event to process see org argouml uml diagram ui fig single line text with notation property change java beans property change event override public void property change property change event pce super property change pce this get group calc bounds figrole figsinglelinetextwithnotation propertychange propertychangeevent propertychange propertychangeevent propertychange getgroup calcbounds suppress warnings deprecation deprecated fig association end annotation fig edge model element edge fig edge edge role new fig role add fig role ordering new fig ordering add fig ordering suppresswarnings figassociationendannotation figedgemodelelement figedge figrole addfig figordering addfig fig association end annotation fig edge model element edge object owner diagram settings settings super owner settings fig edge edge role new fig role owner settings add fig role ordering new fig ordering owner settings add fig ordering determine arrow head model get pump add model event listener this owner new string is navigable aggregation participant figassociationendannotation figedgemodelelement diagramsettings figedge figrole addfig figordering addfig determinearrowhead getpump addmodeleventlistener isnavigable deprecated by mvw in 0 27 3 use non deprecated constructors instead suppress warnings deprecation deprecated override public void set owner object owner if owner null if model get facade isa association end owner throw new illegal argument exception an association end was expected super set owner owner ordering set owner owner role set owner owner role set text determine arrow head model get pump add model event listener this owner new string is navigable aggregation participant suppresswarnings setowner getfacade isaassociationend illegalargumentexception associationend setowner setowner setowner settext determinearrowhead getpump addmodeleventlistener isnavigable override public void remove from diagram model get pump remove model event listener this get owner new string is navigable aggregation participant super remove from diagram removefromdiagram getpump removemodeleventlistener getowner isnavigable removefromdiagram override public void property change property change event pce if pce instanceof attribute change event pce get property name equals is navigable pce get property name equals aggregation determine arrow head fig association fig edge apply arrow heads damage if pce instanceof add association event pce get property name equals participant fig edge determine fig nodes string p name pce get property name if p name equals editing boolean false equals pce get new value finished editing parse the text that was edited only the role is editable hence role text edited calc bounds end trans else if p name equals editing boolean true equals pce get new value fig edge show help role get parsing help role set text role text edit started else pass everything else to superclass super property change pce propertychange propertychangeevent attributechangeevent getpropertyname isnavigable getpropertyname determinearrowhead figassociation figedge applyarrowheads addassociationevent getpropertyname figedge determinefignodes pname getpropertyname pname getnewvalue textedited calcbounds endtrans pname getnewvalue figedge showhelp getparsinghelp settext texteditstarted propertychange decide which arrow head should appear private void determine arrow head assert get owner null object ak model get facade get aggregation get owner boolean nav model get facade is navigable get owner if nav if model get aggregation kind get none equals ak ak null arrow type nav none else if model get aggregation kind get aggregate equals ak arrow type nav aggregate else if model get aggregation kind get composite equals ak arrow type nav composite else if model get aggregation kind get none equals ak ak null arrow type none else if model get aggregation kind get aggregate equals ak arrow type aggregate else if model get aggregation kind get composite equals ak arrow type composite determinearrowhead getowner getfacade getaggregation getowner getfacade isnavigable getowner getaggregationkind getnone arrowtype nav_none getaggregationkind getaggregate arrowtype nav_aggregate getaggregationkind getcomposite arrowtype nav_composite getaggregationkind getnone arrowtype getaggregationkind getaggregate arrowtype getaggregationkind getcomposite arrowtype return the current arrow type of this end of the association public int get arrow type return arrow type getarrowtype arrowtype fig role get role return role figrole getrole constructs a new target event param source the source that fired the target event will always be the target manager param te name the name of the target event can be target set target removed or target added param old targets the old targets before the change took place param new targets the new targets after the change took place public target event object source string te name object old targets object new targets super source the event name te name the old targets old targets the new targets new targets targetevent targetevent targetmanager tename targetevent target_set target_removed target_added oldtargets newtargets targetevent tename oldtargets newtargets theeventname tename theoldtargets oldtargets thenewtargets newtargets getter for the name return the name of the event public string get name return the event name getname theeventname getter for the old targets return an object array with the old targets public object get old targets return the old targets null new object the old targets getoldtargets theoldtargets theoldtargets getter for the new targets return an object array with the new targets public object get new targets return the new targets null new object the new targets getnewtargets thenewtargets thenewtargets helper for getting the new target return the zero th element in newtargets or null public object get new target return the new targets null the new targets length 1 null the new targets 0 _newtargets getnewtarget thenewtargets thenewtargets thenewtargets gets the targets that are removed from the selection return the removed targets public collection get removed target collection list removed targets new array list list old targets arrays as list the old targets list new targets arrays as list the new targets for object o old targets if new targets contains o removed targets add o return removed targets getremovedtargetcollection removedtargets arraylist oldtargets aslist theoldtargets newtargets aslist thenewtargets oldtargets newtargets removedtargets removedtargets gets the targets that are removed from the selection return the removed targets public object get removed targets return get removed target collection to array getremovedtargets getremovedtargetcollection toarray returns the targets that are added to the selection return the added targets public collection get added target collection list added targets new array list list old targets arrays as list the old targets list new targets arrays as list the new targets for object o new targets if old targets contains o added targets add o return added targets getaddedtargetcollection addedtargets arraylist oldtargets aslist theoldtargets newtargets aslist thenewtargets newtargets oldtargets addedtargets addedtargets returns the targets that are added to the selection return the added targets public object get added targets return get added target collection to array getaddedtargets getaddedtargetcollection toarray the constructor public prop panel create action super label create action lookup icon create action abstract action add model element2 action new action add create action instantiation uml mutable linked list list new uml mutable linked list new uml create action classifier list model action null null true list set visible row count 2 j scroll pane instantiation scroll new j scroll pane list add field before translator localize label instantiation instantiation scroll arguments scroll proppanelcreateaction lookupicon createaction abstractactionaddmodelelement2 actionaddcreateactioninstantiation umlmutablelinkedlist umlmutablelinkedlist umlcreateactionclassifierlistmodel setvisiblerowcount jscrollpane instantiationscroll jscrollpane addfieldbefore instantiationscroll argumentsscroll see org argouml ui clarifier set fig org tigris gef presentation fig public void set fig fig f fig f setfig setfig see org argouml ui clarifier set to do item org argouml cognitive to do item public void set to do item to do item i settodoitem todoitem settodoitem todoitem public void paint icon component c graphics g int x int y if fig instanceof attributes compartment container attributes compartment container fc attributes compartment container fig added by eric lefevre 13 mar 1999 we must check if the fig text for attributes is drawn before drawing things over it if fc is attributes visible fig null return rectangle fr fc get attributes bounds int left fr x 6 int height fr y fr height 5 int right fr x fr width 6 g set color color red int i left while true g draw line i height i wave length height wave height i wave length if i right break g draw line i height wave height i wave length height i wave length if i right break g draw line i height i wave length height wave height 2 i wave length if i right break g draw line i height wave height 2 i wave length height i wave length if i right break fig null painticon attributescompartmentcontainer attributescompartmentcontainer attributescompartmentcontainer figtext isattributesvisible getattributesbounds setcolor drawline wave_length wave_height wave_length drawline wave_height wave_length wave_length drawline wave_length wave_height wave_length drawline wave_height wave_length wave_length see javax swing icon get icon width public int get icon width return 0 geticonwidth geticonwidth see javax swing icon get icon height public int get icon height return 0 geticonheight geticonheight public boolean hit int x int y if fig instanceof attributes compartment container log debug not a fig class return false attributes compartment container fc attributes compartment container fig rectangle fr fc get attributes bounds boolean res fr contains x y fig null return res attributescompartmentcontainer figclass attributescompartmentcontainer attributescompartmentcontainer getattributesbounds return returns the the instance public static cl attribute compartment get the instance return the instance theinstance clattributecompartment gettheinstance theinstance creates a j file chooser which is appropriate for opening multiple files containing user defined profiles return a j file chooser public static j file chooser create user defined profile file chooser j file chooser file chooser new j file chooser file chooser set file selection mode j file chooser files and directories file chooser set multi selection enabled true file chooser set file filter new file filter public boolean accept file file string s file get name to lower case return file is directory file is file s ends with xmi s ends with xml s ends with xmi zip s ends with xml zip public string get description return xmi xml xmi zip xml zip return file chooser jfilechooser jfilechooser jfilechooser createuserdefinedprofilefilechooser jfilechooser filechooser jfilechooser filechooser setfileselectionmode jfilechooser files_and_directories filechooser setmultiselectionenabled filechooser setfilefilter filefilter getname tolowercase isdirectory isfile endswith endswith endswith endswith getdescription filechooser public boolean accept file file string s file get name to lower case return file is directory file is file s ends with xmi s ends with xml s ends with xmi zip s ends with xml zip getname tolowercase isdirectory isfile endswith endswith endswith endswith public string get description return xmi xml xmi zip xml zip getdescription get a list of files from a file array where the directory entries are recursively resolved by all profile files inside the directory param file array array of files return list of files public static list file get file list file file array list file files new array list file for int i 0 i file array length i file file file array i files add all get list file return files filearray getfilelist filearray arraylist filearray filearray addall getlist private static list file get list file file list file results new array list file list file to do directories new linked list file set file seen directories new hash set file to do directories add file while to do directories is empty file cur dir to do directories remove 0 if cur dir is directory for some reason this alleged directory is a single file this could be that there is some confusion or just the normal that a single file was selected and is supposed to be imported results add cur dir continue get the contents of the directory file files cur dir list files if files null for file cur file cur dir list files the following test can cause trouble with links because links are accepted as directories even if they link files links could also result in infinite loops for this reason we don t do this traversing recursively if cur file is directory if this file is a directory if seen directories contains cur file to do directories add cur file seen directories add cur file else string s cur file get name to lower case if s ends with xmi s ends with xml s ends with xmi zip s ends with xml zip results add cur file return results getlist arraylist tododirectories linkedlist seendirectories hashset tododirectories tododirectories isempty curdir tododirectories curdir isdirectory curdir curdir listfiles curfile curdir listfiles curfile isdirectory seendirectories curfile tododirectories curfile seendirectories curfile curfile getname tolowercase endswith endswith endswith endswith curfile constructor for uml extension point extend list model public uml extension point extend list model super extend umlextensionpointextendlistmodel umlextensionpointextendlistmodel see org argouml uml ui uml model element list model2 build model list protected void build model list set all elements model get facade get extends get target umlmodelelementlistmodel2 buildmodellist buildmodellist setallelements getfacade getextends gettarget see org argouml uml ui uml model element list model2 is valid element object protected boolean is valid element object o return model get facade isa extend o model get facade get extends get target contains o umlmodelelementlistmodel2 isvalidelement isvalidelement getfacade isaextend getfacade getextends gettarget public collection get children object parent if model get facade isa model element parent return model get facade get comments parent return collections empty set getchildren getfacade isamodelelement getfacade getcomments empty_set see org argouml ui explorer rules perspective rule get rule name public string get rule name return translator localize misc model element comment perspectiverule getrulename getrulename public set get dependencies object parent if model get facade isa model element parent set set new hash set set add parent return set return collections empty set getdependencies getfacade isamodelelement hashset empty_set constructor for action new call action protected action new guard super actionnewcallaction actionnewguard public void action performed action event e super action performed e target manager get instance set target model get state machines factory build guard get target actionperformed actionevent actionperformed targetmanager getinstance settarget getstatemachinesfactory buildguard gettarget return returns the singleton public static action new guard get singleton return singleton actionnewguard getsingleton public boolean is enabled object t get target return t null model get facade get guard t null isenabled gettarget getfacade getguard creates a new unresolvable exception with message msg param msg a message describing what caused the exception public unresolvable exception string msg super msg unresolvableexception unresolvableexception initialize the profiles subsystem by binding the 2 packages together public void init todo there are tests which depend on being able to reinitialize the profile subsystem multiple times if profile facade is initiated profile facade set manager new org argouml profile internal profile manager impl profile facade set manager new org argouml profile internal profile manager impl set up the property panels for critics prop panel factory factory new profile prop panel factory prop panel factory manager add prop panel factory factory init profiles defined in jar files new profile loader do load profilefacade isinitiated profilefacade setmanager profilemanagerimpl profilefacade setmanager profilemanagerimpl proppanelfactory profileproppanelfactory proppanelfactorymanager addproppanelfactory profileloader doload private class popup menu extends j popup menu public popup menu super if is add add action set target get target add add action if is new is delete add separator if is new new action set target get target add new action if is delete add separator if is delete delete action set object to remove get selected value delete action set target get target add delete action popupmenu jpopupmenu popupmenu isadd addaction settarget gettarget addaction isnew isdelete addseparator isnew newaction settarget gettarget newaction isdelete addseparator isdelete deleteaction setobjecttoremove getselectedvalue deleteaction settarget gettarget deleteaction constructor that should be used if the developer wishes the popupmenu to be constructed via the actions as described in the javadoc of this class itself param data model the data model param the add action the action for adding param the new action the action for new param the delete action the action for deleting param show icon true if an icon should be shown public uml mutable linked list uml model element list model2 data model abstract action add model element2 the add action abstract action new model element the new action abstract action remove element the delete action boolean show icon super data model show icon set add action the add action set new action the new action if the delete action null set delete action the delete action add mouse listener this datamodel theaddaction thenewaction thedeleteaction showicon umlmutablelinkedlist umlmodelelementlistmodel2 datamodel abstractactionaddmodelelement2 theaddaction abstractactionnewmodelelement thenewaction abstractactionremoveelement thedeleteaction showicon datamodel showicon setaddaction theaddaction setnewaction thenewaction thedeleteaction setdeleteaction thedeleteaction addmouselistener the constructor param data model the data model param the add action the action for adding param the new action the action for new public uml mutable linked list uml model element list model2 data model abstract action add model element2 the add action abstract action new model element the new action this data model the add action the new action null true datamodel theaddaction thenewaction umlmutablelinkedlist umlmodelelementlistmodel2 datamodel abstractactionaddmodelelement2 theaddaction abstractactionnewmodelelement thenewaction datamodel theaddaction thenewaction the constructor param data model the data model param the add action the action for adding public uml mutable linked list uml model element list model2 data model abstract action add model element2 the add action this data model the add action null null true datamodel theaddaction umlmutablelinkedlist umlmodelelementlistmodel2 datamodel abstractactionaddmodelelement2 theaddaction datamodel theaddaction the constructor param data model the data model param the new action the action for new public uml mutable linked list uml model element list model2 data model abstract action new model element the new action this data model null the new action null true datamodel thenewaction umlmutablelinkedlist umlmodelelementlistmodel2 datamodel abstractactionnewmodelelement thenewaction datamodel thenewaction the constructor param data model the data model protected uml mutable linked list uml model element list model2 data model this data model null null null true set delete false set delete action null datamodel umlmutablelinkedlist umlmodelelementlistmodel2 datamodel datamodel setdelete setdeleteaction constructor that should be used if the developer wishes a customized popupmenu param data model the data model param popup the popup menu param show icon true if an icon should be shown public uml mutable linked list uml model element list model2 data model j popup menu popup boolean show icon super data model show icon set popup menu popup datamodel showicon umlmutablelinkedlist umlmodelelementlistmodel2 datamodel jpopupmenu showicon datamodel showicon setpopupmenu constructor that should be used if the developer wishes a customized popupmenu without icons param data model the data model param popup the popup menu public uml mutable linked list uml model element list model2 data model j popup menu popup this data model popup false datamodel umlmutablelinkedlist umlmodelelementlistmodel2 datamodel jpopupmenu datamodel returns the add return boolean public boolean is add return add action null add possible isadd addaction addpossible returns the delete return boolean public boolean is delete return delete action null delete possible isdelete deleteaction deletepossible returns the new return boolean public boolean is new return new action null new possible isnew newaction newpossible sets the delete param delete the delete to set public void set delete boolean delete delete possible delete setdelete deletepossible returns the add action return uml change action public abstract action add model element2 get add action return add action addaction umlchangeaction abstractactionaddmodelelement2 getaddaction addaction returns the new action return uml change action public abstract action new model element get new action return new action newaction umlchangeaction abstractactionnewmodelelement getnewaction newaction sets the add action param action the add action to set public void set add action abstract action add model element2 action if action null add possible true add action action addaction addaction setaddaction abstractactionaddmodelelement2 addpossible addaction sets the new action param action the new action to set public void set new action abstract action new model element action if action null new possible true new action action newaction newaction setnewaction abstractactionnewmodelelement newpossible newaction tell the actions what objects they should work on protected void init actions if is add add action set target get target if is new new action set target get target if is delete delete action set object to remove get selected value delete action set target get target initactions isadd addaction settarget gettarget isnew newaction settarget gettarget isdelete deleteaction setobjecttoremove getselectedvalue deleteaction settarget gettarget override public void mouse released mouse event e if e is popup trigger model get model management helper is read only get target point point e get point int index location to index point j popup menu popup get popup menu object model get model if model instanceof uml model element list model2 uml model element list model2 model build popup popup index if popup get component count 0 init actions log info showing popup at e getx e gety popup show this e getx e gety e consume mousereleased mouseevent ispopuptrigger getmodelmanagementhelper isreadonly gettarget getpoint locationtoindex jpopupmenu getpopupmenu getmodel umlmodelelementlistmodel2 umlmodelelementlistmodel2 buildpopup getcomponentcount initactions override public void mouse pressed mouse event e if e is popup trigger model get model management helper is read only get target j popup menu popup get popup menu if popup get component count 0 init actions log debug showing popup at e getx e gety get popup menu show this e getx e gety e consume mousepressed mouseevent ispopuptrigger getmodelmanagementhelper isreadonly gettarget jpopupmenu getpopupmenu getcomponentcount initactions getpopupmenu returns the popup menu return j popup menu public j popup menu get popup menu if popup menu null popup menu new popup menu return popup menu popupmenu jpopupmenu jpopupmenu getpopupmenu popupmenu popupmenu popupmenu popupmenu sets the popup menu p this allows to replace the complete default menu with a custom menu if nobody is using this then we better remove this functionality and just return a new menu all the time that would simplify initializing it param menu the popup menu to set public void set popup menu j popup menu menu popup menu menu popupmenu popupmenu setpopupmenu jpopupmenu popupmenu returns the delete action return abstract action remove element public abstract action remove element get delete action return delete action deleteaction abstractactionremoveelement abstractactionremoveelement getdeleteaction deleteaction sets the delete action param action the delete action to set public void set delete action abstract action remove element action delete action action deleteaction deleteaction setdeleteaction abstractactionremoveelement deleteaction override public void mouse clicked mouse event e if e is popup trigger model get model management helper is read only get target j popup menu popup get popup menu if popup get component count 0 init actions log info showing popup at e getx e gety get popup menu show this e getx e gety e consume mouseclicked mouseevent ispopuptrigger getmodelmanagementhelper isreadonly gettarget jpopupmenu getpopupmenu getcomponentcount initactions getpopupmenu see java awt event mouse listener mouse entered java awt event mouse event override public void mouse entered mouse event e set cursor cursor get predefined cursor cursor crosshair cursor mouselistener mouseentered mouseevent mouseentered mouseevent setcursor getpredefinedcursor crosshair_cursor see java awt event mouse listener mouse exited java awt event mouse event public void mouse exited mouse event e set cursor cursor get predefined cursor cursor default cursor mouselistener mouseexited mouseevent mouseexited mouseevent setcursor getpredefinedcursor default_cursor builds a j list from a given list model and wraps in a scrollable view param list model the model from which to build the list public scroll list list model list model this list model true true jlist listmodel scrolllist listmodel listmodel listmodel builds a j list from a given list model and wraps in a scrollable view param list model the model from which to build the list param visible row count an integer specifying the preferred number of rows to display without requiring scrolling public scroll list list model list model int visible row count set horizontal scroll bar policy scroll pane constants horizontal scrollbar never list new uml linked list list model true true list set visible row count visible row count set viewport view list jlist listmodel visiblerowcount scrolllist listmodel listmodel visiblerowcount sethorizontalscrollbarpolicy scrollpaneconstants horizontal_scrollbar_never umllinkedlist listmodel setvisiblerowcount visiblerowcount setviewportview builds a j list from a given list model and wraps in a scrollable view param list model the model from which to build the list param show icon show an icon with elements in the list param show path show containment path for elements in list public scroll list list model list model boolean show icon boolean show path set horizontal scroll bar policy scroll pane constants horizontal scrollbar never list new uml linked list list model show icon show path set viewport view list jlist listmodel showicon showpath scrolllist listmodel listmodel showicon showpath sethorizontalscrollbarpolicy scrollpaneconstants horizontal_scrollbar_never umllinkedlist listmodel showicon showpath setviewportview builds a scroll list from a given list model and wraps in a scrollable view param list the j list to wrap in a scroll deprecated in 0 27 2 use any other scroll list constructor deprecated public scroll list j list alist set horizontal scroll bar policy scroll pane constants horizontal scrollbar never this list uml linked list alist set viewport view list scrolllist jlist scrolllist scrolllist jlist sethorizontalscrollbarpolicy scrollpaneconstants horizontal_scrollbar_never umllinkedlist setviewportview examine key event to scroll left or right depending on key press param e the key event to examine public void key pressed key event e if e get key code key event vk left final point posn get viewport get view position if posn x 0 get viewport set view position new point posn x 1 posn y else if e get key code key event vk right final point posn get viewport get view position if list get width posn x get viewport get width get viewport set view position new point posn x 1 posn y keypressed keyevent getkeycode keyevent vk_left getviewport getviewposition getviewport setviewposition getkeycode keyevent vk_right getviewport getviewposition getwidth getviewport getwidth getviewport setviewposition public void key released key event arg0 keyreleased keyevent public void key typed key event arg0 keytyped keyevent public void add notify super add notify list add key listener this addnotify addnotify addkeylistener public void remove notify super remove notify list remove key listener this removenotify removenotify removekeylistener construct a property panel for object flow state elements public prop panel object flow state super label object flow state lookup icon object flow state add field translator localize label name get name text field add field translator localize label container get container scroll add field translator localize label synch state new uml action synch check box field for type classifier add field translator localize label type new uml combo box navigator translator localize label classifierinstate navigate tooltip get classifier combo box field for states uml mutable linked list list new uml mutable linked list new umlofs state list model new action addofs state null new action removeofs state true states scroll new j scroll pane list add field translator localize label instate states scroll add separator add field translator localize label incoming get incoming scroll add field translator localize label outgoing get outgoing scroll field for parameters add field translator localize label parameters new j scroll pane new uml mutable linked list new uml object flow state parameter list model new action addofs parameter new action newofs parameter new action removeofs parameter true objectflowstate proppanelobjectflowstate lookupicon objectflowstate addfield getnametextfield addfield getcontainerscroll addfield umlactionsynchcheckbox addfield umlcomboboxnavigator getclassifiercombobox umlmutablelinkedlist umlmutablelinkedlist umlofsstatelistmodel actionaddofsstate actionremoveofsstate statesscroll jscrollpane addfield statesscroll addseparator addfield getincomingscroll addfield getoutgoingscroll addfield jscrollpane umlmutablelinkedlist umlobjectflowstateparameterlistmodel actionaddofsparameter actionnewofsparameter actionremoveofsparameter override protected void add extra buttons we do not want the internal transitions button here action newcis new action new classifier in state action newcis put value action short description translator localize button new classifierinstate icon icon resource loader wrapper lookup icon classifier in state action newcis put value action small icon icon add action action newcis addextrabuttons actionnewcis actionnewclassifierinstate actionnewcis putvalue short_description resourceloaderwrapper lookupicon classifierinstate actionnewcis putvalue small_icon addaction actionnewcis override public void set target object t object old target get target super set target t action newcis set enabled action newcis is enabled if model get facade isa object flow state old target model get pump remove model event listener this old target type if model get facade isa object flow state t model get pump add model event listener this t type settarget oldtarget gettarget settarget actionnewcis setenabled actionnewcis isenabled getfacade isaobjectflowstate oldtarget getpump removemodeleventlistener oldtarget getfacade isaobjectflowstate getpump addmodeleventlistener see java beans property change listener property change java beans property change event public void property change property change event evt action newcis set enabled action newcis is enabled propertychangelistener propertychange propertychangeevent propertychange propertychangeevent actionnewcis setenabled actionnewcis isenabled return the combo box for the type classifier or classifier in state protected j combo box get classifier combo box if classifier combo box null classifier combo box new uml searchable combo box classifier combo box model new action set object flow state classifier true return classifier combo box classifierinstate jcombobox getclassifiercombobox classifiercombobox classifiercombobox umlsearchablecombobox classifiercomboboxmodel actionsetobjectflowstateclassifier classifiercombobox utility function to remove the top states from a given collection of states param ret a collection of states static void remove top state from collection ret collection tops new array list for object state ret if model get facade isa composite state state model get facade is top state tops add state ret remove all tops removetopstatefrom arraylist getfacade isacompositestate getfacade istop removeall private static object get type object target object type model get facade get type target if model get facade isa classifier in state type type model get facade get type type return type gettype getfacade gettype getfacade isaclassifierinstate getfacade gettype constructor for umlofs state list model public umlofs state list model todo this needs work we also need to listen to addition removal of states to from a classifier in state super type umlofsstatelistmodel umlofsstatelistmodel classifierinstate protected void build model list if get target null object classifier model get facade get type get target if model get facade isa classifier in state classifier collection c model get facade get in states classifier set all elements c buildmodellist gettarget getfacade gettype gettarget getfacade isaclassifierinstate getfacade getinstates setallelements protected boolean is valid element object elem object t get target if model get facade isa state elem model get facade isa object flow state t object type model get facade get type t if model get facade isa classifier in state type collection c model get facade get in states type if c contains elem return true return false isvalidelement gettarget getfacade isastate getfacade isaobjectflowstate getfacade gettype getfacade isaclassifierinstate getfacade getinstates the constructor public action addofs state super set multi select true actionaddofsstate setmultiselect protected void do it collection selected object t get target if model get facade isa object flow state t object type model get facade get type t if model get facade isa classifier in state type model get activity graphs helper set in states type selected else if model get facade isa classifier type selected null selected size 0 so we found a classifier that is not a classifier in state and at least one state has been selected well let s correct that object cis model get activity graphs factory build classifier in state type selected model get core helper set type t cis doit gettarget getfacade isaobjectflowstate getfacade gettype getfacade isaclassifierinstate getactivitygraphshelper setinstates getfacade isaclassifier classifierinstate getactivitygraphsfactory buildclassifierinstate getcorehelper settype protected list get choices list ret new array list object t get target if model get facade isa object flow state t object classifier get type t if model get facade isa classifier classifier ret add all model get model management helper get all model elements of kind with model classifier choice class remove top state from ret return ret getchoices arraylist gettarget getfacade isaobjectflowstate gettype getfacade isaclassifier addall getmodelmanagementhelper getallmodelelementsofkindwithmodel choiceclass removetopstatefrom protected string get dialog title return translator localize dialog title add state getdialogtitle protected list get selected object t get target if model get facade isa object flow state t object type model get facade get type t if model get facade isa classifier in state type return new array list model get facade get in states type return new array list getselected gettarget getfacade isaobjectflowstate getfacade gettype getfacade isaclassifierinstate arraylist getfacade getinstates arraylist constructor public action removeofs state super translator localize menu popup remove actionremoveofsstate override public void action performed action event e super action performed e object state get object to remove if state null object t get target if model get facade isa object flow state t object type model get facade get type t if model get facade isa classifier in state type collection states new array list model get facade get in states type states remove state model get activity graphs helper set in states type states actionperformed actionevent actionperformed getobjecttoremove gettarget getfacade isaobjectflowstate getfacade gettype getfacade isaclassifierinstate arraylist getfacade getinstates getactivitygraphshelper setinstates constructor for uml object flow state parameter list model public uml object flow state parameter list model super parameter umlobjectflowstateparameterlistmodel umlobjectflowstateparameterlistmodel protected void build model list if get target null set all elements model get facade get parameters get target buildmodellist gettarget setallelements getfacade getparameters gettarget see org argouml uml ui uml model element list model2 is valid element object protected boolean is valid element object element return model get facade get parameters get target contains element umlmodelelementlistmodel2 isvalidelement isvalidelement getfacade getparameters gettarget the constructor public action addofs parameter super set multi select true actionaddofsparameter setmultiselect protected void do it collection selected object t get target if model get facade isa object flow state t model get activity graphs helper set parameters t selected doit gettarget getfacade isaobjectflowstate getactivitygraphshelper setparameters protected list get choices list ret new array list object t get target if model get facade isa object flow state t object classifier get type t if model get facade isa classifier classifier ret add all model get model management helper get all model elements of kind with model classifier choice class todo we may want to restrict the list to parameters which conform to the following wfr parameter type ofstype or parameter kind in and ofstype all supertypes includes type or parameter kind out or parameter kind return and type all supertypes includes ofstype or parameter kind inout and ofstype all supertypes includes type or type all supertypes includes ofstype return ret getchoices arraylist gettarget getfacade isaobjectflowstate gettype getfacade isaclassifier addall getmodelmanagementhelper getallmodelelementsofkindwithmodel choiceclass allsupertypes allsupertypes allsupertypes allsupertypes protected string get dialog title return translator localize dialog title add state getdialogtitle protected list get selected object t get target if model get facade isa object flow state t return new array list model get facade get parameters t return new array list getselected gettarget getfacade isaobjectflowstate arraylist getfacade getparameters arraylist static class action newofs parameter extends abstract action new model element action newofs parameter super actionnewofsparameter abstractactionnewmodelelement actionnewofsparameter override public void action performed action event e object target get target if model get facade isa object flow state target object type get type target object parameter model get core factory create parameter model get core helper set type parameter type model get activity graphs helper add parameter target parameter actionperformed actionevent gettarget getfacade isaobjectflowstate gettype getcorefactory createparameter getcorehelper settype getactivitygraphshelper addparameter constructor public action removeofs parameter super translator localize menu popup remove actionremoveofsparameter override public void action performed action event e super action performed e object param get object to remove if param null object t get target if model get facade isa object flow state t model get activity graphs helper remove parameter t param actionperformed actionevent actionperformed getobjecttoremove gettarget getfacade isaobjectflowstate getactivitygraphshelper removeparameter the constructor public action save diagram to clipboard super translator localize menu popup copy diagram to clip resource loader wrapper lookup icon action copy actionsavediagramtoclipboard resourceloaderwrapper lookupicon public void action performed action event action event image diagram gif image get image if diagram gif image null return copy the gif image to the clipboard clipboard clipboard toolkit get default toolkit get system clipboard clipboard set contents new image selection diagram gif image this actionperformed actionevent actionevent diagramgifimage getimage diagramgifimage getdefaulttoolkit getsystemclipboard setcontents imageselection diagramgifimage get image from gef return an image private image get image int scale configuration get integer save graphics manager key graphics resolution 1 editor ce globals cur editor rectangle drawing area ce get layer manager get active layer calc drawing area avoid gef calc drawing area bug when nothing in a diagram if drawing area x 0 drawing area y 0 drawing area width 0 drawing area height 0 return null boolean is grid hidden ce get grid hidden ce set grid hidden true hide grid otherwise can t see anything image diagram gif image ce create image drawing area width scale drawing area height scale graphics g diagram gif image get graphics if g instanceof graphics2d graphics2d g scale scale scale background color g set color new color savegif action transparent bg color g fill rect 0 0 drawing area width scale drawing area height scale g translate drawing area x drawing area y ce print g ce set grid hidden is grid hidden return diagram gif image getimage getinteger savegraphicsmanager key_graphics_resolution cureditor drawingarea getlayermanager getactivelayer calcdrawingarea calcdrawingarea drawingarea drawingarea drawingarea drawingarea isgridhidden getgridhidden setgridhidden diagramgifimage createimage drawingarea drawingarea diagramgifimage getgraphics setcolor savegifaction transparent_bg_color fillrect drawingarea drawingarea drawingarea drawingarea setgridhidden isgridhidden diagramgifimage java awt datatransfer clipboard java awt datatransfer transferable public void lost ownership clipboard clipboard transferable transferable do nothing lostownership public boolean is enabled editor ce globals cur editor if ce null ce get layer manager null ce get layer manager get active layer null return false layer layer ce get layer manager get active layer if layer null return false rectangle drawing area layer calc drawing area avoid gef calc drawing area bug when nothing in a diagram if drawing area x 0 drawing area y 0 drawing area width 0 drawing area height 0 return false return super is enabled isenabled cureditor getlayermanager getlayermanager getactivelayer getlayermanager getactivelayer drawingarea calcdrawingarea calcdrawingarea drawingarea drawingarea drawingarea drawingarea isenabled constructor param new diagram image the image public image selection image new diagram image diagram image new diagram image newdiagramimage imageselection newdiagramimage diagramimage newdiagramimage see java awt datatransfer transferable get transfer data flavors public synchronized data flavor get transfer data flavors return supported flavors gettransferdataflavors dataflavor gettransferdataflavors supportedflavors public boolean is data flavor supported data flavor par flavor hack in order to be able to compile in java1 3 return par flavor get mime type equals data flavor image flavor get mime type par flavor get human presentable name equals data flavor image flavor get human presentable name isdataflavorsupported dataflavor parflavor parflavor getmimetype dataflavor imageflavor getmimetype parflavor gethumanpresentablename dataflavor imageflavor gethumanpresentablename public synchronized object get transfer data data flavor par flavor throws unsupported flavor exception if is data flavor supported par flavor return diagram image throw new unsupported flavor exception data flavor image flavor gettransferdata dataflavor parflavor unsupportedflavorexception isdataflavorsupported parflavor diagramimage unsupportedflavorexception dataflavor imageflavor constructor for uml composite state concurrent check box public uml composite state concurrent check box super translator localize label concurrent action set composite state concurrent get instance is concurent umlcompositestateconcurrentcheckbox umlcompositestateconcurrentcheckbox actionsetcompositestateconcurrent getinstance isconcurent see org argouml uml ui uml check box2 build model public void build model set selected model get facade is concurrent get target umlcheckbox2 buildmodel buildmodel setselected getfacade isconcurrent gettarget main constructor only directly used for file loading deprecated by for 0 27 4 by tfmorris use link figm node object rectangle diagram settings suppress warnings deprecation deprecated public figm node super figmnode diagramsettings suppresswarnings figmnode construct a figm node based on an existing uml node element param gm ignored param node the uml element deprecated by for 0 27 4 by tfmorris use link figm node object rectangle diagram settings suppress warnings deprecation deprecated public figm node graph model gm object node super gm node figmnode figmnode diagramsettings suppresswarnings figmnode graphmodel construct a new figm node param owner owning uml element param bounds position and size param settings render settings public figm node object owner rectangle bounds diagram settings settings super owner bounds settings figmnode figmnode diagramsettings override protected void text edit started fig text ft if ft get name fig show help parsing help fig node texteditstarted figtext getnamefig showhelp override public vector get pop up actions mouse event me vector pop up actions super get pop up actions me modifiers pop up actions add pop up actions size get popup add offset build modifier pop up abstract leaf root return pop up actions getpopupactions mouseevent popupactions getpopupactions popupactions popupactions getpopupaddoffset buildmodifierpopup popupactions the constructor public shadow combo box super add item translator localize label stylepane no shadow add item 1 add item 2 add item 3 add item 4 add item 5 add item 6 add item 7 add item 8 set renderer new shadow renderer shadowcombobox additem additem additem additem additem additem additem additem additem setrenderer shadowrenderer constructor public shadow renderer super shadowrenderer public component get list cell renderer component j list list object value int index boolean is selected boolean cell has focus if shadow figs null shadow figs new shadow fig shadow combo box this get item count for int i 0 i shadow figs length i shadow figs i new shadow fig shadow figs i set shadow size i shadow figs i set name string shadow combo box this get item at i if is selected set background list get selection background else set background list get background int fig index index if fig index 0 for int i 0 i shadow figs length i if value shadow combo box this get item at i fig index i if fig index 0 current fig shadow figs fig index set preferred size new dimension current fig get width fig index 4 current fig get height fig index 2 else current fig null return this getlistcellrenderercomponent jlist isselected cellhasfocus shadowfigs shadowfigs shadowfig shadowcombobox getitemcount shadowfigs shadowfigs shadowfig shadowfigs setshadowsize shadowfigs setname shadowcombobox getitemat isselected setbackground getselectionbackground setbackground getbackground figindex figindex shadowfigs shadowcombobox getitemat figindex figindex currentfig shadowfigs figindex setpreferredsize currentfig getwidth figindex currentfig getheight figindex currentfig protected void paint component graphics g g set color get background g fill rect 0 0 get width get height if current fig null current fig set location 2 1 current fig paint g paintcomponent setcolor getbackground fillrect getwidth getheight currentfig currentfig setlocation currentfig private static class shadow fig extends fig node model element constructor public shadow fig super add fig get big port add fig get name fig shadowfig fignodemodelelement shadowfig addfig getbigport addfig getnamefig public void set name string text get name fig set text text setname getnamefig settext todo bob says this is a really nasty horrible hack shadow fig should not extend fig node model element instead we require a base class fig node with common behaviour of all nodes in argouml shadow fig should extend that and fig node model element should extend that same base class adding common functionality for fig node that represent model element see org argouml uml diagram ui fig node model element set shadow size int public void set shadow size int size super set shadow size friend size shadowfig fignodemodelelement fignode shadowfig fignodemodelelement fignode fignodemodelelement setshadowsize setshadowsize setshadowsizefriend see org tigris gef presentation fig text fig text int int int int boolean deprecated for 0 27 3 by tfmorris use link fig multi line text object rectangle diagram settings boolean suppress warnings deprecation deprecated public fig multi line text int x int y int w int h boolean expand only super x y w h expand only init figs figtext figtext figmultilinetext diagramsettings suppresswarnings figmultilinetext expandonly expandonly initfigs private void init figs set text color text color set return action fig text insert set line separator n set tab action fig text end editing set justification fig text justify left set filled false set line width 0 initfigs settextcolor text_color setreturnaction figtext setlineseparator settabaction figtext end_editing setjustification figtext justify_left setfilled setlinewidth create a multi line text fig param owner owning uml element param bounds position and size param settings render settings param expand only true if fig should expand but never contract public fig multi line text object owner rectangle bounds diagram settings settings boolean expand only super owner bounds settings expand only init figs expandonly figmultilinetext diagramsettings expandonly expandonly initfigs construct a new fig final state param owner owning uml element param bounds position and size param settings rendering settings public fig final state object owner rectangle bounds diagram settings settings super owner bounds settings init figs figfinalstate figfinalstate diagramsettings initfigs the main constructor deprecated for 0 27 4 by tfmorris use link fig final state object rectangle diagram settings suppress warnings deprecation deprecated public fig final state super init figs figfinalstate diagramsettings suppresswarnings figfinalstate initfigs private void init figs set editable false color handle color globals get prefs get handle color fig circle big port new fig circle x0 y0 width height line color fill color out circle new fig circle x0 y0 width height line color fill color in circle new fig circle x0 5 y0 5 width 10 height 10 handle color line color out circle set line width line width out circle set line color line color in circle set line width 0 add fig big port add fig out circle add fig in circle set big port big port set blink ports false make port invisible unless mouse enters initfigs seteditable handlecolor getprefs gethandlecolor figcircle bigport figcircle line_color fill_color outcircle figcircle line_color fill_color incircle figcircle handlecolor line_color outcircle setlinewidth line_width outcircle setlinecolor line_color incircle setlinewidth addfig bigport addfig outcircle addfig incircle setbigport bigport setblinkports the constructor that hooks the fig into the uml element param gm ignored param node the uml element deprecated for 0 27 4 by tfmorris use link fig final state object rectangle diagram settings suppress warnings deprecation deprecated public fig final state suppress warnings unused graph model gm object node this set owner node figfinalstate diagramsettings suppresswarnings figfinalstate suppresswarnings graphmodel setowner override public object clone fig final state fig clone fig final state super clone iterator it fig clone get figs iterator fig clone set big port fig circle it next fig clone out circle fig circle it next fig clone in circle fig circle it next return fig clone figfinalstate figclone figfinalstate figclone getfigs figclone setbigport figcircle figclone outcircle figcircle figclone incircle figcircle figclone override public selection make selection object pstate get owner selection sel null if pstate null if model get facade isa activity graph model get facade get state machine model get facade get container pstate sel new selection action state this selection action state sel set outgoing button enabled false else sel new selection state this selection state sel set outgoing button enabled false return sel makeselection getowner getfacade isaactivitygraph getfacade getstatemachine getfacade getcontainer selectionactionstate selectionactionstate setoutgoingbuttonenabled selectionstate selectionstate setoutgoingbuttonenabled final states are fixed size return false see org tigris gef presentation fig is resizable override public boolean is resizable return false isresizable isresizable override public void set line color color col out circle set line color col in circle set fill color col setlinecolor outcircle setlinecolor incircle setfillcolor see org tigris gef presentation fig get line color override public color get line color return out circle get line color getlinecolor getlinecolor outcircle getlinecolor override public void set fill color color col if color black equals col see issue 5721 projects before 0 28 have their fill color set to black we refuse that color and replace by white all other fill colors are accepted col color white out circle set fill color col setfillcolor outcircle setfillcolor see org tigris gef presentation fig get fill color override public color get fill color return out circle get fill color getfillcolor getfillcolor outcircle getfillcolor see org tigris gef presentation fig set filled boolean override public void set filled boolean f ignored rendering is fixed setfilled setfilled override public boolean is filled return true isfilled see org tigris gef presentation fig set line width int override public void set line width int w out circle set line width w setlinewidth setlinewidth outcircle setlinewidth see org tigris gef presentation fig get line width override public int get line width return out circle get line width getlinewidth getlinewidth outcircle getlinewidth see java awt event mouse listener mouse clicked java awt event mouse event override public void mouse clicked mouse event me ignore mouse clicks mouselistener mouseclicked mouseevent mouseclicked mouseevent return a list of gravity points around the outer circle used in place of the default bounding box inherit doc override public list get gravity points return get circle gravity points inheritdoc getgravitypoints getcirclegravitypoints override set bounds to keep shapes looking right inherit doc override protected void set standard bounds int x int y int w int h if get name fig null return rectangle old bounds get bounds get big port set bounds x y w h out circle set bounds x y w h in circle set bounds x 5 y 5 w 10 h 10 calc bounds x x y y w w h h update edges fire prop change bounds old bounds get bounds setbounds inheritdoc setstandardbounds getnamefig oldbounds getbounds getbigport setbounds outcircle setbounds incircle setbounds calcbounds _x _y _w _h updateedges firepropchange oldbounds getbounds the constructor param component instance the component instance of which we handle the text public component instance notation object component instance if model get facade isa component instance component instance throw new illegal argument exception this is not a component instance componentinstance componentinstance componentinstancenotation componentinstance getfacade isacomponentinstance componentinstance illegalargumentexception componentinstance the constructor protected attribute notation attributenotation override public void initialise listener property change listener listener object model element add element listener listener model element if model get facade isa attribute model element we also show stereotypes for object uml model get facade get stereotypes model element add element listener listener uml we also show the type of which e g the name may change object type model get facade get type model element if type null add element listener listener type initialiselistener propertychangelistener modelelement addelementlistener modelelement getfacade isaattribute modelelement getfacade getstereotypes modelelement addelementlistener getfacade gettype modelelement addelementlistener override public void update listener property change listener listener object model element property change event pce if pce get source model element stereotype equals pce get property name type equals pce get property name if pce instanceof add association event add element listener listener pce get new value if pce instanceof remove association event remove element listener listener pce get old value updatelistener propertychangelistener modelelement propertychangeevent getsource modelelement getpropertyname getpropertyname addassociationevent addelementlistener getnewvalue removeassociationevent removeelementlistener getoldvalue constructor for uml combo box2 deprecated as of argo uml version unknown before 0 13 5 replaced by link uml combo box2 uml combo box model2 action boolean param model the combo box model deprecated protected uml combo box2 uml combo box model2 model super model set font look and feel mgr get instance get standard font add action listener this add popup menu listener model umlcombobox2 argouml umlcombobox2 umlcomboboxmodel2 comboboxmodel umlcombobox2 umlcomboboxmodel2 setfont lookandfeelmgr getinstance getstandardfont addactionlistener addpopupmenulistener constructor for uml combo box2 via the given action the action for this combobox is done param model the combo box model param action the action param show icon true if an icon should be shown in front of the items public uml combo box2 uml combo box model2 model action action boolean show icon super model set font look and feel mgr get instance get standard font add action listener action set double buffered true set renderer new uml list cell renderer2 show icon add popup menu listener model umlcombobox2 comboboxmodel showicon umlcombobox2 umlcomboboxmodel2 showicon setfont lookandfeelmgr getinstance getstandardfont addactionlistener setdoublebuffered setrenderer umllistcellrenderer2 showicon addpopupmenulistener the constructor param arg0 the combo box model param action the action public uml combo box2 uml combo box model2 arg0 action action this arg0 action true comboboxmodel umlcombobox2 umlcomboboxmodel2 public void action performed action event arg0 int i get selected index if i 0 do it arg0 actionperformed actionevent getselectedindex doit the body of the action performed method is only called if there is actually a selection made param event the event actionperformed utility method to get the current target return object public object get target return uml combo box model2 get model get target gettarget umlcomboboxmodel2 getmodel gettarget see org argouml ui targetmanager targettable model view get targettable model public target listener get targettable model return target listener get model targettablemodelview gettargettablemodel targetlistener gettargettablemodel targetlistener getmodel public void target added target event e if e get new target get target remove action listener this targetadded targetevent getnewtarget gettarget removeactionlistener see org argouml ui targetmanager target listener target removed org argouml ui targetmanager target event public void target removed target event e remove action listener this targetlistener targetremoved targetevent targetremoved targetevent removeactionlistener see org argouml ui targetmanager target listener target set org argouml ui targetmanager target event public void target set target event e add action listener this targetlistener targetset targetevent targetset targetevent addactionlistener construct a new property panel for a stimulus public prop panel stimulus super label stimulus lookup icon stimulus add field translator localize label name get name text field add field translator localize label action new uml stimulus action text field this new uml stimulus action text property name add field translator localize label sender get single row scroll new uml stimulus sender list model add field translator localize label receiver get single row scroll new uml stimulus receiver list model add field translator localize label namespace get namespace selector add action new action navigate namespace add action new action new stereotype add action get delete action proppanelstimulus lookupicon addfield getnametextfield addfield umlstimulusactiontextfield umlstimulusactiontextproperty addfield getsinglerowscroll umlstimulussenderlistmodel addfield getsinglerowscroll umlstimulusreceiverlistmodel addfield getnamespaceselector addaction actionnavigatenamespace addaction actionnewstereotype addaction getdeleteaction return the sender of this stimulus public object get sender object sender null object target get target if model get facade isa stimulus target sender model get facade get sender target return sender getsender gettarget getfacade isastimulus getfacade getsender param element the sender of this stimulus public void set sender object element object target get target if model get facade isa stimulus target model get collaborations helper set sender target element setsender gettarget getfacade isastimulus getcollaborationshelper setsender return the receiver of this stimulus public object get receiver object receiver null object target get target if model get facade isa stimulus target receiver model get facade get receiver target return receiver getreceiver gettarget getfacade isastimulus getfacade getreceiver param element the receiver of this stimulus public void set receiver object element object target get target if model get facade isa stimulus target model get common behavior helper set receiver target element setreceiver gettarget getfacade isastimulus getcommonbehaviorhelper setreceiver param modelelement the given modelelement return true if it is acceptable i e it is an association public boolean is acceptable association object modelelement return model get facade isa association modelelement isacceptableassociation getfacade isaassociation return the association of the link of the stimulus public object get association object association null object target get target if model get facade isa stimulus target object link model get facade get communication link target if link null association model get facade get association link return association getassociation gettarget getfacade isastimulus getfacade getcommunicationlink getfacade getassociation param element the association of the link of the stimulus public void set association object element object target get target if model get facade isa stimulus target object stimulus target object link model get facade get communication link stimulus if link null link model get common behavior factory create link if link null model get common behavior helper add stimulus link stimulus model get common behavior helper set communication link stimulus link object old assoc model get facade get association link if old assoc element model get core helper set association link element todo more needs to go here setassociation gettarget getfacade isastimulus getfacade getcommunicationlink getcommonbehaviorfactory createlink getcommonbehaviorhelper addstimulus getcommonbehaviorhelper setcommunicationlink oldassoc getfacade getassociation oldassoc getcorehelper setassociation adds the eventhandler to the menu and renames the entry param filename the text for the entry param add at the location return the menuitem private j menu item add event handler string filename int add at the text is used by the event handler for opening the project file f new file filename j menu item item filemenu add new action reopen project filename j menu item item file menu insert new action reopen project filename add at set maximum length of menu entry string entry name f get name if entry name length 40 entry name entry name substring 0 40 text is short tooltip is long item set text entry name item set tool tip text filename return item addat jmenuitem addeventhandler addat jmenuitem _filemenu actionreopenproject jmenuitem filemenu actionreopenproject addat entryname getname entryname entryname entryname settext entryname settooltiptext creates a new instance of last recently used menu list with respect to the menu where the lru is bound to param filemenu at this menu the lru is bound after last entry it is added with a separator public last recently used menu list j menu filemenu string new name int i holds file menu file menu filemenu lru count 0 menu index filemenu get item count init from config read number write result as new default and prepare keys max count configuration get integer argo key number last recent used max count default configuration set integer argo key number last recent used max count conf keys new configuration key max count menu items new j menu item max count create all nessessary configuration keys for lru for i 0 i max count i conf keys i configuration make key project mostrecent filelist concat integer to string i read existing file names from configuration i 0 boolean readok true while i max count readok new name configuration get string conf keys i if new name length 0 menu items i add event handler new name menu index i i else readok false empty entry stops reading last line this is the recent count lru count i lastrecentlyusedmenulist lastrecentlyusedmenulist jmenu newname filemenu lrucount menuindex getitemcount maxcount getinteger key_number_last_recent_used max_count_default setinteger key_number_last_recent_used maxcount confkeys configurationkey maxcount menuitems jmenuitem maxcount maxcount confkeys makekey tostring maxcount newname getstring confkeys newname menuitems addeventhandler newname menuindex lrucount adds a new entry to lru list and removes the last one if if it increases max count param filename name of link which is to be used to represent and reopen the file public void add entry string filename get already existing names from menu actions real file names not action names string temp names new string max count for int i 0 i lru count i action reopen project action action reopen project menu items i get action temp names i action get filename delete all existing entries for int i 0 i lru count i file menu remove menu items i add new entry as first entry menu items 0 add event handler filename menu index add other existing entries but filter the just added one int i j i 0 j 1 while i lru count j max count if temp names i equals filename menu items j add event handler temp names i menu index j j i save count lru count j and store configuration props for int k 0 k lru count k action reopen project action action reopen project menu items k get action configuration set string conf keys k action get filename maxcount _and_ addentry tempnames maxcount lrucount actionreopenproject actionreopenproject menuitems getaction tempnames getfilename lrucount filemenu menuitems menuitems addeventhandler menuindex lrucount maxcount tempnames menuitems addeventhandler tempnames menuindex lrucount lrucount actionreopenproject actionreopenproject menuitems getaction setstring confkeys getfilename see org argouml ui explorer rules perspective rule get rule name public string get rule name return translator localize misc project state machine perspectiverule getrulename getrulename public collection get children object parent collection col new array list if parent instanceof project for object model project parent get user defined model list col add all model get model management helper get all model elements of kind model model get meta types get state machine return col getchildren arraylist getuserdefinedmodellist addall getmodelmanagementhelper getallmodelelementsofkind getmetatypes getstatemachine see org argouml ui explorer rules perspective rule get dependencies java lang object public set get dependencies object parent todo what return collections empty set perspectiverule getdependencies getdependencies empty_set construct a new fig subactivity state param owner owning uml element param bounds position and size param settings rendering settings public fig initial state object owner rectangle bounds diagram settings settings super owner bounds settings init figs figsubactivitystate figinitialstate diagramsettings initfigs default constructor deprecated for 0 27 4 by tfmorris use link fig initial state object rectangle diagram settings suppress warnings deprecation deprecated public fig initial state init figs figinitialstate diagramsettings suppresswarnings figinitialstate initfigs private void init figs set editable false fig circle big port new fig circle x y state width height debug color debug color head new fig circle x y state width height line color solid fill color add figs to the fig node in back to front order add fig big port add fig head set big port big port set blink ports false make port invisible unless mouse enters initfigs seteditable figcircle bigport figcircle state_width debug_color debug_color figcircle state_width line_color solid_fill_color fignode addfig bigport addfig setbigport bigport setblinkports constructor which hooks the fig into an existing uml element param gm ignored param node the uml element deprecated for 0 27 4 by tfmorris use link fig initial state object rectangle diagram settings suppress warnings deprecation deprecated public fig initial state suppress warnings unused graph model gm object node this set owner node figinitialstate diagramsettings suppresswarnings figinitialstate suppresswarnings graphmodel setowner override public object clone fig initial state fig clone fig initial state super clone iterator it fig clone get figs iterator set big port fig circle it next fig clone head fig circle it next return fig clone figinitialstate figclone figinitialstate figclone getfigs setbigport figcircle figclone figcircle figclone override public selection make selection object pstate get owner selection sel null if pstate null if model get facade isa activity graph model get facade get state machine model get facade get container pstate sel new selection action state this selection action state sel set incoming button enabled false collection outs model get facade get outgoings get owner selection action state sel set outgoing button enabled outs is empty else sel new selection state this selection state sel set incoming button enabled false collection outs model get facade get outgoings get owner selection state sel set outgoing button enabled outs is empty return sel makeselection getowner getfacade isaactivitygraph getfacade getstatemachine getfacade getcontainer selectionactionstate selectionactionstate setincomingbuttonenabled getfacade getoutgoings getowner selectionactionstate setoutgoingbuttonenabled isempty selectionstate selectionstate setincomingbuttonenabled getfacade getoutgoings getowner selectionstate setoutgoingbuttonenabled isempty initial states are fixed size return false override public boolean is resizable return false isresizable see org tigris gef presentation fig set line color java awt color override public void set line color color col head set line color col setlinecolor setlinecolor setlinecolor see org tigris gef presentation fig get line color override public color get line color return head get line color getlinecolor getlinecolor getlinecolor see org tigris gef presentation fig set fill color java awt color override public void set fill color color col head set fill color col setfillcolor setfillcolor setfillcolor see org tigris gef presentation fig get fill color override public color get fill color return head get fill color getfillcolor getfillcolor getfillcolor ignored figure has fixed rendering param f ignored override public void set filled boolean f ignored rendering is fixed setfilled override public boolean is filled return true isfilled see org tigris gef presentation fig set line width int override public void set line width int w head set line width w setlinewidth setlinewidth setlinewidth see org tigris gef presentation fig get line width override public int get line width return head get line width getlinewidth getlinewidth getlinewidth see java awt event mouse listener mouse clicked java awt event mouse event override public void mouse clicked mouse event me ignore mouse clicks mouselistener mouseclicked mouseevent mouseclicked mouseevent return a list of gravity points around the outer circle used in place of the default bounding box inherit doc override public list get gravity points return get circle gravity points inheritdoc getgravitypoints getcirclegravitypoints override set bounds to keep shapes looking right inherit doc override protected void set standard bounds int x int y int w int h if get name fig null return rectangle old bounds get bounds get big port set bounds x y w h head set bounds x y w h calc bounds x x y y w w h h update edges fire prop change bounds old bounds get bounds setbounds inheritdoc setstandardbounds getnamefig oldbounds getbounds getbigport setbounds setbounds calcbounds _x _y _w _h updateedges firepropchange oldbounds getbounds creates a new instance of operations node param p the parent public operations node object p parent p operationsnode operationsnode return the parent public object get parent return parent getparent see java lang object to string public string to string return operations tostring tostring see org argouml ui explorer weak explorer node subsumes java lang object public boolean subsumes object obj return obj instanceof operations node weakexplorernode operationsnode the constructor public navigate target back action super translator localize action navigate back resource loader wrapper lookup icon action navigate back set the tooltip string put value action short description translator localize action navigate back navigatetargetbackaction resourceloaderwrapper lookupicon putvalue short_description java awt event action event public void action performed action event e target manager get instance navigate backward actionevent actionperformed actionevent targetmanager getinstance navigatebackward action is possible only if navigate back possible on target manager returns true see javax swing action is enabled public boolean is enabled return target manager get instance navigate back possible navigatebackpossible targetmanager isenabled isenabled targetmanager getinstance navigatebackpossible the constructor public checklist status super checkliststatus param item the item to be checkmarked return true override public boolean add check item item super add item num checks return true checkitem numchecks see org argouml ui explorer rules abstract perspective rule get rule name public string get rule name return translator localize misc model element contents abstractperspectiverule getrulename getrulename public collection get children object parent if model get facade isa model element parent return model get facade get model element contents parent return collections empty set getchildren getfacade isamodelelement getfacade getmodelelementcontents empty_set public set get dependencies object parent set set new hash set if model get facade isa model element parent set add parent set add all model get facade get model element contents parent return set getdependencies hashset getfacade isamodelelement addall getfacade getmodelelementcontents see org argouml ui explorer rules perspective rule get rule name public string get rule name return translator localize misc node resident component perspectiverule getrulename getrulename public collection get children object parent if model get facade isa node parent return model get facade get deployed components parent return collections empty set getchildren getfacade isanode getfacade getdeployedcomponents empty_set see org argouml ui explorer rules perspective rule get dependencies java lang object public set get dependencies object parent return collections empty set perspectiverule getdependencies getdependencies empty_set create a new fig for a stereotype declaration deprecated for 0 27 3 by tfmorris use link fig stereotype declaration object rectangle diagram settings suppress warnings deprecation deprecated public fig stereotype declaration construct figs figstereotypedeclaration diagramsettings suppresswarnings figstereotypedeclaration constructfigs private void construct figs get stereotype fig set keyword stereotype put all the bits together suppressing bounds calculations until we re all done for efficiency enable size checking false set suppress calc bounds true add fig get big port add fig get stereotype fig add fig get name fig todo need named tags and constraints compartments here add fig tags fig add fig constraints fig add fig get border fig set suppress calc bounds false set the bounds of the figure to the total of the above hardcoded set bounds x0 y0 width stereoheight name fig height constructfigs getstereotypefig setkeyword enablesizechecking setsuppresscalcbounds addfig getbigport addfig getstereotypefig addfig getnamefig addfig tagsfig addfig constraintsfig addfig getborderfig setsuppresscalcbounds setbounds name_fig_height constructor for use if this figure is created for an existing class node in the metamodel param gm not actually used in the current implementation param node the uml object being placed deprecated for 0 27 3 by tfmorris use link fig stereotype declaration object rectangle diagram settings suppress warnings deprecation deprecated public fig stereotype declaration suppress warnings unused graph model gm object node this set owner node enable size checking true figstereotypedeclaration diagramsettings suppresswarnings figstereotypedeclaration suppresswarnings graphmodel setowner enablesizechecking construct a fig for a stereotype on a diagram param owner owning stereotype param bounds position and size param settings render settings public fig stereotype declaration object owner rectangle bounds diagram settings settings super owner bounds settings construct figs enable size checking true figstereotypedeclaration diagramsettings constructfigs enablesizechecking see org tigris gef presentation fig make selection override public selection make selection return new selection stereotype this makeselection makeselection selectionstereotype build a collection of menu items relevant for a right click popup menu on a stereotype inherit doc override public vector get pop up actions mouse event me vector pop up actions super get pop up actions me add argoj menu add menu new argoj menu menu popup add todo add tags constraints add menu add target manager get instance get add attribute action add menu add target manager get instance get add operation action add menu add new action add note add menu add new action new tag definition add menu add action edges display get show edges add menu add action edges display get hide edges pop up actions add pop up actions size get popup add offset add menu show argoj menu show menu new argoj menu menu popup show for action action action compartment display get actions show menu add action if show menu get component count 0 pop up actions add pop up actions size get popup add offset show menu modifiers pop up actions add pop up actions size get popup add offset build modifier pop up abstract leaf root visibility pop up actions add pop up actions size get popup add offset build visibility pop up return pop up actions inheritdoc getpopupactions mouseevent popupactions getpopupactions argojmenu addmenu argojmenu addmenu targetmanager getinstance getaddattributeaction addmenu targetmanager getinstance getaddoperationaction addmenu actionaddnote addmenu actionnewtagdefinition addmenu actionedgesdisplay getshowedges addmenu actionedgesdisplay gethideedges popupactions popupactions getpopupaddoffset addmenu argojmenu showmenu argojmenu actioncompartmentdisplay getactions showmenu showmenu getcomponentcount popupactions popupactions getpopupaddoffset showmenu popupactions popupactions getpopupaddoffset buildmodifierpopup popupactions popupactions getpopupaddoffset buildvisibilitypopup popupactions gets the minimum size permitted for a class on the diagram p return the size of the minimum bounding box override public dimension get minimum size dimension a size get name fig get minimum size todo why does this differ from the other figs a size add child dimensions a size get stereotype fig todo allow space for each of the tags constraints we have we want to maintain a minimum width for the class a size width math max width a size width return a size getminimumsize asize getnamefig getminimumsize asize addchilddimensions asize getstereotypefig asize asize asize sets the bounds but the size will be at least the one returned by link get minimum size unless checking of size is disabled p param x desired x coordinate of upper left corner param y desired y coordinate of upper left corner param w desired width of the fig param h desired height of the fig see org tigris gef presentation fig set bounds impl int int int int override protected void set standard bounds final int x final int y final int w final int h rectangle old bounds get bounds set bounds of big box get big port set bounds x y w h get border fig set bounds x y w h int current height 0 if get stereotype fig is visible int stereotype height get stereotype fig get minimum size height get stereotype fig set bounds x y w stereotype height current height stereotype height int name height get name fig get minimum size height get name fig set bounds x y current height w name height current height name height todo compute size of tags and constraints now force calculation of the bounds of the figure update the edges and trigger anyone who s listening to see if the bounds property has changed calc bounds update edges fire prop change bounds old bounds get bounds getminimumsize setboundsimpl setstandardbounds oldbounds getbounds getbigport setbounds getborderfig setbounds currentheight getstereotypefig isvisible stereotypeheight getstereotypefig getminimumsize getstereotypefig setbounds stereotypeheight currentheight stereotypeheight nameheight getnamefig getminimumsize getnamefig setbounds currentheight nameheight currentheight nameheight calcbounds updateedges firepropchange oldbounds getbounds override protected compartment fig text unhighlight compartment fig text fc super unhighlight if fc null todo try unhighlighting our child compartments fc unhighlight get attributes fig return fc compartmentfigtext compartmentfigtext getattributesfig handles changes to the model takes into account the event that occurred if you need to update the whole fig consider using rendering changed inherit doc see org argouml uml diagram ui fig node model element model changed java beans property change event override protected void model changed property change event mee super model changed mee if mee instanceof association change event mee instanceof attribute change event rendering changed update listeners get owner get owner damage renderingchanged inheritdoc fignodemodelelement modelchanged propertychangeevent modelchanged propertychangeevent modelchanged associationchangeevent attributechangeevent renderingchanged updatelisteners getowner getowner override protected void update listeners object old owner object new owner set object listeners new hash set object if new owner null listeners add new object new owner null register for tagdefinitions for object td model get facade get tag definitions new owner listeners add new object td new string name tag type multiplicity todo constraints update element listeners listeners updatelisteners oldowner newowner hashset newowner newowner getfacade gettagdefinitions newowner tagtype updateelementlisteners the constructor param message the message to show public open exception string message super message openexception the constructor param message the message to show param cause the cause for the exception public open exception string message throwable cause super message cause openexception the constructor param cause the cause for the exception public open exception throwable cause super cause openexception public void print stack trace super print stack trace if get cause instanceof sax exception sax exception get cause get exception null sax exception get cause get exception print stack trace printstacktrace printstacktrace getcause saxexception saxexception getcause getexception saxexception getcause getexception printstacktrace public void print stack trace print stream ps super print stack trace ps if get cause instanceof sax exception sax exception get cause get exception null sax exception get cause get exception print stack trace ps printstacktrace printstream printstacktrace getcause saxexception saxexception getcause getexception saxexception getcause getexception printstacktrace public void print stack trace print writer pw super print stack trace pw if get cause instanceof sax exception sax exception get cause get exception null sax exception get cause get exception print stack trace pw printstacktrace printwriter printstacktrace getcause saxexception saxexception getcause getexception saxexception getcause getexception printstacktrace the constructor public cr wrong link ends setup head and desc add supported decision uml decision patterns crwronglinkends setupheadanddesc addsupporteddecision umldecision override public boolean predicate2 object dm designer dsgr if dm instanceof uml deployment diagram return no problem uml deployment diagram dd uml deployment diagram dm list set offs compute offenders dd if offs null return no problem return problem found umldeploymentdiagram no_problem umldeploymentdiagram umldeploymentdiagram listset computeoffenders no_problem problem_found override public to do item to do item object dm designer dsgr uml deployment diagram dd uml deployment diagram dm list set offs compute offenders dd return new uml to do item this offs dsgr todoitem todoitem umldeploymentdiagram umldeploymentdiagram listset computeoffenders umltodoitem override public boolean still valid to do item i designer dsgr if is active return false list set offs i get offenders uml deployment diagram dd uml deployment diagram offs get 0 if predicate dm dsgr return false list set new offs compute offenders dd boolean res offs equals new offs return res stillvalid todoitem isactive listset getoffenders umldeploymentdiagram umldeploymentdiagram listset newoffs computeoffenders newoffs if there are links that are going from inside a fig component to inside a fig component instance the returned vector set is not null then in the vector set are the uml deployment diagram and all fig links with this characteristic and their fig objects described over the links m link ends param deployment diagram the diagram to check return the set of offenders public list set compute offenders uml deployment diagram deployment diagram collection figs deployment diagram get layer get contents list set offs null for object obj figs if obj instanceof fig link continue fig link fig link fig link obj if model get facade isa link fig link get owner continue object link fig link get owner collection ends model get facade get connections link if ends null ends size 0 int count 0 for object end ends object instance model get facade get instance end if model get facade isa component instance instance model get facade isa node instance instance collection residencies model get facade get residents instance if residencies null residencies size 0 count count 2 object component model get facade get component instance instance if component null count count 1 if count 3 if offs null offs new list set offs add deployment diagram offs add fig link offs add fig link get source port fig offs add fig link get dest port fig return offs figcomponent figcomponentinstance umldeploymentdiagram figlinks figobjects mlinkends deploymentdiagram listset computeoffenders umldeploymentdiagram deploymentdiagram deploymentdiagram getlayer getcontents listset figlink figlink figlink figlink getfacade isalink figlink getowner figlink getowner getfacade getconnections getfacade getinstance getfacade isacomponentinstance getfacade isanodeinstance getfacade getresidents getfacade getcomponentinstance listset deploymentdiagram figlink figlink getsourceportfig figlink getdestportfig constructor for uml association role message list model public uml association role message list model super message umlassociationrolemessagelistmodel umlassociationrolemessagelistmodel see org argouml uml ui uml model element list model2 build model list protected void build model list set all elements model get facade get messages get target umlmodelelementlistmodel2 buildmodellist buildmodellist setallelements getfacade getmessages gettarget see org argouml uml ui uml model element list model2 is valid element object protected boolean is valid element object o return model get facade isa message o model get facade get messages get target contains o umlmodelelementlistmodel2 isvalidelement isvalidelement getfacade isamessage getfacade getmessages gettarget construct a property panel for flow elements public prop panel flow super label flow lookup icon flow initialize proppanelflow lookupicon private void initialize add field translator localize label name get name text field add field translator localize label namespace get namespace selector add field translator localize label constraints get constraint scroll add separator addfield getnametextfield addfield getnamespaceselector addfield getconstraintscroll addseparator public class init ui cmd subsystem implements init subsystem public list gui settings tab interface get project settings tabs return collections empty list inituicmdsubsystem initsubsystem guisettingstabinterface getprojectsettingstabs emptylist public list gui settings tab interface get settings tabs list gui settings tab interface result new array list gui settings tab interface result add new settings tab shortcuts return result guisettingstabinterface getsettingstabs guisettingstabinterface arraylist guisettingstabinterface settingstabshortcuts public void init action adjust snap init action adjust grid init actionadjustsnap actionadjustgrid public list abstract argoj panel get details tabs return collections empty list abstractargojpanel getdetailstabs emptylist the constructor public uml operation raised signals list model super signal umloperationraisedsignalslistmodel protected void build model list if get target null collection signals null object target get target if model get facade isa operation target signals model get facade get raised signals target set all elements signals buildmodellist gettarget gettarget getfacade isaoperation getfacade getraisedsignals setallelements protected boolean is valid element object element collection signals null object target get target if model get facade isa operation target signals model get facade get raised signals target return signals null signals contains element isvalidelement gettarget getfacade isaoperation getfacade getraisedsignals construct a property panel for a call event public prop panel call event super label call event lookup icon call event proppanelcallevent lookupicon callevent override public void initialize super initialize uml searchable combo box operation combo box new uml call event operation combo box2 new uml call event operation combo box model add field label operations new uml combo box navigator translator localize label operation navigate tooltip operation combo box add action new action new parameter add action get delete action umlsearchablecombobox operationcombobox umlcalleventoperationcombobox2 umlcalleventoperationcomboboxmodel addfield umlcomboboxnavigator operationcombobox addaction actionnewparameter addaction getdeleteaction class uml call event operation combo box2 extends uml searchable combo box the constructor param arg0 the model public uml call event operation combo box2 uml combo box model2 arg0 super arg0 null no external action we do it ourselves set editable false umlcalleventoperationcombobox2 umlsearchablecombobox umlcalleventoperationcombobox2 umlcomboboxmodel2 seteditable override public void action performed action event e super action performed e object source e get source if source instanceof uml combo box2 object selected uml combo box2 source get selected item object target uml combo box2 source get target if model get facade isa call event target model get facade isa operation selected if model get facade get operation target selected model get common behavior helper set operation target selected actionperformed actionevent actionperformed getsource umlcombobox2 umlcombobox2 getselecteditem umlcombobox2 gettarget getfacade isacallevent getfacade isaoperation getfacade getoperation getcommonbehaviorhelper setoperation class uml call event operation combo box model extends uml combo box model2 the constructor public uml call event operation combo box model super operation true umlcalleventoperationcomboboxmodel umlcomboboxmodel2 umlcalleventoperationcomboboxmodel protected void build model list object target target manager get instance get model target collection ops new array list if model get facade isa call event target object ns model get facade get namespace target if model get facade isa namespace ns collection classifiers model get model management helper get all model elements of kind ns model get meta types get classifier for object classifier classifiers ops add all model get facade get operations classifier todo get all model elements of kind should probably do this processing of imported elements automatically for object imported elem model get model management helper get all imported elements ns if model get facade isa classifier imported elem ops add all model get facade get operations imported elem set elements ops buildmodellist targetmanager getinstance getmodeltarget arraylist getfacade isacallevent getfacade getnamespace getfacade isanamespace getmodelmanagementhelper getallmodelelementsofkind getmetatypes getclassifier addall getfacade getoperations getallmodelelementsofkind importedelem getmodelmanagementhelper getallimportedelements getfacade isaclassifier importedelem addall getfacade getoperations importedelem setelements protected object get selected model element object target target manager get instance get model target if model get facade isa call event target return model get facade get operation target return null getselectedmodelelement targetmanager getinstance getmodeltarget getfacade isacallevent getfacade getoperation protected boolean is valid element object element object target target manager get instance get model target if model get facade isa call event target return element model get facade get operation target return false isvalidelement targetmanager getinstance getmodeltarget getfacade isacallevent getfacade getoperation constructor public cr already realizes setup head and desc add supported decision uml decision inheritance set knowledge types critic kt semantics critic kt presentation add trigger generalization add trigger realization cralreadyrealizes setupheadanddesc addsupporteddecision umldecision setknowledgetypes kt_semantics kt_presentation addtrigger addtrigger public boolean predicate2 object dm designer dsgr boolean problem no problem if model get facade isa class dm collection col model get core helper get all realized interfaces dm set set new hash set set add all col if set size col size problem problem found return problem no_problem getfacade isaclass getcorehelper getallrealizedinterfaces hashset addall problem_found public set object get criticized design materials set object ret new hash set object ret add model get meta types getuml class return ret getcriticizeddesignmaterials hashset getmetatypes getumlclass param input stream the stream from where the model should be loaded param public reference the url to be used as the public reference of the profile that will be loaded return the model throws profile exception if the xmi reader couldn t read the input stream public collection load model input stream input stream url public reference throws profile exception if input stream null log error profile not found throw new profile exception profile not found try xmi reader xmi reader model get xmi reader input source input source new input source input stream input source set public id public reference to string collection elements xmi reader parse input source true return elements catch uml exception e throw new profile exception invalid xmi data e inputstream publicreference profileexception xmireader loadmodel inputstream inputstream publicreference profileexception inputstream profileexception xmireader xmireader getxmireader inputsource inputsource inputsource inputstream inputsource setpublicid publicreference tostring xmireader inputsource umlexception profileexception private static list string resource extensions new array list string public static image icon lookup icon resource string resource return lookup icon resource resource resource resourceextensions arraylist imageicon lookupiconresource lookupiconresource public static image icon lookup icon resource string resource string desc return lookup icon resource resource desc null imageicon lookupiconresource lookupiconresource public static image icon lookup icon resource string resource class loader loader return lookup icon resource resource resource loader imageicon lookupiconresource classloader lookupiconresource this method tries to find an image icon for the given name in all known locations the file extension of the used image file can be any of the known extensions param resource name of the image to be looked after param desc a description for the image icon param loader the class loader that should be used for loading the resource return image icon for the given name null if no image could be found public static image icon lookup icon resource string resource string desc class loader loader resource to java identifier resource if is in cache resource return image icon resource cache get resource image icon res null java net url imgurl lookup icon url resource loader if imgurl null res new image icon imgurl desc synchronized resource cache resource cache put resource res return res imageicon imageicon imageicon imageicon lookupiconresource classloader tojavaidentifier isincache imageicon resourcecache imageicon lookupiconurl imageicon resourcecache resourcecache search for the given resource with one of the registered extensions in one of the registered locations the url of the first found is returned param resource base name of resource to search for param loader class loader to use return url representing first location the resource was found or null if it was not found in any of the registered locations static java net url lookup icon url string resource class loader loader java net url imgurl null for iterator extensions resource extensions iterator extensions has next string tmp ext string extensions next for iterator locations resource locations iterator locations has next string image name locations next resource tmp ext system out println resource loader try loading image name if loader null imgurl resource loader class get resource image name else imgurl loader get resource image name if imgurl null break if imgurl null break return imgurl lookupiconurl classloader resourceextensions hasnext tmpext resourcelocations hasnext imagename tmpext resourceloader imagename resourceloader getresource imagename getresource imagename adds a location path to the list of known locations locations are searched in the order they are added so for best performance add the most likely locations first param location string representation of the new location public static void add resource location string location if contains location location resource locations add location addresourcelocation containslocation resourcelocations add an extension to the list of known extensions extensions are searched in the order they are added so for best performance add the most likely extensions first param extension string representation of the new extension public static void add resource extension string extension if contains extension extension resource extensions add extension addresourceextension containsextension resourceextensions this method removes a location from the list of known locations param location string representation of the location to be removed public static void remove resource location string location for iterator iter resource locations iterator iter has next string loc string iter next if loc equals location resource locations remove loc break removeresourcelocation resourcelocations hasnext resourcelocations this method removes a extension from the list of known extensions param extension string representation of the extension to be removed public static void remove resource extension string extension for iterator iter resource extensions iterator iter has next string ext string iter next if ext equals extension resource extensions remove ext break removeresourceextension resourceextensions hasnext resourceextensions public static boolean contains extension string extension return resource extensions contains extension containsextension resourceextensions public static boolean contains location string location return resource locations contains location containslocation resourcelocations public static boolean is in cache string resource return resource cache contains key resource isincache resourcecache containskey public static final string to java identifier string s int len s length int pos 0 for int i 0 i len i pos if character is java identifier part s char at i break if pos len return s string buffer buf new string buffer len buf append s substring 0 pos skip pos we know it s not a valid char from above for int i pos 1 i len i char c s char at i if character is java identifier part c buf append c return buf to string tojavaidentifier isjavaidentifierpart charat stringbuffer stringbuffer charat isjavaidentifierpart tostring constructor for uml state machine top list model public uml transition target list model super target umlstatemachinetoplistmodel umltransitiontargetlistmodel see org argouml uml ui uml model element list model2 build model list protected void build model list remove all elements add element model get facade get target get target umlmodelelementlistmodel2 buildmodellist buildmodellist removeallelements addelement getfacade gettarget gettarget see org argouml uml ui uml model element list model2 is valid element object protected boolean is valid element object element return element model get facade get target get target umlmodelelementlistmodel2 isvalidelement isvalidelement getfacade gettarget gettarget creates a new todolist the only to do list is owned by the designer to do list items collections synchronized list new array list to do item 100 item set collections synchronized set new hash set to do item 100 resolved items collections synchronized set new linked hash set resolved critic 100 listener list new event listener list longest to do list 0 num not valid 0 todolist todolist synchronizedlist arraylist todoitem itemset synchronizedset hashset todoitem resolveditems synchronizedset linkedhashset resolvedcritic listenerlist eventlistenerlist longesttodolist numnotvalid start a thread to delete old items from the to do list param d the designer public synchronized void spawn validity checker designer d designer d validity checker new thread this argo to do validity checking thread validity checker set daemon true validity checker set priority thread min priority set paused false validity checker start todolist spawnvaliditychecker validitychecker todovaliditycheckingthread validitychecker setdaemon validitychecker setpriority min_priority setpaused validitychecker entry point for validity checker thread periodically check to see if items on the list are still valid public void run final list to do item removes new array list to do item while true the validity checking thread should wait if disabled synchronized paused mutex while is paused try paused mutex wait catch interrupted exception ignore log error interrupted exception ignore force validity check removes removes clear try thread sleep sleep seconds 1000 catch interrupted exception ignore log error interrupted exception ignore todoitem arraylist todoitem pausedmutex ispaused pausedmutex interruptedexception interruptedexception forcevaliditycheck sleep_seconds interruptedexception interruptedexception check each to do item on the list to see if it is still valid if not then remove that item this is called automatically by the validity checking thread and it can be called by the user pressing a button via force validity check public void force validity check final list to do item removes new array list to do item force validity check removes todoitem validitycheckingthread forcevaliditycheck forcevaliditycheck todoitem arraylist todoitem forcevaliditycheck check each to do item on the list to see if it is still valid if not then remove that item this is called automatically by the validity checking thread and it can be called by the user pressing a button via force validity check p em warning fragile code em no method that this method calls can synchronized the designer otherwise there will be deadlock param removes a list containing the items to be removed deprecated in 0 27 2 by bob tarling to do list is not designed to be extended so protected is not required this method is not used with the package so scope will become private in future deprecated protected synchronized void force validity check final list to do item removes synchronized items for to do item item items boolean valid try valid item still valid designer catch invalid element exception ex if element has been deleted it s no longer valid valid false catch exception ex valid false string buffer buf new string buffer exception raised in to do list cleaning buf append n buf append item to string log error buf to string ex if valid num not valid removes add item for to do item item removes removee item history the history add item resolution item no longer valid to do item item resolve no longer valid notify observers remove element item recompute all offenders recompute all posters fire to do items removed removes todoitem validitycheckingthread forcevaliditycheck todolist forcevaliditycheck todoitem todoitem stillvalid invalidelementexception stringbuffer stringbuffer todo tostring tostring numnotvalid todoitem thehistory additemresolution todoitem notifyobservers removeelement recomputealloffenders recomputeallposters firetodoitemsremoved pause the validity checking thread public void pause synchronized paused mutex is paused true pausedmutex ispaused resume the validity checking thread public void resume synchronized paused mutex is paused false paused mutex notify all pausedmutex ispaused pausedmutex notifyall return true is paused public boolean is paused synchronized paused mutex return is paused ispaused pausedmutex ispaused sets the pause state param paused if set to false calls resume also to start working public void set paused boolean paused if paused pause else resume setpaused param action the action param arg the argument public void notify observers string action object arg set changed list object l new array list object 2 l add action l add arg super notify observers l notifyobservers setchanged arraylist notifyobservers see java util observable notify observers java lang object public void notify observers object o set changed super notify observers o notifyobservers notifyobservers setchanged notifyobservers see observable notify observers public void notify observers set changed super notify observers notifyobservers notifyobservers setchanged notifyobservers returns the list of the to do items it is em mandatory em that code iterating over this list synchronize access to the list as described in link collections synchronized list list pre list to do item list to do list get to do item list synchronized list for to do item item list must be in synchronized block pre see collections synchronized list return the list of to do items public list to do item get to do item list return items todoitems synchronizedlist todoitem todolist gettodoitemlist todoitem synchronizedlist todo todoitem gettodoitemlist returns the set of resolved critics it is em mandatory em that code iterating over this set synchronize access to the set as described in link collections synchronized set set pre set resolved critic set to do list get resolved items synchronized set for resolved critic item set must be in synchronized block pre see collections synchronized set set return the resolved items public set resolved critic get resolved items return resolved items resolvedcritics synchronizedset resolvedcritic todolist getresolveditems resolvedcritic synchronizedset resolvedcritic getresolveditems resolveditems return the set of offenders todo the return value needs to be more strongly typed tfm 20070630 public list set get offenders extra care to be taken since all offenders can be reset while this method is running list set all all offenders if all null int size items size all new list set size 2 synchronized items for to do item item items all add all item get offenders all offenders all return all listset getoffenders alloffenders listset alloffenders listset todoitem addall getoffenders alloffenders private void add offenders list set newoffs if all offenders null all offenders add all newoffs addoffenders listset alloffenders alloffenders addall return the set of all the posters public list set poster get posters extra care to be taken since all posters can be reset while this method is running list set poster all all posters if all null all new list set poster synchronized items for to do item item items all add item get poster all posters all return all listset getposters allposters listset allposters listset todoitem getposter allposters private void add posters poster newp if all posters null all posters add newp addposters allposters allposters return the list of decisions empty by default public static list decision get decision list return new array list decision getdecisionlist arraylist return the list of goals empty by default public static list goal get goal list return new array list goal getgoallist arraylist private void adde to do item item skip any identical items already on the list if item set contains item return if item get poster instanceof critic resolved critic rc try rc new resolved critic critic item get poster item get offenders false iterator resolved critic elems resolved items iterator cat debug checking for inhibitors rc while elems has next if elems next equals rc log debug to do item not added because it was resolved return catch unresolvable exception ure items add item item set add item longest to do list math max longest to do list items size add offenders item get offenders add posters item get poster if item get poster instanceof designer history the history add item item note else history the history add item critique item notify observers add element item fire to do item added item todoitem itemset getposter resolvedcritic resolvedcritic getposter getoffenders resolvedcritic resolveditems hasnext todoitem unresolvableexception itemset longesttodolist longesttodolist addoffenders getoffenders addposters getposter getposter thehistory additem thehistory additemcritique notifyobservers addelement firetodoitemadded param item the todo item to be added public void add element to do item item adde item addelement todoitem param list the todo items to be removed public void remove all to do list list list to do item item list list get to do item list synchronized item list for to do item item item list removee item recompute all offenders recompute all posters fire to do items removed item list removeall todolist todoitem itemlist gettodoitemlist itemlist todoitem itemlist recomputealloffenders recomputeallposters firetodoitemsremoved itemlist param item the todo item to be removed return code true code if the argument was a component of this list code false code otherwise private boolean removee to do item item item set remove item return items remove item todoitem itemset param item the todo item to be removed return code true code if the argument was a component of this list code false code otherwise public boolean remove element to do item item boolean res removee item recompute all offenders recompute all posters fire to do item removed item notify observers remove element item return res removeelement todoitem recomputealloffenders recomputeallposters firetodoitemremoved notifyobservers removeelement param item the todo item to be resolved return code true code if the argument was a component of this list code false code otherwise public boolean resolve to do item item boolean res removee item fire to do item removed item return res todoitem firetodoitemremoved param item the todo item param reason the reason todo use it return code true code if the argument was a component of this list code false code otherwise throws unresolvable exception unable to resolve public boolean explicitly resolve to do item item string reason throws unresolvable exception if item get poster instanceof designer boolean res resolve item history the history add item resolution item reason return res if item get poster instanceof critic throw new unresolvable exception translator localize misc todo unresolvable new object item get poster get class resolved critic rc new resolved critic critic item get poster item get offenders boolean res resolve item if res res add resolved critic rc return res unresolvableexception explicitlyresolve todoitem unresolvableexception getposter thehistory additemresolution getposter unresolvableexception getposter getclass resolvedcritic resolvedcritic getposter getoffenders addresolvedcritic add the given resolved critic to the list of resolved critics param rc the resolved critic return code true code if successfully added code false code otherwise public boolean add resolved critic resolved critic rc return resolved items add rc addresolvedcritic resolvedcritic resolveditems remove all todo items public void remove all elements log debug removing all todo items list to do item old items new array list to do item items items clear item set clear recompute all offenders recompute all posters notify observers remove all elements fire to do items removed old items removeallelements todoitem olditems arraylist todoitem itemset recomputealloffenders recomputeallposters notifyobservers removeallelements firetodoitemsremoved olditems param offender the offender return a list of todo items for this offender p note the previous implementation returned an internal static global list which could be modified at any point requiring the caller to copy the list before using it negating the value of caching the static copy the current implementation returns a private copy which will not change so callers don t need to copy it public list to do item element list for offender object offender list to do item offender items new array list to do item synchronized items for to do item item items if item get offenders contains offender offender items add item return offender items todoitem elementlistforoffender todoitem offenderitems arraylist todoitem todoitem getoffenders offenderitems offenderitems return the number of todo items public int size return items size param index 0 based index to retrieve to do item from return the to do item at the given index public to do item get int index return items get index todoitem todoitem todoitem re compute all offenders deprecated in 0 27 2 by bob tarling to do list is not designed to be extended so protected is not required this method is not used with the package so scope will become private in future deprecated protected void recompute all offenders all offenders null todolist recomputealloffenders alloffenders reset all posters deprecated in 0 27 2 by bob tarling to do list is not designed to be extended so protected is not required this method is not used with the package so scope will become private in future deprecated protected void recompute all posters all posters null todolist recomputeallposters allposters param l the listener to be added public void add to do list listener to do list listener l event listener list add is synchronized so we don t need to synchronize ourselves listener list add to do list listener class l addtodolistlistener todolistlistener eventlistenerlist listenerlist todolistlistener param l the listener to be removed public void remove to do list listener to do list listener l event listener list remove is synchronized so we don t need to synchronize ourselves listener list remove to do list listener class l removetodolistlistener todolistlistener eventlistenerlist listenerlist todolistlistener notify all listeners that have registered interest for notification on this event type the event instance is lazily created using the parameters passed into the fire method see event listener list deprecated in 0 27 2 by bob tarling to do list is not designed to be extended so protected is not required this method is not used with the package so scope will become private in future deprecated protected void fire to do list changed guaranteed to return a non null array object listeners listener list get listener list to do list event e null process the listeners last to first notifying those that are interested in this event for int i listeners length 2 i 0 i 2 if listeners i to do list listener class lazily create the event if e null e new to do list event to do list listener listeners i 1 to do list changed e eventlistenerlist todolist firetodolistchanged listenerlist getlistenerlist todolistevent todolistlistener todolistevent todolistlistener todolistchanged param item the todo item deprecated in 0 27 2 by bob tarling to do list is not designed to be extended so protected is not required this method is not used with the package so scope will become private in future deprecated protected void fire to do item changed to do item item object listeners listener list get listener list to do list event e null process the listeners last to first notifying those that are interested in this event for int i listeners length 2 i 0 i 2 if listeners i to do list listener class lazily create the event if e null list to do item its new array list to do item its add item e new to do list event its to do list listener listeners i 1 to do items changed e todolist firetodoitemchanged todoitem listenerlist getlistenerlist todolistevent todolistlistener todoitem arraylist todoitem todolistevent todolistlistener todoitemschanged param item the todo item deprecated in 0 27 2 by bob tarling to do list is not designed to be extended so protected is not required this method is not used with the package so scope will become private in future deprecated protected void fire to do item added to do item item list to do item l new array list to do item l add item fire to do items added l todolist firetodoitemadded todoitem todoitem arraylist todoitem firetodoitemsadded param the items the todo items deprecated in 0 27 2 by bob tarling to do list is not designed to be extended so protected is not required this method is not used with the package so scope will become private in future deprecated protected void fire to do items added list to do item the items if the items size 0 guaranteed to return a non null array final object listeners listener list get listener list to do list event e null process the listeners last to first notifying those that are interested in this event for int i listeners length 2 i 0 i 2 if listeners i to do list listener class lazily create the event if e null e new to do list event the items to do list listener listeners i 1 to do items added e theitems todolist firetodoitemsadded todoitem theitems theitems listenerlist getlistenerlist todolistevent todolistlistener todolistevent theitems todolistlistener todoitemsadded param item the todo item deprecated in 0 27 2 by bob tarling to do list is not designed to be extended so protected is not required this method is not used with the package so scope will become private in future deprecated protected void fire to do item removed to do item item list to do item l new array list to do item l add item fire to do items removed l todolist firetodoitemremoved todoitem todoitem arraylist todoitem firetodoitemsremoved param the items the todo items deprecated in 0 27 2 by bob tarling to do list is not designed to be extended so protected is not required this method is not used with the package so scope will become private in future deprecated protected void fire to do items removed final list to do item the items if the items size 0 guaranteed to return a non null array final object listeners listener list get listener list to do list event e null process the listeners last to first notifying those that are interested in this event for int i listeners length 2 i 0 i 2 if listeners i to do list listener class lazily create the event if e null e new to do list event the items to do list listener listeners i 1 to do items removed e theitems todolist firetodoitemsremoved todoitem theitems theitems listenerlist getlistenerlist todolistevent todolistlistener todolistevent theitems todolistlistener todoitemsremoved override public string to string string buffer res new string buffer 100 res append get class get name append n list to do item item list get to do item list synchronized item list for to do item item item list res append append item to string append n res append return res to string tostring stringbuffer stringbuffer getclass getname todoitem itemlist gettodoitemlist itemlist todoitem itemlist tostring tostring the constructor public action add supplier dependency action super set multi select true actionaddsupplierdependencyaction setmultiselect protected void do it collection selected set old set new hash set get selected for object supplier old set if old set contains supplier old set remove supplier to be able to remove dep s later else model get core factory build dependency supplier get target collection to be deleted new array list collection c model get facade get supplier dependencies get target for object dependency c if old set contains all model get facade get clients dependency to be deleted add dependency project manager get manager get current project move to trash to be deleted doit oldset hashset getselected oldset oldset oldset getcorefactory builddependency gettarget tobedeleted arraylist getfacade getsupplierdependencies gettarget oldset containsall getfacade getclients tobedeleted projectmanager getmanager getcurrentproject movetotrash tobedeleted protected list get choices list ret new array list object model project manager get manager get current project get model if get target null ret add all model get model management helper get all model elements of kind model org omg uml foundation core model element ret remove get target return ret getchoices arraylist projectmanager getmanager getcurrentproject getmodel gettarget addall getmodelmanagementhelper getallmodelelementsofkind modelelement gettarget see org argouml uml ui abstract action add model element get dialog title protected string get dialog title return translator localize dialog title add supplier dependency abstractactionaddmodelelement getdialogtitle getdialogtitle protected list get selected list v new array list collection c model get facade get supplier dependencies get target for object supplier dependency c v add all model get facade get clients supplier dependency return v getselected arraylist getfacade getsupplierdependencies gettarget supplierdependency addall getfacade getclients supplierdependency constructor for uml model element constraint list model public uml model element constraint list model super constraint umlmodelelementconstraintlistmodel umlmodelelementconstraintlistmodel protected void build model list if get target null set all elements model get facade get constraints get target buildmodellist gettarget setallelements getfacade getconstraints gettarget see org argouml uml ui uml model element list model2 is valid element object protected boolean is valid element object o return model get facade isa constraint o model get facade get constraints get target contains o umlmodelelementlistmodel2 isvalidelement isvalidelement getfacade isaconstraint getfacade getconstraints gettarget the constructor param o the target public action modifier abstract object o super checkbox abstract uc put value selected boolean value of value of target o actionmodifierabstract putvalue valueof valueoftarget this action is performed on all targets see org argouml uml diagram ui abstract action check box menu item toggle value of target java lang object void toggle value of target object t model get core helper set abstract t model get facade is abstract t abstractactioncheckboxmenuitem togglevalueoftarget togglevalueoftarget getcorehelper setabstract getfacade isabstract this action should be enabled when ul li all targets are modelelements that support the abstract checkmark and li all targets are either abstract or not mixed is not yet supported but could be if a tri state checkmark is implemented ul see org argouml uml diagram ui abstract action check box menu item value of target java lang object boolean value of target object t return model get facade is abstract t abstractactioncheckboxmenuitem valueoftarget valueoftarget getfacade isabstract constructor for uml model element element residence list model public uml model element element residence list model super element residence umlmodelelementelementresidencelistmodel umlmodelelementelementresidencelistmodel elementresidence see org argouml uml ui uml model element list model2 build model list protected void build model list set all elements model get facade get element residences get target umlmodelelementlistmodel2 buildmodellist buildmodellist setallelements getfacade getelementresidences gettarget see org argouml uml ui uml model element list model2 is valid element object protected boolean is valid element object o return model get facade isa element residence o model get facade get element residences get target contains o umlmodelelementlistmodel2 isvalidelement isvalidelement getfacade isaelementresidence getfacade getelementresidences gettarget constructor for action new call action protected action new create action super put value action name translator localize button new createaction actionnewcallaction actionnewcreateaction putvalue see org argouml uml ui behavior common behavior action new action create action protected object create action return model get common behavior factory create create action common_behavior actionnewaction createaction createaction getcommonbehaviorfactory createcreateaction return returns the singleton public static action new create action get instance return singleton actionnewcreateaction getinstance public static action new action get button instance action new action a new action new create action public void action performed action event e object target target manager get instance get model target if model get facade isa transition target return set target target super action performed e a put value short description a get value action name object icon resource loader wrapper lookup icon resource create action a put value small icon icon a put value role roles effect return a actionnewaction getbuttoninstance actionnewaction actionnewcreateaction actionperformed actionevent targetmanager getinstance getmodeltarget getfacade isatransition settarget actionperformed putvalue short_description getvalue resourceloaderwrapper lookupiconresource createaction putvalue small_icon putvalue public void action performed action event e object target target manager get instance get model target if model get facade isa transition target return set target target super action performed e actionperformed actionevent targetmanager getinstance getmodeltarget getfacade isatransition settarget actionperformed create a model loader that will load the model from the given reader param the reader reader from which the model will be loaded public reader model loader reader the reader this reader the reader modelloader thereader readermodelloader thereader thereader public collection load model profile reference reference throws profile exception if reader null log error profile not found throw new profile exception profile not found try xmi reader xmi reader model get xmi reader input source input source new input source reader input source set system id reference get path input source set public id reference get public reference to string collection elements xmi reader parse input source true return elements catch uml exception e throw new profile exception invalid xmi data e loadmodel profilereference profileexception profileexception xmireader xmireader getxmireader inputsource inputsource inputsource inputsource setsystemid getpath inputsource setpublicid getpublicreference tostring xmireader inputsource umlexception profileexception public file get source path object model element object tv model get facade get tagged value model element import interface source path tag if tv null string src path model get facade get value of tag tv if src path null return new file src path return null getsourcepath modelelement getfacade gettaggedvalue modelelement importinterface source_path_tag srcpath getfacade getvalueoftag srcpath srcpath see org argouml uml ui source path controller get source path settings public source path table model get source path settings return new source path table model this sourcepathcontroller getsourcepathsettings sourcepathtablemodel getsourcepathsettings sourcepathtablemodel public void set source path source path table model src paths for int i 0 i src paths get row count i set source path src paths get model element i new file src paths getme source path i setsourcepath sourcepathtablemodel srcpaths srcpaths getrowcount setsourcepath srcpaths getmodelelement srcpaths getmesourcepath public void set source path object model element file source path object tv model get facade get tagged value model element import interface source path tag if tv null model get extension mechanisms helper add tagged value model element model get extension mechanisms factory build tagged value import interface source path tag source path to string else model get extension mechanisms helper set value of tag tv source path to string setsourcepath modelelement sourcepath getfacade gettaggedvalue modelelement importinterface source_path_tag getextensionmechanismshelper addtaggedvalue modelelement getextensionmechanismsfactory buildtaggedvalue importinterface source_path_tag sourcepath tostring getextensionmechanismshelper setvalueoftag sourcepath tostring see java lang object to string public string to string return argouml default source path controller tostring tostring public void delete source path object model element object tagged value model get facade get tagged value model element import interface source path tag model get extension mechanisms helper remove tagged value model element tagged value deletesourcepath modelelement taggedvalue getfacade gettaggedvalue modelelement importinterface source_path_tag getextensionmechanismshelper removetaggedvalue modelelement taggedvalue public collection get all model elements with source path project p project manager get manager get current project object model p get root collection elems model get model management helper get all model elements of kind with model model model get meta types get model element array list m elems with src path new array list iterator iter elems iterator while iter has next object me iter next if get source path me null m elems with src path add me return m elems with src path getallmodelelementswithsourcepath projectmanager getmanager getcurrentproject getroot getmodelmanagementhelper getallmodelelementsofkindwithmodel getmetatypes getmodelelement arraylist melemswithsrcpath arraylist hasnext getsourcepath melemswithsrcpath melemswithsrcpath construct a property panel for uml association elements public prop panel association this label association add field label name get name text field add field label namespace get namespace selector add modifiers panel add separator add field label connections assoc end scroll add separator add field label association roles association role scroll add field label association links links scroll add action new action navigate container element add action new action new stereotype add action get delete action proppanelassociation addfield getnametextfield addfield getnamespaceselector modifierspanel addseparator addfield assocendscroll addseparator addfield associationrolescroll addfield linksscroll addaction actionnavigatecontainerelement addaction actionnewstereotype addaction getdeleteaction construct a property panel for an association param title the title of the panel protected prop panel association string title super title lookup icon association initialize j list assoc end list new uml linked list new uml association connection list model assoc end scroll new j scroll pane assoc end list j list base list new uml linked list new uml association association role list model association role scroll new j scroll pane base list j list link list new uml linked list new uml association link list model links scroll new j scroll pane link list todo implement the multiple inheritance of an association generalizable element proppanelassociation lookupicon jlist assocendlist umllinkedlist umlassociationconnectionlistmodel assocendscroll jscrollpane assocendlist jlist baselist umllinkedlist umlassociationassociationrolelistmodel associationrolescroll jscrollpane baselist jlist linklist umllinkedlist umlassociationlinklistmodel linksscroll jscrollpane linklist private void initialize modifiers panel create border panel translator localize label modifiers modifiers panel add new uml generalizable element abstract check box modifiers panel add new uml generalizable element leaf check box modifiers panel add new uml generalizable element root check box modifierspanel createborderpanel modifierspanel umlgeneralizableelementabstractcheckbox modifierspanel umlgeneralizableelementleafcheckbox modifierspanel umlgeneralizableelementrootcheckbox constructor used by pgml parser to create a new diagram use of this constructor by other callers is deprecated deprecated for 0 27 3 by tfmorris use link uml state diagram string object deprecated public uml state diagram super new state diagram graph model try set name get new diagram name catch property veto exception pve nothing we can do about veto so just ignore it umlstatediagram umlstatediagram statediagramgraphmodel setname getnewdiagramname propertyvetoexception constructor param name the name of the diagram param machine the state machine for the new diagram public uml state diagram string name object machine super name machine new state diagram graph model if model get facade isa state machine machine throw new illegal state exception no state machine given to create a statechart diagram namespace get namespace from machine machine if model get facade isa namespace namespace throw new illegal argument exception name diagram namespace setup namespace machine statemachine umlstatediagram statediagramgraphmodel getfacade isastatemachine illegalstateexception statemachine getnamespacefrommachine getfacade isanamespace illegalargumentexception namediagram constructor param ns the name space for the new diagram param machine the state machine for the new diagram deprecated for 0 27 3 by tfmorris use link uml state diagram string object deprecated public uml state diagram object ns object machine this if model get facade isa state machine machine throw new illegal state exception no state machine given to create a statechart diagram if ns null ns get namespace from machine machine if model get facade isa namespace ns throw new illegal argument exception name diagram ns setup ns machine namespace statemachine umlstatediagram umlstatediagram getfacade isastatemachine illegalstateexception statemachine getnamespacefrommachine getfacade isanamespace illegalargumentexception namediagram name the diagram based on the name of its namespace and the number of behaviors that it contains param ns containing namespace private void name diagram object ns string nname model get facade get name ns if nname null nname trim length 0 int number model get facade get behaviors ns null 0 model get facade get behaviors ns size string name nname number log info uml state diagram constructor string name name try set name name catch property veto exception pve nothing we can do about veto so just ignore it namediagram getfacade getname getfacade getbehaviors getfacade getbehaviors umlstatediagram setname propertyvetoexception from a given state machine find the namespace guaranteed to give a non null result param machine the given state machine if not a state machine throws exception return the best possible namespace to be deducted private object get namespace from machine object machine if model get facade isa state machine machine throw new illegal state exception no state machine given to create a statechart diagram object ns model get facade get namespace machine if ns null return ns object context model get facade get context machine if model get facade isa classifier context ns context else if model get facade isa behavioral feature context ns model get facade get namespace or just the owner model get facade get owner context if ns null ns get project get roots iterator next if ns null model get facade isa namespace ns throw new illegal state exception can not deduce a namespace from a state machine return ns statemachine statemachine statemachine getnamespacefrommachine getfacade isastatemachine illegalstateexception statemachine getfacade getnamespace getfacade getcontext getfacade isaclassifier getfacade isabehavioralfeature getfacade getnamespace getfacade getowner getproject getroots getfacade isanamespace illegalstateexception statemachine get the owner of a statechart diagram return the statemachine which owns the diagram see org argouml uml diagram ui uml diagram get owner override public object get owner if get graph model instanceof state diagram graph model throw new illegal state exception incorrect graph model of get graph model get class get name state diagram graph model gm state diagram graph model get graph model return gm get machine umldiagram getowner getowner getgraphmodel statediagramgraphmodel illegalstateexception getgraphmodel getclass getname statediagramgraphmodel statediagramgraphmodel getgraphmodel getmachine called by the pgml parser to initialize the statechart diagram first the parser creates a statechart diagram via the default constructor then this method is called param o the statemachine see org tigris gef base diagram initialize object override public void initialize object o if model get facade isa state machine o object machine o object context namespace get namespace from machine machine setup context namespace machine else throw new illegal state exception cannot find namespace while initializing statechart diagram getfacade isastatemachine contextnamespace getnamespacefrommachine contextnamespace illegalstateexception method to perform a number of important initializations of a state diagram p each diagram type has a similar i um lxxx diagram i class p changed i lay i from i layer perspective i to i layer perspective mutable i this class is a child of i layer perspective i and was implemented to correct some difficulties in changing the model i lay i is used mainly in i layer manager i gef to control the adding changing and deleting layers on the diagram param namespace class from the uml model connects the class to the statechart diagram param machine state machine from the uml model author psager tigris org jan 24 2oo2 public void setup object namespace object machine set namespace namespace the state machine machine state diagram graph model gm create graph model gm set home model namespace if the state machine null gm set machine the state machine state diagram renderer rend new state diagram renderer singleton layer perspective lay new layer perspective mutable model get facade get name namespace gm lay set graph node renderer rend lay set graph edge renderer rend set layer lay listen to machine deletion to delete the diagram model get pump add model event listener this the state machine new string remove namespace statediagram umlxxxdiagram layerperspective layerperspectivemutable layerperspective layermanager statemachine setnamespace thestatemachine statediagramgraphmodel creategraphmodel sethomemodel thestatemachine setmachine thestatemachine statediagramrenderer statediagramrenderer layerperspective layerperspectivemutable getfacade getname setgraphnoderenderer setgraphedgerenderer setlayer getpump addmodeleventlistener thestatemachine should be created in constructor private state diagram graph model create graph model if get graph model instanceof state diagram graph model return state diagram graph model get graph model else return new state diagram graph model statediagramgraphmodel creategraphmodel getgraphmodel statediagramgraphmodel statediagramgraphmodel getgraphmodel statediagramgraphmodel override public void property change property change event evt if evt get source the state machine evt instanceof delete instance event remove equals evt get property name model get pump remove model event listener this the state machine new string remove namespace if get project null get project move to trash this else diagram factory get instance remove diagram this if evt get source the state machine namespace equals evt get property name object new namespace evt get new value if new namespace null this in case we are being deleted get namespace new namespace the namespace of the statemachine is changed set namespace new namespace uml mutable graph support get graph model set home model new namespace propertychange propertychangeevent getsource thestatemachine deleteinstanceevent getpropertyname getpump removemodeleventlistener thestatemachine getproject getproject movetotrash diagramfactory getinstance removediagram getsource thestatemachine getpropertyname newnamespace getnewvalue newnamespace getnamespace newnamespace setnamespace newnamespace umlmutablegraphsupport getgraphmodel sethomemodel newnamespace return the state machine belonging to this diagram public object get state machine return state diagram graph model get graph model get machine statemachine getstatemachine statediagramgraphmodel getgraphmodel getmachine param sm set the state machine for this diagram public void set state machine object sm if model get facade isa state machine sm throw new illegal argument exception this is not a state machine state diagram graph model get graph model set machine sm statemachine setstatemachine getfacade isastatemachine illegalargumentexception statemachine statediagramgraphmodel getgraphmodel setmachine get the actions from which to create a toolbar or equivalent graphic triggers return the array of actions see org argouml uml diagram ui uml diagram get uml actions protected object get uml actions object actions get action state get action composite state get action transition get action synch state get action submachine state get action stub state null get action start pseudo state get action final pseudo state get action junction pseudo state get action choice pseudo state get action fork pseudo state get action join pseudo state get action shallow history pseudo state get action deep history pseudo state null get trigger actions get action guard get effect actions return actions umldiagram getumlactions getumlactions getactionstate getactioncompositestate getactiontransition getactionsynchstate getactionsubmachinestate getactionstubstate getactionstartpseudostate getactionfinalpseudostate getactionjunctionpseudostate getactionchoicepseudostate getactionforkpseudostate getactionjoinpseudostate getactionshallowhistorypseudostate getactiondeephistorypseudostate gettriggeractions getactionguard geteffectactions protected object get trigger actions object actions get action call event get action change event get action signal event get action time event tool bar utility manage default actions diagram state trigger return actions gettriggeractions getactioncallevent getactionchangeevent getactionsignalevent getactiontimeevent toolbarutility managedefault protected object get effect actions object actions get action call action get action create action get action destroy action get action return action get action send action get action terminate action get action uninterpreted action get action action sequence tool bar utility manage default actions diagram state effect return actions geteffectactions getactioncallaction getactioncreateaction getactiondestroyaction getactionreturnaction getactionsendaction getactionterminateaction getactionuninterpretedaction getactionactionsequence toolbarutility managedefault see org argouml uml diagram ui uml diagram get label name public string get label name return translator localize label state chart diagram umldiagram getlabelname getlabelname return returns the action choice pseudo state protected action get action choice pseudo state if action branch pseudo state null action branch pseudo state new radio action new action create pseudostate model get pseudostate kind get choice button new choice return action branch pseudo state actionchoicepseudostate getactionchoicepseudostate actionbranchpseudostate actionbranchpseudostate radioaction actioncreatepseudostate getpseudostatekind getchoice actionbranchpseudostate return returns the action composite state protected action get action composite state if action composite state null action composite state new radio action new cmd create node model get meta types get composite state button new compositestate return action composite state actioncompositestate getactioncompositestate actioncompositestate actioncompositestate radioaction cmdcreatenode getmetatypes getcompositestate actioncompositestate return returns the action deep history pseudo state protected action get action deep history pseudo state if action deep history pseudo state null action deep history pseudo state new radio action new action create pseudostate model get pseudostate kind get deep history button new deephistory return action deep history pseudo state actiondeephistorypseudostate getactiondeephistorypseudostate actiondeephistorypseudostate actiondeephistorypseudostate radioaction actioncreatepseudostate getpseudostatekind getdeephistory actiondeephistorypseudostate return returns the action final pseudo state protected action get action final pseudo state if action final pseudo state null action final pseudo state new radio action new cmd create node model get meta types get final state button new finalstate return action final pseudo state actionfinalpseudostate getactionfinalpseudostate actionfinalpseudostate actionfinalpseudostate radioaction cmdcreatenode getmetatypes getfinalstate actionfinalpseudostate return returns the action fork pseudo state protected action get action fork pseudo state if action fork pseudo state null action fork pseudo state new radio action new action create pseudostate model get pseudostate kind get fork button new fork return action fork pseudo state actionforkpseudostate getactionforkpseudostate actionforkpseudostate actionforkpseudostate radioaction actioncreatepseudostate getpseudostatekind getfork actionforkpseudostate return returns the action join pseudo state protected action get action join pseudo state if action join pseudo state null action join pseudo state new radio action new action create pseudostate model get pseudostate kind get join button new join return action join pseudo state actionjoinpseudostate getactionjoinpseudostate actionjoinpseudostate actionjoinpseudostate radioaction actioncreatepseudostate getpseudostatekind getjoin actionjoinpseudostate return returns the action junction pseudo state protected action get action junction pseudo state if action junction pseudo state null action junction pseudo state new radio action new action create pseudostate model get pseudostate kind get junction button new junction return action junction pseudo state actionjunctionpseudostate getactionjunctionpseudostate actionjunctionpseudostate actionjunctionpseudostate radioaction actioncreatepseudostate getpseudostatekind getjunction actionjunctionpseudostate return returns the action shallow history pseudo state protected action get action shallow history pseudo state if action shallow history pseudo state null action shallow history pseudo state new radio action new action create pseudostate model get pseudostate kind get shallow history button new shallowhistory return action shallow history pseudo state actionshallowhistorypseudostate getactionshallowhistorypseudostate actionshallowhistorypseudostate actionshallowhistorypseudostate radioaction actioncreatepseudostate getpseudostatekind getshallowhistory actionshallowhistorypseudostate return returns the action start pseudo state protected action get action start pseudo state if action start pseudo state null action start pseudo state new radio action new action create pseudostate model get pseudostate kind get initial button new initial return action start pseudo state actionstartpseudostate getactionstartpseudostate actionstartpseudostate actionstartpseudostate radioaction actioncreatepseudostate getpseudostatekind getinitial actionstartpseudostate return returns the action state protected action get action state if action state null action state new radio action new cmd create node model get meta types get simple state button new simplestate return action state actionstate getactionstate actionstate actionstate radioaction cmdcreatenode getmetatypes getsimplestate actionstate return returns the action synch state protected action get action synch state if action synch state null action synch state new radio action new cmd create node model get meta types get synch state button new synchstate return action synch state actionsynchstate getactionsynchstate actionsynchstate actionsynchstate radioaction cmdcreatenode getmetatypes getsynchstate actionsynchstate return returns the action submachine state protected action get action submachine state if action submachine state null action submachine state new radio action new cmd create node model get meta types get submachine state button new submachinestate return action submachine state actionsubmachinestate getactionsubmachinestate actionsubmachinestate actionsubmachinestate radioaction cmdcreatenode getmetatypes getsubmachinestate actionsubmachinestate return returns the action submachine state protected action get action stub state if action stub state null action stub state new radio action new cmd create node model get meta types get stub state button new stubstate return action stub state actionsubmachinestate getactionstubstate actionstubstate actionstubstate radioaction cmdcreatenode getmetatypes getstubstate actionstubstate return returns the action transition protected action get action transition if action transition null action transition new radio action new action set mode mode create poly edge class edge class model get meta types get transition button new transition return action transition actiontransition getactiontransition actiontransition actiontransition radioaction actionsetmode modecreatepolyedge edgeclass getmetatypes gettransition actiontransition return returns the action call event protected action get action call event if action call event null action call event new button action new call event return action call event actioncallevent getactioncallevent actioncallevent actioncallevent buttonactionnewcallevent actioncallevent return returns the action call event protected action get action change event if action change event null action change event new button action new change event return action change event actioncallevent getactionchangeevent actionchangeevent actionchangeevent buttonactionnewchangeevent actionchangeevent return returns the action call event protected action get action signal event if action signal event null action signal event new button action new signal event return action signal event actioncallevent getactionsignalevent actionsignalevent actionsignalevent buttonactionnewsignalevent actionsignalevent return returns the action call event protected action get action time event if action time event null action time event new button action new time event return action time event actioncallevent getactiontimeevent actiontimeevent actiontimeevent buttonactionnewtimeevent actiontimeevent protected action get action guard if action guard null action guard new button action new guard return action guard getactionguard actionguard actionguard buttonactionnewguard actionguard protected action get action call action if action call action null action call action action new call action get button instance return action call action getactioncallaction actioncallaction actioncallaction actionnewcallaction getbuttoninstance actioncallaction protected action get action create action if action create action null action create action action new create action get button instance return action create action getactioncreateaction actioncreateaction actioncreateaction actionnewcreateaction getbuttoninstance actioncreateaction protected action get action destroy action if action destroy action null action destroy action action new destroy action get button instance return action destroy action getactiondestroyaction actiondestroyaction actiondestroyaction actionnewdestroyaction getbuttoninstance actiondestroyaction protected action get action return action if action return action null action return action action new return action get button instance return action return action getactionreturnaction actionreturnaction actionreturnaction actionnewreturnaction getbuttoninstance actionreturnaction protected action get action send action if action send action null action send action action new send action get button instance return action send action getactionsendaction actionsendaction actionsendaction actionnewsendaction getbuttoninstance actionsendaction protected action get action terminate action if action terminate action null action terminate action action new terminate action get button instance return action terminate action getactionterminateaction actionterminateaction actionterminateaction actionnewterminateaction getbuttoninstance actionterminateaction protected action get action uninterpreted action if action uninterpreted action null action uninterpreted action action new uninterpreted action get button instance return action uninterpreted action getactionuninterpretedaction actionuninterpretedaction actionuninterpretedaction actionnewuninterpretedaction getbuttoninstance actionuninterpretedaction protected action get action action sequence if action action sequence null action action sequence action new action sequence get button instance return action action sequence getactionactionsequence actionactionsequence actionactionsequence actionnewactionsequence getbuttoninstance actionactionsequence see org argouml uml diagram ui uml diagram get dependent element override public object get dependent element return get state machine umldiagram getdependentelement getdependentelement getstatemachine public boolean is relocation allowed object base return false todo we may return the following when the relocate has been implemented model get state machines helper is adding statemachine allowed base isrelocationallowed getstatemachineshelper isaddingstatemachineallowed suppress warnings unchecked public collection get relocation candidates object root todo we may return something useful when the relocate has been implemented like all state machines that are not activity graphs collection c new hash set c add get owner return c suppresswarnings getrelocationcandidates statemachines activitygraphs hashset getowner see org argouml uml diagram ui uml diagram relocate java lang object public boolean relocate object base return false umldiagram public void encloser changed fig node enclosed fig node old encloser fig node new encloser do nothing encloserchanged fignode fignode oldencloser fignode newencloser override public boolean does accept object object to accept if model get facade isa state object to accept return true else if model get facade isa synch state object to accept return true else if model get facade isa stub state object to accept return true else if model get facade isa pseudostate object to accept return true else if model get facade isa comment object to accept return true return false doesaccept objecttoaccept getfacade isastate objecttoaccept getfacade isasynchstate objecttoaccept getfacade isastubstate objecttoaccept getfacade isapseudostate objecttoaccept getfacade isacomment objecttoaccept override public fig node drop object dropped object point location fig node fig node null if location is non null convert to a rectangle that we can use rectangle bounds null if location null bounds new rectangle location x location y 0 0 diagram settings settings get diagram settings if model get facade isa action state dropped object fig node new fig action state dropped object bounds settings else if model get facade isa final state dropped object fig node new fig final state dropped object bounds settings else if model get facade isa stub state dropped object fig node new fig stub state dropped object bounds settings else if model get facade isa submachine state dropped object fig node new fig submachine state dropped object bounds settings else if model get facade isa composite state dropped object fig node new fig composite state dropped object bounds settings else if model get facade isa synch state dropped object fig node new fig synch state dropped object bounds settings else if model get facade isa state dropped object fig node new fig simple state dropped object bounds settings else if model get facade isa comment dropped object fig node new fig comment dropped object bounds settings else if model get facade isa pseudostate dropped object object kind model get facade get kind dropped object if kind null log warn found a null type pseudostate return null if kind equals model get pseudostate kind get initial fig node new fig initial state dropped object bounds settings else if kind equals model get pseudostate kind get choice fig node new fig branch state dropped object bounds settings else if kind equals model get pseudostate kind get junction fig node new fig junction state dropped object bounds settings else if kind equals model get pseudostate kind get fork fig node new fig fork state dropped object bounds settings else if kind equals model get pseudostate kind get join fig node new fig join state dropped object bounds settings else if kind equals model get pseudostate kind get shallow history fig node new fig shallow history state dropped object bounds settings else if kind equals model get pseudostate kind get deep history fig node new fig deep history state dropped object bounds settings else log warn found a type not known if fig node null if location is null here the position of the new fig node is set after in org tigris gef base mode place mouse pressed mouse event e if location null fig node set location location x location y log debug dropped object dropped object converted to fig node else log debug dropped object not added fig node return fig node fignode droppedobject fignode fignode diagramsettings getdiagramsettings getfacade isaactionstate droppedobject fignode figactionstate droppedobject getfacade isafinalstate droppedobject fignode figfinalstate droppedobject getfacade isastubstate droppedobject fignode figstubstate droppedobject getfacade isasubmachinestate droppedobject fignode figsubmachinestate droppedobject getfacade isacompositestate droppedobject fignode figcompositestate droppedobject getfacade isasynchstate droppedobject fignode figsynchstate droppedobject getfacade isastate droppedobject fignode figsimplestate droppedobject getfacade isacomment droppedobject fignode figcomment droppedobject getfacade isapseudostate droppedobject getfacade getkind droppedobject getpseudostatekind getinitial fignode figinitialstate droppedobject getpseudostatekind getchoice fignode figbranchstate droppedobject getpseudostatekind getjunction fignode figjunctionstate droppedobject getpseudostatekind getfork fignode figforkstate droppedobject getpseudostatekind getjoin fignode figjoinstate droppedobject getpseudostatekind getshallowhistory fignode figshallowhistorystate droppedobject getpseudostatekind getdeephistory fignode figdeephistorystate droppedobject fignode fignode modeplace mousepressed mouseevent fignode setlocation droppedobject fignode fignode fignode the constructor public action add context signal super actionaddcontextsignal protected list get choices list ret new array list object model project manager get manager get current project get model if get target null ret add all model get model management helper get all behavioral features model return ret getchoices arraylist projectmanager getmanager getcurrentproject getmodel gettarget addall getmodelmanagementhelper getallbehavioralfeatures protected list get selected list ret new array list ret add all model get facade get contexts get target return ret getselected arraylist addall getfacade getcontexts gettarget protected string get dialog title return translator localize dialog title add contexts getdialogtitle protected void do it collection selected model get common behavior helper set contexts get target selected doit getcommonbehaviorhelper setcontexts gettarget constructor for this object private module loader2 module status new hash map module interface module status compute extension locations moduleloader2 modulestatus hashmap moduleinterface modulestatus computeextensionlocations get hold of the instance of this object return the instance public static module loader2 get instance return instance moduleloader2 getinstance return a list of details panel tabs list abstract argoj panel get details tabs list abstract argoj panel result new array list abstract argoj panel for module interface module get instance available modules module status status module status get module if status null continue if status is enabled if module instanceof details tab provider result add all details tab provider module get details tabs return result abstractargojpanel getdetailstabs abstractargojpanel arraylist abstractargojpanel moduleinterface getinstance availablemodules modulestatus modulestatus isenabled detailstabprovider addall detailstabprovider getdetailstabs return a collection of all available modules return a collection of all available modules private collection module interface available modules return collections unmodifiable collection module status key set moduleinterface availablemodules unmodifiablecollection modulestatus keyset access methods for program infrastructure enables all selected modules and disabling all modules not selected p in short this attempts to make the modules obey their selection p param failing allowed is code true code if enabling or disabling of some of the modules is allowed to fail public static void do load boolean failing allowed get instance do internal failing allowed failingallowed doload failingallowed getinstance dointernal failingallowed other modules gets the loaded status for some other module return true if the module exists and is enabled param name is the module name of the queried module public static boolean is enabled string name return get instance is enabled internal name isenabled getinstance isenabledinternal get a collection with all the names return all the names public static collection string all modules collection string coll new hash set string for module interface mf get instance available modules coll add mf get name return coll allmodules hashset moduleinterface getinstance availablemodules getname get the selected param name the name of the module return code true code if the module is selected public static boolean is selected string name return get instance is selected internal name isselected getinstance isselectedinternal get the selected see is selected string param name the name of the module return code true code if the module is selected private boolean is selected internal string name map entry module interface module status entry find module name if entry null module status status entry get value if status null return false return status is selected return false isselected isselectedinternal moduleinterface modulestatus findmodule modulestatus getvalue isselected set the selected value param name the name of the module param value selected or not public static void set selected string name boolean value get instance set selected internal name value setselected getinstance setselectedinternal set the selected value see set selected string boolean param name the name of the module param value selected or not private void set selected internal string name boolean value map entry module interface module status entry find module name if entry null module status status entry get value status set selected value setselected setselectedinternal moduleinterface modulestatus findmodule modulestatus getvalue setselected create a description of the module based on the information provided by the module itself param name the name of the module return the description public static string get description string name return get instance get description internal name getdescription getinstance getdescriptioninternal create a description of the module based on the information provided by the module itself see get description string param name the name of the module return the description private string get description internal string name map entry module interface module status entry find module name if entry null throw new illegal argument exception module does not exist module interface module entry get key string buffer sb new string buffer string desc module get info module interface description if desc null sb append desc sb append n n string author module get info module interface author if author null sb append author append author sb append n string version module get info module interface version if version null sb append version append version sb append n return sb to string getdescription getdescriptioninternal moduleinterface modulestatus findmodule illegalargumentexception moduleinterface getkey stringbuffer stringbuffer getinfo moduleinterface getinfo moduleinterface getinfo moduleinterface tostring access methods for the program infrastructure enables all selected modules param failing allowed is true if this is not the last attempt at turning on private void do internal boolean failing allowed hunt for modules boolean some module succeeded do some module succeeded false for module interface module get instance available modules module status status module status get module if status null continue if status is enabled status is selected try if module enable some module succeeded true status set enabled catch all exceptions and errors however severe catch throwable e log error exception or error while trying to enable module module get name e else if status is enabled status is selected try if module disable some module succeeded true status set disabled catch all exceptions and errors however severe catch throwable e log error exception or error while trying to disable module module get name e while some module succeeded if failing allowed notify the user that the modules in the list that are selected but not enabled were not possible to enable and that are not selected that we cannot disable currently we just log this todo we could eventually pop up some warning window for module interface module get instance available modules module status status module status get module if status null continue if status is enabled status is selected continue if status is enabled status is selected continue if status is selected log warn module loader was not able to enable module module get name else log warn module loader was not able to disable module module get name failingallowed dointernal failingallowed huntformodules somemodulesucceeded somemodulesucceeded moduleinterface getinstance availablemodules modulestatus modulestatus isenabled isselected somemodulesucceeded setenabled getname isenabled isselected somemodulesucceeded setdisabled getname somemodulesucceeded failingallowed moduleinterface getinstance availablemodules modulestatus modulestatus isenabled isselected isenabled isselected isselected moduleloader getname moduleloader getname gets the loaded status for some other module return true if the module exists and is enabled param name is the module name of the queried module private boolean is enabled internal string name map entry module interface module status entry find module name if entry null module status status entry get value if status null return false return status is enabled return false isenabledinternal moduleinterface modulestatus findmodule modulestatus getvalue isenabled return the module interface module status pair for the module with the given name or code null code if there isn t any param name the given name return a pair map entry private map entry module interface module status find module string name for map entry module interface module status entry module status entry set module interface module entry get key if name equals ignore case module get name return entry return null moduleinterface modulestatus moduleinterface modulestatus findmodule moduleinterface modulestatus modulestatus entryset moduleinterface getkey equalsignorecase getname tries to find as many available modules as possible p as the modules are found they are appended to link module status p private void hunt for modules hunt for modules from extension dir todo hunt for modules from java web start load modules specified by a system property modules specified by a system property is for running modules from within eclipse and running from java web start string list of classes system get property argouml modules if list of classes null string tokenizer si new string tokenizer list of classes while si has more tokens string class name si next token try add class class name catch class not found exception e log error could not load module from class class name modulestatus huntformodules huntformodulesfromextensiondir huntformodulesfromjavawebstart listofclasses getproperty listofclasses stringtokenizer stringtokenizer listofclasses hasmoretokens classname nexttoken addclass classname classnotfoundexception classname find and enable modules from our ext directory and from the directory specified in argo ext dir p private void hunt for modules from extension dir for string location extension locations hunt modules from named directory location huntformodulesfromextensiondir extensionlocations huntmodulesfromnameddirectory this does a calculation of where our ext directory is todo we should eventually make sure that this calculation is only present in one place in the code and not several private void compute extension locations use a little trick to find out where argo is being loaded from todo use a different resource here argoini is unused and deprecated string ext form get class get resource argo argoini to external form string argo root ext form substring 0 ext form length argo argoini length if it s a jar clean it up and make it look like a file url if argo root starts with jar prefix argo root argo root substring jar prefix length if argo root ends with argo root argo root substring 0 argo root length 1 string argo home null if argo root null log info argo root is argo root if argo root starts with file prefix argo home new file argo root substring file prefix length get absolute file get parent else argo home new file argo root get absolute file get parent try argo home java net url decoder decode argo home argo get encoding catch unsupported encoding exception e log warn encoding argo get encoding is unknown log info argo home is argo home if argo home null string extdir if argo home starts with file prefix extdir argo home substring file prefix length file separator ext else extdir argo home file separator ext extension locations add extdir string extdir system get property argo ext dir if extdir null extension locations add extdir computeextensionlocations extform getclass getresource toexternalform argoroot extform extform argoroot startswith jar_prefix argoroot argoroot jar_prefix argoroot endswith argoroot argoroot argoroot argohome argoroot argoroot argoroot argoroot startswith file_prefix argohome argoroot file_prefix getabsolutefile getparent argohome argoroot getabsolutefile getparent argohome urldecoder argohome getencoding unsupportedencodingexception getencoding argohome argohome argohome argohome startswith file_prefix argohome file_prefix argohome extensionlocations getproperty extensionlocations get the list of locations that we ve loaded extension modules from return a list of the paths we ve loaded from public list string get extension locations return collections unmodifiable list extension locations getextensionlocations unmodifiablelist extensionlocations find and enable a module from a given directory param dirname the name of the directory private void hunt modules from named directory string dirname file extension dir new file dirname if extension dir is directory file files extension dir list files new jar file filter for file file files jar file jarfile null try catch only the jar file instantiation so we don t accidentally mask anything in argo jar class loader or process jar file try jarfile new jar file file if jarfile null todo should we be delegating to a different classloader than the default here tfm class loader classloader new url class loader new url file touri tourl try process jar file classloader file catch class not found exception e log error the class is not found e return catch io exception ioe log error cannot open jar file file ioe huntmodulesfromnameddirectory extensiondir extensiondir isdirectory extensiondir listfiles jarfilefilter jarfile jarfile argojarclassloader processjarfile jarfile classloader urlclassloader processjarfile classnotfoundexception ioexception check a jar file for an argouml extension module p if there isn t a manifest or it isn t readable we fall back to using the raw jar entries param classloader the classloader to use param file the file to process throws class not found exception if the manifest file contains a class that doesn t exist private void process jar file class loader classloader file file throws class not found exception log info opening jar file file jar file jarfile try jarfile new jar file file catch io exception e log error unable to open file e return manifest manifest try manifest jarfile get manifest if manifest null we expect all extensions to have a manifest even though we can operate without one if necessary log warn file does not have a manifest catch io exception e log error unable to read manifest of file e return todo it is a performance drain to load all classes at startup time they should be lazy loaded when needed instead of scanning all classes for ones which implement our loadable module interface we should use a manifest entry or a special name name pattern that we look for to find the single main module class to load here tfm boolean loaded class false if manifest null enumeration jar entry jar entries jarfile entries while jar entries has more elements jar entry entry jar entries next element loaded class loaded class process entry classloader entry get name else map string attributes entries manifest get entries for string key entries key set look for our specification loaded class loaded class process entry classloader key add this to search list for i18n properties done for both modules localized property file sets translator add class loader classloader if it didn t have a loadable module class and it doesn t look like a localized property set warn the user that something funny is in their extension directory if loaded class file get name contains argouml i18n log error failed to find any loadable argouml modules in jar file classnotfoundexception processjarfile classloader classnotfoundexception jarfile jarfile ioexception getmanifest ioexception loadedclass jarentry jarentries jarentries hasmoreelements jarentry jarentries nextelement loadedclass loadedclass processentry getname getentries keyset loadedclass loadedclass processentry addclassloader loadedclass getname process a jar file entry attempting to load anything that looks like a java class param classloader the classloader to use when loading the class param cname the class name throws class not found exception return true if class was a module class and loaded successfully private boolean process entry class loader classloader string cname throws class not found exception if cname ends with class suffix int class namelen cname length class suffix length string class name cname substring 0 class namelen class name class name replace return add class classloader class name return false classnotfoundexception processentry classloader classnotfoundexception endswith class_suffix classnamelen class_suffix classname classnamelen classname classname addclass classname add a class from the current class loader param classname the name of the class including package throws class not found exception if the class classname is not found public static void add class string classname throws class not found exception get instance add class module loader2 class get class loader classname classnotfoundexception addclass classnotfoundexception getinstance addclass moduleloader2 getclassloader try to load a module from the given class loader p only add it as a module if it is a module i e it implements the link module interface interface param class loader the class loader to load from param classname the name throws class not found exception if the class classname is not found private boolean add class class loader class loader string classname throws class not found exception log info loading module classname class module class try module class class loader load class classname catch unsupported class version error e log error unsupported java class version for classname return false catch no class def found error e log error unable to find required class while loading classname may indicate an obsolete extension module or an unresolved dependency e return false catch throwable e if e instanceof class not found exception throw class not found exception e log error unexpected error while loading classname e return false if module interface class is assignable from module class log debug the class classname is not a module return false constructor default constructor try default constructor module class get declared constructor new class catch security exception e log error the default constructor for class classname is not accessable e return false catch no such method exception e log error the default constructor for class classname is not found e return false catch no class def found error e log error unable to find required class while loading classname may indicate an obsolete extension module or an unresolved dependency e return false catch throwable e log error unexpected error while loading classname e return false if modifier is public default constructor get modifiers log error the default constructor for class classname is not public not loaded return false object module instance try module instance default constructor new instance new object catch illegal argument exception e log error the constructor for class classname is called with incorrect argument e return false catch instantiation exception e log error the constructor for class classname threw an exception e return false catch illegal access exception e log error the constructor for class classname is not accessible e return false catch invocation target exception e log error the constructor for class classname cannot be called e return false catch no class def found error e log error unable to find required class while instantiating classname may indicate an obsolete extension module or an unresolved dependency e return false catch throwable e log error unexpected error while instantiating classname e return false the following check should have been satisfied before we instantiated the module but double check again if module instance instanceof module interface log error the class classname is not a module return false module interface mf module interface module instance add module mf log info succesfully loaded module classname return true classloader moduleinterface classloader classloader classnotfoundexception addclass classloader classloader classnotfoundexception moduleclass moduleclass classloader loadclass unsupportedclassversionerror noclassdeffounderror classnotfoundexception classnotfoundexception moduleinterface isassignablefrom moduleclass defaultconstructor defaultconstructor moduleclass getdeclaredconstructor securityexception nosuchmethodexception noclassdeffounderror ispublic defaultconstructor getmodifiers moduleinstance moduleinstance defaultconstructor newinstance illegalargumentexception instantiationexception illegalaccessexception invocationtargetexception noclassdeffounderror moduleinstance moduleinterface moduleinterface moduleinterface moduleinstance addmodule add a newly found module to link module status if we already know about it don t add it param mf the module to add private void add module module interface mf since there is no way to compare the objects as equal we have to search through the list at this point for module interface found mf module status key set if found mf get name equals mf get name return we havn t found it add it module status ms new module status enable it todo this by default selects all modules that are found eventually we would rather obey a default either from the modules themselves from how they are found and also have information on what modules are selected from the configuration ms set selected module status put mf ms modulestatus addmodule moduleinterface moduleinterface foundmf modulestatus keyset foundmf getname getname modulestatus modulestatus setselected modulestatus public boolean accept file pathname return pathname can read pathname is file pathname get path to lower case ends with jar canread isfile getpath tolowercase endswith tells if the module is enabled or not return true if the module is enabled public boolean is enabled return enabled isenabled setter for enabled public void set enabled enabled true setenabled setter for enabled public void set disabled enabled false setdisabled tells if the module is selected by the user or not return true if it is selected public boolean is selected return selected isselected setter for selected public void set selected selected true setselected setter for selected public void set unselect selected false setunselect setter for selected param value the value to set public void set selected boolean value if value set selected else set unselect setselected setselected setunselect the constructor deprecated for 0 27 3 by tfmorris use link fig permission object diagram settings suppress warnings deprecation deprecated public fig permission super figpermission diagramsettings suppresswarnings figpermission the constructor param edge the edge deprecated for 0 27 3 by tfmorris use link fig permission object diagram settings suppress warnings deprecation deprecated public fig permission object edge super edge figpermission diagramsettings suppresswarnings figpermission the constructor param edge the edge param lay the layer deprecated for 0 27 3 by tfmorris use link fig permission object diagram settings suppress warnings deprecation deprecated public fig permission object edge layer lay super edge lay figpermission diagramsettings suppresswarnings figpermission construct a fig param owner owning uml element param settings render settings public fig permission object owner diagram settings settings super owner settings figpermission diagramsettings constructor for action add message predecessor protected action add message predecessor super actionaddmessagepredecessor actionaddmessagepredecessor protected list get choices if get target null return collections empty list list vec new array list vec add all model get collaborations helper get all possible predecessors get target return vec getchoices gettarget empty_list arraylist addall getcollaborationshelper getallpossiblepredecessors gettarget protected list get selected if get target null throw new illegal state exception get selected may not be called with null target list vec new array list vec add all model get facade get predecessors get target return vec getselected gettarget illegalstateexception getselected arraylist addall getfacade getpredecessors gettarget protected string get dialog title return translator localize dialog add predecessors getdialogtitle protected void do it collection selected if get target null throw new illegal state exception do it may not be called with null target object message get target model get collaborations helper set predecessors message selected doit gettarget illegalstateexception doit gettarget getcollaborationshelper setpredecessors return returns the singleton public static action add message predecessor get instance return singleton actionaddmessagepredecessor getinstance see org argouml ui explorer rules perspective rule get rule name public string get rule name return translator localize misc state machine top state perspectiverule getrulename getrulename public collection get children object parent if model get facade isa state machine parent list list new array list list add model get facade get top parent return list return collections empty set getchildren getfacade isastatemachine arraylist getfacade gettop empty_set public set get dependencies object parent if model get facade isa state machine parent set set new hash set set add parent return set return collections empty set getdependencies getfacade isastatemachine hashset empty_set the constructor param name the name that will be localized public to do perspective string name super name flat children new array list to do item todoperspective flatchildren arraylist todoitem finds the each of the children of a parent in the tree param parent in the tree param index of child to find return the child found at index null if index is out of bounds override public object get child object parent int index if flat parent get root return flat children get index return super get child parent index getchild getroot flatchildren getchild override public int get child count object parent if flat parent get root return flat children size return super get child count parent getchildcount getroot flatchildren getchildcount override public int get index of child object parent object child if flat parent get root return flat children index of child return super get index of child parent child getindexofchild getroot flatchildren indexof getindexofchild todo list specific param b true if flat public void set flat boolean b flat false if b calc flat children flat b todolist setflat calcflatchildren todo list specific return the flatness true if flat public boolean get flat return flat todolist getflat todo list specific public void calc flat children flat children clear add flat children get root todolist calcflatchildren flatchildren addflatchildren getroot todo list specific param node the object to be added public void add flat children object node if node null return log debug add flat children hack for to do items only should check is leaf node but that includes empty folders really i need always leaf node if node instanceof to do item flat children contains node flat children add to do item node int n kids get child count node for int i 0 i n kids i add flat children get child node i todolist addflatchildren addflatchildren isleaf alwaysleaf todoitem flatchildren flatchildren todoitem nkids getchildcount nkids addflatchildren getchild the constructor param name the name of the properties panel param icon the icon public prop panel model element string name image icon icon super name icon proppanelmodelelement imageicon constructor that is used if no other proppanel can be found for a modelelement of some kind since this is the default public prop panel model element this label model element title image icon null add field label name get name text field add field label namespace get namespace selector add separator add field label supplier dependencies get supplier dependency scroll add field label client dependencies get client dependency scroll add field label source flows get source flow scroll add field label target flows get target flow scroll add separator add field label constraints get constraint scroll add get visibility panel add field label derived new uml derived check box proppanelmodelelement imageicon addfield getnametextfield addfield getnamespaceselector addseparator addfield getsupplierdependencyscroll addfield getclientdependencyscroll addfield getsourceflowscroll addfield gettargetflowscroll addseparator addfield getconstraintscroll getvisibilitypanel addfield umlderivedcheckbox override public void set target object target super set target target this for e g a comment edge if model get facade isauml element target boolean enable model get model management helper is read only target for final component component get components if component instanceof j scroll pane component c j scroll pane component get viewport get view if c get class is annotation present uml model mutator class c set enabled enable else if component instanceof j label component is enabled enable see issue 5289 component set enabled enable settarget settarget commentedge getfacade isaumlelement getmodelmanagementhelper isreadonly getcomponents jscrollpane jscrollpane getviewport getview getclass isannotationpresent umlmodelmutator setenabled jlabel isenabled setenabled this overrides the behaviour of the base class to filter out any actions that could be used to attempt to modify the uml model on a readonly element return the list of actions to show for this panel override protected final list get actions list actions super get actions if model get facade isauml element get target model get model management helper is read only get target final list action filtered actions new array list action 2 for object o actions if o instanceof action o get class is annotation present uml model mutator class filtered actions add action o return filtered actions else return actions getactions getactions getfacade isaumlelement gettarget getmodelmanagementhelper isreadonly gettarget filteredactions arraylist getclass isannotationpresent umlmodelmutator filteredactions filteredactions calling this method navigates the target one level up to the owner of the current target in most cases this navigates to the owning namespace in some cases it navigates to for example the owning composite state for some simple state public void navigate up target manager get instance set target model get facade get model element container get target navigateup targetmanager getinstance settarget getfacade getmodelelementcontainer gettarget returns the namespace selector this is a component which allows the user to select a single item as the namespace return a component for selecting the namespace protected j component get namespace selector if namespace selector null namespace selector new uml searchable combo box namespace combo box model new action set model element namespace true return new uml combo box navigator translator localize label namespace navigate tooltip namespace selector jcomponent getnamespaceselector namespaceselector namespaceselector umlsearchablecombobox namespacecomboboxmodel actionsetmodelelementnamespace umlcomboboxnavigator namespaceselector return a scrollpane for supplier dependency protected j component get supplier dependency scroll if supplier dependency scroll null j list list new uml mutable linked list new uml model element supplier dependency list model new action add supplier dependency action null null true supplier dependency scroll new j scroll pane list return supplier dependency scroll jcomponent getsupplierdependencyscroll supplierdependencyscroll jlist umlmutablelinkedlist umlmodelelementsupplierdependencylistmodel actionaddsupplierdependencyaction supplierdependencyscroll jscrollpane supplierdependencyscroll return a scrollpane for client dependency protected j component get client dependency scroll if client dependency scroll null j list list new uml mutable linked list client dependency list model new action add client dependency action null null true client dependency scroll new j scroll pane list return client dependency scroll jcomponent getclientdependencyscroll clientdependencyscroll jlist umlmutablelinkedlist clientdependencylistmodel actionaddclientdependencyaction clientdependencyscroll jscrollpane clientdependencyscroll return a scrollpane for target flow protected j component get target flow scroll if target flow scroll null target flow scroll new scroll list target flow list model return target flow scroll jcomponent gettargetflowscroll targetflowscroll targetflowscroll scrolllist targetflowlistmodel targetflowscroll return a scrollpane for source flow protected j component get source flow scroll if source flow scroll null source flow scroll new scroll list source flow list model return source flow scroll jcomponent getsourceflowscroll sourceflowscroll sourceflowscroll scrolllist sourceflowlistmodel sourceflowscroll return a scrollpane for constraints protected j component get constraint scroll if constraint scroll null j list constraint list new uml mutable linked list constraint list model null action new model element constraint get instance constraint scroll new j scroll pane constraint list return constraint scroll jcomponent getconstraintscroll constraintscroll jlist constraintlist umlmutablelinkedlist constraintlistmodel actionnewmodelelementconstraint getinstance constraintscroll jscrollpane constraintlist constraintscroll return a panel for the visibility protected j component get visibility panel if visibility panel null visibility panel new uml model element visibility radio button panel translator localize label visibility true return visibility panel jcomponent getvisibilitypanel visibilitypanel visibilitypanel umlmodelelementvisibilityradiobuttonpanel visibilitypanel return a scrollpane for residence protected j component get element residence scroll if element residence scroll null element residence scroll new scroll list element residence list model return element residence scroll jcomponent getelementresidencescroll elementresidencescroll elementresidencescroll scrolllist elementresidencelistmodel elementresidencescroll return a textfield for the name protected j component get name text field if name text field null name text field new uml text field2 name document return name text field jcomponent getnametextfield nametextfield nametextfield umltextfield2 namedocument nametextfield returns the document model for the name only used for the prop panel comment return document protected uml plain text document get name document return name document proppanelcomment umlplaintextdocument getnamedocument namedocument public class init state diagram implements init subsystem public list abstract argoj panel get details tabs return collections empty list initstatediagram initsubsystem abstractargojpanel getdetailstabs emptylist public list gui settings tab interface get project settings tabs return collections empty list guisettingstabinterface getprojectsettingstabs emptylist public list gui settings tab interface get settings tabs return collections empty list guisettingstabinterface getsettingstabs emptylist public void init set up the property panels for statechart diagrams prop panel factory diagram factory new state diagram prop panel factory prop panel factory manager add prop panel factory diagram factory proppanelfactory diagramfactory statediagramproppanelfactory proppanelfactorymanager addproppanelfactory diagramfactory constructor for uml state vertex incoming list model public uml transition state list model super state umlstatevertexincominglistmodel umltransitionstatelistmodel see org argouml uml ui uml model element list model2 build model list protected void build model list remove all elements add element model get facade get state get target umlmodelelementlistmodel2 buildmodellist buildmodellist removeallelements addelement getfacade getstate gettarget see org argouml uml ui uml model element list model2 is valid element object protected boolean is valid element object element return model get facade get state get target element umlmodelelementlistmodel2 isvalidelement isvalidelement getfacade getstate gettarget constructor for uml model element supplier dependency list model public uml model element supplier dependency list model super supplier dependency model get meta types get dependency true umlmodelelementsupplierdependencylistmodel umlmodelelementsupplierdependencylistmodel supplierdependency getmetatypes getdependency protected void build model list if get target null set all elements model get facade get supplier dependencies get target buildmodellist gettarget setallelements getfacade getsupplierdependencies gettarget protected boolean is valid element object o return model get facade isa dependency o model get facade get supplier dependencies get target contains o isvalidelement getfacade isadependency getfacade getsupplierdependencies gettarget construct a property panel for a reception public prop panel reception super label reception lookup icon reception add field translator localize label name get name text field add field translator localize label owner get owner scroll add get visibility panel modifiers panel create border panel translator localize label modifiers modifiers panel add new uml generalizable element abstract check box modifiers panel add new uml generalizable element leaf check box modifiers panel add new uml generalizable element root check box modifiers panel add new uml behavioral feature query check box modifiers panel add new uml feature owner scope check box add modifiers panel add separator add field translator localize label signal new uml reception signal combo box this new uml reception signal combo box model uml text area2 spec text new uml text area2 new uml reception specification document spec text set line wrap true spec text set rows 5 spec text set font look and feel mgr get instance get standard font j scroll pane specification scroll new j scroll pane spec text add field translator localize label specification specification scroll add action new action navigate container element add action new action new stereotype add action get delete action proppanelreception lookupicon addfield getnametextfield addfield getownerscroll getvisibilitypanel modifierspanel createborderpanel modifierspanel umlgeneralizableelementabstractcheckbox modifierspanel umlgeneralizableelementleafcheckbox modifierspanel umlgeneralizableelementrootcheckbox modifierspanel umlbehavioralfeaturequerycheckbox modifierspanel umlfeatureownerscopecheckbox modifierspanel addseparator addfield umlreceptionsignalcombobox umlreceptionsignalcomboboxmodel umltextarea2 spectext umltextarea2 umlreceptionspecificationdocument spectext setlinewrap spectext setrows spectext setfont lookandfeelmgr getinstance getstandardfont jscrollpane specificationscroll jscrollpane spectext addfield specificationscroll addaction actionnavigatecontainerelement addaction actionnewstereotype addaction getdeleteaction constructor param the filename the name of the file public action reopen project string the filename super action reopen project filename the filename thefilename actionreopenproject thefilename thefilename get the filename for comparing during menu creation return the filename public string get filename return filename getfilename performs the save and reload of a project param e e should old the event and the eventsource event source is the menu item the text is used for opening the project public void action performed action event e if project browser get instance ask confirmation and save return file to open new file filename load of the new project just reuse of the action open object project browser get instance load project with progress monitor to open true actionperformed actionevent projectbrowser getinstance askconfirmationandsave toopen actionopen projectbrowser getinstance loadprojectwithprogressmonitor toopen the constructor public go enumeration to literals super goenumerationtoliterals public collection get children object parent if model get facade isa enumeration parent list list new array list if model get facade get enumeration literals parent null model get facade get enumeration literals parent size 0 list add all model get facade get enumeration literals parent return list return collections empty set getchildren getfacade isaenumeration arraylist getfacade getenumerationliterals getfacade getenumerationliterals addall getfacade getenumerationliterals empty_set see org argouml ui explorer rules abstract perspective rule get rule name public string get rule name return translator localize misc enumeration literal abstractperspectiverule getrulename getrulename public set get dependencies object parent if model get facade isa enumeration parent set set new hash set set add parent set add all model get facade get enumeration literals parent return set return collections empty set getdependencies getfacade isaenumeration hashset addall getfacade getenumerationliterals empty_set construct a model to be used by a j table containing tagged values public tab tagged values model jtable taggedvalues tabtaggedvaluesmodel set the current target to the given model element param t the target modelelement public void set target object t if log is debug enabled log debug set target to t if t null model get facade isa model element t throw new illegal argument exception if target t if target null model get pump remove model event listener this target target t if t null model get pump add model event listener this t new string tagged value reference tag always fire changes in the case something has changed in the composition of the tagged values collection fire table data changed settarget isdebugenabled getfacade isamodelelement illegalargumentexception getpump removemodeleventlistener getpump addmodeleventlistener taggedvalue referencetag taggedvalues firetabledatachanged see javax swing table table model get column count public int get column count return 2 tablemodel getcolumncount getcolumncount override public string get column name int c if c 0 return translator localize label taggedvaluespane tag if c 1 return translator localize label taggedvaluespane value return xxx getcolumnname override public class get column class int c if c 0 return class model get meta types get tag definition if c 1 todo this will vary based on the type of the tag definition return string class return null getcolumnclass getmetatypes gettagdefinition tagdefinition see javax swing table table model is cell editable int int override public boolean is cell editable int row int col return true tablemodel iscelleditable iscelleditable public int get row count if target null return 0 try collection tvs model get facade get tagged values collection target if tvs null return 1 return tvs size 1 catch invalid element exception e target has been deleted return 0 getrowcount getfacade gettaggedvaluescollection invalidelementexception public object get value at int row int col collection tvs model get facade get tagged values collection target if row tvs size col 1 throw new illegal argument exception if the row is past the end of our current collection return an empty string so they can add a new value if row tvs size return object tv tvs to array row if col 0 object n model get facade get tag definition tv if n null return return n if col 1 string be model get facade get value of tag tv if be null return return be return tv row 2 col for debugging getvalueat getfacade gettaggedvaluescollection illegalargumentexception toarray getfacade gettagdefinition getfacade getvalueoftag override public void set value at object a value int row index int column index if column index 0 column index 1 return if column index 1 a value null todo use default value of appropriate type here a value if a value null equals a value column index 0 remove row row index return collection tvs model get facade get tagged values collection target if tvs size row index if column index 0 add row new object a value null if column index 1 add row new object null a value else object tv get from collection tvs row index if column index 0 model get extension mechanisms helper set type tv a value else if column index 1 model get extension mechanisms helper set data values tv new string string a value fire table changed new table model event this row index row index column index setvalueat avalue rowindex columnindex columnindex columnindex columnindex avalue avalue avalue avalue columnindex removerow rowindex getfacade gettaggedvaluescollection rowindex columnindex addrow avalue columnindex addrow avalue getfromcollection rowindex columnindex getextensionmechanismshelper settype avalue columnindex getextensionmechanismshelper setdatavalues avalue firetablechanged tablemodelevent rowindex rowindex columnindex add a tagged value to the model with the given type and value param values values for the columns values 0 contains type for new tagged value values 1 contains value for new tagged value public void add row object values object tag type values 0 string tag value string values 1 if tag type null tag type if tag value null todo use default value of appropriate type for td tag value tag value true object tv model get extension mechanisms factory create tagged value we really shouldn t add it until after it is set up but we need it to have an owner for the following method calls model get extension mechanisms helper add tagged value target tv model get extension mechanisms helper set type tv tag type model get extension mechanisms helper set data values tv new string tag value since we aren t sure of ordering fire event for whole table fire table changed new table model event this taggedvalue taggedvalue addrow tagtype tagvalue tagtype tagtype tagvalue tagvalue tagvalue getextensionmechanismsfactory createtaggedvalue getextensionmechanismshelper addtaggedvalue getextensionmechanismshelper settype tagtype getextensionmechanismshelper setdatavalues tagvalue firetablechanged tablemodelevent remove the tagged value at the given row from the model element param row row containing tagged value to be removed public void remove row int row collection c model get facade get tagged values collection target if row 0 row c size object element get from collection c row model get uml factory delete element fire table changed new table model event this taggedvalue modelelement taggedvalue removerow getfacade gettaggedvaluescollection getfromcollection getumlfactory firetablechanged tablemodelevent static object get from collection collection collection int index if collection instanceof list return list collection get index if index collection size index 0 throw new index out of bounds exception iterator it collection iterator for int i 0 i index i it next return it next getfromcollection indexoutofboundsexception public void property change property change event evt if tagged value equals evt get property name reference tag equals evt get property name fire table changed new table model event this if evt instanceof delete instance event evt get source target set target null propertychange propertychangeevent taggedvalue getpropertyname referencetag getpropertyname firetablechanged tablemodelevent deleteinstanceevent getsource settarget see java beans vetoable change listener vetoable change java beans property change event public void vetoable change property change event pce delayed change notify delayed notify new delayed change notify this pce swing utilities invoke later delayed notify vetoablechangelistener vetoablechange propertychangeevent vetoablechange propertychangeevent delayedchangenotify delayednotify delayedchangenotify swingutilities invokelater delayednotify see org argouml kernel delayedv change listener delayed vetoable change java beans property change event public void delayed vetoable change property change event pce fire table data changed delayedvchangelistener delayedvetoablechange propertychangeevent delayedvetoablechange propertychangeevent firetabledatachanged constructor for classifier create action list model public uml create action classifier list model super instantiation classifiercreateactionlistmodel umlcreateactionclassifierlistmodel protected void build model list remove all elements add element model get common behavior helper get instantiation get target buildmodellist removeallelements addelement getcommonbehaviorhelper getinstantiation gettarget protected boolean is valid element object elem return model get facade isa classifier elem model get common behavior helper get instantiation get target elem isvalidelement getfacade isaclassifier getcommonbehaviorhelper getinstantiation gettarget constructor public action add create action instantiation super set multi select false actionaddcreateactioninstantiation setmultiselect protected void do it collection selected if selected null selected size 1 model get common behavior helper set instantiation get target selected iterator next else model get common behavior helper set instantiation get target null doit getcommonbehaviorhelper setinstantiation gettarget getcommonbehaviorhelper setinstantiation gettarget protected list get choices list ret new array list if get target null project p project manager get manager get current project object model p get root ret add all model get model management helper get all model elements of kind with model model choice class return ret getchoices arraylist gettarget projectmanager getmanager getcurrentproject getroot addall getmodelmanagementhelper getallmodelelementsofkindwithmodel choiceclass protected string get dialog title return translator localize dialog title add instantiation getdialogtitle protected list get selected list ret new array list object instantiation model get common behavior helper get instantiation get target if instantiation null ret add instantiation return ret getselected arraylist getcommonbehaviorhelper getinstantiation gettarget the main constructor used for file loading deprecated for 0 27 3 by tfmorris use link fig comment object rectangle diagram settings suppress warnings deprecation deprecated public fig comment body text fig new fig multi line text 2 2 width 2 dogear height 4 true initialize figcomment diagramsettings suppresswarnings figcomment bodytextfig figmultilinetext private void initialize color fg super get line color use super because not fully init d color fill super get fill color outline fig new fig poly fg fill outline fig add point 0 0 outline fig add point width 1 dogear 0 outline fig add point width 1 dogear outline fig add point width 1 height 1 outline fig add point 0 height 1 outline fig add point 0 0 outline fig set filled true outline fig set line width line width ur corner new fig poly fg fill ur corner add point width 1 dogear 0 ur corner add point width 1 dogear ur corner add point width 1 dogear dogear ur corner add point width 1 dogear 0 ur corner set filled true color col outline fig get fill color ur corner set fill color col darker ur corner set line width line width set big port new fig rect 0 0 width height null null get big port set filled false get big port set line width 0 add figs to the fig node in back to front order add fig get big port add fig outline fig add fig ur corner add fig get stereotype fig add fig body text fig col outline fig get fill color ur corner set fill color col darker set blink ports false make port invisible unless mouse enters rectangle r get bounds set bounds r x r y r width r height update edges ready to edit false mark this as newly created this is to get round the problem with creating figs for loaded comments that had stereotypes they are saved with their dimensions including the stereotype but since we pretend the stereotype is not visible we add height the first time we render such a comment this is a complete fudge and really we ought to address how comment objects with stereotypes are saved but that will be hard work newly created true getlinecolor getfillcolor outlinefig figpoly outlinefig addpoint outlinefig addpoint outlinefig addpoint outlinefig addpoint outlinefig addpoint outlinefig addpoint outlinefig setfilled outlinefig setlinewidth line_width urcorner figpoly urcorner addpoint urcorner addpoint urcorner addpoint urcorner addpoint urcorner setfilled outlinefig getfillcolor urcorner setfillcolor urcorner setlinewidth line_width setbigport figrect getbigport setfilled getbigport setlinewidth fignode addfig getbigport addfig outlinefig addfig urcorner addfig getstereotypefig addfig bodytextfig outlinefig getfillcolor urcorner setfillcolor setblinkports getbounds setbounds updateedges readytoedit newlycreated construct a new comment param gm the graphmodel param node the underlying uml comment deprecated for 0 27 3 by tfmorris use link fig comment object rectangle diagram settings deprecated public fig comment suppress warnings unused graph model gm object node this set owner node figcomment diagramsettings figcomment suppresswarnings graphmodel setowner construct a comment figure with the given model element bounds and settings this constructor is used by the pgml parser param owner owning comments param bounds position and size param settings rendering settings public fig comment object owner rectangle bounds diagram settings settings super owner bounds settings body text fig new fig multi line text get owner new rectangle 2 2 width 2 dogear height 4 get settings true initialize update body if bounds null set location bounds x bounds y figcomment diagramsettings bodytextfig figmultilinetext getowner getsettings updatebody setlocation get the default text for this figure return the default text for this figure override public string place string string place string retrieve body if place string null todo i18n place string new note return place string placestring placestring retrievebody placestring placestring placestring clone this figure return the cloned figure override public object clone fig comment fig clone fig comment super clone iterator this iter this get figs iterator while this iter has next object this fig this iter next if this fig outline fig fig clone outline fig fig poly this fig if this fig ur corner fig clone ur corner fig poly this fig if this fig body text fig fig clone body text fig fig text this fig return fig clone figcomment figclone figcomment thisiter getfigs thisiter hasnext thisfig thisiter thisfig outlinefig figclone outlinefig figpoly thisfig thisfig urcorner figclone urcorner figpoly thisfig thisfig bodytextfig figclone bodytextfig figtext thisfig figclone suppress warnings deprecation deprecated override public void set owner object own super set owner own update body suppresswarnings setowner setowner updatebody private void update body if get owner null string body string model get facade get body get owner if body null body text fig set text body updatebody getowner getfacade getbody getowner bodytextfig settext if the user double clicks on any part of this fig node pass it down to one of the internal figs this allows the user to initiate direct text editing inherit doc override public void mouse clicked mouse event me if ready to edit object owner get owner if model get facade isa model element owner model get model management helper is read only owner ready to edit true else log debug not ready to edit note return if me is consumed return if me get click count 2 me is popup trigger me get modifiers input event button3 mask if get owner null return fig f hit fig new rectangle me getx 2 me gety 2 4 4 if f instanceof mouse listener mouse listener f mouse clicked me me consume fignode inheritdoc mouseclicked mouseevent readytoedit getowner getfacade isamodelelement getmodelmanagementhelper isreadonly readytoedit isconsumed getclickcount ispopuptrigger getmodifiers inputevent button3_mask getowner hitfig mouselistener mouselistener mouseclicked override public void vetoable change property change event pce object src pce get source if src get owner delayed change notify delayed notify new delayed change notify this pce swing utilities invoke later delayed notify else log debug fig node model element got vetoable change from non owner src vetoablechange propertychangeevent getsource getowner delayedchangenotify delayednotify delayedchangenotify swingutilities invokelater delayednotify fignodemodelelement vetoablechange override public void delayed vetoable change property change event pce update any text colors fonts etc rendering changed update the relative sizes and positions of internel figs end trans delayedvetoablechange propertychangeevent renderingchanged endtrans override public void property change property change event pve object src pve get source string p name pve get property name if p name equals editing boolean false equals pve get new value parse the text that was edited text edited fig text src resize the fig node to accomodate the new text rectangle bbox get bounds dimension min size get minimum size bbox width math max bbox width min size width bbox height math max bbox height min size height set bounds bbox x bbox y bbox width bbox height end trans else super property change pve propertychange propertychangeevent getsource pname getpropertyname pname getnewvalue textedited figtext fignode getbounds minsize getminimumsize minsize minsize setbounds endtrans propertychange see java awt event key listener key pressed java awt event key event override public void key pressed key event ke not used do nothing keylistener keypressed keyevent keypressed keyevent see java awt event key listener key released java awt event key event override public void key released key event ke not used do nothing keylistener keyreleased keyevent keyreleased keyevent override public void key typed key event ke if character isiso control ke get key char return if ready to edit object owner get owner if model get facade isa model element owner model get model management helper is read only owner store body ready to edit true else log debug not ready to edit note return if ke is consumed return if get owner null return body text fig key typed ke keytyped keyevent isisocontrol getkeychar readytoedit getowner getfacade isamodelelement getmodelmanagementhelper isreadonly storebody readytoedit isconsumed getowner bodytextfig keytyped return an empty menu see org argouml uml diagram ui fig node model element build show pop up override protected argoj menu build show pop up return new argoj menu menu popup show fignodemodelelement buildshowpopup argojmenu buildshowpopup argojmenu see org tigris gef presentation fig make selection override public selection make selection return new selection comment this makeselection makeselection selectioncomment override public void set line color color col the text element has no border so the line color doesn t matter outline fig set line color col ur corner set line color col setlinecolor outlinefig setlinecolor urcorner setlinecolor see org tigris gef presentation fig get line color override public color get line color return outline fig get line color getlinecolor getlinecolor outlinefig getlinecolor override public void set fill color color col outline fig set fill color col ur corner set fill color col setfillcolor outlinefig setfillcolor urcorner setfillcolor see org tigris gef presentation fig get fill color override public color get fill color return outline fig get fill color getfillcolor getfillcolor outlinefig getfillcolor override public void set filled boolean f body text fig set filled false the text is always opaque outline fig set filled f ur corner set filled f setfilled bodytextfig setfilled outlinefig setfilled urcorner setfilled override public boolean is filled return outline fig is filled isfilled outlinefig isfilled override public void set line width int w body text fig set line width 0 make a seamless integration of the text in the note figure outline fig set line width w ur corner set line width w setlinewidth bodytextfig setlinewidth outlinefig setlinewidth urcorner setlinewidth see org tigris gef presentation fig get line width override public int get line width return outline fig get line width getlinewidth getlinewidth outlinefig getlinewidth override protected void text edited fig text ft if ft body text fig store body ft get text textedited figtext bodytextfig storebody gettext see org argouml uml diagram ui fig node model element text edit started org tigris gef presentation fig text override protected void text edit started fig text ft show help parsing help comment fignodemodelelement texteditstarted figtext texteditstarted figtext showhelp see org tigris gef presentation fig set enclosing fig org tigris gef presentation fig override public void set enclosing fig fig encloser super set enclosing fig encloser setenclosingfig setenclosingfig setenclosingfig stores the body text in the associated model element param body the body text to store public final void store body string body if get owner null model get core helper set body get owner body storebody getowner getcorehelper setbody getowner retrieve the body text from the associated model element return the body from the associated model element private string retrieve body return get owner null string model get facade get body get owner null retrievebody getowner getfacade getbody getowner see org tigris gef presentation fig get use trap rect override public boolean get use trap rect return true getusetraprect getusetraprect always returns null as the fig comment does not display its name return null override public rectangle get name bounds return null figcomment getnamebounds get the minimum size for the note figure return the minimum size for the note figure override public dimension get minimum size get the size of the text field dimension a size body text fig get minimum size if we have a stereotype displayed then allow some space for that width and height if get stereotype fig is visible dimension stereo min get stereotype fig get minimum size a size width math max a size width stereo min width a size height stereo min height and add the gaps around the textfield to get the minimum size of the note return new dimension a size width 4 dogear a size height 4 getminimumsize asize bodytextfig getminimumsize getstereotypefig isvisible stereomin getstereotypefig getminimumsize asize asize stereomin asize stereomin asize asize override protected void set standard bounds int px int py int w int h if body text fig null return dimension stereo min get stereotype fig get minimum size int stereotype height 0 if get stereotype fig is visible stereotype height stereo min height rectangle old bounds get bounds resize the text figure body text fig set bounds px 2 py 2 stereotype height w 4 dogear h 4 stereotype height get stereotype fig set bounds px 2 py 2 w 4 dogear stereo min height resize the big port around the figure get big port set bounds px py w h since this is a complex polygon there s no easy way to resize it polygon new poly new polygon new poly add point px py new poly add point px w 1 dogear py new poly add point px w 1 py dogear new poly add point px w 1 py h 1 new poly add point px py h 1 new poly add point px py outline fig set polygon new poly just move the corner to it s new position ur corner set bounds px w 1 dogear py dogear dogear calc bounds x x y y w w h h fire prop change bounds old bounds get bounds setstandardbounds bodytextfig stereomin getstereotypefig getminimumsize stereotypeheight getstereotypefig isvisible stereotypeheight stereomin oldbounds getbounds bodytextfig setbounds stereotypeheight stereotypeheight getstereotypefig setbounds stereomin getbigport setbounds newpoly newpoly addpoint newpoly addpoint newpoly addpoint newpoly addpoint newpoly addpoint newpoly addpoint outlinefig setpolygon newpoly urcorner setbounds calcbounds _x _y _w _h firepropchange oldbounds getbounds override protected void update bounds rectangle bbox get bounds dimension min size get minimum size bbox width math max bbox width min size width bbox height math max bbox height min size height set bounds bbox x bbox y bbox width bbox height updatebounds getbounds minsize getminimumsize minsize minsize setbounds override protected final void update layout uml change event mee super update layout mee if mee instanceof attribute change event mee get property name equals body body text fig set text mee get new value to string calc bounds set bounds get bounds damage else if mee instanceof remove association event mee get property name equals annotated element remove the commentedge if there are more then one comment edges between the 2 objects then delete them all collection fig edge note to remove new array list fig edge note collection c get fig edges all connected edges for iterator i c iterator i has next fig edge note fen fig edge note i next object other end fen get destination the uml object if other end get owner wrong end of the edge other end fen get source if other end mee get old value to remove add fen for fig edge note fen to remove fen remove from diagram updatelayout umlchangeevent updatelayout attributechangeevent getpropertyname bodytextfig settext getnewvalue tostring calcbounds setbounds getbounds removeassociationevent getpropertyname annotatedelement figedgenote toremove arraylist figedgenote getfigedges hasnext figedgenote figedgenote otherend getdestination otherend getowner otherend getsource otherend getoldvalue toremove figedgenote toremove removefromdiagram override protected void update stereotype text object me get owner if me null return rectangle rect get bounds dimension stereo min get stereotype fig get minimum size if model get facade get stereotypes me is empty if get stereotype fig is visible get stereotype fig set visible false rect y stereo min height rect height stereo min height set bounds rect x rect y rect width rect height calc bounds else get stereotype fig set owner get owner if get stereotype fig is visible get stereotype fig set visible true only adjust the stereotype height if we are not newly created this gets round the problem of loading classes with stereotypes defined which have the height already including the stereotype if newly created rect y stereo min height rect height stereo min height rect width math max get minimum size width rect width set bounds rect x rect y rect width rect height calc bounds whatever happened we are no longer newly created so clear the flag then set the bounds for the rectangle we have defined newly created false updatestereotypetext getowner getbounds stereomin getstereotypefig getminimumsize getfacade getstereotypes isempty getstereotypefig isvisible getstereotypefig setvisible stereomin stereomin setbounds calcbounds getstereotypefig setowner getowner getstereotypefig isvisible getstereotypefig setvisible newlycreated stereomin stereomin getminimumsize setbounds calcbounds newlycreated get the text body of the comment return the body of the comment public string get body return body text fig get text getbody bodytextfig gettext override public point get closest point point another pt rectangle r get bounds int xs r x r x r width dogear r x r width r x r width r x r x int ys r y r y r y dogear r y r height r y r height r y point p geometry pt closest to xs ys 6 another pt return p getclosestpoint anotherpt getbounds ptclosestto anotherpt constructor for uml plain text document this takes a panel to set the thirdpartyeventlistener to the given list of events to listen to param name the event public uml plain text document string name super set event name name umlplaintextdocument umlplaintextdocument seteventname public void property change property change event evt note this may be called from a different thread so we need to be careful of the threading restrictions imposed by abstract document for mutators to be sure we don t deadlock if evt instanceof attribute change event event name equals evt get property name update text string evt get new value propertychange propertychangeevent abstractdocument attributechangeevent eventname getpropertyname updatetext getnewvalue returns the target return object public final object get target return panel target gettarget paneltarget sets the target param target the target to set public final void set target object target target target instanceof fig fig target get owner target if model get facade isauml element target if target panel target model event pump event pump model get pump if panel target null event pump remove model event listener this panel target get event name panel target target event pump add model event listener this panel target get event name update text get property settarget getowner getfacade isaumlelement paneltarget modeleventpump eventpump getpump paneltarget eventpump removemodeleventlistener paneltarget geteventname paneltarget eventpump addmodeleventlistener paneltarget geteventname updatetext getproperty public void insert string int offset string str attribute set a throws bad location exception mutators hold write lock will deadlock if use is not thread safe super insert string offset str a set property internal get text 0 get length insertstring attributeset badlocationexception insertstring setpropertyinternal gettext getlength public void remove int offs int len throws bad location exception mutators hold write lock will deadlock if use is not thread safe super remove offs len set property internal get text 0 get length badlocationexception setpropertyinternal gettext getlength wrapped version of set property which attempts to keep us from hearing our own echo on the event listener when we change something also skips updates equal the current value private void set property internal string new value todo this is updating model on a per character basis as well as unregistering reregistering event listeners every character very wasteful tfm if is firing new value equals get property set firing false set property new value model get pump flush model events set firing true setproperty setpropertyinternal newvalue isfiring newvalue getproperty setfiring setproperty newvalue getpump flushmodelevents setfiring param text the value of the property protected abstract void set property string text setproperty protected abstract void set property string text return the value of the property protected abstract string get property setproperty getproperty enable disable firing of updates as a side effect it unregisters model event listeners during disable and registers them again during enable param f new firing state pass false to disable updates private final synchronized void set firing boolean f model event pump event pump model get pump if f panel target null event pump add model event listener this panel target event name else event pump remove model event listener this panel target event name firing f setfiring modeleventpump eventpump getpump paneltarget eventpump addmodeleventlistener paneltarget eventname eventpump removemodeleventlistener paneltarget eventname return the state of the firing flag method is synchronized so it will return the correct value from any thread return true firing of updates is allowed currently returns false if we are in the process of doing an update so that we know to ignore any resulting events private final synchronized boolean is firing return firing isfiring private final void update text string text value try if text value null text value string current value get text 0 get length if is firing text value equals current value set firing false mutators hold write lock will deadlock if use is not thread safe super remove 0 get length super insert string 0 text value null catch bad location exception b log error a bad location exception happened n the string to set was get property b finally set firing true updatetext textvalue textvalue textvalue currentvalue gettext getlength isfiring textvalue currentvalue setfiring getlength insertstring textvalue badlocationexception badlocationexception getproperty setfiring returns the event name return string public string get event name return event name eventname geteventname eventname sets the event name param en the event name to set protected void set event name string en event name en eventname eventname seteventname eventname see org argouml ui targetmanager target listener target added org argouml ui targetmanager target event public void target added target event e set target e get new target targetlistener targetadded targetevent targetadded targetevent settarget getnewtarget see org argouml ui targetmanager target listener target removed org argouml ui targetmanager target event public void target removed target event e set target e get new target targetlistener targetremoved targetevent targetremoved targetevent settarget getnewtarget see org argouml ui targetmanager target listener target set org argouml ui targetmanager target event public void target set target event e set target e get new target targetlistener targetset targetevent targetset targetevent settarget getnewtarget construct a property panel for uml data type elements param title title string for the property panel param icon icon public prop panel data type string title image icon icon super title icon add field translator localize label name get name text field add field translator localize label namespace get namespace selector add get modifiers panel add get visibility panel add separator add field translator localize label client dependencies get client dependency scroll add field translator localize label supplier dependencies get supplier dependency scroll add field translator localize label generalizations get generalization scroll add field translator localize label specializations get specialization scroll add separator add field translator localize label operations get operation scroll add action new action navigate container element add action new action add data type add enumeration buttons add action new action add query operation add action new action new stereotype add action get delete action datatype proppaneldatatype imageicon addfield getnametextfield addfield getnamespaceselector getmodifierspanel getvisibilitypanel addseparator addfield getclientdependencyscroll addfield getsupplierdependencyscroll addfield getgeneralizationscroll addfield getspecializationscroll addseparator addfield getoperationscroll addaction actionnavigatecontainerelement addaction actionadddatatype addenumerationbuttons addaction actionaddqueryoperation addaction actionnewstereotype addaction getdeleteaction override this to add more buttons protected void add enumeration buttons add action new action add enumeration addenumerationbuttons addaction actionaddenumeration the constructor public prop panel data type this label data type lookup icon data type proppaneldatatype lookupicon datatype the constructor public action add query operation super button new operation put value action name translator localize button new operation actionaddqueryoperation putvalue override public void action performed action event e object target target manager get instance get model target if model get facade isa classifier target object return type project manager get manager get current project get default return type object new oper model get core factory build operation target return type due to well defined rule 2 5 3 12 1 model get core helper set query new oper true target manager get instance set target new oper super action performed e actionperformed actionevent targetmanager getinstance getmodeltarget getfacade isaclassifier returntype projectmanager getmanager getcurrentproject getdefaultreturntype newoper getcorefactory buildoperation returntype getcorehelper setquery newoper targetmanager getinstance settarget newoper actionperformed returns the operation scroll return j scroll pane override public j scroll pane get operation scroll if operation scroll null j list list new uml linked list operation list model operation scroll new j scroll pane list return operation scroll operationscroll jscrollpane jscrollpane getoperationscroll operationscroll jlist umllinkedlist operationlistmodel operationscroll jscrollpane operationscroll the constructor public style panel fig message super arrow field add item listener this arrow label set label for arrow field add arrow label add arrow field arrow field set selected index 0 remove get fill field remove get fill label stylepanelfigmessage arrowfield additemlistener arrowlabel setlabelfor arrowfield arrowlabel arrowfield arrowfield setselectedindex getfillfield getfilllabel override public void refresh super refresh int direction fig message get panel target get arrow arrow field set selected item fig message get arrow directions get direction figmessage getpaneltarget getarrow arrowfield setselecteditem figmessage getarrowdirections set the arrow direction for the target public void set target arrow string ad string arrow field get selected item int arrow direction fig message get arrow directions index of ad if get panel target null arrow direction 1 return fig message get panel target set arrow arrow direction get panel target end trans settargetarrow arrowfield getselecteditem arrowdirection figmessage getarrowdirections indexof getpaneltarget arrowdirection figmessage getpaneltarget setarrow arrowdirection getpaneltarget endtrans override public void item state changed item event e object src e get source if src arrow field set target arrow else super item state changed e itemstatechanged itemevent getsource arrowfield settargetarrow itemstatechanged construct a property panel for a link end public prop panel link end super label association link end lookup icon association end add field label name get name text field add separator add action new action navigate container element add action new action navigate opposite link end add action get delete action proppanellinkend lookupicon associationend addfield getnametextfield addseparator addaction actionnavigatecontainerelement addaction actionnavigateoppositelinkend addaction getdeleteaction the constructor public action navigate opposite link end super button go opposite true put value action small icon resource loader wrapper lookup icon resource link end actionnavigateoppositelinkend putvalue small_icon resourceloaderwrapper lookupiconresource linkend protected object navigate to object source object link model get facade get link source the mdr does not return a list but collection for get connections this is a bug afaik for uml 1 4 list ends new array list model get facade get connections link int index ends index of source if ends size index 1 return ends get index 1 return ends get 0 navigateto getfacade getlink getconnections arraylist getfacade getconnections indexof return the singleton public static final attribute notation uml get instance return instance attributenotationuml getinstance the constructor protected attribute notation uml super log info creating attribute notation uml attributenotationuml attributenotationuml public void parse object model element string text try parse attribute fig model get facade get owner model element model element text catch parse exception pe string msg statusmsg bar error parsing attribute object args pe get localized message integer value of pe get error offset argo event pump fire event new argo help event argo event types help changed this translator message format msg args modelelement parseattributefig getfacade getowner modelelement modelelement parseexception getlocalizedmessage valueof geterroroffset argoeventpump fireevent argohelpevent argoeventtypes help_changed messageformat parse a string representing one ore more separated attributes the case that a string or char contains a e g in an initializer is handled but not other occurrences of param classifier classifier the classifier the attribute s belong to param attribute attribute the attribute on which the editing happened param text the string to parse throws parse exception for invalid input public void parse attribute fig object classifier object attribute string text throws parse exception if classifier null attribute null return project project project manager get manager get current project parse exception pex null int start 0 int end notation utility uml index of next checked semicolon text start if end 1 no text remove attr project move to trash attribute return string s text substring start end trim if s length 0 no non whitechars in text remove attr project move to trash attribute return parse attribute s attribute int i model get facade get features classifier index of attribute check for more attributes separated start end 1 end notation utility uml index of next checked semicolon text start while end start end text length s text substring start end trim if s length 0 yes there are more object attr type project get default attribute type object new attribute model get uml factory build node model get meta types get attribute model get core helper set type new attribute attr type if new attribute null we need to set the namespace owner of the new attribute before parsing if i 1 model get core helper add feature classifier i new attribute else model get core helper add feature classifier new attribute try parse attribute s new attribute if the 1st attribute is static then the new ones too model get core helper set static new attribute model get facade is static attribute catch parse exception ex if pex null pex ex start end 1 end notation utility uml index of next checked semicolon text start if pex null throw pex parseexception parseattributefig parseexception projectmanager getmanager getcurrentproject parseexception notationutilityuml indexofnextcheckedsemicolon movetotrash movetotrash parseattribute getfacade getfeatures indexof notationutilityuml indexofnextcheckedsemicolon attrtype getdefaultattributetype newattribute getumlfactory buildnode getmetatypes getattribute getcorehelper settype newattribute attrtype newattribute getcorehelper addfeature newattribute getcorehelper addfeature newattribute parseattribute newattribute getcorehelper setstatic newattribute getfacade isstatic parseexception notationutilityuml indexofnextcheckedsemicolon parse a line on the form pre visibility name type expression initial value pre ul li if only one of visibility and name is given then it is assumed to be the name and the visibility is left unchanged li type and initial value can be given in any order li properties can be given between any element in the form pre name value pre li multiplicity can be given between any element except after the initial value and before the type or end to allow java style array indexing in the initial value it must be given on form multiplicity with the square brackets included li stereotypes can be given between any element except after the initial value and before the type or end to allow java style bit shifts in the initial value it must be given on form lt lt stereotype1 stereotype2 stereotype3 gt gt ul the following properties are recognized to have special meaning frozen p this syntax is compatible with the uml 1 3 spec formerly visibility name multiplicity type expression initial value property string 2nd formerly visibility keywords type name init param text the string to parse param attribute the attribute to modify to comply with the instructions in s throws parse exception when it detects an error in the attribute string see also parse error get error offset protected void parse attribute string text object attribute throws parse exception string builder multiplicity null string name null list string properties null string builder stereotype null this is null as until the first stereotype declaration is seen after that it is non null string token string type null string builder value null string visibility null boolean has colon false boolean has eq false int multindex 1 my tokenizer st text text trim if text length 0 notation utility uml visibilitychars index of text char at 0 0 visibility text substring 0 1 text text substring 1 try st new my tokenizer text t u00ab u00bb notation utility uml attribute custom sep while st has more tokens token st next token if equals token t equals token equals token if has eq value append token else if equals token u00ab equals token if has eq value append token else if stereotype null string msg parsing error attribute two sets stereotypes throw new parse exception translator localize msg st get token index stereotype new string builder while true token st next token if equals token u00bb equals token break stereotype append token else if equals token if has eq value append token else if multiplicity null string msg parsing error attribute two multiplicities throw new parse exception translator localize msg st get token index multiplicity new string builder multindex st get token index 1 while true token st next token if equals token break multiplicity append token else if equals token string builder propname new string builder string propvalue null if properties null properties new array list string while true token st next token if equals token equals token if propname length 0 properties add propname to string properties add propvalue propname new string builder propvalue null if equals token break else if equals token if propvalue null string msg parsing error attribute prop two values object args propvalue throw new parse exception translator localize msg args st get token index propvalue else if propvalue null propname append token else propvalue token if propname length 0 properties add propname to string properties add propvalue else if equals token has colon true has eq false else if equals token if value null string msg parsing error attribute two default values throw new parse exception translator localize msg st get token index value new string builder has colon false has eq true else if has colon if type null string msg parsing error attribute two types throw new parse exception translator localize msg st get token index if token length 0 token char at 0 token char at 0 string msg parsing error attribute quoted throw new parse exception translator localize msg st get token index if token length 0 token char at 0 string msg parsing error attribute is expr throw new parse exception translator localize msg st get token index type token else if has eq value append token else if name null visibility null string msg parsing error attribute extra text throw new parse exception translator localize msg st get token index if token length 0 token char at 0 token char at 0 string msg parsing error attribute name quoted throw new parse exception translator localize msg st get token index if token length 0 token char at 0 string msg parsing error attribute name expr throw new parse exception translator localize msg st get token index if name null visibility null token length 1 notation utility uml visibilitychars index of token char at 0 0 visibility token substring 0 1 parseexception parseerror geterroroffset parseattribute parseexception stringbuilder stringbuilder stringbuilder hascolon haseq mytokenizer notationutilityuml indexof charat mytokenizer notationutilityuml attributecustomsep hasmoretokens nexttoken haseq haseq parseexception gettokenindex stringbuilder nexttoken haseq parseexception gettokenindex stringbuilder gettokenindex nexttoken stringbuilder stringbuilder arraylist nexttoken tostring stringbuilder parseexception gettokenindex tostring hascolon haseq parseexception gettokenindex stringbuilder hascolon haseq hascolon parseexception gettokenindex charat charat parseexception gettokenindex charat parseexception gettokenindex haseq parseexception gettokenindex charat charat parseexception gettokenindex charat parseexception gettokenindex notationutilityuml indexof charat private void deal with properties object attribute list string properties if properties null notation utility uml set properties attribute properties notation utility uml attribute special strings dealwithproperties notationutilityuml setproperties notationutilityuml attributespecialstrings private void deal with multiplicity object attribute string builder multiplicity int multindex throws parse exception if multiplicity null try model get core helper set multiplicity attribute model get data types factory create multiplicity multiplicity to string trim catch illegal argument exception iae string msg parsing error attribute bad multiplicity object args iae throw new parse exception translator localize msg args multindex dealwithmultiplicity stringbuilder parseexception getcorehelper setmultiplicity getdatatypesfactory createmultiplicity tostring illegalargumentexception parseexception private void deal with value object attribute string builder value if value null project project project manager get manager get current project project settings ps project get project settings object init expr model get data types factory create expression ps get notation language value to string trim model get core helper set initial value attribute init expr dealwithvalue stringbuilder projectmanager getmanager getcurrentproject projectsettings getprojectsettings initexpr getdatatypesfactory createexpression getnotationlanguage tostring getcorehelper setinitialvalue initexpr private void deal with type object attribute string type if type null object ow model get facade get owner attribute object ns null if ow null model get facade get namespace ow null ns model get facade get namespace ow else ns model get facade get model attribute model get core helper set type attribute notation utility uml get type type trim ns dealwithtype getfacade getowner getfacade getnamespace getfacade getnamespace getfacade getmodel getcorehelper settype notationutilityuml gettype private void deal with name object attribute string name if name null model get core helper set name attribute name trim else if model get facade get name attribute null equals model get facade get name attribute model get core helper set name attribute anonymous dealwithname getcorehelper setname getfacade getname getfacade getname getcorehelper setname private void deal with visibility object attribute string visibility if visibility null model get core helper set visibility attribute notation utility uml get visibility visibility trim dealwithvisibility getcorehelper setvisibility notationutilityuml getvisibility see org argouml notation providers notation provider get parsing help public string get parsing help return parsing help attribute notationprovider getparsinghelp getparsinghelp override public string to string object model element notation settings settings return to string model element settings is use guillemets settings is show visibilities settings is show multiplicities settings is show types settings is show initial values settings is show properties tostring modelelement notationsettings tostring modelelement isuseguillemets isshowvisibilities isshowmultiplicities isshowtypes isshowinitialvalues isshowproperties generates a string representation for the provided attribute the string representation will be of the form visibility name multiplicity type expression initial value property string depending on settings in notation visibility multiplicity type expression initial value and properties are shown not shown inherit doc deprecated suppress warnings deprecation deprecated public string to string object model element map args project p project manager get manager get current project project settings ps p get project settings return to string model element ps get use guillemots value ps get show visibility value ps get show multiplicity value ps get show types value ps get show initial value value ps get show properties value inheritdoc suppresswarnings tostring modelelement projectmanager getmanager getcurrentproject projectsettings getprojectsettings tostring modelelement getuseguillemotsvalue getshowvisibilityvalue getshowmultiplicityvalue getshowtypesvalue getshowinitialvaluevalue getshowpropertiesvalue private string to string object model element boolean use guillemets boolean show visibility boolean show multiplicity boolean show types boolean show initial values boolean show properties try string stereo notation utility uml generate stereotype model element use guillemets string name model get facade get name model element string multiplicity generate multiplicity model get facade get multiplicity model element string type fix for loading bad projects if model get facade get type model element null type model get facade get name model get facade get type model element string builder sb new string builder 20 if stereo null stereo length 0 sb append stereo append if show visibility string visibility notation utility uml generate visibility2 model element if visibility null visibility length 0 sb append visibility if name null name length 0 sb append name append if multiplicity null multiplicity length 0 show multiplicity sb append append multiplicity append append if type null type length 0 the show types defaults to true to stay compatible with older argouml versions that did not have this setting show types sb append append type append if show initial values object iv model get facade get initial value model element if iv null string initial value string model get facade get body iv if initial value null initial value length 0 sb append append initial value append if show properties string changeable kind if model get facade is read only model element changeable kind frozen if model get facade get changeability model element null if model get changeable kind get add only equals model get facade get changeability model element changeable kind add only string builder properties new string builder if changeable kind length 0 properties append append changeable kind append if properties length 0 sb append properties return sb to string trim catch invalid element exception e the element was deleted while we were processing it return tostring modelelement useguillemets showvisibility showmultiplicity showtypes showinitialvalues showproperties notationutilityuml generatestereotype modelelement useguillemets getfacade getname modelelement generatemultiplicity getfacade getmultiplicity modelelement getfacade gettype modelelement getfacade getname getfacade gettype modelelement stringbuilder stringbuilder showvisibility notationutilityuml generatevisibility2 modelelement showmultiplicity showtypes showinitialvalues getfacade getinitialvalue modelelement initialvalue getfacade getbody initialvalue initialvalue initialvalue showproperties changeablekind getfacade isreadonly modelelement changeablekind getfacade getchangeability modelelement getchangeablekind getaddonly getfacade getchangeability modelelement changeablekind addonly stringbuilder stringbuilder changeablekind changeablekind tostring invalidelementexception private static string generate multiplicity object m if m null 1 equals model get facade to string m return return model get facade to string m generatemultiplicity getfacade tostring getfacade tostring constructor for uml state do activity list param data model the model public uml state do activity list uml model element list model2 data model super data model umlstatedoactivitylist datamodel umlstatedoactivitylist umlmodelelementlistmodel2 datamodel datamodel see org argouml uml ui uml mutable linked list get popup menu public j popup menu get popup menu return new popup menu new action action new action roles do this umlmutablelinkedlist getpopupmenu jpopupmenu getpopupmenu popupmenunewaction actionnewaction the constructor public prop panel time event super label time event lookup icon time event proppaneltimeevent lookupicon timeevent override public void initialize super initialize uml expression model2 when model new uml time expression model this when j panel when panel create border panel label when when panel add new j scroll pane new uml expression body field when model true when panel add new uml expression language field when model false add when panel add action get delete action umlexpressionmodel2 whenmodel umltimeexpressionmodel jpanel whenpanel createborderpanel whenpanel jscrollpane umlexpressionbodyfield whenmodel whenpanel umlexpressionlanguagefield whenmodel whenpanel addaction getdeleteaction default constructor public hash bag hashbag creates a new bag from a collection param col the collection public hash bag collection col this add all col hashbag addall see org argouml profile internal ocl uml14 bag count java lang object public int count object element integer c map get element return c null 0 c public boolean add e e if e null if map get e null map put e 1 else map put e map get e 1 return true suppress warnings unchecked public boolean add all collection c for object object c add e object return true suppresswarnings addall public void clear map clear public boolean contains object o return map contains key o containskey public boolean contains all collection c return map key set contains all c containsall keyset containsall public boolean is empty return map is empty isempty isempty public iterator e iterator return map key set iterator keyset public boolean remove object o return map remove o null public boolean remove all collection c boolean changed false for object object c changed remove object return changed removeall public boolean retain all collection c throw new unsupported operation exception retainall unsupportedoperationexception return the number of elements in this bag see java util set size public int size int sum 0 for e e map key set sum count e return sum keyset public object to array return map key set to array toarray keyset toarray public t t to array t a return map key set to array a toarray keyset toarray override public string to string return map to string tostring tostring override public boolean equals object obj if obj instanceof bag bag bag bag obj for object object bag if count object bag count object return false return true else return false override public int hash code return map hash code 35 hashcode hashcode constructor public action sequence diagram super action sequence diagram actionsequencediagram public argo diagram create diagram object namespace return diagram factory get instance create diagram diagram factory diagram type sequence create collaboration namespace null argodiagram creatediagram diagramfactory getinstance creatediagram diagramfactory diagramtype createcollaboration constructs a new navigator panel p this panel consists of a combobox to select a navigation perspective a combobox to select ordering a j tree to display the uml model and a configuration dialog to tailor the perspectives param splash the splash screen where to show progress public navigator pane splash screen splash j combo box perspective combo new perspective combo box j combo box order by combo new j combo box explorer tree tree new dnd explorer tree collection object toolbar tools new array list object toolbar tools add new action perspective config toolbar tools add perspective combo j tool bar toolbar new tool bar factory toolbar tools create tool bar toolbar set floatable false order by combo add item new type then name order order by combo add item new name order collection object toolbar tools2 new array list object toolbar tools2 add order by combo j tool bar toolbar2 new tool bar factory toolbar tools2 create tool bar toolbar2 set floatable false j panel toolbarpanel new j panel toolbarpanel set layout new border layout toolbarpanel add toolbar border layout north toolbarpanel add toolbar2 border layout south set layout new border layout add toolbarpanel border layout north add new j scroll pane tree border layout center if splash null splash get status bar show status translator localize statusmsg bar making navigator pane perspectives splash get status bar show progress 25 perspective combo add item listener explorer tree model tree get model order by combo add item listener explorer tree model tree get model perspective manager get instance load user perspectives jtree navigatorpane splashscreen jcombobox perspectivecombo perspectivecombobox jcombobox orderbycombo jcombobox explorertree dndexplorertree toolbartools arraylist toolbartools actionperspectiveconfig toolbartools perspectivecombo jtoolbar toolbarfactory toolbartools createtoolbar setfloatable orderbycombo additem typethennameorder orderbycombo additem nameorder toolbartools2 arraylist toolbartools2 orderbycombo jtoolbar toolbarfactory toolbartools2 createtoolbar setfloatable jpanel jpanel setlayout borderlayout borderlayout borderlayout setlayout borderlayout borderlayout jscrollpane borderlayout getstatusbar showstatus getstatusbar showprogress perspectivecombo additemlistener explorertreemodel getmodel orderbycombo additemlistener explorertreemodel getmodel perspectivemanager getinstance loaduserperspectives sets minimum size to 120 100 public dimension get minimum size return new dimension 120 100 getminimumsize the constructor public cr invalid branch setup head and desc add supported decision uml decision state machines add trigger incoming crinvalidbranch setupheadanddesc addsupporteddecision umldecision state_machines addtrigger public boolean predicate2 object dm designer dsgr if model get facade isa pseudostate dm return no problem object k model get facade get kind dm if model get facade equals pseudostate kind k model get pseudostate kind get choice model get facade equals pseudostate kind k model get pseudostate kind get junction return no problem collection outgoing model get facade get outgoings dm collection incoming model get facade get incomings dm int n outgoing outgoing null 0 outgoing size int n incoming incoming null 0 incoming size if n incoming 1 return problem found if n outgoing 1 return problem found return no problem getfacade isapseudostate no_problem getfacade getkind getfacade equalspseudostatekind getpseudostatekind getchoice getfacade equalspseudostatekind getpseudostatekind getjunction no_problem getfacade getoutgoings getfacade getincomings noutgoing nincoming nincoming problem_found noutgoing problem_found no_problem public set object get criticized design materials set object ret new hash set object ret add model get meta types get pseudostate return ret getcriticizeddesignmaterials hashset getmetatypes getpseudostate constructor for uml message action list model public uml message action list model super action umlmessageactionlistmodel umlmessageactionlistmodel see org argouml uml ui uml model element list model2 build model list protected void build model list remove all elements add element model get facade get action get target umlmodelelementlistmodel2 buildmodellist buildmodellist removeallelements addelement getfacade getaction gettarget see org argouml uml ui uml model element list model2 is valid element object protected boolean is valid element object elem return model get facade isa action elem model get facade get action get target elem umlmodelelementlistmodel2 isvalidelement isvalidelement getfacade isaaction getfacade getaction gettarget construct a new deferred buffered image which will use gef to render the current diagram on demand param drawing area bounding rectangle of the area to be drawn param image type type of image to be created e g type int argb must be on an image type which is supported by buffered image param ed gef editor to be used for rendering the image param scale factor integer scale factor to multiply by when rendering image public deferred buffered image rectangle drawing area int image type editor ed int scale factor editor ed scale scale factor x drawing area x y drawing area y width drawing area width height drawing area height scale everything up x x scale y y scale width width scale height height scale scaled buffer height buffer height scale create our bandbuffer which is just a small slice of the image todo we used a fixed height buffer now but we could be smarter and compute a height which would fit in some memory budget allowing us to use taller buffers with narrower images minimizing the overhead of multiple rendering passes image new buffered image width scaled buffer height image type initialize band buffer bounds y1 y y2 y1 deferredbufferedimage drawingarea imagetype type_int_argb bufferedimage scalefactor deferredbufferedimage drawingarea imagetype scalefactor scalefactor drawingarea drawingarea drawingarea drawingarea scaledbufferheight buffer_height bufferedimage scaledbufferheight imagetype public raster get data log debug get data with no params return get data new rectangle x y width height getdata getdata getdata public raster get data rectangle clip log debug get data rectangle clip if is raster valid clip log debug raster not valid computing new raster compute raster clip rectangle o clip offset window clip raster ras image get data o clip raster translated raster ras create translated child clip x clip y log debug get data returning raster translated raster return translated raster getdata getdata israstervalid computeraster oclip offsetwindow getdata oclip translatedraster createtranslatedchild getdata translatedraster translatedraster param clip clipping rectangle to test return true if clip rectangle is completely contained in image raster private boolean is raster valid rectangle clip if clip height scaled buffer height throw new index out of bounds exception clip rectangle must fit in band buffer return clip y y1 clip y clip height 1 y2 israstervalid scaledbufferheight indexoutofboundsexception rasterize the next slice in the band buffer raster will be the full width of the image and based vertically at the y value of the current clip rectangle param clip clip rectangle of interest private void compute raster rectangle clip log debug computing raster for rectangle clip create a new graphics context so we start with fresh transforms graphics2d graphics image create graphics graphics scale 1 0 scale 1 0 scale fill with our background color graphics set color background color composite c graphics get composite graphics set composite alpha composite src graphics fill rect 0 0 width scaled buffer height graphics set composite c translate clip graphic to match region of interest graphics set clip 0 0 width scaled buffer height graphics translate 0 clip y scale y1 clip y y2 y1 scaled buffer height ask gef to print a band of the diagram translated clipped editor print graphics make sure it isn t caching anything that should be written graphics dispose computeraster creategraphics setcolor background_color getcomposite setcomposite alphacomposite fillrect scaledbufferheight setcomposite setclip scaledbufferheight scaledbufferheight return a new clip rectangle which is offset by the base of our band buffer param clip clipping rectangle return adjusted clipping rectangle private rectangle offset window rectangle clip int basey clip y y1 return new rectangle clip x basey clip width math min clip height scaled buffer height basey offsetwindow scaledbufferheight not implemented inherit doc see java awt image rendered image copy data java awt image writable raster public writable raster copy data writable raster out raster throw new unsupported operation exception this needs to iterate to fill entire output raster if implemented return image copy data out raster inheritdoc renderedimage copydata writableraster writableraster copydata writableraster outraster unsupportedoperationexception copydata outraster not implemented inherit doc see java awt image rendered image get sources public vector rendered image get sources return null inheritdoc renderedimage getsources renderedimage getsources public color model get color model return image get color model colormodel getcolormodel getcolormodel public int get minx log debug get minx 0 return 0 getminx getminx public int get miny log debug get miny 0 return 0 getminy getminy public int get min tilex log debug get min tilex 0 return 0 getmintilex getmintilex public int get min tiley log debug get min tiley 0 return 0 getmintiley getmintiley public int get numx tiles log debug get numx tiles 1 return 1 getnumxtiles getnumxtiles untested not guaranteed to work inherit doc see java awt image rendered image get numy tiles public int get numy tiles int tiles get height scaled buffer height 1 scaled buffer height log debug get numy tiles tiles return tiles inheritdoc renderedimage getnumytiles getnumytiles getheight scaledbufferheight scaledbufferheight getnumytiles public object get property string name return image get property name getproperty getproperty public string get property names return image get property names getpropertynames getpropertynames public sample model get sample model return image get sample model samplemodel getsamplemodel getsamplemodel untested not guaranteed to work inherit doc see java awt image rendered image get numy tiles public raster get tile int tilex int tiley log debug get tile x tilex y tiley if tilex get min tilex tilex get min tilex get numx tiles tiley get min tiley tiley get min tiley get numy tiles throw new index out of bounds exception fixme boundary condition at end of image for non integral multiples of buffer height rectangle tile bounds new rectangle 0 tiley get min tiley scaled buffer height width scaled buffer height return get data tile bounds inheritdoc renderedimage getnumytiles gettile gettile getmintilex getmintilex getnumxtiles getmintiley getmintiley getnumytiles indexoutofboundsexception buffer_height tilebounds getmintiley scaledbufferheight scaledbufferheight getdata tilebounds public int get tile gridx offset log debug get tile gridx offset 0 return 0 gettilegridxoffset gettilegridxoffset public int get tile gridy offset log debug get tile gridy offset 0 return 0 gettilegridyoffset gettilegridyoffset public int get tile width log debug get tile width width return width gettilewidth gettilewidth public int get tile height log debug get tile height scaled buffer height return scaled buffer height gettileheight gettileheight scaledbufferheight scaledbufferheight public int get width log debug get width width return width getwidth getwidth public int get height log debug get height height return height getheight getheight constructor for uml instance link end list model public uml instance link end list model super link end umlinstancelinkendlistmodel umlinstancelinkendlistmodel linkend protected void build model list if get target null set all elements model get facade get link ends get target buildmodellist gettarget setallelements getfacade getlinkends gettarget see org argouml uml ui uml model element list model2 is valid element object protected boolean is valid element object element return model get facade get link ends get target contains element umlmodelelementlistmodel2 isvalidelement isvalidelement getfacade getlinkends gettarget public string get rule name return translator localize misc project roots getrulename public collection get children object parent if parent instanceof project return project parent get roots return collections empty set getchildren getroots empty_set public set get dependencies object parent return collections empty set getdependencies empty_set creates a new offenderxml helper describing the offender described by item param offender a description of an offender throws illegal argument exception if item is null public offenderxml helper string offender if offender null throw new illegal argument exception an offender string must be supplied item offender offenderxmlhelper illegalargumentexception offenderxmlhelper illegalargumentexception gets the description of this offender return the description as a string public string get offender return item getoffender the constructor public argo awt exception handler argoawtexceptionhandler called from within link java awt event dispatch thread when an unhandled exception occurs in the awt event queue param t the uncaught exception throws throwable to repost the exception if we do not want to eat it public void handle throwable t throws throwable throw t eventdispatchthread the constructor param o the target public action modifier root object o super checkbox root uc put value selected boolean value of value of target o actionmodifierroot putvalue valueof valueoftarget see org argouml uml diagram ui abstract action check box menu item toggle value of target java lang object void toggle value of target object t model get core helper set root t model get facade is root t abstractactioncheckboxmenuitem togglevalueoftarget togglevalueoftarget getcorehelper setroot getfacade isroot see org argouml uml diagram ui abstract action check box menu item value of target java lang object boolean value of target object t return model get facade is root t abstractactioncheckboxmenuitem valueoftarget valueoftarget getfacade isroot constructor deprecated by for 0 27 4 by tfmorris use link abstract fig node object rectangle diagram settings suppress warnings deprecation deprecated public abstract fig node super init figs abstractfignode diagramsettings suppresswarnings abstractfignode initfigs private void init figs set big port new cube port fig rect default x default y depth default width depth default height depth depth get big port set filled false get big port set line width 0 cover new fig cube default x default y default width default height line color fill color get name fig set line width 0 get name fig set filled false get name fig set justification 0 add fig get big port add fig cover add fig get stereotype fig add fig get name fig initfigs setbigport cubeportfigrect default_x default_y default_width default_height getbigport setfilled getbigport setlinewidth figcube default_x default_y default_width default_height line_color fill_color getnamefig setlinewidth getnamefig setfilled getnamefig setjustification addfig getbigport addfig addfig getstereotypefig addfig getnamefig constructor param gm the graphmodel param node the uml element deprecated by for 0 27 4 by tfmorris use link abstract fig node object rectangle diagram settings suppress warnings deprecation deprecated public abstract fig node suppress warnings unused graph model gm object node this set owner node if model get facade isa classifier node model get facade get name node null get name fig set text model get facade get name node abstractfignode diagramsettings suppresswarnings abstractfignode suppresswarnings graphmodel setowner getfacade isaclassifier getfacade getname getnamefig settext getfacade getname construct a figure at a specific position for a given model element p the layer which has a 1 1 relation to the diagram is not yet set in this stage of the creation of the fig param element model element associated with figure param x horizontal location param y vertical location deprecated by for 0 27 4 by tfmorris use link abstract fig node object rectangle diagram settings suppress warnings deprecation deprecated public abstract fig node object element int x int y super element x y modelelement abstractfignode diagramsettings suppresswarnings abstractfignode construct a new abstract fig node param owner owning uml element param bounds position and size param settings render settings public abstract fig node object owner rectangle bounds diagram settings settings super owner bounds settings init figs abstractfignode abstractfignode diagramsettings initfigs override public object clone abstract fig node fig clone abstract fig node super clone iterator it fig clone get figs iterator fig clone set big port fig rect it next fig clone cover fig cube it next it next fig clone set name fig fig text it next return fig clone abstractfignode figclone abstractfignode figclone getfigs figclone setbigport figrect figclone figcube figclone setnamefig figtext figclone override public void set line color color c cover set line color c setlinecolor setlinecolor override public void set line width int w cover set line width w setlinewidth setlinewidth override public boolean is filled return cover is filled isfilled isfilled override public void set filled boolean f cover set filled f setfilled setfilled override public selection make selection return new selection node this makeselection selectionnode override public dimension get minimum size dimension stereo dim get stereotype fig get minimum size dimension name dim get name fig get minimum size int w math max stereo dim width name dim width 1 depth int h stereo dim height name dim height depth w math max 3 depth w so it still looks like a cube h math max 3 depth h return new dimension w h getminimumsize stereodim getstereotypefig getminimumsize namedim getnamefig getminimumsize stereodim namedim stereodim namedim override protected void set standard bounds int x int y int w int h if get name fig null return rectangle old bounds get bounds get big port set bounds x y w h cover set bounds x y depth w depth h depth dimension stereo dim get stereotype fig get minimum size dimension name dim get name fig get minimum size get name fig set bounds x 4 y depth stereo dim height 1 w depth 8 name dim height get stereotype fig set bounds x 1 y depth 1 w depth 2 stereo dim height x x y y w w h h fire prop change bounds old bounds get bounds update edges setstandardbounds getnamefig oldbounds getbounds getbigport setbounds setbounds stereodim getstereotypefig getminimumsize namedim getnamefig getminimumsize getnamefig setbounds stereodim namedim getstereotypefig setbounds stereodim _x _y _w _h firepropchange oldbounds getbounds updateedges override protected void update stereotype text get stereotype fig set owner get owner updatestereotypetext getstereotypefig setowner getowner override public void mouse clicked mouse event me super mouse clicked me set line color line color mouseclicked mouseevent mouseclicked setlinecolor line_color override public void set enclosing fig fig encloser if encloser null encloser null model get facade isa node encloser get owner super set enclosing fig encloser if get layer null element ordering figures collection contents get layer get contents collection fig edge model element bring to front list new array list fig edge model element for object o contents if o instanceof fig edge model element bring to front list add fig edge model element o for fig edge model element fig edge bring to front list fig edge get layer bring to front fig edge setenclosingfig getfacade isanode getowner setenclosingfig getlayer elementordering getlayer getcontents figedgemodelelement bringtofrontlist arraylist figedgemodelelement figedgemodelelement bringtofrontlist figedgemodelelement figedgemodelelement figedge bringtofrontlist figedge getlayer bringtofront figedge override public boolean get use trap rect return true getusetraprect override protected void model changed property change event mee super model changed mee if mee instanceof association change event mee instanceof attribute change event rendering changed update listeners get owner get owner damage modelchanged propertychangeevent modelchanged associationchangeevent attributechangeevent renderingchanged updatelisteners getowner getowner override protected void update listeners object old owner object new owner set object l new hash set object if new owner null add the listeners to the new owner l add new object new owner null collection c model get facade get stereotypes new owner iterator i c iterator while i has next object st i next l add new object st name update element listeners l updatelisteners oldowner newowner hashset newowner newowner newowner getfacade getstereotypes newowner hasnext updateelementlisteners override public point get closest point point another pt rectangle r get bounds int xs r x r x depth r x r width r x r width r x r width depth r x r x int ys r y depth r y r y r y r height depth r y r height r y r height r y depth point p geometry pt closest to xs ys 7 another pt return p getclosestpoint anotherpt getbounds ptclosestto anotherpt construct a new fig branch state param owner owning uml element param bounds position and size param settings rendering settings public fig branch state object owner rectangle bounds diagram settings settings super owner bounds settings init figs figbranchstate figbranchstate diagramsettings initfigs constructor deprecated for 0 27 4 by tfmorris use link fig branch state object rectangle diagram settings suppress warnings deprecation deprecated public fig branch state super init figs figbranchstate diagramsettings suppresswarnings figbranchstate initfigs private void init figs set editable false bp new fig circle x0 y0 width height debug color debug color set big port bp head new fig circle x0 y0 width height line color fill color add figs to the fig node in back to front order add fig get big port add fig head set blink ports false make port invisible unless mouse enters initfigs seteditable figcircle debug_color debug_color setbigport figcircle line_color fill_color fignode addfig getbigport addfig setblinkports constructor param gm ignored param node the owner deprecated for 0 27 4 by tfmorris use link fig branch state object rectangle diagram settings suppress warnings deprecation deprecated public fig branch state suppress warnings unused graph model gm object node this set owner node figbranchstate diagramsettings suppresswarnings figbranchstate suppresswarnings graphmodel setowner override public point get closest point point another pt point p bp connection point another pt return p getclosestpoint anotherpt connectionpoint anotherpt override public object clone fig branch state fig clone fig branch state super clone iterator it fig clone get figs iterator fig clone set big port fig circle it next fig clone head fig circle it next return fig clone figbranchstate figclone figbranchstate figclone getfigs figclone setbigport figcircle figclone figcircle figclone choice states are fixed size return false override public boolean is resizable return false isresizable see org tigris gef presentation fig set line color java awt color override public void set line color color col head set line color col setlinecolor setlinecolor setlinecolor see org tigris gef presentation fig get line color override public color get line color return head get line color getlinecolor getlinecolor getlinecolor see org tigris gef presentation fig set fill color java awt color override public void set fill color color col head set fill color col setfillcolor setfillcolor setfillcolor see org tigris gef presentation fig get fill color override public color get fill color return head get fill color getfillcolor getfillcolor getfillcolor ignored figure has a fixed rendering param f ignored override public void set filled boolean f ignored fixed rendering setfilled override public boolean is filled return true isfilled see org tigris gef presentation fig set line width int override public void set line width int w head set line width w setlinewidth setlinewidth setlinewidth see org tigris gef presentation fig get line width override public int get line width return head get line width getlinewidth getlinewidth getlinewidth see java awt event mouse listener mouse clicked java awt event mouse event override public void mouse clicked mouse event me ignored mouselistener mouseclicked mouseevent mouseclicked mouseevent override set standard bounds to keep shapes looking right inherit doc override protected void set standard bounds int x int y int w int h if get name fig null return rectangle old bounds get bounds get big port set bounds x y w h head set bounds x y w h calc bounds x x y y w w h h update edges fire prop change bounds old bounds get bounds setstandardbounds inheritdoc setstandardbounds getnamefig oldbounds getbounds getbigport setbounds setbounds calcbounds _x _y _w _h updateedges firepropchange oldbounds getbounds construct a new use case diagram with no defined namespace p note we must never call this directly since defining the namespace is what makes everything work however gef will call it directly when loading a new diagram so it must remain public p a unique name is constructed by using the serial index we allow for the possibility that setting this may fail in which case no name is set p deprecated ony for use by pgml parser deprecated public uml use case diagram super new use case diagram graph model try set name get new diagram name catch property veto exception pve umlusecasediagram usecasediagramgraphmodel setname getnewdiagramname propertyvetoexception construct a new use case diagram with in a defined namespace p invokes the generic constructor link uml use case diagram then intialises the namespace which initializes all the graphics p this is the constructor which should always be used p param m the desired namespace for this diagram public uml use case diagram object m this if model get facade isa namespace m throw new illegal argument exception set namespace m umlusecasediagram umlusecasediagram getfacade isanamespace illegalargumentexception setnamespace constructor param name the name for the diagram param namespace the namespace for the diagram public uml use case diagram string name object namespace this namespace if model get facade isa namespace namespace throw new illegal argument exception try set name name catch property veto exception v umlusecasediagram getfacade isanamespace illegalargumentexception setname propertyvetoexception perform a number of important initializations of a em use case diagram em p creates a new graph model for the diagram settings its namespace to that supplied p changed em lay em from em layer perspective em to em layer perspective mutable em this class is a child of em layer perspective em and was implemented to correct some difficulties in changing the model em lay em is used mainly in em layer manager em gef to control the adding changing and deleting of items in a layer of the diagram p set a renderer suitable for the use case diagram p em note em this is declared as public not clear that other classes should be allowed to invoke this method p param handle namespace to be used for this diagram author psager tigris org jan 24 2002 override public void set namespace object handle if model get facade isa namespace handle log error illegal argument object handle is not a namespace throw new illegal argument exception illegal argument object handle is not a namespace object m handle super set namespace m use case diagram graph model gm use case diagram graph model get graph model gm set home model m layer perspective lay new layer perspective mutable model get facade get name m gm use case diagram renderer rend new use case diagram renderer lay set graph node renderer rend lay set graph edge renderer rend set layer lay the renderer should be a singleton layerperspective layerperspectivemutable layerperspective layermanager setnamespace getfacade isanamespace illegalargumentexception setnamespace usecasediagramgraphmodel usecasediagramgraphmodel getgraphmodel sethomemodel layerperspective layerperspectivemutable getfacade getname usecasediagramrenderer usecasediagramrenderer setgraphnoderenderer setgraphedgerenderer setlayer protected object get uml actions object actions get action actor get action use case null get association actions get action dependency get action generalize get action extend get action include null get action extension point return actions getumlactions getactionactor getactionusecase getassociationactions getactiondependency getactiongeneralize getactionextend getactioninclude getactionextensionpoint private object get association actions object actions get action association get action uni association get action aggregation get action uni aggregation get action composition get action uni composition tool bar utility manage default actions diagram usecase association return actions getassociationactions getactionassociation getactionuniassociation getactionaggregation getactionuniaggregation getactioncomposition getactionunicomposition toolbarutility managedefault see org argouml uml diagram ui uml diagram get label name public string get label name return translator localize label usecase diagram umldiagram getlabelname getlabelname return returns the action actor protected action get action actor if action actor null action actor new radio action new cmd create node model get meta types get actor button new actor return action actor actionactor getactionactor actionactor actionactor radioaction cmdcreatenode getmetatypes getactor actionactor return returns the action aggregation protected action get action aggregation if action aggregation null action aggregation new radio action new action set add association mode model get aggregation kind get aggregate false button new aggregation return action aggregation actionaggregation getactionaggregation actionaggregation actionaggregation radioaction actionsetaddassociationmode getaggregationkind getaggregate actionaggregation return returns the action association protected action get action association if action association null action association new radio action new action set add association mode model get aggregation kind get none false button new association return action association actionassociation getactionassociation actionassociation actionassociation radioaction actionsetaddassociationmode getaggregationkind getnone actionassociation return returns the action composition protected action get action composition if action composition null action composition new radio action new action set add association mode model get aggregation kind get composite false button new composition return action composition actioncomposition getactioncomposition actioncomposition actioncomposition radioaction actionsetaddassociationmode getaggregationkind getcomposite actioncomposition return returns the action dependency protected action get action dependency if action dependency null action dependency new radio action new action set mode mode create poly edge class edge class model get meta types get dependency button new dependency return action dependency actiondependency getactiondependency actiondependency actiondependency radioaction actionsetmode modecreatepolyedge edgeclass getmetatypes getdependency actiondependency return returns the action extend protected action get action extend if action extend null action extend new radio action new action set mode mode create poly edge class edge class model get meta types get extend button new extend return action extend actionextend getactionextend actionextend actionextend radioaction actionsetmode modecreatepolyedge edgeclass getmetatypes getextend actionextend return returns the action generalize protected action get action generalize if action generalize null action generalize new radio action new action set mode mode create poly edge class edge class model get meta types get generalization button new generalization return action generalize actiongeneralize getactiongeneralize actiongeneralize actiongeneralize radioaction actionsetmode modecreatepolyedge edgeclass getmetatypes getgeneralization actiongeneralize return returns the action include protected action get action include if action include null action include new radio action new action set mode mode create poly edge class edge class model get meta types get include button new include return action include actioninclude getactioninclude actioninclude actioninclude radioaction actionsetmode modecreatepolyedge edgeclass getmetatypes getinclude actioninclude return returns the action uni aggregation protected action get action uni aggregation if action uni aggregation null action uni aggregation new radio action new action set add association mode model get aggregation kind get aggregate true button new uniaggregation return action uni aggregation actionuniaggregation getactionuniaggregation actionuniaggregation actionuniaggregation radioaction actionsetaddassociationmode getaggregationkind getaggregate actionuniaggregation return returns the action uni association protected action get action uni association if action uni association null action uni association new radio action new action set add association mode model get aggregation kind get none true button new uniassociation return action uni association actionuniassociation getactionuniassociation actionuniassociation actionuniassociation radioaction actionsetaddassociationmode getaggregationkind getnone actionuniassociation return returns the action uni composition protected action get action uni composition if action uni composition null action uni composition new radio action new action set add association mode model get aggregation kind get composite true button new unicomposition return action uni composition actionunicomposition getactionunicomposition actionunicomposition actionunicomposition radioaction actionsetaddassociationmode getaggregationkind getcomposite actionunicomposition return returns the action use case protected action get action use case if action use case null action use case new radio action new cmd create node model get meta types get use case button new usecase return action use case actionusecase getactionusecase actionusecase actionusecase radioaction cmdcreatenode getmetatypes getusecase actionusecase return the action to create an extension point protected action get action extension point if action extension point null action extension point action add extension point singleton return action extension point getactionextensionpoint actionextensionpoint actionextensionpoint actionaddextensionpoint actionextensionpoint see org argouml uml diagram ui uml diagram is relocation allowed java lang object public boolean is relocation allowed object base return model get facade isa package base model get facade isa classifier base umldiagram isrelocationallowed isrelocationallowed getfacade isapackage getfacade isaclassifier public boolean relocate object base set namespace base damage return true setnamespace suppress warnings unchecked public collection get relocation candidates object root collection c new hash set c add model get model management helper get all model elements of kind with model root model get meta types get package c add model get model management helper get all model elements of kind with model root model get meta types get classifier return c suppresswarnings getrelocationcandidates hashset getmodelmanagementhelper getallmodelelementsofkindwithmodel getmetatypes getpackage getmodelmanagementhelper getallmodelelementsofkindwithmodel getmetatypes getclassifier public void encloser changed fig node enclosed fig node old encloser fig node new encloser do nothing encloserchanged fignode fignode oldencloser fignode newencloser override public boolean does accept object object to accept if model get facade isa actor object to accept return true else if model get facade isa use case object to accept return true else if model get facade isa comment object to accept return true else if model get facade isa package object to accept return true return false doesaccept objecttoaccept getfacade isaactor objecttoaccept getfacade isausecase objecttoaccept getfacade isacomment objecttoaccept getfacade isapackage objecttoaccept override public fig node drop object dropped object point location fig node fig node null if location is non null convert to a rectangle that we can use rectangle bounds null if location null bounds new rectangle location x location y 0 0 diagram settings settings get diagram settings if model get facade isa actor dropped object fig node new fig actor dropped object bounds settings else if model get facade isa use case dropped object fig node new fig use case dropped object bounds settings else if model get facade isa comment dropped object fig node new fig comment dropped object bounds settings else if model get facade isa package dropped object fig node new fig package dropped object bounds settings if fig node null log debug dropped object dropped object converted to fig node else log debug dropped object not added fig node return fig node fignode droppedobject fignode fignode diagramsettings getdiagramsettings getfacade isaactor droppedobject fignode figactor droppedobject getfacade isausecase droppedobject fignode figusecase droppedobject getfacade isacomment droppedobject fignode figcomment droppedobject getfacade isapackage droppedobject fignode figpackage droppedobject fignode droppedobject fignode fignode fignode construct a property panel for an interaction public prop panel interaction super label interaction title lookup icon interaction add field translator localize label name get name text field add field translator localize label namespace get namespace selector add field translator localize label context get single row scroll new uml interaction context list model add separator j list messages list new uml linked list new uml interaction messages list model j scroll pane messages scroll new j scroll pane messages list add field translator localize label messages messages scroll add action new action navigate context add action new action new stereotype add action get delete action proppanelinteraction lookupicon addfield getnametextfield addfield getnamespaceselector addfield getsinglerowscroll umlinteractioncontextlistmodel addseparator jlist messageslist umllinkedlist umlinteractionmessageslistmodel jscrollpane messagesscroll jscrollpane messageslist addfield messagesscroll addaction actionnavigatecontext addaction actionnewstereotype addaction getdeleteaction create a new instance of association end name notation uml return the notation public static final association end name notation java get instance return instance associationendnamenotationuml associationendnamenotationjava getinstance the constructor protected association end name notation java super associationendnamenotationjava see org argouml notation providers notation provider get parsing help public string get parsing help return parsing help fig association end name return parsing in java not yet supported notationprovider getparsinghelp getparsinghelp public void parse object model element string text argo event pump fire event new argo help event argo event types help changed this parsing in java not yet supported modelelement argoeventpump fireevent argohelpevent argoeventtypes help_changed suppress warnings deprecation deprecated override public string to string object model element map args return to string model element notation utility uml is value use guillemets args suppresswarnings tostring modelelement tostring modelelement notationutilityuml isvalue useguillemets private string to string object model element boolean use guillemets string name model get facade get name model element if name null name object visi model get facade get visibility model element string visibility if visi null visibility notation utility java generate visibility visi if name length 1 visibility this is the temporary solution for issue 1011 string stereo string notation utility uml generate stereotype model element use guillemets return stereo string visibility name tostring modelelement useguillemets getfacade getname modelelement getfacade getvisibility modelelement notationutilityjava generatevisibility stereostring notationutilityuml generatestereotype modelelement useguillemets stereostring override public string to string object model element notation settings settings return to string model element settings is use guillemets tostring modelelement notationsettings tostring modelelement isuseguillemets the constructor param x x param y y param w width param h height deprecated for 0 27 3 by tfmorris use link fig enum literals compartment object rectangle diagram settings suppress warnings deprecation deprecated public fig enum literals compartment int x int y int w int h super x y w h figenumliteralscompartment diagramsettings suppresswarnings figenumliteralscompartment constructor param owner owning uml element param bounds bounding rectangle param settings render settings public fig enum literals compartment object owner rectangle bounds diagram settings settings super owner bounds settings super populate todo we don t really want this to be filled but if it s not then the user can t double click in the compartment to add a new literal apparently gef thinks unfilled figs are only selectable by border set filled false figenumliteralscompartment diagramsettings setfilled see org argouml uml diagram ui fig editable compartment get uml collection protected collection get uml collection return model get facade get enumeration literals get owner figeditablecompartment getumlcollection getumlcollection getfacade getenumerationliterals getowner protected int get notation type the enumeration literal uses a dedicated notation that supports parsing name1 name2 name3 and stereotypes also supports deleting a literal by erasing text return notation provider factory2 type enumeration literal getnotationtype enumerationliteral notationproviderfactory2 type_enumeration_literal see org argouml uml diagram ui fig editable compartment create model element protected void create model element object enumeration get group get owner object literal model get core factory build enumeration literal literal enumeration target manager get instance set target literal figeditablecompartment createmodelelement createmodelelement getgroup getowner getcorefactory buildenumerationliteral targetmanager getinstance settarget suppress warnings deprecation deprecated override protected fig single line text with notation create fig text object owner rectangle bounds diagram settings settings notation provider np return new fig enumeration literal owner bounds settings np suppresswarnings figsinglelinetextwithnotation createfigtext diagramsettings notationprovider figenumerationliteral override protected fig single line text with notation create fig text object owner rectangle bounds diagram settings settings return new fig enumeration literal owner bounds settings figsinglelinetextwithnotation createfigtext diagramsettings figenumerationliteral constructor for uml classifier feature list model public uml classifier feature list model super feature umlclassifierfeaturelistmodel umlclassifierfeaturelistmodel protected void build model list if get target null set all elements model get facade get features get target buildmodellist gettarget setallelements getfacade getfeatures gettarget see org argouml uml ui uml model element list model2 is valid element object protected boolean is valid element object element return model get facade get features get target contains element umlmodelelementlistmodel2 isvalidelement isvalidelement getfacade getfeatures gettarget protected void move down int index object clss get target list c model get facade get features clss if index c size 1 object mem c get index model get core helper remove feature clss mem model get core helper add feature clss index 1 mem movedown gettarget getfacade getfeatures getcorehelper removefeature getcorehelper addfeature see org argouml uml ui uml model element ordered list model2 move to bottom int override protected void move to bottom int index object clss get target list c model get facade get features clss if index c size 1 object mem c get index model get core helper remove feature clss mem model get core helper add feature clss c size mem umlmodelelementorderedlistmodel2 movetobottom movetobottom gettarget getfacade getfeatures getcorehelper removefeature getcorehelper addfeature see org argouml uml ui uml model element ordered list model2 move to top int override protected void move to top int index object clss get target list c model get facade get features clss if index 0 object mem c get index model get core helper remove feature clss mem model get core helper add feature clss 0 mem umlmodelelementorderedlistmodel2 movetotop movetotop gettarget getfacade getfeatures getcorehelper removefeature getcorehelper addfeature creates a new ocl interpreter for a given ocl expression param ocl expression param interpreter the interpreter throws invalid ocl exception if the expression is not valid public ocl interpreter string ocl model interpreter interpreter throws invalid ocl exception this model interpreter interpreter lexer lexer new lexer new pushback reader new string reader ocl 2 ocl parser parser new ocl parser lexer try tree parser parse catch exception e e print stack trace throw new invalid ocl exception ocl invalidoclexception oclinterpreter modelinterpreter invalidoclexception modelinterpreter pushbackreader stringreader oclparser oclparser printstacktrace invalidoclexception checks whether this ocl expression is applicable to a given model element param model element the model element return if is applicable public boolean applicable object model element context applicable ca new context applicable model element tree apply ca return ca is applicable modelelement modelelement modelelement contextapplicable contextapplicable modelelement isapplicable checks if this expression invariant is satisfied for the given model element param model element the model element return if is satisfied public boolean check object model element evaluate invariant ei new evaluate invariant model element model interpreter tree apply ei return ei isok modelelement modelelement modelelement evaluateinvariant evaluateinvariant modelelement modelinterpreter computes and returns the set of triggers for this constraint see org argouml cognitive critic add trigger string return the set of triggers public list string get triggers compute triggers ct new compute triggers tree apply ct return ct get triggers addtrigger gettriggers computetriggers computetriggers gettriggers return the design materials to be criticized by this ocl no metatype is assumed by default public set object get criticized design materials compute design materials cdm new compute design materials tree apply cdm return cdm get criticized design materials getcriticizeddesignmaterials computedesignmaterials computedesignmaterials getcriticizeddesignmaterials construct a new predicate which evaluates the given gef predication param gef predicate predicate to be evaluated public predicate gef wrapper org tigris gef util predicate gef predicate predicate gef predicate gefpredicate predicategefwrapper gefpredicate gefpredicate public boolean evaluate object object return predicate predicate object return the original gef predicate public org tigris gef util predicate get gef predicate return predicate getgefpredicate the constructor param o the target public action visibility package object o super checkbox visibility package uc false put value selected boolean value of model get visibility kind get package equals value of target o actionvisibilitypackage putvalue valueof getvisibilitykind getpackage valueoftarget see org argouml uml diagram ui abstract action radio menu item toggle value of target java lang object void toggle value of target object t model get core helper set visibility t model get visibility kind get package abstractactionradiomenuitem togglevalueoftarget togglevalueoftarget getcorehelper setvisibility getvisibilitykind getpackage make use of the default visibility which is public todo centralise this knowledge see org argouml uml diagram ui abstract action radio menu item value of target java lang object object value of target object t object v model get facade get visibility t return v null model get visibility kind get public v abstractactionradiomenuitem valueoftarget valueoftarget getfacade getvisibility getvisibilitykind getpublic returns the suffix for which a file filter filters param filter the file filter from which we want to know the suffix return string the suffix of the file filter returns null if the file filter is not an instance of suffix filter public static string get suffix file filter filter if filter instanceof suffix filter return suffix filter filter get suffix return null filefilter filefilter filefilter filefilter suffixfilter getsuffix filefilter suffixfilter suffixfilter getsuffix the constructor deprecated for 0 27 3 by tfmorris use link fig generalization object diagram settings suppress warnings deprecation deprecated public fig generalization discriminator new argo fig text null new rectangle x0 y0 discriminator width text height get settings false initialize figgeneralization diagramsettings suppresswarnings figgeneralization argofigtext discriminator_width text_height getsettings private void initialize uml spec for generalizations doesn t call for name or stereotype discriminator set filled false discriminator set line width 0 discriminator set return action fig text end editing discriminator set tab action fig text end editing add path item discriminator new path item placement this discriminator 50 10 end arrow new arrow head triangle end arrow set fill color fill color set dest arrow head end arrow set between nearest points true setfilled setlinewidth setreturnaction figtext end_editing settabaction figtext end_editing addpathitem pathitemplacement endarrow arrowheadtriangle endarrow setfillcolor fill_color setdestarrowhead endarrow setbetweennearestpoints the constructor that hooks the fig into the uml element param edge the uml element param lay the layer deprecated for 0 27 3 by tfmorris use link fig generalization object diagram settings deprecated public fig generalization object edge layer lay this set layer lay set owner edge figgeneralization diagramsettings figgeneralization setlayer setowner construct a new generalization edge with the given model element as the owner param owner owning model element param settings render settings public fig generalization object owner diagram settings settings super owner settings discriminator new argo fig text owner new rectangle x0 y0 discriminator width text height settings false initialize fixup owner add listener owner figgeneralization diagramsettings argofigtext discriminator_width text_height addlistener see org argouml uml diagram ui fig edge model element can edit org tigris gef presentation fig override protected boolean can edit fig f return false figedgemodelelement canedit canedit override protected void model changed property change event e name stereotypes get updated by superclass super model changed e update the discriminator if it changed if e instanceof attribute change event discriminator equals e get property name update discriminator text modelchanged propertychangeevent modelchanged attributechangeevent getpropertyname updatediscriminatortext override protected void update listeners object old owner object new owner if old owner null remove element listener old owner if new owner null add listener new owner updatelisteners oldowner newowner oldowner removeelementlistener oldowner newowner addlistener newowner private void add listener object owner add element listener owner new string remove discriminator addlistener addelementlistener updates the discriminator text called if the model is changed and on construction time public void update discriminator text object generalization get owner if generalization null return string disc string model get facade get discriminator generalization if disc null disc discriminator set font get settings get font font plain discriminator set text disc updatediscriminatortext getowner getfacade getdiscriminator setfont getsettings getfont settext override public void paint graphics g end arrow set line color get line color super paint g endarrow setlinecolor getlinecolor suppress warnings deprecation override public void set owner object own super set owner own fixup own suppresswarnings setowner setowner fix up bad figs p due to errors in earlier releases of argouml it can happen that there is a generalization without a child or parent p todo move into xsl we should not remove from the graph model while we re writing to it or we have a possible cause of concurrent modification exception param owner private void fixup object owner if model get facade isa generalization owner object sub type model get facade get specific owner object super type model get facade get general owner if sub type null super type null todo we should warn the user we have removed something tfm remove from diagram return update discriminator text show it else if owner null throw new illegal state exception fig generalization has an illegal owner of owner get class get name getfacade isageneralization subtype getfacade getspecific supertype getfacade getgeneral subtype supertype removefromdiagram updatediscriminatortext illegalstateexception figgeneralization getclass getname construct a new selection comment for the given fig param f the given fig public selection comment fig f super f selectioncomment selectioncomment override protected icon get icons if model get model management helper is read only get content get owner return null return icons geticons getmodelmanagementhelper isreadonly getcontent getowner override protected string get instructions int index return instructions index base getinstructions override protected object get new edge type int index return comment edge class getnewedgetype commentedge override protected object get new node type int index return model get meta types get comment getnewnodetype getmetatypes getcomment override protected object get new node int index alternatively we could just return null here so that you can not create a comment just linked to a comment this way which is a bit uncommon but not illegal so for consistency we better allow it return null return model get core factory create comment getnewnode getcorefactory createcomment constructor for uml association end navigable check box public uml association end navigable check box super translator localize label navigable action set association end navigable get instance is navigable umlassociationendnavigablecheckbox umlassociationendnavigablecheckbox actionsetassociationendnavigable getinstance isnavigable public void build model if get target null set selected model get facade is navigable get target buildmodel gettarget setselected getfacade isnavigable gettarget constructor for action new event protected action new event super actionnewevent actionnewevent implementors should create a concrete event like an instance of signal event in this method param ns the namespace return object signalevent creates the event sets its role and namespace and navigates towards it inherit doc public void action performed action event e super action performed e object target get target object model project manager get manager get current project get model object ns model get state machines helper find namespace for event target model object event create event ns if get value role equals roles trigger model get state machines helper set event as trigger target event if get value role equals roles deferrable event model get state machines helper add deferrable event target event target manager get instance set target event inheritdoc actionperformed actionevent actionperformed gettarget projectmanager getmanager getcurrentproject getmodel getstatemachineshelper findnamespaceforevent createevent getvalue getstatemachineshelper seteventastrigger getvalue deferrable_event getstatemachineshelper adddeferrableevent targetmanager getinstance settarget param role the role the event plays param t the transition or state to get the event for return the event public static object get action string role object t if role equals roles trigger return model get facade get trigger t return null getaction getfacade gettrigger the constructor settings tab layout super set layout new border layout todo localize these final string positions north south east final string pane column header pane final string position column header position j panel top new j panel new border layout prp todo create property label todo pane positions tab to do class prp properties create property label properties pane positions tab props class prp documentation create property label documentation pane positions tab documentation class prp style create property label style pane positions tab style class prp source create property label source pane positions tab src class prp constraints create property label constraints pane positions tab constraints class prp tagged values create property label tagged values pane positions tab tagged values class property property list new property prp todo prp properties prp documentation prp style prp source prp constraints prp tagged values arrays sort property list top add new j scroll pane new property table property list pane column header position column header border layout center top set border border factory create empty border 10 10 0 10 add top border layout center j label restart new j label translator localize label restart application restart set horizontal alignment swing constants center restart set vertical alignment swing constants center restart set border border factory create empty border 10 2 10 2 add restart border layout south settingstablayout setlayout borderlayout panecolumnheader positioncolumnheader jpanel jpanel borderlayout prptodo createproperty tabtodo prpproperties createproperty tabprops prpdocumentation createproperty tabdocumentation prpstyle createproperty tabstyle prpsource createproperty tabsrc prpconstraints createproperty tabconstraints prptaggedvalues createproperty tabtaggedvalues propertylist prptodo prpproperties prpdocumentation prpstyle prpsource prpconstraints prptaggedvalues propertylist jscrollpane propertytable propertylist panecolumnheader positioncolumnheader borderlayout setborder borderfactory createemptyborder borderlayout jlabel jlabel sethorizontalalignment swingconstants setverticalalignment swingconstants setborder borderfactory createemptyborder borderlayout create a property for the position of the given tab pane selecting the current display value from the user properties file private property create property string text string positions class tab configuration key key make key tab string current value configuration get string key south return new property translator localize text string class current value positions createproperty configurationkey makekey currentvalue getstring currentvalue private void load position property position class tab configuration key key make key tab position set current value configuration get string key south loadposition configurationkey makekey setcurrentvalue getstring private void save position property position class tab configuration key key make key tab configuration set string key position get current value to string saveposition configurationkey makekey setstring getcurrentvalue tostring private configuration key make key class tab string class name tab get name string short class name class name substring class name last index of 1 to lower case configuration key key configuration make key layout short class name return key configurationkey makekey classname getname shortclassname classname classname lastindexof tolowercase configurationkey makekey shortclassname when the setting values should be reloaded public void handle settings tab refresh load position prp todo tab to do class load position prp properties tab props class load position prp documentation tab documentation class load position prp style tab style class load position prp source tab src class load position prp constraints tab constraints class load position prp tagged values tab tagged values class handlesettingstabrefresh loadposition prptodo tabtodo loadposition prpproperties tabprops loadposition prpdocumentation tabdocumentation loadposition prpstyle tabstyle loadposition prpsource tabsrc loadposition prpconstraints tabconstraints loadposition prptaggedvalues tabtaggedvalues when the ok or apply button is pressed public void handle settings tab save save position prp todo tab to do class save position prp properties tab props class save position prp documentation tab documentation class save position prp style tab style class save position prp source tab src class save position prp constraints tab constraints class save position prp tagged values tab tagged values class handlesettingstabsave saveposition prptodo tabtodo saveposition prpproperties tabprops saveposition prpdocumentation tabdocumentation saveposition prpstyle tabstyle saveposition prpsource tabsrc saveposition prpconstraints tabconstraints saveposition prptaggedvalues tabtaggedvalues see gui settings tab interface handle settings tab cancel public void handle settings tab cancel guisettingstabinterface handlesettingstabcancel handlesettingstabcancel see org argouml ui gui settings tab interface handle reset to default public void handle reset to default do nothing these buttons are not shown guisettingstabinterface handleresettodefault handleresettodefault see gui settings tab interface get tab key public string get tab key return tab layout guisettingstabinterface gettabkey gettabkey see gui settings tab interface get tab panel public j panel get tab panel return this guisettingstabinterface gettabpanel jpanel gettabpanel constructor public prop panel subactivity state super label subactivity state lookup icon subactivity state proppanelsubactivitystate lookupicon subactivitystate constructor for uml association link list model public uml association link list model super link umlassociationlinklistmodel umlassociationlinklistmodel protected void build model list if get target null set all elements model get facade get links get target buildmodellist gettarget setallelements getfacade getlinks gettarget see org argouml uml ui uml model element list model2 is valid element object protected boolean is valid element object o return model get facade isa link o model get facade get links get target contains o umlmodelelementlistmodel2 isvalidelement isvalidelement getfacade isalink getfacade getlinks gettarget default constructor used if a modelelement is a child of dependency or dependency itself but does not have a proppanel of their own public prop panel dependency this label dependency lookup icon dependency add field translator localize label name get name text field add field translator localize label namespace get namespace selector add separator add field translator localize label suppliers supplier scroll add field translator localize label clients client scroll add action new action navigate namespace add action new action new stereotype add action get delete action proppaneldependency lookupicon addfield getnametextfield addfield getnamespaceselector addseparator addfield supplierscroll addfield clientscroll addaction actionnavigatenamespace addaction actionnewstereotype addaction getdeleteaction constructor that should be used by subclasses to initialize the attributes a dependency has inherit doc see org argouml uml ui prop panel prop panel string image icon protected prop panel dependency string name image icon icon super name icon j list supplier list new uml linked list new uml dependency supplier list model true supplier scroll new j scroll pane supplier list j list client list new uml linked list new uml dependency client list model true client scroll new j scroll pane client list inheritdoc proppanel proppanel imageicon proppaneldependency imageicon jlist supplierlist umllinkedlist umldependencysupplierlistmodel supplierscroll jscrollpane supplierlist jlist clientlist umllinkedlist umldependencyclientlistmodel clientscroll jscrollpane clientlist return returns the supplier scroll protected j scroll pane get supplier scroll return supplier scroll supplierscroll jscrollpane getsupplierscroll supplierscroll return returns the client scroll protected j scroll pane get client scroll return client scroll clientscroll jscrollpane getclientscroll clientscroll the getter for the instance return the instance public static graph change adapter get instance return instance graphchangeadapter getinstance the constructor of a singleton is private private graph change adapter singleton no instantiation graphchangeadapter public di diagram create diagram class type object owner if model get diagram interchange model null return model get diagram interchange model create diagram type owner return null didiagram creatediagram getdiagraminterchangemodel getdiagraminterchangemodel creatediagram public void remove diagram di diagram dd if model get diagram interchange model null model get diagram interchange model delete diagram dd removediagram didiagram getdiagraminterchangemodel getdiagraminterchangemodel deletediagram public di element create element graph model gm object node if model get diagram interchange model null return model get diagram interchange model create element uml mutable graph support gm get di diagram node return null dielement createelement graphmodel getdiagraminterchangemodel getdiagraminterchangemodel createelement umlmutablegraphsupport getdidiagram public void remove element di element element if model get diagram interchange model null model get diagram interchange model delete element element removeelement dielement getdiagraminterchangemodel getdiagraminterchangemodel deleteelement public void node added graph event e object source e get source object arg e get arg if source instanceof fig source fig source get owner if arg instanceof fig arg fig arg get owner model get diagram interchange model node added source arg nodeadded graphevent getsource getarg getowner getowner getdiagraminterchangemodel nodeadded public void edge added graph event e object source e get source object arg e get arg if source instanceof fig source fig source get owner if arg instanceof fig arg fig arg get owner model get diagram interchange model edge added source arg edgeadded graphevent getsource getarg getowner getowner getdiagraminterchangemodel edgeadded public void node removed graph event e object source e get source object arg e get arg if source instanceof fig source fig source get owner if arg instanceof fig arg fig arg get owner model get diagram interchange model node removed source arg noderemoved graphevent getsource getarg getowner getowner getdiagraminterchangemodel noderemoved public void edge removed graph event e object source e get source object arg e get arg if source instanceof fig source fig source get owner if arg instanceof fig arg fig arg get owner model get diagram interchange model edge removed source arg edgeremoved graphevent getsource getarg getowner getowner getdiagraminterchangemodel edgeremoved public void graph changed graph event e object source e get source object arg e get arg if source instanceof fig source fig source get owner if arg instanceof fig arg fig arg get owner model get diagram interchange model graph changed source arg graphchanged graphevent getsource getarg getowner getowner getdiagraminterchangemodel graphchanged constructor public uml multiplicity panel super new border layout multiplicity combo box model new multiplicity combo box model multiplicity check box new multiplicity check box multiplicity combo box new multiplicity combo box multiplicity combo box model action set classifier role multiplicity get instance multiplicity combo box set editable true multiplicity combo box add item listener this add check box border layout west add multiplicity combo box border layout center umlmultiplicitypanel borderlayout multiplicitycomboboxmodel multiplicitycomboboxmodel checkbox multiplicitycheckbox multiplicitycombobox multiplicitycombobox multiplicitycomboboxmodel actionsetclassifierrolemultiplicity getinstance multiplicitycombobox seteditable multiplicitycombobox additemlistener checkbox borderlayout multiplicitycombobox borderlayout enforce that the preferred height is the minimum height this works around a bug in windows laf of jre5 where a change in the preferred min size of a combo has changed and has a knock on effect here if the layout manager for prop panels finds the preferred height is greater than the minimum height then it will allow this component to resize in error see issue 4333 sun has now fixed this bug in jre6 and so this method can be removed once jre5 is no longer supported return the preferred dimension override public dimension get preferred size return new dimension super get preferred size width get minimum size height getpreferredsize getpreferredsize getminimumsize public void item state changed item event event if event get source multiplicity combo box get target null object item multiplicity combo box get selected item object target multiplicity combo box model get target object multiplicity model get facade get multiplicity target if model get facade isa multiplicity item if item equals multiplicity model get core helper set multiplicity target item if multiplicity null model get uml factory delete multiplicity else if item instanceof string if item equals model get facade to string multiplicity model get core helper set multiplicity target model get data types factory create multiplicity string item if multiplicity null model get uml factory delete multiplicity else if multiplicity null model get core helper set multiplicity target null model get uml factory delete multiplicity itemstatechanged itemevent getsource multiplicitycombobox gettarget multiplicitycombobox getselecteditem multiplicitycomboboxmodel gettarget getfacade getmultiplicity getfacade isamultiplicity getcorehelper setmultiplicity getumlfactory getfacade tostring getcorehelper setmultiplicity getdatatypesfactory createmultiplicity getumlfactory getcorehelper setmultiplicity getumlfactory private object get target return multiplicity combo box model get target gettarget multiplicitycomboboxmodel gettarget constructor for uml multiplicity combo box2 param arg0 the combobox model param select action the action public multiplicity combo box uml combo box model2 arg0 action select action super arg0 select action umlmultiplicitycombobox2 selectaction multiplicitycombobox umlcomboboxmodel2 selectaction selectaction on enter the text the user has filled in the textfield is first checked to see if it s a valid multiplicity if so then that is the multiplicity to be set if not the combobox searches for a multiplicity starting with the given text if there is no multiplicity starting with the given text the old value is reset in the comboboxeditor inherit doc override protected void do on edit object item string text string item try object multi model get data types factory create multiplicity text if multi null set selected item text model get uml factory delete multi return catch illegal argument exception e object o search text if o null set selected item o return get editor set item get selected item inheritdoc doonedit getdatatypesfactory createmultiplicity setselecteditem getumlfactory illegalargumentexception setselecteditem geteditor setitem getselecteditem when we change target make sure that the check box is only selected if the multiplicity exists param e see org argouml uml ui uml combo box2 target set org argouml ui targetmanager target event override public void target set target event e super target set e object target get target boolean exists target null model get facade get multiplicity target null multiplicity combo box set enabled exists multiplicity combo box set editable exists this will cause item state changed to be called because of us rather than a user action but we don t care because we re going to check if the value is the same check box set selected exists umlcombobox2 targetset targetevent targetset targetevent targetset gettarget getfacade getmultiplicity multiplicitycombobox setenabled multiplicitycombobox seteditable itemstatechanged checkbox setselected constructor for uml multiplicity combo box model param property set name the name of the property set public multiplicity combo box model string property set name super property set name false umlmultiplicitycomboboxmodel propertysetname multiplicitycomboboxmodel propertysetname propertysetname see org argouml uml ui uml combo box model2 is valid element object protected boolean is valid element object element return element instanceof string umlcomboboxmodel2 isvalidelement isvalidelement protected void build model list set elements multiplicity list object t get target if model get facade isa model element t add element model get facade get multiplicity t buildmodellist setelements multiplicitylist gettarget getfacade isamodelelement addelement getfacade getmultiplicity override public void add element object o if o null return string text if model get facade isa multiplicity o text model get facade to string o if equals text text 1 else if o instanceof string text string o else return if multiplicity list contains text is valid element text multiplicity list add text super add element text addelement getfacade isamultiplicity getfacade tostring multiplicitylist isvalidelement multiplicitylist addelement override public void set selected item object an item add element an item super set selected item an item null null model get facade to string an item setselecteditem anitem addelement anitem setselecteditem anitem getfacade tostring anitem protected object get selected model element if get target null return model get facade to string model get facade get multiplicity get target return null getselectedmodelelement gettarget getfacade tostring getfacade getmultiplicity gettarget implements item listener public multiplicity check box add item listener this itemlistener multiplicitycheckbox additemlistener public void item state changed item event e object target get target object old value model get facade get multiplicity target note multiplicity combo box target set can cause this event as well as user actions so be sure to consider this in changing the following logic if e get state change item event selected string combo text string multiplicity combo box get selected item if old value null combo text equals model get facade to string old value object multi model get data types factory create multiplicity combo text if multi null model get core helper set multiplicity target 1 else model get core helper set multiplicity target multi if old value null model get uml factory delete old value multiplicity combo box set enabled true multiplicity combo box set editable true else multiplicity combo box set enabled false multiplicity combo box set editable false model get core helper set multiplicity target null if old value null model get uml factory delete old value itemstatechanged itemevent gettarget oldvalue getfacade getmultiplicity multiplicitycombobox targetset getstatechange itemevent combotext multiplicitycombobox getselecteditem oldvalue combotext getfacade tostring oldvalue getdatatypesfactory createmultiplicity combotext getcorehelper setmultiplicity getcorehelper setmultiplicity oldvalue getumlfactory oldvalue multiplicitycombobox setenabled multiplicitycombobox seteditable multiplicitycombobox setenabled multiplicitycombobox seteditable getcorehelper setmultiplicity oldvalue getumlfactory oldvalue the constructor param n the name to be localized param p the priority public goal string n int p name translator localize n priority p public int hash code if name null return 0 return name hash code hashcode hashcode public boolean equals object d2 if d2 instanceof goal return false return goal d2 get name equals get name getname getname return the localized name public string get name return name getname public string get name return name param n the localized name public void set name string n name n getname setname public void set name string n name n return the priority public int get priority return priority setname getpriority public int get priority return priority param p the priority public void set priority int p priority p getpriority setpriority see java lang object to string public string to string return get name tostring tostring getname return returns the unspecified goal public static goal get unspecified goal return unspec getunspecifiedgoal the constructor public cr class without component setup head and desc add supported decision uml decision patterns crclasswithoutcomponent setupheadanddesc addsupporteddecision umldecision public boolean predicate2 object dm designer dsgr if dm instanceof uml deployment diagram return no problem uml deployment diagram dd uml deployment diagram dm list set offs compute offenders dd if offs null return no problem return problem found umldeploymentdiagram no_problem umldeploymentdiagram umldeploymentdiagram listset computeoffenders no_problem problem_found public to do item to do item object dm designer dsgr uml deployment diagram dd uml deployment diagram dm list set offs compute offenders dd return new uml to do item this offs dsgr todoitem todoitem umldeploymentdiagram umldeploymentdiagram listset computeoffenders umltodoitem public boolean still valid to do item i designer dsgr if is active return false list set offs i get offenders uml deployment diagram dd uml deployment diagram offs get 0 if predicate dm dsgr return false list set new offs compute offenders dd boolean res offs equals new offs return res stillvalid todoitem isactive listset getoffenders umldeploymentdiagram umldeploymentdiagram listset newoffs computeoffenders newoffs if there are classes that are not inside a component the returned list set is not null then in the list set are the uml deployment diagram and all fig classes with no enclosing fig component param dd the deployment diagram return the set of effenders public list set compute offenders uml deployment diagram dd list figs dd get layer get contents list set offs null iterator fig iter figs iterator while fig iter has next object obj fig iter next if obj instanceof fig class continue fig class fc fig class obj if fc get enclosing fig null model get facade isa component fc get enclosing fig get owner if offs null offs new list set offs add dd offs add fc return offs listset listset umldeploymentdiagram figclasses figcomponent listset computeoffenders umldeploymentdiagram getlayer getcontents listset figiter figiter hasnext figiter figclass figclass figclass getenclosingfig getfacade isacomponent getenclosingfig getowner listset default constructor that registrates the history manager as target listener with the target manager private history manager add target listener this historymanager addtargetlistener puts some target into the history if needed updates both the history as the pointer to indicate the target param target the target to put into the history private void put in history object target if current target 1 only targets we didn t have allready count object the model target target instanceof fig fig target get owner target object old target weak reference history get current target get old target old target instanceof fig fig old target get owner old target if old target the model target return if target null navigate backward if current target 1 history size uml listener add listener target history add new weak reference target current target resize else weak reference ref current target 1 weak reference history get current target null if current target 1 ref get equals target int size history size for int i current target 1 i size i uml listener remove listener history remove current target 1 history add new weak reference target uml listener add listener target current target putinhistory currenttarget themodeltarget getowner oldtarget weakreference currenttarget oldtarget oldtarget oldtarget getowner oldtarget oldtarget themodeltarget navigatebackward currenttarget umllistener addlistener weakreference currenttarget weakreference currenttarget weakreference currenttarget currenttarget currenttarget umllistener removelistener currenttarget weakreference umllistener addlistener currenttarget resizes the history if it s grown too big private void resize int size history size if size max size int oversize size max size int halfsize size 2 if current target halfsize oversize halfsize for int i 0 i oversize i uml listener remove listener history remove 0 current target oversize max_size max_size currenttarget umllistener removelistener currenttarget navigate one target forward in history throws an illegalstate exception if not possible private void navigate forward if current target history size 1 throw new illegal state exception navigate forward is not allowed since the targetpointer is pointing at the upper boundary of the history set target weak reference history get current target get illegalstateexception navigateforward currenttarget illegalstateexception navigateforward settarget weakreference currenttarget navigate one step back in history throws an illegalstateexception if not possible private void navigate backward if current target 0 throw new illegal state exception navigate backward is not allowed since the targetpointer is pointing at the lower boundary of the history navigate backward true if nothing selected go to last selected target if targets size 0 set target weak reference history get current target get else set target weak reference history get current target get navigate backward false navigatebackward currenttarget illegalstateexception navigatebackward navigatebackward settarget weakreference currenttarget settarget weakreference currenttarget navigatebackward checks if it s possible to navigate back return true if it s possible to navigate back private boolean navigate back possible return current target 0 navigatebackpossible currenttarget checks if it s possible to navigate forward return true if it s possible to navigate forward private boolean navigate forward possible return current target history size 1 navigateforwardpossible currenttarget listener for additions of targets to the selected targets on addition of targets we put them in the history see org argouml ui targetmanager target listener target added org argouml ui targetmanager target event public void target added target event e object added targets e get added targets we put the targets backwards in the history since the first target in the added targets array is the first one selected for int i added targets length 1 i 0 i put in history added targets i targetlistener targetadded targetevent targetadded targetevent addedtargets getaddedtargets addedtargets addedtargets putinhistory addedtargets listener for the removal of targets from the selection on removal of a target from the selection we do nothing with respect to the history of targets see org argouml ui targetmanager target listener target removed org argouml ui targetmanager target event public void target removed target event e targetlistener targetremoved targetevent targetremoved targetevent listener for the selection of a whole bunch of targets in one go or just one puts all the new targets in the history starting with the newest target see org argouml ui targetmanager target listener target set org argouml ui targetmanager target event public void target set target event e object new targets e get new targets for int i new targets length 1 i 0 i put in history new targets i targetlistener targetset targetevent targetset targetevent newtargets getnewtargets newtargets putinhistory newtargets cleans the history in total private void clean uml listener remove all listeners history history new array list current target 1 umllistener removealllisteners arraylist currenttarget private void remove history target object o if o instanceof diagram iterator it diagram o get edges iterator while it has next remove history target it next it diagram o get nodes iterator while it has next remove history target it next list iterator it history list iterator while it has next weak reference ref weak reference it next object history object ref get if model get facade isa model element o history object history object instanceof fig fig history object get owner history object if o history object if history index of ref current target current target it remove cannot break here since an object can be multiple times in history removehistorytarget getedges hasnext removehistorytarget getnodes hasnext removehistorytarget listiterator listiterator hasnext weakreference weakreference historyobject getfacade isamodelelement historyobject historyobject historyobject getowner historyobject historyobject indexof currenttarget currenttarget singleton retrieval method return the targetmanager public static target manager get instance return instance targetmanager getinstance singleton constructor should remain private private target manager targetmanager sets the targets to the single given object if there are targets at the moment of calling this method these will be removed as targets to all interested targetlisteners a target event will be fired if the new target o equals the current target no events will be fired nor will the target be re set param o the new target null clears all targets public synchronized void set target object o if is in target transaction return if targets size 0 o null targets size 1 targets get 0 equals o return start target transaction object old targets targets to array uml listener remove all listeners targets targets clear if o null object new target if o instanceof diagram needed for argo startup new target o else new target get owner o targets add new target uml listener add listener new target internal on set target target event target set old targets end target transaction targetevent settarget isintargettransaction starttargettransaction oldtargets toarray umllistener removealllisteners newtarget newtarget newtarget getowner newtarget umllistener addlistener newtarget internalonsettarget targetevent target_set oldtargets endtargettransaction private void internal on set target string event name object old targets target event event new target event this event name old targets targets to array if targets size 0 fig target determine fig target targets get 0 model target determine model target targets get 0 else fig target null model target null if target event target set equals event name fire target set event return else if target event target added equals event name fire target added event return else if target event target removed equals event name fire target removed event return log error unknown event name event name internalonsettarget eventname oldtargets targetevent targetevent eventname oldtargets toarray figtarget determinefigtarget modeltarget determinemodeltarget figtarget modeltarget targetevent target_set eventname firetargetset targetevent target_added eventname firetargetadded targetevent target_removed eventname firetargetremoved eventname eventname returns the current primary target the first selected object the value will be that of the new primary target during a target set target added target removed notification since they are just that notifications that the target s has just changed return the current target or null if no target is selected public synchronized object get target return targets size 0 targets get 0 null targetset targetadded targetremoved gettarget sets the given collection to the current targets if the collection equals the current targets then does nothing when setting the targets a target event will be fired to each interested listener note that the first element returned by an iterator on target list will be taken to be the primary target see get target and that an event will be fired also in case that that element would not equal the element returned by get target note also that any nulls within the collection will be ignored param targets collection the new targets list public synchronized void set targets collection targets collection iterator ntarg if is in target transaction return collection targets list new array list if targets collection null targets list add all targets collection remove duplicates and take care of get owner and remove nulls list modified list new array list iterator it targets list iterator while it has next object o it next o get owner o if o null modified list contains o modified list add o targets list modified list object old targets null check if there are new elements in the list if the old and new list are of the same size set the old targets to the correct selection if targets list size targets size boolean first true ntarg targets list iterator while ntarg has next object targ ntarg next if targ null continue if targets contains targ first targ get target old targets targets to array break first false else old targets targets to array if old targets null return start target transaction uml listener remove all listeners targets targets clear implement set like behaviour the same element may not be added more then once ntarg targets list iterator while ntarg has next object targ ntarg next if targets contains targ continue targets add targ uml listener add listener targ internal on set target target event target set old targets end target transaction targetevent targetlist gettarget gettarget targetscollection settargets targetscollection isintargettransaction targetslist arraylist targetscollection targetslist addall targetscollection getowner modifiedlist arraylist targetslist hasnext getowner modifiedlist modifiedlist targetslist modifiedlist oldtargets oldtargets targetslist targetslist hasnext gettarget oldtargets toarray oldtargets toarray oldtargets starttargettransaction umllistener removealllisteners targetslist hasnext umllistener addlistener internalonsettarget targetevent target_set oldtargets endtargettransaction adds a target to the targets list if the target is already in the targets list then does nothing otherwise the target will be added and an appropriate target event will be fired to all interested listeners since null can never be a target adding null will never do anything param target the target to be added public synchronized void add target object target if target instanceof target listener log warn add target method received a target listener perhaps add target listener was intended target if is in target transaction return object new target get owner target if target null targets contains target targets contains new target return start target transaction object old targets targets to array targets add 0 new target uml listener add listener new target internal on set target target event target added old targets end target transaction targetevent addtarget targetlistener addtarget targetlistener addtargetlistener isintargettransaction newtarget getowner newtarget starttargettransaction oldtargets toarray newtarget umllistener addlistener newtarget internalonsettarget targetevent target_added oldtargets endtargettransaction removes the target from the targets list does nothing if the target does not exist in the targets list fires an appropriate target event to all interested listeners since null can never be a target removing null will never do anything param target the target to remove public synchronized void remove target object target if is in target transaction return if target null targets contains target return start target transaction object old targets targets to array collection c get owner and all figs target targets remove target targets remove all c uml listener remove all listeners c if targets size old targets length internal on set target target event target removed old targets end target transaction targetevent removetarget isintargettransaction starttargettransaction oldtargets toarray getownerandallfigs removeall umllistener removealllisteners oldtargets internalonsettarget targetevent target_removed oldtargets endtargettransaction private collection get owner and all figs object o collection c new array list c add o if o instanceof fig if fig o get owner null o fig o get owner c add o if o instanceof fig project p project manager get manager get current project collection col p find all presentations for o if col null col is empty c add all col return c getownerandallfigs arraylist getowner getowner projectmanager getmanager getcurrentproject findallpresentationsfor isempty addall param o the object return the owner of the fig or if it didn t exist the object itself public object get owner object o if o instanceof fig if fig o get owner null o fig o get owner return o getowner getowner getowner returns a list of all targets returns an empty list if there are no targets if there are several targets then the first object by an iterator on the returned list or the zero th object in an array on this list is guaranteed to be the object returned by link get single target the value will be that of the new target s during a target set target added target removed notification since they are just that notifications that the target s has just changed return a list with all targets public synchronized list get targets return collections unmodifiable list targets getsingletarget targetset targetadded targetremoved gettargets unmodifiablelist if there is only one target then it is returned otherwise null return the one and only target public synchronized object get single target return targets size 1 targets get 0 null getsingletarget return the target from the model public synchronized collection get model targets array list t new array list iterator iter get targets iterator while iter has next t add determine model target iter next return t getmodeltargets arraylist arraylist gettargets hasnext determinemodeltarget if there is only one model target then it is returned otherwise null return the single model target public synchronized object get single model target int i 0 iterator iter get targets iterator while iter has next if determine model target iter next null i if i 1 break if i 1 return model target return null getsinglemodeltarget gettargets hasnext determinemodeltarget modeltarget adds a listener param listener the listener to add public void add target listener target listener listener listener list add target listener class listener addtargetlistener targetlistener listenerlist targetlistener removes a listener param listener the listener to remove public void remove target listener target listener listener listener list remove target listener class listener removetargetlistener targetlistener listenerlist targetlistener private void fire target set target event target event guaranteed to return a non null array object listeners listener list get listener list for int i listeners length 2 i 0 i 2 try if listeners i target listener class lazily create the event target listener listeners i 1 target set target event catch runtime exception e log error while calling target set for target event in listeners i 1 an error is thrown e e print stack trace firetargetset targetevent targetevent listenerlist getlistenerlist targetlistener targetlistener targetset targetevent runtimeexception targetset targetevent printstacktrace private void fire target added target event target event guaranteed to return a non null array object listeners listener list get listener list for int i listeners length 2 i 0 i 2 try if listeners i target listener class lazily create the event target listener listeners i 1 target added target event catch runtime exception e log error while calling target added for target event in listeners i 1 an error is thrown e e print stack trace firetargetadded targetevent targetevent listenerlist getlistenerlist targetlistener targetlistener targetadded targetevent runtimeexception targetadded targetevent printstacktrace private void fire target removed target event target event guaranteed to return a non null array object listeners listener list get listener list for int i listeners length 2 i 0 i 2 try if listeners i target listener class lazily create the event target listener listeners i 1 target removed target event catch runtime exception e log warn while calling target removed for target event in listeners i 1 an error is thrown e firetargetremoved targetevent targetevent listenerlist getlistenerlist targetlistener targetlistener targetremoved targetevent runtimeexception targetremoved targetevent private void start target transaction in transaction true starttargettransaction intransaction private boolean is in target transaction return in transaction isintargettransaction intransaction private void end target transaction in transaction false endtargettransaction intransaction convenience method to return the target as fig if the current target retrieved by get target is either a fig itself or the owner of a fig this fig will be returned otherwise null will be returned return the target in it s fig form public fig get fig target return fig target gettarget getfigtarget figtarget calculates the most probable fig form of some target beware the result does not depend on the current diagram param target the target to calculate the fig form for return the fig form private fig determine fig target object target if target instanceof fig project p project manager get manager get current project collection col p find figs for member target if col null col is empty target null else target col iterator next return target instanceof fig fig target null determinefigtarget projectmanager getmanager getcurrentproject findfigsformember isempty returns the target in it s modelform if the target retrieved by get target is an uml diagram or a uml element the target will be returned if the target is a fig but owned by a modelelement that modelelement will be returned otherwise null will be returned return the target in it s modelform public object get model target return model target gettarget umldiagram getmodeltarget modeltarget calculates the modeltarget param target the target to calculate the modeltarget for return the modeltarget private object determine model target object target if target instanceof fig object owner fig target get owner if model get facade isauml element owner target owner return target instanceof diagram model get facade isauml element target target null determinemodeltarget getowner getfacade isaumlelement getfacade isaumlelement navigates the target pointer one target forward this implements together with navigate backward browser like functionality throws illegal state exception if the target pointer is at the end of the history public void navigate forward throws illegal state exception history manager navigate forward log debug navigate forward navigatebackward illegalstateexception navigateforward illegalstateexception historymanager navigateforward navigates the target pointer one target backward this implements together with navigate forward browser like functionality throws illegal state exception if the target pointer is at the beginning of the history public void navigate backward throws illegal state exception history manager navigate backward log debug navigate backward navigateforward illegalstateexception navigatebackward illegalstateexception historymanager navigatebackward checks if it s possible to navigate forward return true if it is possible to navigate forward public boolean navigate forward possible return history manager navigate forward possible navigateforwardpossible historymanager navigateforwardpossible checks if it s possible to navigate backward return true if it s possible to navigate backward public boolean navigate back possible return history manager navigate back possible navigatebackpossible historymanager navigatebackpossible cleans the history needed for the j unit tests and when instantiating a new project public void clean history history manager clean junit cleanhistory historymanager param o the object to be removed public void remove history element object o history manager remove history target o removehistoryelement historymanager removehistorytarget protected remover listen for the removal of diagrams from project project manager get manager add property change listener this projectmanager getmanager addpropertychangelistener private void add listener object o if model get facade isa model element o model get pump add model event listener this o remove else if o instanceof diagram figs on a diagram without an owning model element diagram o add property change listener this else if o instanceof notification emitter comment edge the owner of a fig edge note notification emitter o add notification listener this null o addlistener getfacade isamodelelement getpump addmodeleventlistener addpropertychangelistener notificationemitter commentedge figedgenote notificationemitter addnotificationlistener private void remove listener object o if model get facade isa model element o model get pump remove model event listener this o remove else if o instanceof diagram diagram o remove property change listener this else if o instanceof notification emitter try notification emitter o remove notification listener this catch listener not found exception e log error notification listener for comment edge not found e removelistener getfacade isamodelelement getpump removemodeleventlistener removepropertychangelistener notificationemitter notificationemitter removenotificationlistener listenernotfoundexception commentedge private void remove all listeners collection c iterator i c iterator while i has next remove listener i next removealllisteners hasnext removelistener public void property change property change event evt if remove equals evt get property name remove evt get source propertychange propertychangeevent getpropertyname getsource public void handle notification notification notification object handback if remove equals notification get type remove notification get source handlenotification gettype getsource protected abstract void remove object obj private class target remover extends remover protected void remove object obj remove target obj targetremover removetarget private class history remover extends remover protected void remove object obj history manager remove history target obj historyremover historymanager removehistorytarget constructor for uml association end specification list model public uml association end specification list model super specification umlassociationendspecificationlistmodel umlassociationendspecificationlistmodel protected void build model list if get target null set all elements model get facade get specifications get target buildmodellist gettarget setallelements getfacade getspecifications gettarget see org argouml uml ui uml model element list model2 is valid element object protected boolean is valid element object o return model get facade isa classifier o model get facade get specifications get target contains o umlmodelelementlistmodel2 isvalidelement isvalidelement getfacade isaclassifier getfacade getspecifications gettarget constructor for uml state vertex incoming list model public uml state vertex incoming list model super incoming umlstatevertexincominglistmodel umlstatevertexincominglistmodel protected void build model list array list c new array list model get facade get incomings get target if model get facade isa state get target array list i new array list model get facade get internal transitions get target c remove all i set all elements c buildmodellist arraylist arraylist getfacade getincomings gettarget getfacade isastate gettarget arraylist arraylist getfacade getinternaltransitions gettarget removeall setallelements protected boolean is valid element object element array list c new array list model get facade get incomings get target if model get facade isa state get target array list i new array list model get facade get internal transitions get target c remove all i return c contains element isvalidelement arraylist arraylist getfacade getincomings gettarget getfacade isastate gettarget arraylist arraylist getfacade getinternaltransitions gettarget removeall the constructor param state the state represented by the notation public state body notation uml object state super state statebodynotationuml public void parse object model element string text try parse state body model element text catch parse exception pe string msg statusmsg bar error parsing statebody object args pe get localized message integer value of pe get error offset argo event pump fire event new argo help event argo event types help changed this translator message format msg args modelelement parsestatebody modelelement parseexception getlocalizedmessage valueof geterroroffset argoeventpump fireevent argohelpevent argoeventtypes help_changed messageformat see org argouml uml notation notation provider get parsing help public string get parsing help return parsing help fig statebody notationprovider getparsinghelp getparsinghelp override public string to string object model element notation settings settings return to string model element tostring modelelement notationsettings tostring modelelement suppress warnings deprecation deprecated public string to string object model element map args return to string model element suppresswarnings tostring modelelement tostring modelelement private string to string object model element string buffer s new string buffer object entry action model get facade get entry model element object exit action model get facade get exit model element object do action model get facade get do activity model element if entry action null string entry str notation utility uml generate action sequence entry action s append entry append entry str if do action null string do str notation utility uml generate action sequence do action if s length 0 s append n s append do append do str if exit action null string exit str notation utility uml generate action sequence exit action if s length 0 s append n s append exit append exit str collection internaltrans model get facade get internal transitions model element if internaltrans null for object trans internaltrans if s length 0 s append n todo is this a good way of handling nested notation s append new transition notation uml trans to string trans notation settings get default settings return s to string tostring modelelement stringbuffer stringbuffer entryaction getfacade getentry modelelement exitaction getfacade getexit modelelement doaction getfacade getdoactivity modelelement entryaction entrystr notationutilityuml generateactionsequence entryaction entrystr doaction dostr notationutilityuml generateactionsequence doaction dostr exitaction exitstr notationutilityuml generateactionsequence exitaction exitstr getfacade getinternaltransitions modelelement transitionnotationuml tostring notationsettings getdefaultsettings tostring parse user input for state bodies and assign the individual lines to according actions or transitions the user input consists of multiple lines like pre action label action expression pre or the format of a regular transition see parse transition p action label stands for one of entry do and exit the words entry do and exit are case independent param st the state object param s the string to parse throws parse exception when there is a syntax problem e g non matching brackets or protected void parse state body object st string s throws parse exception boolean found entry false boolean found exit false boolean found do false generate all the existing internal transitions so that we can compare them as text with the newly entered ones model element info list internals info new model element info list model get facade get internal transitions st string tokenizer lines new string tokenizer s n r while lines has more tokens string line lines next token trim now let s check if the new line is already present in the old list of internal transitions if it is then mark the old one to be retained i e do not create a new one if it isn t continue with parsing if internals info check retain line if line to lower case starts with entry line substring 5 trim starts with parse state entry action st line found entry true else if line to lower case starts with exit line substring 4 trim starts with parse state exit action st line found exit true else if line to lower case starts with do line substring 2 trim starts with parse state do action st line found do true else object t model get state machines factory build internal transition st if t null continue todo if the next line trows an exception then what do we do with the remainder of the parsed to be parsed lines todo is this a good way of handling nested notation the following fails the tests new transition notation uml t parse line new transition notation uml t parse transition t line add this new one and mark it to be retained internals info add t true if found entry delete model get facade get entry st if found exit delete model get facade get exit st if found do delete model get facade get do activity st process the final list of internal transitions and hook it to the state model get state machines helper set internal transitions st internals info finalised list parsetransition parseexception parsestatebody parseexception foundentry foundexit founddo modelelementinfolist internalsinfo modelelementinfolist getfacade getinternaltransitions stringtokenizer stringtokenizer hasmoretokens nexttoken internalsinfo checkretain tolowercase startswith startswith parsestateentryaction foundentry tolowercase startswith startswith parsestateexitaction foundexit tolowercase startswith startswith parsestatedoaction founddo getstatemachinesfactory buildinternaltransition transitionnotationuml transitionnotationuml parsetransition internalsinfo foundentry getfacade getentry foundexit getfacade getexit founddo getfacade getdoactivity getstatemachineshelper setinternaltransitions internalsinfo finalisedlist the constructor param obj the uml object info item object obj uml object obj generator new transition notation uml obj infoitem umlobject transitionnotationuml the constructor param obj the uml object param r info item object obj boolean r this obj retain it r infoitem retainit return the generated string representation string get generated return generator to string getgenerated tostring return the uml object object get uml object return uml object getumlobject umlobject retain this uml object void retain retain it true retainit return true if the uml object is to be retained false if it is to be deleted boolean is retained return retain it isretained retainit the constructor param c the collection of the uml objects that were present before model element info list collection c the list new array list info item for object obj c the list add new info item obj modelelementinfolist thelist arraylist infoitem thelist infoitem param obj the uml object param r true if this uml object needs to be retained void add object obj boolean r the list add new info item obj r thelist infoitem check the given textual description and if already present in the list then retain it param line the given textual description return true if the item was already present in the list boolean check retain string line for info item t info the list if t info get generated equals line t info retain return true return false checkretain infoitem tinfo thelist tinfo getgenerated tinfo finish the procedure by deleting the uml model items that are not to be retained and return a collection of the ones to be retained this method should only be called once return the uml objects that survive collection finalised list don t forget to remove old internals collection object new model elements list new array list object for info item t info the list if t info is retained new model elements list add t info get uml object else delete t info get uml object make next accesses to this instance predictable the list clear and hook in the new ones return new model elements list finalisedlist newmodelelementslist arraylist infoitem tinfo thelist tinfo isretained newmodelelementslist tinfo getumlobject tinfo getumlobject thelist newmodelelementslist parse a line of the form entry action and create an action we do not need to check for the presence of the word entry that is done by the caller param st the state object param s the string to be parsed private void parse state entry action object st string s if s index of 1 s s substring s index of 1 trim object old entry model get facade get entry st if old entry null model get state machines helper set entry st build new call action s else update action old entry s parsestateentryaction indexof indexof oldentry getfacade getentry oldentry getstatemachineshelper setentry buildnewcallaction updateaction oldentry parse a line of the form exit action and create an action we do not need to check for the presence of the word exit that is done by the caller param st the state object param s the string to be parsed private void parse state exit action object st string s if s index of 1 s s substring s index of 1 trim object old exit model get facade get exit st if old exit null model get state machines helper set exit st build new call action s else update action old exit s parsestateexitaction indexof indexof oldexit getfacade getexit oldexit getstatemachineshelper setexit buildnewcallaction updateaction oldexit parse a line of the form do action and create an action we do not need to check for the presence of the word do that is done by the caller param st the state object param s the string to be parsed private void parse state do action object st string s if s index of 1 s s substring s index of 1 trim object old do model get facade get do activity st if old do null model get state machines helper set do activity st build new call action s else update action old do s parsestatedoaction indexof indexof olddo getfacade getdoactivity olddo getstatemachineshelper setdoactivity buildnewcallaction updateaction olddo this builds a call action with default attributes but without operation author mvw param s string representing the script of the action return the newly created call action private object build new call action string s object a model get common behavior factory create call action object ae model get data types factory create action expression language s model get common behavior helper set script a ae model get core helper set name a anon return a callaction callaction buildnewcallaction getcommonbehaviorfactory createcallaction getdatatypesfactory createactionexpression getcommonbehaviorhelper setscript getcorehelper setname update an existing action with a new script author mvw param old the action param s a string representing a new script for the action expression private void update action object old string s object ae model get facade get script old the action expression string language language if ae null language model get data types helper get language ae string body string model get facade get body ae if body equals s return ae model get data types factory create action expression language s model get common behavior helper set script old ae actionexpression updateaction getfacade getscript actionexpression getdatatypeshelper getlanguage getfacade getbody getdatatypesfactory createactionexpression getcommonbehaviorhelper setscript this deletes modelelements and swallows null without barking author michiel param obj the modelelement to be deleted private void delete object obj if obj null model get uml factory delete obj getumlfactory the constructor public cr no instance variables setup head and desc add supported decision uml decision storage set knowledge types critic kt completeness add trigger structural feature crnoinstancevariables setupheadanddesc addsupporteddecision umldecision setknowledgetypes kt_completeness addtrigger structuralfeature override public boolean predicate2 object dm designer dsgr if model get facade isa class dm return no problem if model get facade is primary object dm return no problem if the object does not have a name than no problem if model get facade get name dm null equals model get facade get name dm return no problem types can probably have variables but we should not nag at them not having any if model get facade is type dm return no problem utility is a namespace collection also not strictly required to have variables if model get facade is utility dm return no problem if find changeable instance attribute in inherited dm 0 return no problem return problem found getfacade isaclass no_problem getfacade isprimaryobject no_problem getfacade getname getfacade getname no_problem getfacade istype no_problem getfacade isutility no_problem findchangeableinstanceattributeininherited no_problem problem_found see org argouml cognitive poster get clarifier override public icon get clarifier return cl attribute compartment get the instance getclarifier getclarifier clattributecompartment gettheinstance searches for attributes that are changeable instance attributes param dm the classifier to examine param depth number of levels searched return true if an attribute can be found in this class or in any of its generalizations private boolean find changeable instance attribute in inherited object dm int depth iterator attribs model get facade get attributes dm iterator while attribs has next object attr attribs next if we find an instance variable that is not a constant we have succeeded if model get facade is static attr model get facade is read only attr return true i am only prepared to go this far if depth max depth return false iterator iter model get facade get generalizations dm iterator while iter has next object parent model get facade get general iter next if parent dm continue if model get facade isa classifier parent find changeable instance attribute in inherited parent depth 1 return true return false findchangeableinstanceattributeininherited getfacade getattributes hasnext getfacade isstatic getfacade isreadonly max_depth getfacade getgeneralizations hasnext getfacade getgeneral getfacade isaclassifier findchangeableinstanceattributeininherited override public void init wizard wizard w if w instanceof wiz add instance variable string ins super get instructions string sug super get default suggestion wiz add instance variable w set instructions ins wiz add instance variable w set suggestion sug initwizard wizaddinstancevariable getinstructions getdefaultsuggestion wizaddinstancevariable setinstructions wizaddinstancevariable setsuggestion see org argouml cognitive critics critic get wizard class org argouml cognitive to do item override public class get wizard class to do item item return wiz add instance variable class getwizardclass todoitem getwizardclass todoitem wizaddinstancevariable public set object get criticized design materials set object ret new hash set object ret add model get meta types getuml class return ret getcriticizeddesignmaterials hashset getmetatypes getumlclass create a tab that contains a toolbar then add a language selector onto it public tab src super tab source true if predicates null predicates new array list predicate add a predicate for argouml s default capabilities predicates add new default predicate set editable false lang name language cb lang get selected item file name null get toolbar add cb lang get toolbar add separator cb lang add item listener this get toolbar add cb files get toolbar add separator cb files add item listener this tabsrc arraylist defaultpredicate seteditable langname cblang getselecteditem filename gettoolbar cblang gettoolbar addseparator cblang additemlistener gettoolbar cbfiles gettoolbar addseparator cbfiles additemlistener override protected void finalize cb lang remove item listener this cblang removeitemlistener populate files and cb files using the specified element private void generate source object elem log debug tab src gen text getting src for model get facade get name elem collection code generator helper generate lang name elem false cb files remove all items if code is empty files new source unit code size files source unit code to array files for int i 0 i files length i string builder title new string builder files i get name if files i get base path length 0 title append files i get full name cb files add item title to string cbfiles generatesource tabsrc gentext getfacade getname generatorhelper langname cbfiles removeallitems isempty sourceunit sourceunit toarray stringbuilder stringbuilder getname getbasepath getfullname cbfiles additem tostring override protected string gen text object model object if files null generate source model object if files null files length cb files get selected index return files cb files get selected index get content return null gentext modelobject generatesource modelobject cbfiles getselectedindex cbfiles getselectedindex getcontent override protected void parse text string s log debug tab src setting src for model get facade get name get target object model object get target if get target instanceof fig node model object fig node get target get owner if get target instanceof fig edge model object fig edge get target get owner if model object null return todo implement this parser parse and update model object s parsetext tabsrc getfacade getname gettarget modelobject gettarget gettarget fignode modelobject fignode gettarget getowner gettarget figedge modelobject figedge gettarget getowner modelobject parseandupdate modelobject override public void set target object t object model target t instanceof fig fig t get owner t set should be enabled model get facade isa classifier model target cb files remove all items files null super set target t settarget modeltarget getowner setshouldbeenabled getfacade isaclassifier modeltarget cbfiles removeallitems settarget determines if the current tab should be enabled with the given target returns true if the given target is or represents a classifier inherit doc override public boolean should be enabled object target target target instanceof fig fig target get owner target set should be enabled false for predicate p predicates if p evaluate target set should be enabled true return should be enabled inheritdoc shouldbeenabled getowner setshouldbeenabled setshouldbeenabled shouldbeenabled public void item state changed item event event if event get source cb lang if event get state change item event selected language new lang language cb lang get selected item if new lang equals lang name lang name new lang refresh else if event get source cb files if event get state change item event selected string new file string cb files get selected item if new file equals file name file name new file super set target get target itemstatechanged itemevent getsource cblang getstatechange itemevent newlang cblang getselecteditem newlang langname langname newlang getsource cbfiles getstatechange itemevent newfile cbfiles getselecteditem newfile filename filename newfile settarget gettarget override public void refresh set target get target settarget gettarget this function allows extra predicates to be added the predicates are conditions for cases where the tab src should show source code if a plugin module is able to generate code for certain objects for which argouml itself does not generate code then this function will allow the module to show the tab param predicate the predicate to be added public static void add predicate predicate predicate predicates add predicate tabsrc addpredicate class default predicate implements predicate public boolean evaluate object object return model get facade isa classifier object defaultpredicate getfacade isaclassifier the constructor public splash screen this loading argouml splash splashscreen the constructor param title the title of the window param icon name the icon for the window private splash screen string title string icon name super set cursor cursor get predefined cursor cursor wait cursor get content pane set layout new border layout 0 0 splash panel panel new splash panel icon name if panel get image null int img width panel get image get icon width int img height panel get image get icon height point scr center graphics environment get local graphics environment get center point set location scr center x img width 2 scr center y img height 2 j panel splash new j panel new border layout splash set border new etched border etched border raised splash add panel border layout center splash add status bar border layout south get content pane add splash add preloading progress bar dimension content pane size get content pane get preferred size set size content pane size width content pane size height pack iconname splashscreen iconname setcursor getpredefinedcursor wait_cursor getcontentpane setlayout borderlayout splashpanel splashpanel iconname getimage imgwidth getimage geticonwidth imgheight getimage geticonheight scrcenter graphicsenvironment getlocalgraphicsenvironment getcenterpoint setlocation scrcenter imgwidth scrcenter imgheight jpanel jpanel borderlayout setborder etchedborder etchedborder borderlayout statusbar borderlayout getcontentpane contentpanesize getcontentpane getpreferredsize setsize contentpanesize contentpanesize return the status bar of this dialog public status bar get status bar return status bar statusbar getstatusbar statusbar see org tigris gef ui i status bar show status java lang string public void show status string s status bar show status s istatusbar showstatus showstatus statusbar showstatus override public void paint graphics g super paint g if paint called synchronized this paint called true notify all paintcalled paintcalled notifyall param called true if paint is already called public void set paint called boolean called this paint called called setpaintcalled paintcalled return true if paint is already called public boolean is paint called return paint called ispaintcalled paintcalled param trans the translator public static void set translator abstract cognitive translator trans translator trans settranslator abstractcognitivetranslator param key the key for the string to be localized return the localized string public static string localize string key return translator null translator i18nlocalize key key param key the key for the string to be localized param args arguments that will be inserted in the string return the localized string containing the arguments public static string message format string key object args return translator null translator i18nmessage format key args key messageformat i18nmessageformat constructs a uml add dialog with a uml list cell renderer modelelements are represented with their names in the choices list and the selected list param the choices a list containing the choices a user has param preselected a list containing the preselected choices param the title the title of the dialog param multiselect allowed true if the user may select multiple choices param is exclusive true if choices in the selected list may not appear in the choices list if true preselected choices are removed from the choices list public uml add dialog final list the choices final list preselected final string the title final boolean multiselect allowed final boolean is exclusive this the choices preselected the title new uml list cell renderer2 true multiselect allowed is exclusive umladddialog umllistcellrenderer thechoices thetitle multiselectallowed isexclusive umladddialog thechoices thetitle multiselectallowed isexclusive thechoices thetitle umllistcellrenderer2 multiselectallowed isexclusive constructs a uml add dialog with a given uml list cell renderer param the choices a list containing the choices a user has param preselected a list containing the preselected choices param the title the title of the dialog param renderer the cellrenderer of the choices list and the selected list param multiselect allowed true if the user may select multiple choices param is exclusive true if choices in the selected list may not appear in the choices list if true preselected choices are removed from the choices list public uml add dialog final list the choices final list preselected final string the title final list cell renderer renderer final boolean multiselect allowed final boolean is exclusive multi select allowed multiselect allowed if the choices null throw new illegal argument exception there should always be choices in uml add dialog exclusive is exclusive list choices new array list the choices if is exclusive preselected null preselected is empty choices remove all preselected if the title null title the title else title set layout new border layout j panel upper panel new j panel j panel panel choices new j panel new border layout j panel panel selected new j panel new border layout choices list new j list construct list model choices choices list set minimum size new dimension 150 300 if renderer null choices list set cell renderer renderer if multiselect allowed choices list set selection mode list selection model multiple interval selection else choices list set selection mode list selection model single selection choices list set visible row count 15 j scroll pane choices scroll new j scroll pane choices list panel choices add new j label translator localize label choices border layout north panel choices add choices scroll border layout center add button new j button resource loader wrapper lookup icon resource navigate forward add button add action listener this remove button new j button resource loader wrapper lookup icon resource navigate back remove button add action listener this box button box box create vertical box button box add box create rigid area new dimension 0 20 button box add add button button box add box create rigid area new dimension 0 5 button box add remove button selected list new j list construct list model preselected selected list set minimum size new dimension 150 300 if renderer null selected list set cell renderer renderer selected list set selection mode list selection model multiple interval selection selected list set visible row count 15 j scroll pane selected scroll new j scroll pane selected list panel selected add new j label translator localize label selected border layout north panel selected add selected scroll border layout center upper panel add panel choices upper panel add box create rigid area new dimension 5 0 upper panel add button box upper panel add box create rigid area new dimension 5 0 upper panel add panel selected upper panel set border border factory create etched border add upper panel border layout north j panel ok cancel panel new j panel new flow layout flow layout right ok button new j button translator localize button ok ok button add action listener this cancel button new j button translator localize button cancel cancel button add action listener this ok cancel panel add ok button ok cancel panel add cancel button ok cancel panel set border border factory create empty border 10 0 10 10 add ok cancel panel border layout south set border border factory create empty border 20 10 20 10 update umladddialog umllistcellrenderer thechoices thetitle multiselectallowed isexclusive umladddialog thechoices thetitle listcellrenderer multiselectallowed isexclusive multiselectallowed multiselectallowed thechoices illegalargumentexception umladddialog isexclusive arraylist thechoices isexclusive isempty removeall thetitle thetitle setlayout borderlayout jpanel upperpanel jpanel jpanel panelchoices jpanel borderlayout jpanel panelselected jpanel borderlayout choiceslist jlist constructlistmodel choiceslist setminimumsize choiceslist setcellrenderer multiselectallowed choiceslist setselectionmode listselectionmodel multiple_interval_selection choiceslist setselectionmode listselectionmodel single_selection choiceslist setvisiblerowcount jscrollpane choicesscroll jscrollpane choiceslist panelchoices jlabel borderlayout panelchoices choicesscroll borderlayout addbutton jbutton resourceloaderwrapper lookupiconresource navigateforward addbutton addactionlistener removebutton jbutton resourceloaderwrapper lookupiconresource navigateback removebutton addactionlistener buttonbox createverticalbox buttonbox createrigidarea buttonbox addbutton buttonbox createrigidarea buttonbox removebutton selectedlist jlist constructlistmodel selectedlist setminimumsize selectedlist setcellrenderer selectedlist setselectionmode listselectionmodel multiple_interval_selection selectedlist setvisiblerowcount jscrollpane selectedscroll jscrollpane selectedlist panelselected jlabel borderlayout panelselected selectedscroll borderlayout upperpanel panelchoices upperpanel createrigidarea upperpanel buttonbox upperpanel createrigidarea upperpanel panelselected upperpanel setborder borderfactory createetchedborder upperpanel borderlayout jpanel okcancelpanel jpanel flowlayout flowlayout okbutton jbutton okbutton addactionlistener cancelbutton jbutton cancelbutton addactionlistener okcancelpanel okbutton okcancelpanel cancelbutton okcancelpanel setborder borderfactory createemptyborder okcancelpanel borderlayout setborder borderfactory createemptyborder public void action performed action event e object source e get source if source equals add button add selection update if source equals remove button remove selection update if source equals ok button ok if source equals cancel button cancel actionperformed actionevent getsource addbutton addselection removebutton removeselection okbutton cancelbutton updates the add and remove button sets enabled disabled called whenever the model is changed private void update if choices list get model get size 0 add button set enabled false else add button set enabled true if selected list get model get size 0 remove button set enabled false else remove button set enabled true if selected list get model get size 1 multi select allowed add button set enabled false ok button set enabled false else add button set enabled true ok button set enabled true choiceslist getmodel getsize addbutton setenabled addbutton setenabled selectedlist getmodel getsize removebutton setenabled removebutton setenabled selectedlist getmodel getsize multiselectallowed addbutton setenabled okbutton setenabled addbutton setenabled okbutton setenabled utility method to construct a abstract list model from a list param list the given list return abstract list model protected abstract list model construct list model list list sorted list model model new sorted list model if list null model add all list return model abstractlistmodel abstractlistmodel abstractlistmodel constructlistmodel sortedlistmodel sortedlistmodel addall shows the dialog first a dialog must be constructed using one of the constructors of this class after that this method should be called to actually show the dialog this method returns either j option pane ok option if the user wants to select his choices or j option pane cancel option if he does not want to param parent the parent frame of this dialog return int the returnvalue can be either j option pane ok option or j option pane cancel option public int show dialog component parent frame frame parent instanceof frame frame parent frame swing utilities get ancestor of class frame class parent string title getui get dialog title this dialog new j dialog frame title true container content pane dialog get content pane content pane set layout new border layout content pane add this border layout center dialog set default close operation window constants do nothing on close dialog add window listener new window adapter public void window closing window event we cancel dialog pack dialog set location relative to parent dialog set visible true return return value joptionpane ok_option joptionpane cancel_option joptionpane ok_option joptionpane cancel_option showdialog swingutilities getancestorofclass getdialogtitle jdialog contentpane getcontentpane contentpane setlayout borderlayout contentpane borderlayout setdefaultcloseoperation windowconstants do_nothing_on_close addwindowlistener windowadapter windowclosing windowevent setlocationrelativeto setvisible returnvalue dialog set default close operation window constants do nothing on close dialog add window listener new window adapter public void window closing window event we cancel setdefaultcloseoperation windowconstants do_nothing_on_close addwindowlistener windowadapter windowclosing windowevent returns the choices a user can make return list of choices private list get choices list result new array list for int index choices list get selected indices result add choices list get model get element at index return result getchoices arraylist choiceslist getselectedindices choiceslist getmodel getelementat returns the selected elements in the selected list return list private list get selected choices list result new array list for int index selected list get selected indices result add selected list get model get element at index return result getselectedchoices arraylist selectedlist getselectedindices selectedlist getmodel getelementat returns the elements of the right hand selected list note that these are not the elements selected ie highlighted in the swing sense but rather the entire contents of the list containing the user selections return a vector of selected elements public vector get selected vector result new vector list model list selected list get model for int i 0 i list get size i result add list get element at i return result getselected listmodel selectedlist getmodel getsize getelementat adds the selected elements in the choices list to the selected list private void add selection list the choices get choices if exclusive sorted list model choices list get model remove all the choices sorted list model selected list get model add all the choices addselection thechoices getchoices sortedlistmodel choiceslist getmodel removeall thechoices sortedlistmodel selectedlist getmodel addall thechoices removes the selected elements in the selected list and adds them to the choices list the gui will be updated by the list model listeners private void remove selection list the choices get selected choices sorted list model selected list get model remove all the choices if exclusive sorted list model choices list get model add all the choices listmodel removeselection thechoices getselectedchoices sortedlistmodel selectedlist getmodel removeall thechoices sortedlistmodel choiceslist getmodel addall thechoices called when the ok button is pressed closes this dialog and sets the return value to j option pane ok option private void ok if dialog null dialog set visible false return value j option pane ok option joptionpane ok_option setvisible returnvalue joptionpane ok_option called when the cancel button is pressed closes this dialog and sets the returnvalue to j option pane cancel option the state of any selections is indeterminate after cancel is called private void cancel if dialog null dialog set visible false return value j option pane cancel option joptionpane cancel_option setvisible returnvalue joptionpane cancel_option constructor public action class diagram super action class diagram actionclassdiagram suppress warnings deprecation override public argo diagram create diagram object ns if is valid namespace ns return diagram factory get instance create diagram diagram factory diagram type class ns null log error no namespace as argument log error ns throw new illegal argument exception the argument ns is not a namespace suppresswarnings argodiagram creatediagram isvalidnamespace diagramfactory getinstance creatediagram diagramfactory diagramtype illegalargumentexception override public argo diagram create diagram object ns diagram settings settings if is valid namespace ns return diagram factory get instance create diagram factory diagram type class ns settings log error no namespace as argument log error ns throw new illegal argument exception the argument ns is not a namespace argodiagram creatediagram diagramsettings isvalidnamespace diagramfactory getinstance diagramfactory diagramtype illegalargumentexception see org argouml uml ui action add diagram is valid namespace object public boolean is valid namespace object handle return model get facade isa namespace handle actionadddiagram isvalidnamespace isvalidnamespace getfacade isanamespace the constructor of a compound critic public compound critic compoundcritic the constructor param c1 the first critic that makes up the compound critic param c2 the 2nd critic that makes up the compound critic public compound critic critic c1 critic c2 this critics add c1 critics add c2 compoundcritic the constructor param c1 the first critic that makes up the compound critic param c2 the 2nd critic that makes up the compound critic param c3 the 3rd critic that makes up the compound critic public compound critic critic c1 critic c2 critic c3 this c1 c2 critics add c3 compoundcritic the constructor param c1 the first critic that makes up the compound critic param c2 the 2nd critic that makes up the compound critic param c3 the 3rd critic that makes up the compound critic param c4 the 4th critic that makes up the compound critic public compound critic critic c1 critic c2 critic c3 critic c4 this c1 c2 c3 critics add c4 compoundcritic param c the new list of critics that completely replaces the old list public void set critics list critic c critics c setcritics return the complete list of critics public list critic get critic list return critics getcriticlist param c the critic to be added at the end of the current list public void add critic critic c critics add c addcritic param c the critic to be removed public void remove critic critic c critics remove c removecritic override public void critique object dm designer dsgr for critic c critics if c is active c predicate dm dsgr to do item item c to do item dm dsgr post item item dm dsgr return once one criticism is found exit isactive todoitem todoitem postitem override public boolean supports decision d for critic c critics if c supports d return true return false see org argouml cognitive poster get supported decisions override public list decision get supported decisions throw new unsupported operation exception getsupporteddecisions getsupporteddecisions unsupportedoperationexception see org argouml cognitive critics critic add supported decision org argouml cognitive decision override public void add supported decision decision d throw new unsupported operation exception addsupporteddecision addsupporteddecision unsupportedoperationexception override public boolean supports goal g for critic c critics if c supports g return true return false see org argouml cognitive poster get supported goals override public list goal get supported goals throw new unsupported operation exception getsupportedgoals getsupportedgoals unsupportedoperationexception see org argouml cognitive critics critic add supported goal org argouml cognitive goal override public void add supported goal goal g throw new unsupported operation exception addsupportedgoal addsupportedgoal unsupportedoperationexception override public boolean contains knowledge type string type for critic c critics if c contains knowledge type type return true return false containsknowledgetype containsknowledgetype see org argouml cognitive critics critic add knowledge type java lang string override public void add knowledge type string type throw new unsupported operation exception addknowledgetype addknowledgetype unsupportedoperationexception see org argouml cognitive poster expand java lang string list set override public string expand string desc list set offs throw new unsupported operation exception listset listset unsupportedoperationexception see org argouml cognitive poster get clarifier override public icon get clarifier throw new unsupported operation exception getclarifier getclarifier unsupportedoperationexception override public boolean is active for critic c critics if c is active return true return false isactive isactive see org argouml cognitive critics critic is enabled override public boolean is enabled return true isenabled isenabled org argouml cognitive designer override public to do item to do item object dm designer dsgr throw new unsupported operation exception todoitem todoitem unsupportedoperationexception public set object get criticized design materials set object ret new hash set object for critic cr this critics ret add all cr get criticized design materials ret add all extra design materials return ret getcriticizeddesignmaterials hashset addall getcriticizeddesignmaterials addall extradesignmaterials extra criticized design material to be added to the list returned by link get criticized design materials param dm extra design material public void add extra criticized design material object dm this extra design materials add dm getcriticizeddesignmaterials addextracriticizeddesignmaterial extradesignmaterials see org argouml cognitive critic to string public string to string return critics to string tostring tostring tostring the constructor public cr conflicting composites setup head and desc add supported decision uml decision containment set knowledge types critic kt semantics no good trigger crconflictingcomposites setupheadanddesc addsupporteddecision umldecision setknowledgetypes kt_semantics public boolean predicate2 object classifier designer dsgr if model get facade isa classifier classifier return no problem collection conns model get facade get association ends classifier if conns null return no problem int composite count 0 iterator assoc ends conns iterator while assoc ends has next object my end assoc ends next if model get core helper equals aggregation kind my end composite continue if model get facade get lower my end 0 continue object asc model get facade get association my end if asc null model get core helper has composite end asc composite count if composite count 1 return problem found return no problem getfacade isaclassifier no_problem getfacade getassociationends no_problem compositecount assocends assocends hasnext myend assocends getcorehelper equalsaggregationkind myend getfacade getlower myend getfacade getassociation myend getcorehelper hascompositeend compositecount compositecount problem_found no_problem constructor public action showxml dump super translator localize action show saved actionshowxmldump public void action performed action event e project project project manager get manager get current project string data persistence manager get instance get quick view dump project j dialog pw new j dialog argo frame get instance translator localize action show saved false j text area a new j text area data 50 80 a set editable false a set line wrap true a set wrap style word true a set margin new insets inset px inset px inset px inset px a set caret position 0 pw get content pane add new j scroll pane a pw set size 400 500 pw set location relative to argo frame get instance init pw pw set visible true actionperformed actionevent projectmanager getmanager getcurrentproject persistencemanager getinstance getquickviewdump jdialog jdialog argoframe getinstance jtextarea jtextarea seteditable setlinewrap setwrapstyleword setmargin inset_px inset_px inset_px inset_px setcaretposition getcontentpane jscrollpane setsize setlocationrelativeto argoframe getinstance setvisible private void init j dialog pw ui utils load common key map pw jdialog uiutils loadcommonkeymap see javax swing plaf metal metal theme get name public string get name return very large fonts metaltheme getname getname see javax swing plaf metal metal theme get primary1 protected colorui resource get primary1 return primary1 metaltheme getprimary1 coloruiresource getprimary1 see javax swing plaf metal metal theme get primary2 protected colorui resource get primary2 return primary2 metaltheme getprimary2 coloruiresource getprimary2 see javax swing plaf metal metal theme get primary3 protected colorui resource get primary3 return primary3 metaltheme getprimary3 coloruiresource getprimary3 see javax swing plaf metal metal theme get secondary1 protected colorui resource get secondary1 return secondary1 metaltheme getsecondary1 coloruiresource getsecondary1 see javax swing plaf metal metal theme get secondary2 protected colorui resource get secondary2 return secondary2 metaltheme getsecondary2 coloruiresource getsecondary2 see javax swing plaf metal metal theme get secondary3 protected colorui resource get secondary3 return secondary3 metaltheme getsecondary3 coloruiresource getsecondary3 see javax swing plaf metal metal theme get control text font public fontui resource get control text font return control font metaltheme getcontroltextfont fontuiresource getcontroltextfont controlfont see javax swing plaf metal metal theme get system text font public fontui resource get system text font return system font metaltheme getsystemtextfont fontuiresource getsystemtextfont systemfont see javax swing plaf metal metal theme get user text font public fontui resource get user text font return user font metaltheme getusertextfont fontuiresource getusertextfont userfont see javax swing plaf metal metal theme get menu text font public fontui resource get menu text font return control font metaltheme getmenutextfont fontuiresource getmenutextfont controlfont see javax swing plaf metal metal theme get sub text font public fontui resource get sub text font return small font metaltheme getsubtextfont fontuiresource getsubtextfont smallfont see javax swing plaf metal metal theme get window title font public fontui resource get window title font return window title font metaltheme getwindowtitlefont fontuiresource getwindowtitlefont windowtitlefont constructor for uml signal combo box param container the containing ui element param arg0 the model public uml reception signal combo box uml user interface container container uml combo box model2 arg0 todo this super constructor has been deprecated super arg0 set renderer new uml list cell renderer2 true umlsignalcombobox umlreceptionsignalcombobox umluserinterfacecontainer umlcomboboxmodel2 setrenderer umllistcellrenderer2 protected void do it action event event object o get model get element at get selected index object signal o object reception get target if signal model get facade get signal reception model get common behavior helper set signal reception signal doit actionevent getmodel getelementat getselectedindex gettarget getfacade getsignal getcommonbehaviorhelper setsignal anonymous constructor configuration properties super true properties defaults new properties try defaults load get class get resource as stream property location log debug configuration loaded from property location catch exception ioe todo what should we do here log warn configuration not loaded from property location ioe property bundle new properties defaults configurationproperties getclass getresourceasstream propertylocation propertylocation propertylocation propertybundle returns the default path for user properties return a generic path string public string get default path return system get property user home argouml argo user properties getdefaultpath getproperty returns the default path for user properties before 0 25 4 return a generic path string deprecated this should be removed on the next version after 0 26 deprecated public string get old default path return system get property user home argo user properties getolddefaultpath getproperty copy a file from source to destination todo perhaps belongs in a utilities class of some sort param source the source file to be copied param dest the destination file return success status flag private static boolean copy file final file source final file dest try final file input stream fis new file input stream source final file output stream fos new file output stream dest byte buf new byte 1024 int i 0 while i fis read buf 1 fos write buf 0 i fis close fos close return true catch final file not found exception e log error file not found while copying e return false catch final io exception e log error io error copying file e return false catch final security exception e log error you are not allowed to copy these files e return false copyfile fileinputstream fileinputstream fileoutputstream fileoutputstream filenotfoundexception ioexception securityexception load the configuration from a specified location p before version 0 25 4 argouml used to store the properties file in a different location a user who upgrades his argouml to a newer version would not like to loose his settings hence in case a properties file does not exist in the new location this code attempts to copy the file from the old location to the new location p in this upgrade case the properties file is copied not moved rationale see issue 5364 p the meaning of the return value is not simply success in loading the properties file but it indicates if we may save the properties on top of this file later hence in case a properties file did not exist not in the new location nor in the old location then a new empty file is created and in this case the return value is true p returning false here would mean that no properties will be saved at all param file the path to load the configuration from return true if the given file location may be used for writing the properties later public boolean load file file file try if file exists check for the older properties file and copy it over if possible this is done for compatibility with previous version move the argo user properties written before 0 25 4 to the new location if it exists final file old file new file get old default path if old file exists old file is file old file can read file get parent file can write copy to new file and let the regular load code do the actual load final boolean result copy file old file file if result log info configuration copied from old file to file else log error error copying old configuration to new see previous log messages else try file create new file catch io exception e log error could not create the properties file at file get absolute path e if file exists file is file file can read try property bundle load new file input stream file log info configuration loaded from file return true catch final io exception e if can complain log warn unable to load configuration file can complain false catch final security exception e log error a security exception occurred trying to load the configuration check your security settings e return false loadfile oldfile getolddefaultpath oldfile oldfile isfile oldfile canread getparentfile canwrite copyfile oldfile oldfile createnewfile ioexception getabsolutepath isfile canread propertybundle fileinputstream ioexception cancomplain cancomplain securityexception save the configuration to a specified location param file the path to save the configuration at return true if the save was successful false if not public boolean save file file file try property bundle store new file output stream file argouml properties log info configuration saved to file return true catch exception e if can complain log warn unable to save configuration file n can complain false return false savefile propertybundle fileoutputstream cancomplain cancomplain load the configuration from a specified location param url the path to load the configuration from return true if the load was successful false if not public boolean loadurl url url try property bundle load url open stream log info configuration loaded from url n return true catch exception e if can complain log warn unable to load configuration url n can complain false return false propertybundle openstream cancomplain cancomplain save the configuration to a specified location param url the path to save the configuration at return true if the save was successful false if not public boolean saveurl url url log info configuration saved to url n return false returns the string value of a configuration property param key the key to return the value of param default value the value to return if the key was not found return the string value of the key if found otherwise null public string get value string key string default value string result try result property bundle get property key default value catch exception e result default value return result defaultvalue getvalue defaultvalue propertybundle getproperty defaultvalue defaultvalue sets the string value of a configuration property param key the key to set param value the value to set the key to public void set value string key string value log debug key key set to value property bundle set property key value setvalue propertybundle setproperty remove a property param key the property to remove public void remove string key property bundle remove key propertybundle public class predicate true implements predicate private predicate true predicatetrue predicatetrue public boolean evaluate object obj return true return the instance public static predicate true get instance return the instance predicatetrue getinstance theinstance the constructor public cr missing attr name setup head and desc add supported decision uml decision naming set knowledge types critic kt syntax add trigger name crmissingattrname setupheadanddesc addsupporteddecision umldecision setknowledgetypes kt_syntax addtrigger public boolean predicate2 object dm designer dsgr if model get facade isa attribute dm return no problem object attr dm string my name model get facade get name attr if my name null equals my name return problem found if my name length 0 return problem found return no problem getfacade isaattribute no_problem myname getfacade getname myname myname problem_found myname problem_found no_problem see org argouml cognitive poster get clarifier public icon get clarifier return cl attribute compartment get the instance getclarifier getclarifier clattributecompartment gettheinstance public void init wizard wizard w if w instanceof wizme name to do item item to do item w get to do item object me item get offenders get 0 string ins super get instructions string sug super get default suggestion if model get facade isa attribute me object a me int count 1 if model get facade get owner a null count model get facade get features model get facade get owner a size sug attr count 1 wizme name w set instructions ins wizme name w set suggestion sug initwizard wizmename todoitem todoitem gettodoitem getoffenders getinstructions getdefaultsuggestion getfacade isaattribute getfacade getowner getfacade getfeatures getfacade getowner wizmename setinstructions wizmename setsuggestion see org argouml cognitive critics critic get wizard class org argouml cognitive to do item public class get wizard class to do item item return wizme name class getwizardclass todoitem getwizardclass todoitem wizmename public set object get criticized design materials set object ret new hash set object ret add model get meta types get attribute return ret getcriticizeddesignmaterials hashset getmetatypes getattribute increment the number of times we ve been snoozed or hushed public static void increment num hushes num hushes incrementnumhushes numhushes construct a to do tab for the property panel public tab to do super tab todo item set icon new left arrow icon string position configuration get string configuration make key layout tabtodo set orientation position equals west position equals east vertical get instance horizontal get instance set layout new border layout object actions action new to do item action resolve action snooze tool bar factory factory new tool bar factory actions factory set rollover true factory set floatable false factory set orientation swing constants vertical j tool bar tool bar factory create tool bar tool bar set name get title add tool bar border layout west split pane new border split pane add split pane border layout center set target null add component listener this todo register listener for target to do item changes and for new show step requests todo tabtodo seticon leftarrowicon getstring makekey setorientation getinstance getinstance setlayout borderlayout actionnewtodoitem actionresolve actionsnooze toolbarfactory toolbarfactory setrollover setfloatable setorientation swingconstants jtoolbar toolbar createtoolbar toolbar setname gettitle toolbar borderlayout splitpane bordersplitpane splitpane borderlayout settarget addcomponentlistener todo showstep show the description of a todo item public void show description if last panel null split pane remove last panel split pane add description border split pane center last panel description validate repaint showdescription lastpanel splitpane lastpanel splitpane bordersplitpane lastpanel param tdp the todo pane public void set tree to do pane tdp if get orientation equals horizontal get instance split pane add tdp border split pane west else split pane add tdp border split pane north settree todopane getorientation getinstance splitpane bordersplitpane splitpane bordersplitpane param ws the panel to be shown public void show step j panel ws todo this should listen for new target events fired by wiz step update tab to do so that we can decouple it from the project browser if last panel null split pane remove last panel if ws null split pane add ws border split pane center last panel ws else split pane add description border split pane center last panel description validate repaint showstep jpanel wizstep updatetabtodo projectbrowser lastpanel splitpane lastpanel splitpane bordersplitpane lastpanel splitpane bordersplitpane lastpanel sets the target of the tab to do param item the new target public void set target object item target item if is visible set target internal item request that we be made visible if we re not top level tabbed pane set selected component t tabtodo settarget isvisible settargetinternal topleveltabbedpane setselectedcomponent private void set target internal object item the target of description will always be set directly by tabtodo description set target item wizard w null if item instanceof to do item w to do item item get wizard if w null show step w get current panel else show description update actions enabled item settargetinternal settarget todoitem todoitem getwizard showstep getcurrentpanel showdescription updateactionsenabled returns the target of the tab to do return the current target of the tab to do public object get target return target tabtodo tabtodo gettarget set the target again to what it was before public void refresh set target target manager get instance get target settarget targetmanager getinstance gettarget update the enabled state of the resolve and snooze actions param item the target of the tab to do class protected static void update actions enabled object item action resolve set enabled action resolve is enabled action resolve update enabled item action snooze set enabled action snooze is enabled action snooze update enabled item tabtodo updateactionsenabled actionresolve setenabled actionresolve isenabled actionresolve updateenabled actionsnooze setenabled actionsnooze isenabled actionsnooze updateenabled target event public void target added target event e set target e get new target targetevent targetadded targetevent settarget getnewtarget public void target removed target event e how to handle empty target lists probably the wizstep should only show an empty pane in that case set target e get new target targetremoved targetevent settarget getnewtarget see org argouml ui targetmanager target listener target set target event public void target set target event e set target e get new target targetlistener targetset targetevent targetset targetevent settarget getnewtarget see java awt event component listener component shown java awt event component event public void component shown component event e update our model with our saved target set target internal target componentlistener componentshown componentevent componentshown componentevent settargetinternal see java awt event component listener component hidden java awt event component event public void component hidden component event e stop updating model when we re not visible set target internal null componentlistener componenthidden componentevent componenthidden componentevent settargetinternal public void component moved component event e ignored componentmoved componentevent public void component resized component event e ignored componentresized componentevent param event type reported by this event param src object that caused the event public argo diagram appearance event int event type object src super event type src eventtype argodiagramappearanceevent eventtype eventtype indicates the start of the 100 digit range for diagram appearance events return the first id reserved for events public int get event start range return any diagram appearance event geteventstartrange any_diagram_appearance_event construct a fig for a stereotype or a keyword which visually resembles a stereotype param owner owning uml element or null if this fig is being used for a keyword param bounds position and size param settings render settings public fig stereotype object owner rectangle bounds diagram settings settings super owner bounds settings true new string name assert owner null initialize set text figstereotype diagramsettings settext private void initialize set editable false set text color text color set text filled false set justification fig text justify center set right margin 3 set left margin 3 seteditable settextcolor text_color settextfilled setjustification figtext justify_center setrightmargin setleftmargin force the line width to 0 since the fig group that contains the stereotype may want to show a border but we don t override public void set line width int w super set line width 0 figgroup setlinewidth setlinewidth called by property change protected void update layout uml change event event assert event null rectangle old bounds get bounds set text this does a calc bounds if old bounds get bounds set bounds get bounds if get group null todo why do i need to do this get group calc bounds get group set bounds get group get bounds if old bounds get bounds fig sg get group get group todo why do i need to do this if sg null sg calc bounds sg set bounds sg get bounds test case for the above code draw a class create a stereotype for it by clicking on the prop panel tool and name it remove the class from the diagram drag the class from the explorer on the diagram select the stereotype in the explorer and change its name in the prop panel to something longer the longer name does not make the class fig wider unless the above code is added damage propertychange updatelayout umlchangeevent oldbounds getbounds settext calcbounds oldbounds getbounds setbounds getbounds getgroup getgroup calcbounds getgroup setbounds getgroup getbounds oldbounds getbounds getgroup getgroup calcbounds setbounds getbounds override protected void set text set text model get facade get name get owner settext settext getfacade getname getowner add guillemets to any text set to this fig inherit doc public void set text string text super set text notation utility uml format stereotype text get settings get notation settings is use guillemets damage inheritdoc settext settext notationutilityuml formatstereotype getsettings getnotationsettings isuseguillemets the constructor public cr attr name conflict setup head and desc add supported decision uml decision inheritance add supported decision uml decision storage add supported decision uml decision naming set knowledge types critic kt syntax add trigger structural feature add trigger feature name crattrnameconflict setupheadanddesc addsupporteddecision umldecision addsupporteddecision umldecision addsupporteddecision umldecision setknowledgetypes kt_syntax addtrigger structuralfeature addtrigger feature_name examines the classifier and tells if we have two attributes with the same name comparison is done with equals contains param dm is the classifier param dsgr is not used return true if there are two with the same name see org argouml uml cognitive critics cruml predicate2 java lang object org argouml cognitive designer override public boolean predicate2 object dm designer dsgr if model get facade isa classifier dm return no problem collection string names seen new array list string iterator attrs model get facade get attributes dm iterator while attrs has next string name model get facade get name attrs next if name null name length 0 continue if names seen contains name return problem found names seen add name return no problem getfacade isaclassifier no_problem namesseen arraylist getfacade getattributes hasnext getfacade getname namesseen problem_found namesseen no_problem see org argouml cognitive poster get clarifier override public icon get clarifier return cl attribute compartment get the instance getclarifier getclarifier clattributecompartment gettheinstance public set object get criticized design materials set object ret new hash set object ret add model get meta types get classifier return ret getcriticizeddesignmaterials hashset getmetatypes getclassifier the constructor public tm results show in diagram column true tmresults showindiagramcolumn the constructor param show the in diagram column true if the in diagram column should be shown public tm results boolean show the in diagram column show in diagram column show the in diagram column showtheindiagramcolumn tmresults showtheindiagramcolumn showindiagramcolumn showtheindiagramcolumn param results the row objects param the diagrams the diagrams public void set target list results list the diagrams row objects results diagrams the diagrams fire table structure changed thediagrams settarget thediagrams rowobjects thediagrams firetablestructurechanged see javax swing table table model get column count public int get column count return show in diagram column 4 3 tablemodel getcolumncount getcolumncount showindiagramcolumn public int get row count if row objects null return 0 return row objects size getrowcount rowobjects rowobjects public string get column name int c if c 0 return translator localize dialog find column name type if c 1 return translator localize dialog find column name name if c 2 return translator localize show in diagram column dialog find column name in diagram dialog find column name description if c 3 return translator localize dialog find column name description return xxx getcolumnname showindiagramcolumn see javax swing table table model get column class int public class get column class int c return string class tablemodel getcolumnclass getcolumnclass see javax swing table table model is cell editable int int public boolean is cell editable int row int col return false tablemodel iscelleditable iscelleditable public object get value at int row int col if row 0 row row objects size return bad row if col 0 col show in diagram column 4 3 return bad col object row obj row objects get row if row obj instanceof diagram diagram d diagram row obj switch col case 0 the name of this type of diagram if d instanceof uml diagram return uml diagram d get label name return null case 1 the name of this instance of diagram return d get name case 2 n a or x nodes and x edges return show in diagram column translator localize dialog find not applicable count nodes and edges d case 3 x nodes and x edges return count nodes and edges d default if model get facade isa model element row obj diagram d null if diagrams null d diagrams get row switch col case 0 the name of this type of model element return model get facade getuml class name row obj case 1 the name of this instance of model element return model get facade get name row obj case 2 the name of the parent diagram instance return d null translator localize dialog find not applicable d get name case 3 todo implement this show some documentation return docs default switch col case 0 the name of this type of object if row obj null return string cls name row obj get class get name int last dot cls name last index of return cls name substring last dot 1 case 1 return case 2 return case 3 return docs default return unknown getvalueat rowobjects showindiagramcolumn rowobj rowobjects rowobj rowobj umldiagram umldiagram getlabelname getname showindiagramcolumn countnodesandedges countnodesandedges getfacade isamodelelement rowobj modelelement getfacade getumlclassname rowobj modelelement getfacade getname rowobj getname rowobj clsname rowobj getclass getname lastdot clsname lastindexof clsname lastdot param d the diagram to count the nodes and edges of return a string which says it all private object count nodes and edges diagram d int num nodes d get nodes size int num edges d get edges size object msg args integer value of num nodes integer value of num edges return translator message format dialog nodes and edges msg args countnodesandedges numnodes getnodes numedges getedges msgargs valueof numnodes valueof numedges messageformat msgargs see javax swing table table model set value at java lang object int int override public void set value at object a value int row index int column index tablemodel setvalueat setvalueat avalue rowindex columnindex constructor to build new settings dialog settings dialog super translator localize dialog settings argo dialog ok cancel option true tabs new j tabbed pane apply button new j button translator localize button apply string mnemonic translator localize button apply mnemonic if mnemonic null mnemonic length 0 apply button set mnemonic mnemonic char at 0 apply button add action listener new action listener public void action performed action event e handle save add button apply button add settings from the settings registry settings tabs gui get instance get settings tabs for gui settings tab interface stp settings tabs tabs add tab translator localize stp get tab key stp get tab panel increase width to accommodate all tabs on one row final int minimum width 480 tabs set preferred size new dimension math max tabs get preferred size width minimum width tabs get preferred size height tabs set tab placement swing constants left set content tabs add window listener this settingsdialog argodialog ok_cancel_option jtabbedpane applybutton jbutton applybutton setmnemonic charat applybutton addactionlistener actionlistener actionperformed actionevent handlesave addbutton applybutton settingstabs getinstance getsettingstabs guisettingstabinterface settingstabs addtab gettabkey gettabpanel minimumwidth setpreferredsize getpreferredsize minimumwidth getpreferredsize settabplacement swingconstants setcontent addwindowlistener apply button add action listener new action listener public void action performed action event e handle save applybutton addactionlistener actionlistener actionperformed actionevent handlesave override public void set visible boolean show if show handle refresh to front super set visible show window open state will be changed when window is activated setvisible handlerefresh tofront setvisible windowopen public void action performed action event ev super action performed ev if ev get source get ok button handle save else if ev get source get cancel button handle cancel actionperformed actionevent actionperformed getsource getokbutton handlesave getsource getcancelbutton handlecancel private void handle save for gui settings tab interface tab settings tabs tab handle settings tab save window open false configuration save handlesave guisettingstabinterface settingstabs handlesettingstabsave windowopen private void handle cancel for gui settings tab interface tab settings tabs tab handle settings tab cancel window open false handlecancel guisettingstabinterface settingstabs handlesettingstabcancel windowopen perform refresh in all tabs private void handle refresh for gui settings tab interface tab settings tabs tab handle settings tab refresh handlerefresh guisettingstabinterface settingstabs handlesettingstabrefresh private void handle open we only request focus the first time we become visible if window open get ok button request focus in window window open true handleopen windowopen getokbutton requestfocusinwindow windowopen see java awt event window listener window activated java awt event window event public void window activated window event e handle open windowlistener windowactivated windowevent windowactivated windowevent handleopen see java awt event window listener window closed java awt event window event public void window closed window event e ignored we only care about open closing windowlistener windowclosed windowevent windowclosed windowevent see java awt event window listener window deactivated java awt event window event public void window deactivated window event e ignored we only care about open closing windowlistener windowdeactivated windowevent windowdeactivated windowevent see java awt event window listener window deiconified java awt event window event public void window deiconified window event e ignored we only care about open closing windowlistener windowdeiconified windowevent windowdeiconified windowevent see java awt event window listener window iconified java awt event window event public void window iconified window event e ignored we only care about open closing windowlistener windowiconified windowevent windowiconified windowevent see java awt event window listener window opened java awt event window event public void window opened window event e handle open windowlistener windowopened windowevent windowopened windowevent handleopen see java awt event window listener window closing java awt event window event public void window closing window event e handle the same as an explicit cancel handle cancel windowlistener windowclosing windowevent windowclosing windowevent handlecancel the constructor public todo token table super 32 todotokentable protected void setup tokens add token string to do integer value of token to do add token string to do list integer value of token to do list add token string to do item integer value of token to do item add token string headline integer value of token headline add token string description integer value of token description add token string priority integer value of token priority add token string moreinfourl integer value of token moreinfourl add token string resolvedcritics integer value of token resolvedcritics add token string issue integer value of token issue add token string poster integer value of token poster add token string offender integer value of token offender setuptokens addtoken string_to_do valueof token_to_do addtoken string_to_do_list valueof token_to_do_list addtoken string_to_do_item valueof token_to_do_item addtoken string_headline valueof token_headline addtoken string_description valueof token_description addtoken string_priority valueof token_priority addtoken string_moreinfourl valueof token_moreinfourl addtoken string_resolvedcritics valueof token_resolvedcritics addtoken string_issue valueof token_issue addtoken string_poster valueof token_poster addtoken string_offender valueof token_offender the constructor public action open goals super translator localize action design goals null set the tooltip string put value action short description translator localize action design goals actionopengoals putvalue short_description public void action performed action event ae super action performed ae goals dialog d new goals dialog d set visible true actionperformed actionevent actionperformed goalsdialog goalsdialog setvisible constructor for uml generalizable element leaf check box public uml generalizable element leaf check box super translator localize checkbox leaf lc action set generalizable element leaf get instance is leaf umlgeneralizableelementleafcheckbox umlgeneralizableelementleafcheckbox actionsetgeneralizableelementleaf getinstance isleaf public void build model object target get target if target null model get facade isauml element target set selected model get facade is leaf target else set selected false buildmodel gettarget getfacade isaumlelement setselected getfacade isleaf setselected construct a new fig stub state param owner owning uml element param bounds position and size param settings rendering settings public fig stub state object owner rectangle bounds diagram settings settings super owner bounds settings init figs figstubstate figstubstate diagramsettings initfigs the constructor deprecated for 0 27 4 by tfmorris use link fig stub state object rectangle diagram settings suppress warnings deprecation deprecated public fig stub state super init figs figstubstate diagramsettings suppresswarnings figstubstate initfigs private void init figs facade model get facade statem helper model get state machines helper set big port new fig rect x y width height get big port set line width 0 get big port set filled false stubline new fig line x y width y text color reference fig new fig text 0 0 width height true reference fig set font get settings get font plain reference fig set text color text color reference fig set return action fig text end editing reference fig set tab action fig text end editing reference fig set justification fig text justify center reference fig set line width 0 reference fig set bounds x y width reference fig get bounds height reference fig set filled false reference fig set editable false add fig get big port add fig reference fig add fig stubline set shadow size 0 set blink ports false make port invisible unless mouse enters initfigs getfacade statemhelper getstatemachineshelper setbigport figrect getbigport setlinewidth getbigport setfilled figline text_color referencefig figtext referencefig setfont getsettings getfontplain referencefig settextcolor text_color referencefig setreturnaction figtext end_editing referencefig settabaction figtext end_editing referencefig setjustification figtext justify_center referencefig setlinewidth referencefig setbounds referencefig getbounds referencefig setfilled referencefig seteditable addfig getbigport addfig referencefig addfig setshadowsize setblinkports the constructor param gm ignored param node the uml owner element deprecated for 0 27 4 by tfmorris use link fig stub state object rectangle diagram settings deprecated public fig stub state suppress warnings unused graph model gm object node this set owner node figstubstate diagramsettings figstubstate suppresswarnings graphmodel setowner override public void set owner object node super set owner node rendering changed setowner setowner renderingchanged override public object clone fig stub state fig clone fig stub state super clone iterator it fig clone get figs iterator fig clone set big port fig rect it next fig clone reference fig fig text it next fig clone stubline fig line it next return fig clone figstubstate figclone figstubstate figclone getfigs figclone setbigport figrect figclone referencefig figtext figclone figline figclone synch states are fixed size return false override public boolean is resizable return false isresizable see org tigris gef presentation fig make selection override public selection make selection return new selection move clarifiers this makeselection makeselection selectionmoveclarifiers see org tigris gef presentation fig set line color java awt color override public void set line color color col stubline set line color col setlinecolor setlinecolor setlinecolor see org tigris gef presentation fig get line color override public color get line color return stubline get line color getlinecolor getlinecolor getlinecolor see org tigris gef presentation fig set fill color java awt color override public void set fill color color col reference fig set fill color col setfillcolor setfillcolor referencefig setfillcolor see org tigris gef presentation fig get fill color override public color get fill color return reference fig get fill color getfillcolor getfillcolor referencefig getfillcolor see org tigris gef presentation fig set filled boolean override public void set filled boolean f reference fig set filled f setfilled setfilled referencefig setfilled override public boolean is filled return reference fig is filled isfilled referencefig isfilled see org tigris gef presentation fig set line width int override public void set line width int w stubline set line width w setlinewidth setlinewidth setlinewidth see org tigris gef presentation fig get line width override public int get line width return stubline get line width getlinewidth getlinewidth getlinewidth override protected void set standard bounds int thex int they int thew int theh rectangle old bounds get bounds thew 60 reference fig set bounds thex they thew reference fig get bounds height stubline set shape thex they thex thew they get big port set bounds thex they thew theh calc bounds x x y y w w h h update edges fire prop change bounds old bounds get bounds setstandardbounds oldbounds getbounds referencefig setbounds referencefig getbounds setshape getbigport setbounds calcbounds _x _y _w _h updateedges firepropchange oldbounds getbounds override protected void model changed property change event mee super model changed mee if get owner null return object top null object old ref null object container facade get container get owner the event source is the owner stub state if mee get source equals get owner if mee get property name equals reference state update reference text if container null facade isa submachine state container facade get submachine container null top facade get top facade get submachine container old ref statem helper get stateby name string mee get old value top update listeners old ref get owner else if mee get property name equals container facade isa submachine state container remove listeners object o mee get old value if o null facade isa submachine state o remove element listener o statem helper set reference state get owner null update listeners get owner get owner update reference text else the event source is the submachine state if container null mee get source equals container facade isa submachine state container facade get submachine container null the submachine has got a new name this indicates a change in association not name tfm if mee get property name equals submachine if mee get old value null top facade get top mee get old value old ref statem helper get stateby name facade get reference state get owner top statem helper set reference state get owner null update listeners old ref get owner update reference text else the event source is the stub state s referenced state or one of the referenced state s path if facade get submachine container null top facade get top facade get submachine container string path facade get reference state get owner object ref object statem helper get stateby name path top string ref if ref object null the source was the referenced state that has got a new name ref statem helper get path mee get source else the source was one of the referenced state s path which has got a new name ref statem helper get path ref object the referenced state or one of his path s states has got a new name statem helper set reference state get owner ref update reference text modelchanged propertychangeevent modelchanged getowner oldref getcontainer getowner getsource getowner getpropertyname referencestate updatereferencetext isasubmachinestate getsubmachine gettop getsubmachine oldref statemhelper getstatebyname getoldvalue updatelisteners oldref getowner getpropertyname isasubmachinestate removelisteners getoldvalue isasubmachinestate removeelementlistener statemhelper setreferencestate getowner updatelisteners getowner getowner updatereferencetext getsource isasubmachinestate getsubmachine getpropertyname getoldvalue gettop getoldvalue oldref statemhelper getstatebyname getreferencestate getowner statemhelper setreferencestate getowner updatelisteners oldref getowner updatereferencetext getsubmachine gettop getsubmachine getreferencestate getowner refobject statemhelper getstatebyname refobject statemhelper getpath getsource statemhelper getpath refobject statemhelper setreferencestate getowner updatereferencetext rerender the whole figure call superclass then add reference text override public void rendering changed super rendering changed update reference text renderingchanged renderingchanged updatereferencetext update the reference text public void update reference text object text null try text facade get reference state get owner catch exception e log error exception caught and ignored e if text null reference fig set text string text else reference fig set text calc bounds set bounds get bounds damage updatereferencetext getreferencestate getowner referencefig settext referencefig settext calcbounds setbounds getbounds param new owner private void add listeners object new owner object container object top object reference container facade get container new owner the new submachine container is added as listener if container null facade isa submachine state container add element listener container all states in the new reference state s path are added as listeners if container null facade isa submachine state container facade get submachine container null top facade get top facade get submachine container reference statem helper get stateby name facade get reference state new owner top string properties name container container reference while container null container equals top add element listener container container facade get container container newowner addlisteners newowner getcontainer newowner isasubmachinestate addelementlistener isasubmachinestate getsubmachine gettop getsubmachine statemhelper getstatebyname getreferencestate newowner addelementlistener getcontainer remove all the existing listeners private void remove listeners object container object top object reference object owner get owner if owner null return container facade get container owner the old submachine container is deleted as listener if container null facade isa submachine state container remove element listener container all states in the old reference state s path are deleted as listeners if container null facade isa submachine state container facade get submachine container null top facade get top facade get submachine container reference statem helper get stateby name facade get reference state owner top if reference null remove element listener reference container facade get container reference while container null facade is top container remove element listener container container facade get container container removelisteners getowner getcontainer isasubmachinestate removeelementlistener isasubmachinestate getsubmachine gettop getsubmachine statemhelper getstatebyname getreferencestate removeelementlistener getcontainer istop removeelementlistener getcontainer param new owner the new owner uml object param oldv the old owner uml object deprecated for 0 27 2 by tfmorris use link update listeners object object with the argument order swapper there are no internal users of this method so the only potential users are people who ve subclassed this fig protected void update listenersx object new owner object oldv just swap order of arguments to get to new form update listeners oldv new owner newowner updatelisteners updatelistenersx newowner updatelisteners newowner override protected void update listeners object oldv object new owner if oldv null if oldv new owner remove element listener oldv object container facade get container oldv while container null facade is top container remove element listener container container facade get container container super update listeners get owner new owner updatelisteners newowner newowner removeelementlistener getcontainer istop removeelementlistener getcontainer updatelisteners getowner newowner override protected void update font super update font font f get settings get font font plain reference fig set font f updatefont updatefont getsettings getfont referencefig setfont constructor for the critic p sets up the resource name which will allow headline and description to found for the current locale provides a design issue category relationships and knowledge type syntax adds trigger end navigable public cr nav from interface setup head and desc specify design issue category and knowledge type add supported decision uml decision relationships set knowledge types critic kt syntax this may not actually make any difference at present the code behind add trigger needs more work add trigger end navigable end_navigable crnavfrominterface setupheadanddesc addsupporteddecision umldecision setknowledgetypes kt_syntax addtrigger addtrigger end_navigable the trigger for the critic p applies to associations only not association roles the reason is that an association role cannot have greater navigability than the association it specializes so if the critic has addressed the association the association role will effectively be addressed there may of course be a need for a critic to check that association roles do match their parents in this respect p as a consequence we also don t need to check for associations with classifier roles p iterate over all the association ends we only have a problem if p ol li there is an end connected to an interface and li an end other than that end is navigable ol param dm the object to be checked against the critic param dsgr the designer creating the model not used this is for future development of argouml return link problem found problem found if the critic is triggered otherwise link no problem no problem public boolean predicate2 object dm designer dsgr only look at associations if model get facade isa association dm return no problem if model get facade isa association role dm return no problem iterate over all the association ends we only have a problem if 1 there is an end connected to an interface and 2 an end other than that end is navigable iterator assoc ends model get facade get connections dm iterator boolean have interface end false end at an interface boolean other end navigable false navigable other end while assoc ends has next the next association end object ae assoc ends next if its an interface we have an interface end otherwise its something else and we should see if it is navigable we don t check that the end is a classifier rather than its child classifier role since we have effectively eliminated that possiblity in rejecting association roles above object type model get facade get type ae if model get facade isa interface type have interface end true else if model get facade is navigable ae other end navigable true we can give up looking if we ve hit both criteria if have interface end other end navigable return problem found if we drop out we didn t meet both criteria and all is well return no problem associationroles associationrole associationrole classifierroles associationends problem_found problem_found no_problem no_problem getfacade isaassociation no_problem getfacade isaassociationrole no_problem associationends assocends getfacade getconnections haveinterfaceend otherendnavigable assocends hasnext associationend assocends classifierrole associationroles getfacade gettype getfacade isainterface haveinterfaceend getfacade isnavigable otherendnavigable haveinterfaceend otherendnavigable problem_found no_problem public set object get criticized design materials set object ret new hash set object ret add model get meta types get association class return ret getcriticizeddesignmaterials hashset getmetatypes getassociationclass the constructor param the object the uml object public object notation uml object the object super the object theobject objectnotationuml theobject theobject see org argouml notation providers notation provider get parsing help public string get parsing help return parsing help fig object notationprovider getparsinghelp getparsinghelp public void parse object model element string text string s text trim if s length 0 return strip any trailing semi colons if s char at s length 1 s s substring 0 s length 2 string name string bases string tokenizer base tokens null if s index of 0 1 name s substring 0 s index of 0 trim bases s substring s index of 0 1 trim base tokens new string tokenizer bases else name s model get common behavior helper set classifiers model element collections empty list if base tokens null while base tokens has more elements string type string base tokens next token object type project manager get manager get current project find type type string model get common behavior helper add classifier model element type this updates the diagram hence as last statement model get core helper set name model element name modelelement charat stringtokenizer basetokens indexof indexof indexof basetokens stringtokenizer getcommonbehaviorhelper setclassifiers modelelement emptylist basetokens basetokens hasmoreelements typestring basetokens nexttoken projectmanager getmanager getcurrentproject findtype typestring getcommonbehaviorhelper addclassifier modelelement getcorehelper setname modelelement suppress warnings deprecation deprecated public string to string object model element map args return to string model element suppresswarnings tostring modelelement tostring modelelement private string to string object model element string name str if model get facade get name model element null name str model get facade get name model element trim string builder base string format name list model get facade get classifiers model element if name str length 0 base string length 0 return string base base string to string trim if base length 1 return name str trim return name str trim base tostring modelelement namestr getfacade getname modelelement namestr getfacade getname modelelement stringbuilder basestring formatnamelist getfacade getclassifiers modelelement namestr basestring basestring tostring namestr namestr override public string to string object model element notation settings settings return to string model element tostring modelelement notationsettings tostring modelelement constructor for a new use case fig we work out the smallest oval that will fit round p at creation the extension point box is not showing for consistency with existing implementations we can show it later p deprecated for 0 27 2 by tfmorris use link fig use case object rectangle diagram settings suppress warnings deprecation deprecated public fig use case initialize figusecase diagramsettings suppresswarnings figusecase initialization which is common to multiple constructors p there should be no size calculations here nor color setting since not all attributes are set yet like e g fill color private void initialize create all the things we need first the main port ellipse and the cover of identical size that will realize it use arbitrary dimensions for now big port new fig my circle 0 0 100 60 cover new fig my circle 0 0 100 60 mark the text but not the box as filled mark that the name may use multi line text a bit odd how do we enter a multi line name todo the above comment hints that the return action should be insert not end editing get name fig set text filled false get name fig set filled false get name fig set line width 0 get name fig set return action fig text end editing the separator again with arbitrary bounds for now ep sep new fig line 0 30 100 100 ep sep set line width line width ep sep set visible false the surrounding box for the extension points again with arbitrary bounds for now but made the same width as the name field so the name field width will dominate size calculations but there is a space to double click in for a new ep it is not filled nor has it a surrounding line its bounds which allow for one line which is empty are the same as for the name box at this stage ep big port new fig rect 0 30 get name fig get bounds width 20 ep big port set filled false ep big port set line width 0 ep big port set visible false the group for the extension points the first entry in the group is the overall surrounding box itself the group is not filled nor has any line the first entry we add is the ep big port ep vec new fig group ep vec set filled false ep vec set line width 0 ep vec set visible false ep vec add fig ep big port set big port big port add figs to the fig node in back to front order add fig big port add fig cover add fig get name fig add fig get stereotype fig add fig ep sep add fig ep vec update extension point having built the figure get bounds finds the enclosing rectangle which we set as our bounds set bounds get bounds bigport figmycircle figmycircle returnaction end_editing getnamefig settextfilled getnamefig setfilled getnamefig setlinewidth getnamefig setreturnaction figtext end_editing epsep figline epsep setlinewidth line_width epsep setvisible epbigport figrect getnamefig getbounds epbigport setfilled epbigport setlinewidth epbigport setvisible epbigport epvec figgroup epvec setfilled epvec setlinewidth epvec setvisible epvec addfig epbigport setbigport bigport fignode addfig bigport addfig addfig getnamefig addfig getstereotypefig addfig epsep addfig epvec updateextensionpoint getbounds setbounds getbounds a version of the constructor used to associated the fig with a particular model element object p used at creation time of a use case and also when add to diagram is activated however the load routines use the main constructor and call set owner directly p param gm the graph model to associate with this fig ignored in this implementation param node the model element object to associate with this fig deprecated for 0 27 3 by tfmorris use link fig use case object rectangle diagram settings suppress warnings deprecation deprecated public fig use case suppress warnings unused graph model gm object node this set owner node usecase setowner figusecase diagramsettings suppresswarnings figusecase suppresswarnings graphmodel setowner construct a use case figure with the given owner bounds and rendering settings this constructor is used by the pgml parser param owner owning model element param bounds position and size param settings rendering settings public fig use case object owner rectangle bounds diagram settings settings super owner bounds settings initialize if bounds null set location bounds x bounds y figusecase diagramsettings setlocation the text string to be used as the default name of the new use case fig however this seems in general to be immediately overwritten presumably somewhere in the creation code for the object which choses to define a name p em note em good uml would probably prefer a name starting with a capital and no spaces p return the desired text of the default name override public string place string return new use case placestring make a copy of the current fig p uses the generic superclass clone which gives a list of all the figs then initialize our instance variables from this list p return a new copy of the the current fig override public object clone fig use case fig clone fig use case super clone iterator it fig clone get figs iterator fig clone big port fig my circle it next fig clone cover fig my circle it next fig clone set name fig fig text it next it next fig clone ep sep fig line it next fig clone ep vec fig group it next return fig clone figusecase figclone figusecase figclone getfigs figclone bigport figmycircle figclone figmycircle figclone setnamefig figtext figclone epsep figline figclone epvec figgroup figclone build a collection of menu items relevant for a right click popup menu on a use case p adds to the generic pop up items from the parent p param me the mouse event that generated this popup return a collection of menu items override public vector get pop up actions mouse event me check if multiple items are selected boolean ms target manager get instance get targets size 1 get the parent vector first vector pop up actions super get pop up actions me add menu to add an extension point or note placed one before last so the properties entry is always last argoj menu add menu new argoj menu menu popup add if ms add menu add action add extension point singleton add menu add new action add note pop up actions add pop up actions size get popup add offset add menu modifier menu placed one before last so the properties entry is always last pop up actions add pop up actions size get popup add offset build modifier pop up leaf root return pop up actions getpopupactions mouseevent targetmanager getinstance gettargets popupactions getpopupactions argojmenu addmenu argojmenu addmenu actionaddextensionpoint addmenu actionaddnote popupactions popupactions getpopupaddoffset addmenu popupactions popupactions getpopupaddoffset buildmodifierpopup popupactions show menu to display hide the extension point compartment return the menu see org argouml uml diagram ui fig node model element build show pop up override protected argoj menu build show pop up argoj menu show menu super build show pop up iterator i action compartment display get actions iterator while i has next show menu add action i next return show menu fignodemodelelement buildshowpopup argojmenu buildshowpopup argojmenu showmenu buildshowpopup actioncompartmentdisplay getactions hasnext showmenu showmenu used by pgml tee return the class name and bounds together with compartment visibility override public string class name and bounds return super class name and bounds extension point visible is extension point visible classnameandbounds classnameandbounds extensionpointvisible isextensionpointvisible see org argouml uml diagram extensions compartment container is extension point visible public boolean is extension point visible return ep vec is visible extensionscompartmentcontainer isextensionpointvisible isextensionpointvisible epvec isvisible set the visibility of the extension point compartment this is called from outside this class when the user sets visibility explicitly through the style panel or the context sensitive pop up menu p we don t change the size of the use case so we just have to mark the extension point elements visibility link set bounds int int int int will do the relayout with name in the middle for us p param is visible code true code if the compartment should be shown code false code otherwise see org argouml uml diagram extensions compartment container set extension point visible boolean public void set extension point visible boolean is visible if ep vec is visible is visible set extension point visible internal false else if ep vec is visible is visible set extension point visible internal true move the stereotype out of the way update stereotype text setbounds isvisible extensionscompartmentcontainer setextensionpointvisible setextensionpointvisible isvisible epvec isvisible isvisible setextensionpointvisibleinternal epvec isvisible isvisible setextensionpointvisibleinternal updatestereotypetext private void set extension point visible internal boolean visible record our current bounds for later use rectangle old bounds get bounds tell gef that we are starting to make a change loop through the ep vec marking each element as not visible for fig fig list fig ep vec get figs fig set visible visible mark the vector itself and the separator as not displayed ep vec set visible visible ep sep set visible visible redo the bounds and then tell gef the change has finished set bounds old bounds x old bounds y old bounds width old bounds height end trans setextensionpointvisibleinternal oldbounds getbounds epvec epvec getfigs setvisible epvec setvisible epsep setvisible setbounds oldbounds oldbounds oldbounds oldbounds endtrans creates a set of handles for dragging generalization specializations or associations p return the new selection object a gef entity override public selection make selection return new selection use case this makeselection selectionusecase compute the minimum acceptable size of the use case p we work out the minimum size of the text box and from that the radii of the enclosing ellipse p return the dimensions of the smallest size bounding box of the use case override public dimension get minimum size dimension text size get text size dimension size calc ellipse text size min vert padding return new dimension math max size width 100 math max size height 60 getminimumsize textsize gettextsize calcellipse textsize min_vert_padding a private utility routine to calculate the minimum size of the rectangle to hold the name and extension points if displayed p return the dimensions of the rectangle private dimension get text size dimension min size get name fig get minimum size now allow for the extension points if they are displayed if ep vec is visible allow for a separator spacer each side 1 pixel width line min size height 2 spacer 1 loop through all the extension points to find the widest list compartment fig text figs getep figs for compartment fig text f figs int elem width f get minimum size width min size width math max min size width elem width height allows one row for each extension point int row height math max rowheight min size height min size height row height math max 1 figs size return min size gettextsize minsize getnamefig getminimumsize epvec isvisible minsize compartmentfigtext getepfigs compartmentfigtext elemwidth getminimumsize minsize minsize elemwidth rowheight minsize minsize rowheight minsize a private utility to calculate the bounding oval for the given rectangular text box p to sufficiently constrain the problem we define that there is a gap given by the parameter code vert padding code above the top of the box to the top of the oval p all computations are done in double and then converted to integer at the end p param rect size the dimensions of the rectangle to be bounded param vert padding the padding between the top of the box and the top of the ellipse return the dimensions of the required oval private dimension calc ellipse dimension rect size int vert padding work out the radii of the ellipse a and b the top right corner of the ellipse cartesian coordinates centred on the origin will be at x y double a double b rect size height 2 0 vert padding double x rect size width 2 0 double y rect size height 2 0 formula for a is described in the overall class description a x b math sqrt b b y y result as integers rounded up we ensure that the radii are integers for convenience return new dimension int math ceil a 2 int math ceil b 2 vertpadding rectsize vertpadding calcellipse rectsize vertpadding rectsize vertpadding rectsize rectsize change the boundary of the use case p if we are called with less than the minimum size we impose the minimum size p we place the name and extension points at the centre of the rectangle p set the bounds of all components of the fig p param x x coordinate of upper left corner param y y coordinate of upper left corner param w width of bounding box param h height of bounding box override protected void set bounds impl int x int y int w int h remember where we are at present so we can tell gef later then check we are as big as the minimum size rectangle old bounds get bounds dimension min size get minimum size int neww min size width w min size width w int newh min size height h min size height h newh newh get stereotype fig get height stereotype padding work out the size of the name and extension point rectangle and hence the vertical padding dimension text size get text size int v padding newh text size height 2 adjust the alignment of the name dimension name size get name fig get minimum size get name fig set bounds x neww name size width 2 y v padding name size width name size height place extension points if they are showing if ep vec is visible curry tracks the current vertical position of each element the separator is spacer pixels below the name its length is calculated from the formula for an ellipse int curry y v padding name size height spacer int sep len 2 int calcx neww 2 0 newh 2 0 newh 2 0 curry y ep sep set shape x neww sep len 2 curry x neww sep len 2 curry extension points are 1 pixel for the line and spacer gap below the separator curry 1 spacer move the extension point figures for now we assume that extension points are the width of the overall text rectangle true unless the name is wider than any ep update fig group size x neww text size width 2 curry text size width text size height name size height spacer 2 1 set the bounds of the big port and cover big port set bounds x y neww newh cover set bounds x y neww newh record the changes in the instance variables of our parent tell gef and trigger the edges to reconsider themselves x x y y w neww h newh get stereotype fig get height stereotype padding position stereotypes fire prop change bounds old bounds get bounds update edges setboundsimpl oldbounds getbounds minsize getminimumsize minsize minsize minsize minsize getstereotypefig getheight stereotype_padding textsize gettextsize vpadding textsize namesize getnamefig getminimumsize getnamefig setbounds namesize vpadding namesize namesize epvec isvisible _spacer vpadding namesize seplen epsep setshape seplen seplen _spacer updatefiggroupsize textsize textsize textsize namesize bigport bigport setbounds setbounds _x _y _w _h getstereotypefig getheight stereotype_padding positionstereotypes firepropchange oldbounds getbounds updateedges calculates the new size of the fig group based on its extensionpoints after calculation new bounds for all sub figs considering their minimal sizes fig group need not be displayed no update event is fired this used to be a duplicate method from fig editable compartment p todo follow the improvements done to the similar code in fig editable compartment param x x param y y param w w param h h protected void update fig group size int x int y int w int h int neww w int n ep vec get figs size 1 int newh is check size math max h rowheight math max 1 n 2 h set new bounds for all included figs iterator figs ep vec get figs iterator figs next skip ep big port fig fi int fw fh int yy y while figs has next fi fig figs next fw fi get minimum size width fh fi get minimum size height if is check size fw neww 2 fw neww 2 fi set bounds x 1 yy 1 fw fh 2 if is check size neww fw 2 neww fw 2 yy fh ep big port set bounds x y neww newh calculate the rectangle containing all fig text objects ep vec calc bounds figgroup figgroup figeditablecompartment figeditablecompartment updatefiggroupsize epvec getfigs ischecksize epvec getfigs epbigport hasnext getminimumsize getminimumsize ischecksize setbounds ischecksize epbigport setbounds figtext epvec calcbounds private utility routine to work out the positive x coordinate of a point on an oval given the radii and y coordinate p param a radius in x direction param b radius in y direction param y y coordinate return positive x coordinate for the given y coordinate private double calcx double a double b double y return a math sqrt b b y y b set the line colour for the use case oval p this involves setting the code cover code oval not the big port calling the super method would cause all fig group elements to follow suit which is not wanted param col the colour desired override public void set line color color col if cover null cover set line color col ep sep set line color col bigport figgroup setlinecolor setlinecolor epsep setlinecolor get the line colour for the use case oval p this involves getting the code cover code oval colour not the big port return the colour in use override public color get line color return cover get line color bigport getlinecolor getlinecolor set the fill colour for the use case oval p this involves setting the code cover code oval not the big port calling the super method would cause all fig group elements to follow suit which is not wanted param col the colour desired override public void set fill color color col if cover null cover set fill color col bigport figgroup setfillcolor setfillcolor get the line colour for the use case oval p this involves getting the code cover code oval colour not the big port return the colour in use override public color get fill color return cover get fill color bigport getfillcolor getfillcolor set whether the use case oval is to be filled p this involves setting the code cover code oval not the big port p calling the super method would cause all fig group elements to be filled too which is not wanted for e g the stereotype figs see issue 5581 param f code true code if the oval is to be filled code false code if not override public void set filled boolean f if cover null cover set filled f bigport figgroup setfilled setfilled get whether the use case oval is to be filled p this involves getting the code cover code oval not the big port p return code true code if the oval is to be filled code false code if not override public boolean is filled return cover is filled bigport isfilled isfilled set the line width for the use case oval p this involves setting the code cover code oval not the big port calling the super method would cause all fig group elements to be filled too which is not wanted for e g the stereotype figs param w the line width desired override public void set line width int w if cover null cover set line width w bigport figgroup setlinewidth setlinewidth get the line width for the use case oval p this involves getting the code cover code oval colour not the big port p return the line width set override public int get line width return cover get line width bigport getlinewidth getlinewidth public static class fig my circle extends fig circle constructor just invokes the parent constructor p param x x coordinate of the upper left corner of the bounding box param y y coordinate of the upper left corner of the bounding box param w width of the bounding box param h height of the bounding box param l color line colour of the fig param f color fill colour of the fig public fig my circle int x int y int w int h color l color color f color super x y w h l color f color figmycircle figcircle lcolor fcolor figmycircle lcolor fcolor lcolor fcolor constructor just invokes the parent constructor p param x x coordinate of the upper left corner of the bounding box param y y coordinate of the upper left corner of the bounding box param w width of the bounding box param h height of the bounding box public fig my circle int x int y int w int h super x y w h figmycircle compute the border point of the ellipse that is on the edge between the stored upper left corner and the given parameter p param another pt the remote point to which an edge is drawn return the connection point on the boundary of the ellipse override public point connection point point another pt double rx w 2 double ry h 2 double dx another pt x x rx double dy another pt y y ry double dd ry ry dx dx rx rx dy dy double mu rx ry math sqrt dd point res new point int mu dx x rx int mu dy y ry return res anotherpt connectionpoint anotherpt _w _h anotherpt _x anotherpt _y _x _y react to a mouse key being pressed p param me the mouse action that caused us to be invoked override public void mouse pressed mouse event me deal with anything from the parent first super mouse pressed me if we are currently selected turn off the draggable buttons at each side and unhighlight any currently selected extension points editor ce globals cur editor if ce null selection sel ce get selection manager find selection for this if sel instanceof selection use case selection use case sel hide buttons unhighlight display extension point properties if necessary look to see if the mouse 2x2 pixels hit the extension point compartment use a flag to track this rectangle r new rectangle me getx 1 me gety 1 2 2 fig f hit fig r if f ep vec work out which extension point this corresponds to each ep takes rowheight pixels so take the difference between the centre of the mouse me gety 1 and the top of the ep vec f gety and integer divide by rowheight int i me gety f gety 1 rowheight list compartment fig text figs getep figs if we are in the range of the ep list size avoids any nasty boundary overflows we can select that ep entry make this entry the target fig and note that we do have a target if i 0 i figs size highlighted fig text figs get i highlighted fig text set highlighted true mousepressed mouseevent mousepressed cureditor getselectionmanager findselectionfor selectionusecase selectionusecase hidebuttons hitfig epvec epvec compartmentfigtext getepfigs highlightedfigtext highlightedfigtext sethighlighted react to a mouse key being clicked p param me the mouse action that caused us to be invoked override public void mouse clicked mouse event me super mouse clicked me if me is consumed return if is extension point visible me gety ep sep gety1 get name fig mouse clicked me else if me get click count 2 me is popup trigger me get modifiers input event button3 mask create contained model element ep vec me mouseclicked mouseevent mouseclicked isconsumed isextensionpointvisible epsep getnamefig mouseclicked getclickcount ispopuptrigger getmodifiers inputevent button3_mask createcontainedmodelelement epvec deal with the mouse leaving the fig unhighlight the fig p param me the mouse action that caused us to be invoked override public void mouse exited mouse event me super mouse exited me unhighlight mouseexited mouseevent mouseexited create a new feature extension point in the use case fig p extension points are not strictly features but that is a historical accident of naming this creates a new entry in the extension point vector p param fg the fig group to which this applies which must be the extension point vector param ie the input event that triggered us in the current implementation a mouse double click protected void create contained model element fig group fg input event ie give up if we don t have an owner if get owner null return invoke the relevant action method to create an empty extension point then start the editor assuming we successfully created an extension point action add extension point singleton action performed null compartment fig text ft compartment fig text fg get figs get fg get figs size 1 if ft null ft start text editor ie ft set highlighted true highlighted fig text ft ie consume createcontainedmodelelement figgroup inputevent getowner actionaddextensionpoint actionperformed compartmentfigtext compartmentfigtext getfigs getfigs starttexteditor sethighlighted highlightedfigtext private utility to unhighlight any currently selected extension point p return the extension point that was unhighlighted private compartment fig text unhighlight loop through the list of extension points until we find a highlighted one for compartment fig text ft getep figs if ft is highlighted ft set highlighted false highlighted fig text null return ft none were highlighted return null compartmentfigtext compartmentfigtext getepfigs ishighlighted sethighlighted highlightedfigtext override protected void model changed property change event mee let our superclass sort itself out first super model changed mee if mee instanceof association change event mee instanceof attribute change event rendering changed update listeners get owner get owner modelchanged propertychangeevent modelchanged associationchangeevent attributechangeevent renderingchanged updatelisteners getowner getowner override protected void update listeners object old owner object new owner set object l new hash set object let s register for events from all modelelements that change the name or body text if new owner null register for name changes added extensionpoints and abstract makes the text italic all figs need to listen to remove too l add new object new owner new string remove name is abstract extension point stereotype register for extension points for object ep model get facade get extension points new owner l add new object ep new string location name for object st model get facade get stereotypes new owner l add new object st name update element listeners l updatelisteners oldowner newowner hashset newowner newowner isabstract extensionpoint getfacade getextensionpoints newowner getfacade getstereotypes newowner updateelementlisteners override public void rendering changed super rendering changed if get owner null update extension point renderingchanged renderingchanged getowner updateextensionpoint updates the extensionpoints in the fig p a difference in behaviour of this function compared to the similar fig editable compartment populate is that the extensionpoints are not ordered while features are protected void update extension point give up if we have no owner object use case get owner if use case null return note our current bounds rectangle old bounds get bounds loop through all the extension points ep count keeps track of the fig s index as we go through the extension points collection eps model get facade get extension points use case int ep count 1 if eps null eps size 0 int xpos ep big port getx int ypos ep big port gety take each ep and its corresponding fig in turn iterator iter eps iterator list compartment fig text figs getep figs list compartment fig text to be removed new array list compartment fig text figs while iter has next compartment fig text ep fig null object ep iter next find the fig for this ep for compartment fig text candidate figs if candidate get owner ep ep fig candidate break if we don t have a fig for this ep we ll need to add one we set the bounds but they will be reset later if ep fig null ep fig new compartment fig text ep new rectangle xpos ypos ep count 1 rowheight 0 rowheight get settings ep fig set filled false ep fig set line width 0 ep fig set text color get text color ep fig set justification fig text justify left ep fig set return action fig text end editing ep vec add fig ep fig else this one is still usable so let s not remove it to be removed remove ep fig now put the text in we must handle the case where the text is null string ep text ep fig get notation provider to string ep get notation settings if ep text null ep text ep fig set text ep text ep count remove any spare figs we have if there are now fewer extension points than figs for fig f to be removed ep vec remove fig f now recalculate all the bounds using our old bounds set bounds old bounds x old bounds y old bounds width old bounds height figeditablecompartment updateextensionpoint usecase getowner usecase oldbounds getbounds epcount getfacade getextensionpoints usecase epcount epbigport epbigport compartmentfigtext getepfigs compartmentfigtext toberemoved arraylist compartmentfigtext hasnext compartmentfigtext epfig compartmentfigtext getowner epfig epfig epfig compartmentfigtext epcount getsettings epfig setfilled epfig setlinewidth epfig settextcolor gettextcolor epfig setjustification figtext justify_left epfig setreturnaction figtext end_editing epvec addfig epfig toberemoved epfig eptext epfig getnotationprovider tostring getnotationsettings eptext eptext epfig settext eptext epcount toberemoved epvec removefig setbounds oldbounds oldbounds oldbounds oldbounds override protected void update name text object use case get owner if use case null return rectangle old bounds get bounds now things to do with the use case itself put the use case in italics if it is abstract otherwise ordinary font super update name text set bounds old bounds x old bounds y old bounds width old bounds height updatenametext usecase getowner usecase oldbounds getbounds updatenametext setbounds oldbounds oldbounds oldbounds oldbounds override public list point get gravity points final int max points 30 list point ret new array list point max points int cx big port get center x int cy big port get center y int radiusx math round big port get width 2 1 int radiusy math round big port get height 2 1 point point null for int i 0 i max points i point new point int cx math cos 2 math pi max points i radiusx int cy math sin 2 math pi max points i radiusy ret add point return ret getgravitypoints maxpoints arraylist maxpoints bigport getcenter bigport getcenter bigport getwidth bigport getheight maxpoints maxpoints maxpoints override protected void update stereotype text super update stereotype text if get owner null return position stereotypes damage updatestereotypetext updatestereotypetext getowner positionstereotypes private void position stereotypes if fig group get stereotype fig get fig count 0 get stereotype fig set bounds getx get width 2 get stereotype fig get width 2 gety big port get height stereotype padding get stereotype fig get width get stereotype fig get height else get stereotype fig set bounds 0 0 0 0 positionstereotypes figgroup getstereotypefig getfigcount getstereotypefig setbounds getwidth getstereotypefig getwidth bigport getheight stereotype_padding getstereotypefig getwidth getstereotypefig getheight getstereotypefig setbounds get a list of the extension point figs em without em the first fig which is the bigport fig return a list of the extension point figs private list compartment fig text getep figs list compartment fig text l new array list compartment fig text ep vec get figs l remove 0 return l compartmentfigtext getepfigs compartmentfigtext arraylist compartmentfigtext epvec getfigs constructor for action new extend extension point protected action new extend extension point super actionnewextendextensionpoint actionnewextendextensionpoint public void action performed action event e super action performed e if model get facade isa extend get target object point model get use cases factory build extension point model get facade get base get target model get use cases helper add extension point get target point actionperformed actionevent actionperformed getfacade isaextend gettarget getusecasesfactory buildextensionpoint getfacade getbase gettarget getusecaseshelper addextensionpoint gettarget the constructor public action new interface super button new interface put value action name translator localize button new interface actionnewinterface putvalue public void action performed action event e object target target manager get instance get model target if model get facade isa interface target object iface target object new interface model get core factory create interface model get core helper add owned element model get facade get namespace iface new interface target manager get instance set target new interface super action performed e actionperformed actionevent targetmanager getinstance getmodeltarget getfacade isainterface newinterface getcorefactory createinterface getcorehelper addownedelement getfacade getnamespace newinterface targetmanager getinstance settarget newinterface actionperformed the constructor param o the target public action visibility private object o super checkbox visibility private uc false put value selected boolean value of model get visibility kind get private equals value of target o actionvisibilityprivate putvalue valueof getvisibilitykind getprivate valueoftarget see org argouml uml diagram ui abstract action radio menu item toggle value of target java lang object void toggle value of target object t model get core helper set visibility t model get visibility kind get private abstractactionradiomenuitem togglevalueoftarget togglevalueoftarget getcorehelper setvisibility getvisibilitykind getprivate make use of the default visibility which is public todo centralise this knowledge see org argouml uml diagram ui abstract action radio menu item value of target java lang object object value of target object t object v model get facade get visibility t return v null model get visibility kind get public v abstractactionradiomenuitem valueoftarget valueoftarget getfacade getvisibility getvisibilitykind getpublic construct a new property panel for a pseudo state branch fork etc public prop panel pseudostate super label pseudostate lookup icon state add field label name get name text field add field label container get container scroll add separator add field label incoming get incoming scroll add field label outgoing get outgoing scroll target manager get instance add target listener this pseudostate proppanelpseudostate lookupicon addfield getnametextfield addfield getcontainerscroll addseparator addfield getincomingscroll addfield getoutgoingscroll targetmanager getinstance addtargetlistener this method is responsible for setting the title of the proppanel according to the type of the pseudo state displayed in the property panel this is required as pseudostates share a common class and are distinguished only by an attribute pseudostatekind public void refresh target object target target manager get instance get model target if model get facade isa pseudostate target object kind model get facade get kind target if model get facade equals pseudostate kind kind model get pseudostate kind get fork get title label set text translator localize label pseudostate fork if model get facade equals pseudostate kind kind model get pseudostate kind get join get title label set text translator localize label pseudostate join if model get facade equals pseudostate kind kind model get pseudostate kind get choice get title label set text translator localize label pseudostate choice if model get facade equals pseudostate kind kind model get pseudostate kind get deep history get title label set text translator localize label pseudostate deephistory if model get facade equals pseudostate kind kind model get pseudostate kind get shallow history get title label set text translator localize label pseudostate shallowhistory if model get facade equals pseudostate kind kind model get pseudostate kind get initial get title label set text translator localize label pseudostate initial if model get facade equals pseudostate kind kind model get pseudostate kind get junction get title label set text translator localize label pseudostate junction icon icon resource loader wrapper get instance lookup icon target if icon null get title label set icon icon refreshtarget targetmanager getinstance getmodeltarget getfacade isapseudostate getfacade getkind getfacade equalspseudostatekind getpseudostatekind getfork gettitlelabel settext getfacade equalspseudostatekind getpseudostatekind getjoin gettitlelabel settext getfacade equalspseudostatekind getpseudostatekind getchoice gettitlelabel settext getfacade equalspseudostatekind getpseudostatekind getdeephistory gettitlelabel settext getfacade equalspseudostatekind getpseudostatekind getshallowhistory gettitlelabel settext getfacade equalspseudostatekind getpseudostatekind getinitial gettitlelabel settext getfacade equalspseudostatekind getpseudostatekind getjunction gettitlelabel settext resourceloaderwrapper getinstance lookupicon gettitlelabel seticon override public void target added target event e if model get facade isa pseudostate e get new target refresh target super target added e targetadded targetevent getfacade isapseudostate getnewtarget refreshtarget targetadded override public void target removed target event e if model get facade isa pseudostate e get new target refresh target super target removed e targetremoved targetevent getfacade isapseudostate getnewtarget refreshtarget targetremoved override public void target set target event e if model get facade isa pseudostate e get new target refresh target super target set e targetset targetevent getfacade isapseudostate getnewtarget refreshtarget targetset based on the input of a model element name this method should compute a suggestion for the wizard to present to the user please write tests against this method for concrete implementations param name the unconventional name return a wizard suggestion constructor for action new pseudo state protected action new stub state super put value action name translator localize button new stubstate actionnewpseudostate actionnewstubstate putvalue see java awt event action listener action performed java awt event action event public void action performed action event e super action performed e model get state machines factory build stub state get target actionlistener actionperformed actionevent actionperformed actionevent actionperformed getstatemachinesfactory buildstubstate gettarget return returns the singleton public static action new stub state get instance return singleton actionnewstubstate getinstance the constructor of the style panel of a fig this constructor does not create any contents of the panel param title the title string public style panel fig string title super title stylepanelfig the constructor public style panel fig super fig appearance init choices document bbox doc bbox field get document bbox doc add document listener this bbox field add key listener this bbox field add focus listener this fill field add item listener this line field add item listener this stereo field add item listener this fill field set renderer new color renderer line field set renderer new color renderer bbox label set label for bbox field add bbox label add bbox field fill label set label for fill field add fill label add fill field line label set label for line field add line label add line field stereo label set label for stereo field add stereo label add stereo field stylepanelfig initchoices bboxdoc bboxfield getdocument bboxdoc adddocumentlistener bboxfield addkeylistener bboxfield addfocuslistener fillfield additemlistener linefield additemlistener stereofield additemlistener fillfield setrenderer colorrenderer linefield setrenderer colorrenderer bboxlabel setlabelfor bboxfield bboxlabel bboxfield filllabel setlabelfor fillfield filllabel fillfield linelabel setlabelfor linefield linelabel linefield stereolabel setlabelfor stereofield stereolabel stereofield fill in the user choices protected void init choices fill field add item translator localize label stylepane no fill fill field add item color black fill field add item color white fill field add item color gray fill field add item color light gray fill field add item color dark gray fill field add item new color 255 255 200 fill field add item new color 255 200 255 fill field add item new color 200 255 255 fill field add item new color 200 200 255 fill field add item new color 200 255 200 fill field add item new color 255 200 200 fill field add item new color 200 200 200 fill field add item color red fill field add item color blue fill field add item color cyan fill field add item color yellow fill field add item color magenta fill field add item color green fill field add item color orange fill field add item color pink fill field add item custom item line field add item translator localize label stylepane no line line field add item color black line field add item color white line field add item color gray line field add item color light gray line field add item color dark gray line field add item new color 60 60 200 line field add item new color 60 200 60 line field add item new color 200 60 60 line field add item color red line field add item color blue line field add item color cyan line field add item color yellow line field add item color magenta line field add item color green line field add item color orange line field add item color pink line field add item custom item default combo box model model new default combo box model stereo field set model model note these must stay in this order to match rendering styles model add element translator localize menu popup stereotype view textual model add element translator localize menu popup stereotype view big icon model add element translator localize menu popup stereotype view small icon initchoices fillfield additem fillfield additem fillfield additem fillfield additem fillfield additem lightgray fillfield additem darkgray fillfield additem fillfield additem fillfield additem fillfield additem fillfield additem fillfield additem fillfield additem fillfield additem fillfield additem fillfield additem fillfield additem fillfield additem fillfield additem fillfield additem fillfield additem fillfield additem custom_item linefield additem linefield additem linefield additem linefield additem linefield additem lightgray linefield additem darkgray linefield additem linefield additem linefield additem linefield additem linefield additem linefield additem linefield additem linefield additem linefield additem linefield additem linefield additem linefield additem custom_item defaultcomboboxmodel defaultcomboboxmodel stereofield setmodel addelement addelement addelement set whether this fig has a editable boundingbox this is done normally in code refresh code e g for fig edge model elements where it does not make sense to edit the bounding box param value the boolean value of the bounding box property protected void has editable bounding box boolean value bbox field set enabled value bbox label set enabled value figedgemodelelements haseditableboundingbox bboxfield setenabled bboxlabel setenabled handle a refresh of the style panel after the fig has moved p em warning em there is a circular trap here editing the boundary box will also trigger a refresh and so we reset the boundary box which causes funny behaviour the cursor keeps jumping to the end of the text the solution is to not reset the boundary box field if the boundaries have not changed p public void refresh fig target get panel target todo how about fig association class if target instanceof fig edge model element has editable bounding box false else has editable bounding box true if target null return the boundary box as held in the target fig and as listed in the boundary box style field null if we don t have anything valid rectangle fig bounds target get bounds rectangle style bounds parseb box only reset the text if the two are not the same i e the fig has moved rather than we ve just edited the text when set targetb box will have made them the same note that style bounds could be null so we do the test this way round if fig bounds equals style bounds bbox field set text fig bounds x fig bounds y fig bounds width fig bounds height change the fill colour if target is filled color c target get fill color fill field set selected item c if c null fill field get selected item equals c fill field insert item at c fill field get item count 1 fill field set selected item c else fill field set selected index 0 change the line colour if target get line width 0 color c target get line color todo this is going to cause the color to be reset on a refresh line field set selected item c if c null line field get selected item equals c line field insert item at c line field get item count 1 line field set selected item c else line field set selected index 0 stereo field set enabled target instanceof stereotype styled stereo label set enabled target instanceof stereotype styled if target instanceof stereotype styled stereotype styled fig stereotype styled target stereo field set selected index fig get stereotype style ordinal getpaneltarget figassociationclass figedgemodelelement haseditableboundingbox haseditableboundingbox figbounds getbounds stylebounds parsebbox settargetbbox stylebounds figbounds stylebounds bboxfield settext figbounds figbounds figbounds figbounds isfilled getfillcolor fillfield setselecteditem fillfield getselecteditem fillfield insertitemat fillfield getitemcount fillfield setselecteditem fillfield setselectedindex getlinewidth getlinecolor linefield setselecteditem linefield getselecteditem linefield insertitemat linefield getitemcount linefield setselecteditem linefield setselectedindex stereofield setenabled stereotypestyled stereolabel setenabled stereotypestyled stereotypestyled stereotypestyled stereotypestyled stereofield setselectedindex getstereotypestyle change the bounds of the target fig called whenever the bounds box is edited p format of the bounds is four integers representing x y width and height separated by spaces or commas an empty field is treated as no change and leading and trailing spaces are ignored p em note em there is a note in the old code that more work might be needed because this could change the graph model i don t see how that could ever be protected void set targetb box fig target get panel target can t do anything if we don t have a fig if target null return parse the boundary box text null is returned if it is empty or invalid which causes no change otherwise we tell gef we are making a change make the change and tell gef we ve finished rectangle bounds parseb box if bounds null return if target get bounds equals bounds target set bounds bounds x bounds y bounds width bounds height target end trans settargetbbox getpaneltarget parsebbox getbounds setbounds endtrans parse the boundary box string and return the rectangle it represents p the syntax are four integers separated by spaces or commas we ignore leading and trailing blanks p if we have the empty string we return code null code p if we fail to parse then we return code null code and print out a rude message p return the size of the box or code null code if the bounds string is empty or invalid protected rectangle parseb box fig target get panel target get the text in the field and don t do anything if the field is empty string bbox str bbox field get text trim if bbox str length 0 return null parse the string as if possible rectangle res new rectangle java util string tokenizer st new java util string tokenizer bbox str try boolean changed false if st has more tokens return target get bounds res x integer parse int st next token if st has more tokens res y target get bounds y res width target get bounds width res height target get bounds height return res res y integer parse int st next token if st has more tokens res width target get bounds width res height target get bounds height return res res width integer parse int st next token todo what does the magic number 6000 represent here put it in an explanatory literal tfm 20071205 if res width res x 6000 res width 6000 res x changed true if st has more tokens res width target get bounds width return res res height integer parse int st next token todo what does the magic number 6000 represent here put it in an explanatory literal tfm 20071205 if res height res y 6000 res height 6000 res y changed true if res x 0 res y 0 todo this exception will be thrown during autoscrolling when the edge of the canvas is reached causing either the width or height to be adjusted to a negative value log warn part of bounding box is off screen res if res width 0 res height 0 todo this exception will be thrown during autoscrolling when the edge of the canvas is reached causing either the width or height to be adjusted to a negative value throw new illegal argument exception bounding box has negative size res if changed string buffer sb new string buffer sb append integer to string res x sb append sb append integer to string res y sb append sb append integer to string res width sb append sb append integer to string res height bbox field set text sb to string catch number format exception ex bbox field set background color red return null catch illegal argument exception iae bbox field set background color red return null bbox field set background null return res parsebbox getpaneltarget bboxstr bboxfield gettext bboxstr stringtokenizer stringtokenizer bboxstr hasmoretokens getbounds parseint nexttoken hasmoretokens getbounds getbounds getbounds parseint nexttoken hasmoretokens getbounds getbounds parseint nexttoken hasmoretokens getbounds parseint nexttoken illegalargumentexception stringbuffer stringbuffer tostring tostring tostring tostring bboxfield settext tostring numberformatexception bboxfield setbackground illegalargumentexception bboxfield setbackground bboxfield setbackground prompts the user for a new custom color and adds that color to the combo box param field the combobox to enter a new color for param title the i18n key for the title for the dialog box param target color the initial color set when the color chooser is shown protected void handle custom color j combo box field string title color target color color new color j color chooser show dialog argo frame get instance translator localize title target color if new color null field insert item at new color field get item count 1 field set selected item new color else if get panel target null field set selected item target color targetcolor handlecustomcolor jcombobox targetcolor newcolor jcolorchooser showdialog argoframe getinstance targetcolor newcolor insertitemat newcolor getitemcount setselecteditem newcolor getpaneltarget setselecteditem targetcolor change the fill public void set target fill fig target get panel target object c fill field get selected item if target null c null return if c instanceof color target set fill color color c target set filled c instanceof color target end trans settargetfill getpaneltarget fillfield getselecteditem setfillcolor setfilled endtrans change the line public void set target line fig target get panel target object c line field get selected item if target null c null return if c instanceof color target set line color color c target set line width c instanceof color argo fig line width 0 target end trans settargetline getpaneltarget linefield getselecteditem setlinecolor setlinewidth argofig line_width endtrans public void item state changed item event e object src e get source fig target get panel target if e get state change item event selected target null if src fill field if e get item custom item handle custom color fill field label stylepane custom fill color target get fill color set target fill else if src line field if e get item custom item handle custom color line field label stylepane custom line color target get line color set target line else if src stereo field if target instanceof stereotype styled object item e get item default combo box model model default combo box model stereo field get model int idx model get index of item stereotype styled fig stereotype styled target fig set stereotype style stereotype style get enum idx itemstatechanged itemevent getsource getpaneltarget getstatechange itemevent fillfield getitem custom_item handlecustomcolor fillfield getfillcolor settargetfill linefield getitem custom_item handlecustomcolor linefield getlinecolor settargetline stereofield stereotypestyled getitem defaultcomboboxmodel defaultcomboboxmodel stereofield getmodel getindexof stereotypestyled stereotypestyled setstereotypestyle stereotypestyle getenum see java awt event focus listener focus gained java awt event focus event public void focus gained focus event e focuslistener focusgained focusevent focusgained focusevent makes sure that the fig is updated when the bbox field loses focus inherit doc public void focus lost focus event e if e get source bbox field set targetb box bboxfield inheritdoc focuslost focusevent getsource bboxfield settargetbbox see java awt event key listener key pressed java awt event key event public void key pressed key event e empty implementation we only care about key typed keylistener keypressed keyevent keypressed keyevent keytyped see java awt event key listener key released java awt event key event public void key released key event e empty implementation we only care about key typed keylistener keyreleased keyevent keyreleased keyevent keytyped public void key typed key event e if e get source equals bbox field e get key char n set targetb box keytyped keyevent getsource bboxfield getkeychar settargetbbox return returns the bboxlabel protected j label getb box label return bbox label _bboxlabel jlabel getbboxlabel bboxlabel return returns the bboxfield protected j text field getb box field return bbox field _bboxfield jtextfield getbboxfield bboxfield return returns the filllabel protected j label get fill label return fill label _filllabel jlabel getfilllabel filllabel return returns the fillfield protected j combo box get fill field return fill field _fillfield jcombobox getfillfield fillfield return returns the linelabel protected j label get line label return line label _linelabel jlabel getlinelabel linelabel return returns the linefield protected j combo box get line field return line field _linefield jcombobox getlinefield linefield return returns the spacer protected spacer panel get spacer return spacer _spacer spacerpanel getspacer return returns the spacer2 protected spacer panel get spacer2 return spacer2 _spacer2 spacerpanel getspacer2 return returns the spacer3 protected spacer panel get spacer3 return spacer3 _spacer3 spacerpanel getspacer3 return returns the translated name of the custom item protected static string get custom item name return custom item getcustomitemname custom_item the constructor param the owner the graphical object for which this mouselistener is registered public uml link mouse listener j list the owner this the owner 2 theowner umllinkmouselistener jlist theowner theowner the constructor param the owner the graphical object for which this mouselistener is registered param number ofmouse clicks the total amount of mouseclicks the user has to do to go to the selected element private uml link mouse listener j list the owner int number ofmouse clicks owner the owner number of mouse clicks number ofmouse clicks theowner numberofmouseclicks umllinkmouselistener jlist theowner numberofmouseclicks theowner numberofmouseclicks numberofmouseclicks public void mouse clicked mouse event e if e get click count number of mouse clicks swing utilities is left mouse button e object o owner get selected value if model get facade isa model element o target manager get instance set target o e consume mouseclicked mouseevent getclickcount numberofmouseclicks swingutilities isleftmousebutton getselectedvalue getfacade isamodelelement targetmanager getinstance settarget see java awt event mouse listener mouse entered java awt event mouse event public void mouse entered mouse event e ignored mouselistener mouseentered mouseevent mouseentered mouseevent see java awt event mouse listener mouse exited java awt event mouse event public void mouse exited mouse event e ignored mouselistener mouseexited mouseevent mouseexited mouseevent see java awt event mouse listener mouse pressed java awt event mouse event public void mouse pressed mouse event e ignored mouselistener mousepressed mouseevent mousepressed mouseevent java awt event mouse event public void mouse released mouse event e ignored mouseevent mousereleased mouseevent the constructor public cr zero length edge todo name is not expanded for diagram objects setup head and desc add supported decision uml decision relationships add supported decision uml decision inheritance add supported decision uml decision state machines set knowledge types critic kt presentation crzerolengthedge setupheadanddesc addsupporteddecision umldecision addsupporteddecision umldecision addsupporteddecision umldecision state_machines setknowledgetypes kt_presentation public boolean predicate2 object dm designer dsgr if dm instanceof fig edge return no problem fig edge fe fig edge dm int length fe get perimeter length if length threshold return no problem return problem found figedge no_problem figedge figedge getperimeterlength no_problem problem_found the constructor param w the wizard param instr the instructions param ch the choices public wiz step choice wizard w string instr list string ch store wizard choices ch instructions set text instr instructions set wrap style word true instructions set editable false instructions set border null instructions set background get main panel get background get main panel set border new etched border grid bag layout gb new grid bag layout get main panel set layout gb grid bag constraints c new grid bag constraints c ipadx 3 c ipady 3 c weightx 0 0 c weighty 0 0 c anchor grid bag constraints east j label image new j label image set margin new insets 0 0 0 0 image set icon get wizard icon image set border null c gridx 0 c gridheight grid bag constraints remainder c gridy 0 c anchor grid bag constraints north gb set constraints image c get main panel add image c weightx 1 0 c gridx 2 c gridheight 1 c gridwidth 3 c gridy 0 c fill grid bag constraints horizontal gb set constraints instructions c get main panel add instructions c gridx 1 c gridy 1 c weightx 0 0 c gridwidth 1 c fill grid bag constraints none spacer panel spacer new spacer panel gb set constraints spacer c get main panel add spacer c gridx 2 c weightx 1 0 c anchor grid bag constraints west c gridwidth 1 int size ch size for int i 0 i size i c gridy 2 i string s ch get i j radio button rb new j radio button s rb set action command s rb add action listener this gb set constraints rb c get main panel add rb c gridx 1 c gridy 3 ch size c weightx 0 0 c gridwidth 1 c fill grid bag constraints none spacer panel spacer2 new spacer panel gb set constraints spacer2 c get main panel add spacer2 wizstepchoice settext setwrapstyleword seteditable setborder setbackground getmainpanel getbackground getmainpanel setborder etchedborder gridbaglayout gridbaglayout getmainpanel setlayout gridbagconstraints gridbagconstraints gridbagconstraints jlabel jlabel setmargin seticon getwizardicon setborder gridbagconstraints gridbagconstraints setconstraints getmainpanel gridbagconstraints setconstraints getmainpanel gridbagconstraints spacerpanel spacerpanel setconstraints getmainpanel gridbagconstraints jradiobutton jradiobutton setactioncommand addactionlistener setconstraints getmainpanel gridbagconstraints spacerpanel spacerpanel setconstraints getmainpanel return the index of the selected item public int get selected index return selected index getselectedindex selectedindex override public void action performed action event e super action performed e if e get source instanceof j radio button string cmd e get action command if cmd null selected index 1 return int size choices size for int i 0 i size i string s choices get i if s equals cmd selected index i get wizard do action enable buttons actionperformed actionevent actionperformed getsource jradiobutton getactioncommand selectedindex selectedindex getwizard doaction enablebuttons param event type reported by this event param src object that caused the event param message the help text string already translated to be shown public argo help event int event type object src string message super event type src help text message eventtype argohelpevent eventtype eventtype helptext indicates the start of the 100 digit range for help events return the first id reserved for events override public int get event start range return any help event geteventstartrange any_help_event return returns the help text public string get help text return help text helptext gethelptext helptext param new predicate the new list predicate public void set list predicate predicate new predicate list predicate new predicate newpredicate setlistpredicate newpredicate listpredicate newpredicate return the list predicate public predicate get predicate return list predicate getpredicate listpredicate see javax swing tree tree model get root public object get root throw new unsupported operation exception treemodel getroot getroot unsupportedoperationexception param r ignored public void set root object r does nothing setroot a notation without a version or icon param the name the name of the notation protected notation name impl string the name this the name null null thename notationnameimpl thename thename a notation without a version and with an icon param the name the name of the notation param the icon the icon for of the notation protected notation name impl string the name icon the icon this the name null the icon thename theicon notationnameimpl thename theicon thename theicon a notation with a version and no icon param the name the name of the notation param the version the version of the notation protected notation name impl string the name string the version this the name the version null thename theversion notationnameimpl thename theversion thename theversion a notation with a version and an icon param my name the name of the notation param my version the version of the notation param my icon the icon of the notation protected notation name impl string my name string my version icon my icon name my name version my version icon my icon myname myversion myicon notationnameimpl myname myversion myicon myname myversion myicon accessor for the language name see org argouml notation notation name get name public string get name return name notationname getname getname accessor for the language version see org argouml notation notation name get version public string get version return version notationname getversion getversion gets a textual title for the notation suitable for use in a combo box or other such visual location see org argouml notation notation name get title public string get title string my name name if my name equals ignore case uml my name my name to upper case if version null version equals return my name return my name version notationname gettitle gettitle myname myname equalsignorecase myname myname touppercase myname myname returns an icon for the notation or null if no icon is available see org argouml notation notation name get icon public icon get icon return icon notationname geticon geticon see org argouml notation notation name get configuration value public string get configuration value return get notation name string name version notationname getconfigurationvalue getconfigurationvalue getnotationnamestring see java lang object to string public string to string return get title tostring tostring gettitle param k1 first part of the given name param k2 2nd part of the given name return the notation name string static string get notation name string string k1 string k2 if k2 null return k1 if k2 equals return k1 return k1 k2 getnotationnamestring private static void fire event int event type notation name nn argo event pump fire event new argo notation event event type nn fireevent eventtype notationname argoeventpump fireevent argonotationevent eventtype create a notation name with or without a version the notation name is only created if there is no such notation before param k1 the 1st part of the notation name param k2 the 2nd part of the notation name param icon the icon for the notation return the newly created or the old notation name static notation name make notation string k1 string k2 icon icon notation name nn null nn find notation get notation name string k1 k2 if nn null nn new notation name impl k1 k2 icon notations add nn fire event argo event types notation added nn return nn notationname notationname notationname notationname makenotation notationname findnotation getnotationnamestring notationnameimpl fireevent argoeventtypes notation_added static boolean remove notation notation name the notation return notations remove the notation removenotation notationname thenotation thenotation get all of the registered notations return a list with all notations static list notation name get available notations return collections unmodifiable list notations notationname getavailablenotations unmodifiablelist finds a notation name matching the string matching the name of the notation returns null if no match param s the name string return the notation name or null static notation name find notation string s list iterator iterator notations list iterator while iterator has next try notation name nn notation name iterator next if s equals nn get configuration value return nn catch exception e todo document why we catch this log error unexpected exception e return null notationname notationname notationname findnotation listiterator listiterator hasnext notationname notationname getconfigurationvalue see org argouml notation notation name same notation as org argouml notation notation name public boolean same notation as notation name nn return this get configuration value equals nn get configuration value notationname samenotationas notationname samenotationas notationname getconfigurationvalue getconfigurationvalue finds a notation name matching the language with no version returns null if no match param k1 the notation name string return the notation name static notation name get notation string k1 return find notation get notation name string k1 null notationname notationname getnotation findnotation getnotationnamestring finds a notation name matching the language and version returns null if no match param k1 the 1st part of the notation name param k2 the 2nd part of the notation name return the notation name static notation name get notation string k1 string k2 return find notation get notation name string k1 k2 notationname notationname getnotation findnotation getnotationnamestring create a new set of project settings based on the application defaults p the constructor is not public since this class is only created from the project project settings super dia default new diagram settings np settings dia default get notation settings string notation language notation get configured notation get configuration value todo the concept of a single global notation language doesn t work with multiple projects notation provider factory2 set current language notation language np settings set notation language notation language dia default set show bold names configuration get boolean notation key show bold names np settings set use guillemets configuration get boolean notation key use guillemots false the next one defaults to true to stay compatible with older argouml versions that did not have this setting np settings set show association names configuration get boolean notation key show association names true np settings set show visibilities configuration get boolean notation key show visibility np settings set show multiplicities configuration get boolean notation key show multiplicity np settings set show initial values configuration get boolean notation key show initial value np settings set show properties configuration get boolean notation key show properties the next ones defaults to true to stay compatible with older argouml versions that did not have this setting np settings set show types configuration get boolean notation key show types true todo why is this a notation setting dia default set show bidirectional arrows configuration get boolean notation key hide bidirectional arrows true show explorer stereotypes configuration get boolean notation key show stereotypes the next one defaults to true despite that this is not compatible with older argouml versions before 0 24 that did not have this setting see issue 1395 for the rationale np settings set show singular multiplicities configuration get boolean notation key show singular multiplicities true todo why is this a notation setting dia default set default shadow width configuration get integer notation key default shadow width 1 dia default set default stereotype view configuration get integer profile configuration key default stereotype view diagram appearance stereotype view textual diagram appearance settings dia default set font name diagram appearance get instance get configured font name dia default set font size configuration get integer diagram appearance key font size projectsettings diadefault diagramsettings npsettings diadefault getnotationsettings notationlanguage getconfigurednotation getconfigurationvalue notationproviderfactory2 setcurrentlanguage notationlanguage npsettings setnotationlanguage notationlanguage diadefault setshowboldnames getboolean key_show_bold_names npsettings setuseguillemets getboolean key_use_guillemots npsettings setshowassociationnames getboolean key_show_association_names npsettings setshowvisibilities getboolean key_show_visibility npsettings setshowmultiplicities getboolean key_show_multiplicity npsettings setshowinitialvalues getboolean key_show_initial_value npsettings setshowproperties getboolean key_show_properties npsettings setshowtypes getboolean key_show_types diadefault setshowbidirectionalarrows getboolean key_hide_bidirectional_arrows showexplorerstereotypes getboolean key_show_stereotypes npsettings setshowsingularmultiplicities getboolean key_show_singular_multiplicities diadefault setdefaultshadowwidth getinteger key_default_shadow_width diadefault setdefaultstereotypeview getinteger profileconfiguration key_default_stereotype_view diagramappearance stereotype_view_textual diadefault setfontname diagramappearance getinstance getconfiguredfontname diadefault setfontsize getinteger diagramappearance key_font_size send all events required for post load of project p deprecated for 0 27 2 by tfmorris no replacement diagrams figs are now created with the correct initial settings deprecated public void init since this is hopefully a temporary solution and nobody ever looks at the type of notation event we can simplify from sending every existing event to one event only but since there is no catch all event defined we just make one up rationale reduce the number of total refreshes of the drawing init true configuration make key notation all since this is hopefully a temporary solution and nobody ever looks at the type of the diagram appearance event we can simplify from sending every existing event to one event only but since there is no catch all event defined we just use one rationale reduce the number of total refreshes of the drawing fire diagram appearance event configuration make key diagramappearance all 0 0 makekey firediagramappearanceevent makekey private void init boolean value configuration key key fire notation event key value value configurationkey firenotationevent return the default diagram settings public diagram settings get default diagram settings return dia default diagramsettings getdefaultdiagramsettings diadefault return the default project wide notation settings public notation settings get notation settings return np settings notationsettings getnotationsettings npsettings used by argo tee return returns the notation language public string get notation language return np settings get notation language getnotationlanguage npsettings getnotationlanguage return return the notation name public notation name get notation name return notation find notation get notation language notationname getnotationname findnotation getnotationlanguage param new language the notation language return true if the notation is set false if it does not exist public boolean set notation language final string new language if get notation language equals new language return true if notation find notation new language null this notation is not available return false final string old language get notation language memento memento new memento private final configuration key key notation key default notation public void redo np settings set notation language new language notation provider factory2 set current language new language fire notation event key old language new language public void undo np settings set notation language old language notation provider factory2 set current language old language fire notation event key new language old language do undoable memento return true newlanguage setnotationlanguage newlanguage getnotationlanguage newlanguage findnotation newlanguage oldlanguage getnotationlanguage configurationkey key_default_notation npsettings setnotationlanguage newlanguage notationproviderfactory2 setcurrentlanguage newlanguage firenotationevent oldlanguage newlanguage npsettings setnotationlanguage oldlanguage notationproviderfactory2 setcurrentlanguage oldlanguage firenotationevent newlanguage oldlanguage doundoable public void redo np settings set notation language new language notation provider factory2 set current language new language fire notation event key old language new language npsettings setnotationlanguage newlanguage notationproviderfactory2 setcurrentlanguage newlanguage firenotationevent oldlanguage newlanguage public void undo np settings set notation language old language notation provider factory2 set current language old language fire notation event key new language old language npsettings setnotationlanguage oldlanguage notationproviderfactory2 setcurrentlanguage oldlanguage firenotationevent newlanguage oldlanguage private void do undoable memento memento todo this needs to be managing undo on a per project basis instead of using gef s global undo manager if undo manager get instance is generate mementos undo manager get instance add memento memento memento redo project manager get manager set save enabled true doundoable undomanager getinstance isgeneratemementos undomanager getinstance addmemento projectmanager getmanager setsaveenabled param nn the new notation language public void set notation language notation name nn set notation language nn get configuration value setnotationlanguage notationname setnotationlanguage getconfigurationvalue used by argo tee return returns true if we show bold names public string get show bold names return boolean to string get show bold names value getshowboldnames tostring getshowboldnamesvalue return returns code true code if we show bold names deprecated for 0 27 2 by tfmorris use link diagram settings deprecated public boolean get show bold names value return dia default is show bold names diagramsettings getshowboldnamesvalue diadefault isshowboldnames param showbold code true code if names are to be shown in bold font deprecated for 0 27 2 by tfmorris use link diagram settings deprecated public void set show bold names string showbold set show bold names boolean value of showbold boolean value diagramsettings setshowboldnames setshowboldnames valueof booleanvalue param showem code true code if names are to be shown in bold font deprecated for 0 27 2 by tfmorris use link diagram settings deprecated public void set show bold names final boolean showem if dia default is show bold names showem return memento memento new memento private final configuration key key notation key show bold names public void redo dia default set show bold names showem fire notation event key showem showem public void undo dia default set show bold names showem fire notation event key showem showem do undoable memento diagramsettings setshowboldnames diadefault isshowboldnames configurationkey key_show_bold_names diadefault setshowboldnames firenotationevent diadefault setshowboldnames firenotationevent doundoable private final configuration key key notation key show bold names public void redo dia default set show bold names showem fire notation event key showem showem configurationkey key_show_bold_names diadefault setshowboldnames firenotationevent public void undo dia default set show bold names showem fire notation event key showem showem diadefault setshowboldnames firenotationevent used by argo tee see get use guillemots value return returns true if we show guillemets public string get use guillemots return boolean to string get use guillemots value getuseguillemotsvalue getuseguillemots tostring getuseguillemotsvalue get setting controlling whether guillemets the double angle brackets quotation mark characters from unicode are to be used for formatting instead of two individual characters for each quote mark e g note this affects not only the diagrams but also display in the explorer view and other places return returns code true code if we show guillemets public boolean get use guillemots value return np settings is use guillemets getuseguillemotsvalue npsettings isuseguillemets see get use guillemots value param showem code true code if guillemets are to be used public void set use guillemots string showem set use guillemots boolean value of showem boolean value getuseguillemotsvalue setuseguillemots setuseguillemots valueof booleanvalue see get use guillemots value param showem code true code if guillemets are to be shown public void set use guillemots final boolean showem if get use guillemots value showem return memento memento new memento private final configuration key key notation key use guillemots public void redo np settings set use guillemets showem fire notation event key showem showem public void undo np settings set use guillemets showem fire notation event key showem showem do undoable memento getuseguillemotsvalue setuseguillemots getuseguillemotsvalue configurationkey key_use_guillemots npsettings setuseguillemets firenotationevent npsettings setuseguillemets firenotationevent doundoable private final configuration key key notation key use guillemots public void redo np settings set use guillemets showem fire notation event key showem showem configurationkey key_use_guillemots npsettings setuseguillemets firenotationevent public void undo np settings set use guillemets showem fire notation event key showem showem npsettings setuseguillemets firenotationevent return the left pointing guillemet i e or the one character symbol deprecated for 0 27 2 by tfmorris there s no need for a separate method for this it can be easily handled in a format string using the results of link diagram settings is use guillemets deprecated public string get left guillemot return get use guillemots value u00ab diagramsettings isuseguillemets getleftguillemot getuseguillemotsvalue return the right pointing guillemet i e or the one character symbol deprecated for 0 27 2 by tfmorris there s no need for a separate method for this it can be easily handled in a format string using the results of link diagram settings is use guillemets deprecated public string get right guillemot return get use guillemots value u00bb diagramsettings isuseguillemets getrightguillemot getuseguillemotsvalue used by argo tee return returns true if we show association names deprecated for 0 27 2 by tfmorris use link notation settings deprecated public string get show association names return boolean to string get show association names value notationsettings getshowassociationnames tostring getshowassociationnamesvalue return returns code true code if we show association names deprecated for 0 27 2 by tfmorris use link notation settings deprecated public boolean get show association names value return np settings is show association names notationsettings getshowassociationnamesvalue npsettings isshowassociationnames param showem code true code if association names are to be shown deprecated for 0 27 2 by tfmorris use link notation settings deprecated public void set show association names string showem set show association names boolean value of showem boolean value notationsettings setshowassociationnames setshowassociationnames valueof booleanvalue param showem code true code if association names are to be shown deprecated for 0 27 2 by tfmorris use link notation settings deprecated public void set show association names final boolean showem if np settings is show association names showem return memento memento new memento private final configuration key key notation key show association names public void redo np settings set show association names showem fire notation event key showem showem public void undo np settings set show association names showem fire notation event key showem showem do undoable memento notationsettings setshowassociationnames npsettings isshowassociationnames configurationkey key_show_association_names npsettings setshowassociationnames firenotationevent npsettings setshowassociationnames firenotationevent doundoable notation key show association names public void redo np settings set show association names showem fire notation event key showem showem key_show_association_names npsettings setshowassociationnames firenotationevent public void undo np settings set show association names showem fire notation event key showem showem npsettings setshowassociationnames firenotationevent used by argo tee return returns true if we show visibilities deprecated for 0 27 2 by tfmorris use link notation settings deprecated public string get show visibility return boolean to string get show visibility value notationsettings getshowvisibility tostring getshowvisibilityvalue return returns code true code if we show visibilities deprecated for 0 27 2 by tfmorris use link notation settings deprecated public boolean get show visibility value return np settings is show visibilities notationsettings getshowvisibilityvalue npsettings isshowvisibilities param showem code true code if visibilities are to be shown deprecated for 0 27 2 by tfmorris use link notation settings deprecated public void set show visibility string showem set show visibility boolean value of showem boolean value notationsettings setshowvisibility setshowvisibility valueof booleanvalue param showem code true code if visibilities are to be shown deprecated for 0 27 2 by tfmorris use link notation settings deprecated public void set show visibility final boolean showem if np settings is show visibilities showem return memento memento new memento private final configuration key key notation key show visibility public void redo np settings set show visibilities showem fire notation event key showem showem public void undo np settings set show visibilities showem fire notation event key showem showem do undoable memento notationsettings setshowvisibility npsettings isshowvisibilities configurationkey key_show_visibility npsettings setshowvisibilities firenotationevent npsettings setshowvisibilities firenotationevent doundoable private final configuration key key notation key show visibility public void redo np settings set show visibilities showem fire notation event key showem showem configurationkey key_show_visibility npsettings setshowvisibilities firenotationevent public void undo np settings set show visibilities showem fire notation event key showem showem npsettings setshowvisibilities firenotationevent used by argo tee return returns true if we show multiplicities deprecated for 0 27 2 by tfmorris use link notation settings deprecated public string get show multiplicity return boolean to string get show multiplicity value notationsettings getshowmultiplicity tostring getshowmultiplicityvalue return returns code true code if we show multiplicities deprecated for 0 27 2 by tfmorris use link notation settings deprecated public boolean get show multiplicity value return np settings is show multiplicities notationsettings getshowmultiplicityvalue npsettings isshowmultiplicities param showem code true code if multiplicity is to be shown deprecated for 0 27 2 by tfmorris use link notation settings deprecated public void set show multiplicity string showem set show multiplicity boolean value of showem boolean value notationsettings setshowmultiplicity setshowmultiplicity valueof booleanvalue param showem code true code if the multiplicity is to be shown deprecated for 0 27 2 by tfmorris use link notation settings deprecated public void set show multiplicity final boolean showem if np settings is show multiplicities showem return memento memento new memento private final configuration key key notation key show multiplicity public void redo np settings set show multiplicities showem fire notation event key showem showem public void undo np settings set show multiplicities showem fire notation event key showem showem do undoable memento notationsettings setshowmultiplicity npsettings isshowmultiplicities configurationkey key_show_multiplicity npsettings setshowmultiplicities firenotationevent npsettings setshowmultiplicities firenotationevent doundoable private final configuration key key notation key show multiplicity public void redo np settings set show multiplicities showem fire notation event key showem showem configurationkey key_show_multiplicity npsettings setshowmultiplicities firenotationevent public void undo np settings set show multiplicities showem fire notation event key showem showem npsettings setshowmultiplicities firenotationevent used by argo tee return returns true if we show initial values deprecated for 0 27 2 by tfmorris use link notation settings deprecated public string get show initial value return boolean to string get show initial value value notationsettings getshowinitialvalue tostring getshowinitialvaluevalue return returns code true code if we show initial values deprecated for 0 27 2 by tfmorris use link notation settings deprecated public boolean get show initial value value return np settings is show initial values notationsettings getshowinitialvaluevalue npsettings isshowinitialvalues param showem code true code if initial values are to be shown deprecated for 0 27 2 by tfmorris use link notation settings deprecated public void set show initial value string showem set show initial value boolean value of showem boolean value notationsettings setshowinitialvalue setshowinitialvalue valueof booleanvalue param showem code true code if initial values are to be shown deprecated for 0 27 2 by tfmorris use link notation settings deprecated public void set show initial value final boolean showem if np settings is show initial values showem return memento memento new memento private final configuration key key notation key show initial value public void redo np settings set show initial values showem fire notation event key showem showem public void undo np settings set show initial values showem fire notation event key showem showem do undoable memento notationsettings setshowinitialvalue npsettings isshowinitialvalues configurationkey key_show_initial_value npsettings setshowinitialvalues firenotationevent npsettings setshowinitialvalues firenotationevent doundoable notation key show initial value public void redo np settings set show initial values showem fire notation event key showem showem key_show_initial_value npsettings setshowinitialvalues firenotationevent public void undo np settings set show initial values showem fire notation event key showem showem npsettings setshowinitialvalues firenotationevent used by argo tee return returns true if we show properties deprecated for 0 27 2 by tfmorris use link notation settings deprecated public string get show properties return boolean to string get show properties value notationsettings getshowproperties tostring getshowpropertiesvalue return returns code true code if we show properties deprecated for 0 27 2 by tfmorris use link notation settings deprecated public boolean get show properties value return np settings is show properties notationsettings getshowpropertiesvalue npsettings isshowproperties param showem code true code if properties are to be shown deprecated for 0 27 2 by tfmorris use link notation settings deprecated public void set show properties string showem set show properties boolean value of showem boolean value notationsettings setshowproperties setshowproperties valueof booleanvalue param showem code true code if properties are to be shown deprecated for 0 27 2 by tfmorris use link notation settings deprecated public void set show properties final boolean showem if np settings is show properties showem return memento memento new memento private final configuration key key notation key show properties public void redo np settings set show properties showem fire notation event key showem showem public void undo np settings set show properties showem fire notation event key showem showem do undoable memento notationsettings setshowproperties npsettings isshowproperties configurationkey key_show_properties npsettings setshowproperties firenotationevent npsettings setshowproperties firenotationevent doundoable notation key show properties public void redo np settings set show properties showem fire notation event key showem showem key_show_properties npsettings setshowproperties firenotationevent public void undo np settings set show properties showem fire notation event key showem showem npsettings setshowproperties firenotationevent used by argo tee return returns true if we show types deprecated for 0 27 2 by tfmorris use link notation settings deprecated public string get show types return boolean to string get show types value notationsettings getshowtypes tostring getshowtypesvalue return returns code true code if we show types deprecated for 0 27 2 by tfmorris use link notation settings deprecated public boolean get show types value return np settings is show types notationsettings getshowtypesvalue npsettings isshowtypes param showem code true code if types are to be shown deprecated for 0 27 2 by tfmorris use link notation settings deprecated public void set show types string showem set show types boolean value of showem boolean value notationsettings setshowtypes setshowtypes valueof booleanvalue param showem code true code if types are to be shown deprecated for 0 27 2 by tfmorris use link notation settings deprecated public void set show types final boolean showem if np settings is show types showem return memento memento new memento private final configuration key key notation key show types public void redo np settings set show types showem fire notation event key showem showem public void undo np settings set show types showem fire notation event key showem showem do undoable memento notationsettings setshowtypes npsettings isshowtypes configurationkey key_show_types npsettings setshowtypes firenotationevent npsettings setshowtypes firenotationevent doundoable private final configuration key key notation key show types public void redo np settings set show types showem fire notation event key showem showem configurationkey key_show_types npsettings setshowtypes firenotationevent public void undo np settings set show types showem fire notation event key showem showem npsettings setshowtypes firenotationevent used by argo tee return returns true if we show stereotypes in the explorer public string get show stereotypes return boolean to string get show stereotypes value getshowstereotypes tostring getshowstereotypesvalue todo is this used in places other than on diagrams if so it needs to stay in project settings as well as being a diagram setting return returns code true code if we show stereotypes in the explorer public boolean get show stereotypes value return show explorer stereotypes projectsettings diagramsetting getshowstereotypesvalue showexplorerstereotypes param showem code true code if stereotypes are to be shown in the explorer public void set show stereotypes string showem set show stereotypes boolean value of showem boolean value setshowstereotypes setshowstereotypes valueof booleanvalue param showem code true code if stereotypes are to be shown in the explorer view public void set show stereotypes final boolean showem if show explorer stereotypes showem return memento memento new memento private final configuration key key notation key show stereotypes public void redo show explorer stereotypes showem fire notation event key showem showem public void undo show explorer stereotypes showem fire notation event key showem showem do undoable memento setshowstereotypes showexplorerstereotypes configurationkey key_show_stereotypes showexplorerstereotypes firenotationevent showexplorerstereotypes firenotationevent doundoable private final configuration key key notation key show stereotypes public void redo show explorer stereotypes showem fire notation event key showem showem configurationkey key_show_stereotypes showexplorerstereotypes firenotationevent public void undo show explorer stereotypes showem fire notation event key showem showem showexplorerstereotypes firenotationevent used by argo tee return returns true if we show 1 multiplicities deprecated for 0 27 2 by tfmorris use link notation settings deprecated public string get show singular multiplicities return boolean to string get show singular multiplicities value notationsettings getshowsingularmultiplicities tostring getshowsingularmultiplicitiesvalue return returns code true code if we show 1 multiplicities deprecated for 0 27 2 by tfmorris use link notation settings deprecated public boolean get show singular multiplicities value return np settings is show singular multiplicities notationsettings getshowsingularmultiplicitiesvalue npsettings isshowsingularmultiplicities param showem code true code if 1 multiplicities are to be shown deprecated for 0 27 2 by tfmorris use link notation settings deprecated public void set show singular multiplicities string showem set show singular multiplicities boolean value of showem boolean value notationsettings setshowsingularmultiplicities setshowsingularmultiplicities valueof booleanvalue param showem code true code if 1 multiplicities are to be shown deprecated for 0 27 2 by tfmorris use link notation settings deprecated public void set show singular multiplicities final boolean showem if np settings is show singular multiplicities showem return memento memento new memento private final configuration key key notation key show singular multiplicities public void redo np settings set show singular multiplicities showem fire notation event key showem showem public void undo np settings set show singular multiplicities showem fire notation event key showem showem do undoable memento notationsettings setshowsingularmultiplicities npsettings isshowsingularmultiplicities configurationkey key_show_singular_multiplicities npsettings setshowsingularmultiplicities firenotationevent npsettings setshowsingularmultiplicities firenotationevent doundoable notation key show singular multiplicities public void redo np settings set show singular multiplicities showem fire notation event key showem showem key_show_singular_multiplicities npsettings setshowsingularmultiplicities firenotationevent public void undo np settings set show singular multiplicities showem fire notation event key showem showem npsettings setshowsingularmultiplicities firenotationevent used by argo tee return returns true if we show the arrows when both association ends of an association are navigable deprecated for 0 27 2 by tfmorris use link diagram settings deprecated public string get hide bidirectional arrows return boolean to string get hide bidirectional arrows value diagramsettings gethidebidirectionalarrows tostring gethidebidirectionalarrowsvalue return returns code true code if we show the arrows when both association ends of an association are navigable deprecated for 0 27 2 by tfmorris use link diagram settings deprecated public boolean get hide bidirectional arrows value return dia default is show bidirectional arrows diagramsettings gethidebidirectionalarrowsvalue diadefault isshowbidirectionalarrows param hideem code true code if both arrows are to be shown when both association ends of an association are navigable deprecated for 0 27 2 by tfmorris use link diagram settings deprecated public void set hide bidirectional arrows string hideem set hide bidirectional arrows boolean value of hideem boolean value diagramsettings sethidebidirectionalarrows sethidebidirectionalarrows valueof booleanvalue param hideem code true code if both arrows are to be shown when both association ends of an association are navigable deprecated for 0 27 2 by tfmorris use link diagram settings deprecated public void set hide bidirectional arrows final boolean hideem if dia default is show bidirectional arrows hideem return memento memento new memento private final configuration key key notation key hide bidirectional arrows public void redo dia default set show bidirectional arrows hideem fire notation event key hideem hideem public void undo dia default set show bidirectional arrows hideem fire notation event key hideem hideem do undoable memento diagramsettings sethidebidirectionalarrows diadefault isshowbidirectionalarrows configurationkey key_hide_bidirectional_arrows diadefault setshowbidirectionalarrows firenotationevent diadefault setshowbidirectionalarrows firenotationevent doundoable notation key hide bidirectional arrows public void redo dia default set show bidirectional arrows hideem fire notation event key hideem hideem key_hide_bidirectional_arrows diadefault setshowbidirectionalarrows firenotationevent public void undo dia default set show bidirectional arrows hideem fire notation event key hideem hideem diadefault setshowbidirectionalarrows firenotationevent used by argo tee return returns the shadow width deprecated for 0 27 2 by tfmorris use link diagram settings deprecated public string get default shadow width return integer value of get default shadow width value to string diagramsettings getdefaultshadowwidth valueof getdefaultshadowwidthvalue tostring return returns the shadow width deprecated for 0 27 2 by tfmorris use link diagram settings deprecated public int get default shadow width value return dia default get default shadow width diagramsettings getdefaultshadowwidthvalue diadefault getdefaultshadowwidth param new width the shadow width deprecated for 0 27 2 by tfmorris use link diagram settings deprecated public void set default shadow width final int new width final int old value dia default get default shadow width if old value new width return memento memento new memento private final configuration key key notation key default shadow width public void redo dia default set default shadow width new width fire notation event key old value new width public void undo dia default set default shadow width old value fire notation event key new width old value do undoable memento newwidth diagramsettings setdefaultshadowwidth newwidth oldvalue diadefault getdefaultshadowwidth oldvalue newwidth configurationkey key_default_shadow_width diadefault setdefaultshadowwidth newwidth firenotationevent oldvalue newwidth diadefault setdefaultshadowwidth oldvalue firenotationevent newwidth oldvalue doundoable notation key default shadow width public void redo dia default set default shadow width new width fire notation event key old value new width key_default_shadow_width diadefault setdefaultshadowwidth newwidth firenotationevent oldvalue newwidth public void undo dia default set default shadow width old value fire notation event key new width old value diadefault setdefaultshadowwidth oldvalue firenotationevent newwidth oldvalue param width the shadow width to set deprecated for 0 27 2 by tfmorris use link diagram settings deprecated public void set default shadow width string width set default shadow width integer parse int width diagramsettings setdefaultshadowwidth setdefaultshadowwidth parseint used by argo tee return returns the default stereotype view deprecated for 0 27 2 by tfmorris use link diagram settings deprecated public string get default stereotype view return integer value of get default stereotype view value to string diagramsettings getdefaultstereotypeview valueof getdefaultstereotypeviewvalue tostring return returns the default stereotype view deprecated for 0 27 2 by tfmorris use link diagram settings deprecated public int get default stereotype view value return dia default get default stereotype view int diagramsettings getdefaultstereotypeviewvalue diadefault getdefaultstereotypeviewint no longer used by argo tee all uses deprecated return the output directory name deprecated for 0 27 2 by tfmorris this is a user setting not a project setting deprecated public string get generation output dir return getgenerationoutputdir param od the output directory name deprecated for 0 27 2 by tfmorris this is a user setting not a project setting any uses will be ignored deprecated public void set generation output dir suppress warnings unused string od ignored setgenerationoutputdir suppresswarnings return the header comment string public string get header comment return header comment getheadercomment headercomment param new view the default stereotype view deprecated for 0 27 2 by tfmorris use link diagram settings deprecated public void set default stereotype view final int new view final int old value dia default get default stereotype view int if old value new view return memento memento new memento private final configuration key key profile configuration key default stereotype view public void redo dia default set default stereotype view new view fire notation event key old value new view public void undo dia default set default stereotype view old value fire notation event key new view old value do undoable memento newview diagramsettings setdefaultstereotypeview newview oldvalue diadefault getdefaultstereotypeviewint oldvalue newview configurationkey profileconfiguration key_default_stereotype_view diadefault setdefaultstereotypeview newview firenotationevent oldvalue newview diadefault setdefaultstereotypeview oldvalue firenotationevent newview oldvalue doundoable profile configuration key default stereotype view public void redo dia default set default stereotype view new view fire notation event key old value new view profileconfiguration key_default_stereotype_view diadefault setdefaultstereotypeview newview firenotationevent oldvalue newview public void undo dia default set default stereotype view old value fire notation event key new view old value diadefault setdefaultstereotypeview oldvalue firenotationevent newview oldvalue param c the header comment string public void set header comment string c header comment c setheadercomment headercomment convenience methods to fire notation configuration change events param key the configuration key that is related to the change param old value the old value param new value the new value private void fire notation event configuration key key int old value int new value fire notation event key integer to string old value integer to string new value configurationkey oldvalue newvalue firenotationevent configurationkey oldvalue newvalue firenotationevent tostring oldvalue tostring newvalue convenience methods to fire notation configuration change events param key the configuration key that is related to the change param old value the old value param new value the new value private void fire notation event configuration key key boolean old value boolean new value fire notation event key boolean to string old value boolean to string new value configurationkey oldvalue newvalue firenotationevent configurationkey oldvalue newvalue firenotationevent tostring oldvalue tostring newvalue convenience methods to fire notation configuration change events param key the configuration key that is related to the change param old value the old value param new value the new value private void fire notation event configuration key key string old value string new value argo event pump fire event new argo notation event argo event types notation changed new property change event this key get key old value new value configurationkey oldvalue newvalue firenotationevent configurationkey oldvalue newvalue argoeventpump fireevent argonotationevent argoeventtypes notation_changed propertychangeevent getkey oldvalue newvalue convenience methods to fire diagram appearance configuration change events param key the configuration key that is related to the change param old value the old value param new value the new value private void fire diagram appearance event configuration key key int old value int new value fire diagram appearance event key integer to string old value integer to string new value configurationkey oldvalue newvalue firediagramappearanceevent configurationkey oldvalue newvalue firediagramappearanceevent tostring oldvalue tostring newvalue convenience methods to fire diagram appearance configuration change events param key the configuration key that is related to the change param old value the old value param new value the new value private void fire diagram appearance event configuration key key string old value string new value argo event pump fire event new argo diagram appearance event argo event types diagram font changed new property change event this key get key old value new value configurationkey oldvalue newvalue firediagramappearanceevent configurationkey oldvalue newvalue argoeventpump fireevent argodiagramappearanceevent argoeventtypes diagram_font_changed propertychangeevent getkey oldvalue newvalue diagram font name p used by argo tee return diagram font name deprecated for 0 27 2 by tfmorris use link diagram settings deprecated public string get font name return dia default get font name diagramsettings getfontname diadefault getfontname diagram font name param new font name diagram font name deprecated for 0 27 2 by tfmorris use link diagram settings deprecated public void set font name string new font name string old dia default get font name dia default set font name new font name fire diagram appearance event diagram appearance key font name old new font name newfontname diagramsettings setfontname newfontname diadefault getfontname diadefault setfontname newfontname firediagramappearanceevent diagramappearance key_font_name newfontname diagram font size p used by argo tee return diagram font size deprecated for 0 27 2 by tfmorris use link diagram settings deprecated public int get font size return dia default get font size diagramsettings getfontsize diadefault getfontsize diagram font size param new font size diagram font size deprecated for 0 27 2 by tfmorris use link diagram settings deprecated public void set font size int new font size int old dia default get font size dia default set font size new font size fire diagram appearance event diagram appearance key font size old new font size newfontsize diagramsettings setfontsize newfontsize diadefault getfontsize diadefault setfontsize newfontsize firediagramappearanceevent diagramappearance key_font_size newfontsize returns the plain diagram font which corresponds to selected parameters return plain diagram font deprecated for 0 27 2 by tfmorris use link diagram settings deprecated public font get font plain return dia default get font plain diagramsettings getfontplain diadefault getfontplain returns the italic diagram font which corresponds to selected parameters return italic diagram font deprecated for 0 27 2 by tfmorris use link diagram settings deprecated public font get font italic return dia default get font italic diagramsettings getfontitalic diadefault getfontitalic returns the bold diagram font which corresponds to selected parameters return bold diagram font deprecated for 0 27 2 by tfmorris use link diagram settings deprecated public font get font bold return dia default get font bold diagramsettings getfontbold diadefault getfontbold returns the bold italic diagram font which corresponds to selected parameters return bold italic diagram font deprecated for 0 27 2 by tfmorris use link diagram settings deprecated public font get font bold italic return dia default get font bold italic diagramsettings getfontbolditalic diadefault getfontbolditalic utility function to convert a font style integer into a font param font style the style see the predefined constants in font return the font that corresponds to the style deprecated for 0 27 2 by tfmorris use link diagram settings deprecated public font get font int font style return dia default get font font style fontstyle diagramsettings getfont fontstyle diadefault getfont fontstyle new action add association specification constructor for action add extend extension point protected action add association specification super actionaddassociationspecification actionaddextendextensionpoint actionaddassociationspecification protected void do it collection selected model get core helper set specifications get target selected doit getcorehelper setspecifications gettarget protected list get choices list ret new array list if get target null project p project manager get manager get current project object model p get root ret add all model get model management helper get all model elements of kind with model model model get meta types get classifier return ret getchoices arraylist gettarget projectmanager getmanager getcurrentproject getroot addall getmodelmanagementhelper getallmodelelementsofkindwithmodel getmetatypes getclassifier protected string get dialog title return translator localize dialog title add specifications getdialogtitle protected list get selected list ret new array list ret add all model get facade get specifications get target return ret getselected arraylist addall getfacade getspecifications gettarget return returns the singleton public static action add association specification get instance return singleton actionaddassociationspecification getinstance constructor for action wrapper class param action key the key of this action param current key stroke the current shortcut for this action if present param default key stroke the default shortcut for this action if present param action the abstract action that represents the real class param action name the name of the action protected action wrapper string action key key stroke current key stroke key stroke default key stroke abstract action action string action name this key action key this current shortcut current key stroke this default shortcut default key stroke this action instance action this action instance name action name actionwrapper actionkey currentkeystroke defaultkeystroke abstractaction actionname actionwrapper actionkey keystroke currentkeystroke keystroke defaultkeystroke abstractaction actionname actionkey currentshortcut currentkeystroke defaultshortcut defaultkeystroke actioninstance actioninstancename actionname getter for key return the id for this shortcut public string get key return key getkey getter for current shortcut return the current key stroke for this shortcut public key stroke get current shortcut return current shortcut currentshortcut keystroke keystroke getcurrentshortcut currentshortcut setter for current shortcut param actual shortcut the new short cut public void set current shortcut key stroke actual shortcut this current shortcut actual shortcut currentshortcut actualshortcut shortcut setcurrentshortcut keystroke actualshortcut currentshortcut actualshortcut getter for default shortcut return the default key stroke for this shortcut public key stroke get default shortcut return default shortcut defaultshortcut keystroke keystroke getdefaultshortcut defaultshortcut getter for action s name return the name of the action public string get action name return action instance name getactionname actioninstancename getter for action instance return the action public abstract action get action instance return this action instance abstractaction getactioninstance actioninstance build a new enumeration literal fig text of the given dimensions within the compartment described by code a fig code p em warning em won t work properly if code a fig code is null a warning is printed p param x x coordinate of the top left of the fig text param y y coordinate of the top left of the fig text param w width of the fig text param h height of the fig text param a fig the figure describing the whole compartment param np the notation provider see notation provider factory2 deprecated for 0 27 3 by tfmorris use link fig enumeration literal object rectangle diagram settings suppress warnings deprecation deprecated public fig enumeration literal int x int y int w int h fig a fig notation provider np super x y w h a fig np figtext afig afig figtext figtext figtext figtext afig notationprovider notationproviderfactory2 figenumerationliteral diagramsettings suppresswarnings figenumerationliteral afig notationprovider afig build a new enumeration literal fig text of the given dimensions within the compartment described by code a fig code deprecated by mvw in v0 27 3 use the constructor without np parameter param owner owning uml element param bounds position and size param settings render settings param np the notation provider see notation provider factory2 suppress warnings deprecation deprecated public fig enumeration literal object owner rectangle bounds diagram settings settings notation provider np super owner bounds settings np figtext afig notationprovider notationproviderfactory2 suppresswarnings figenumerationliteral diagramsettings notationprovider build a new enumeration literal fig text of the given dimensions within the compartment described by code a fig code param owner owning uml element param bounds position and size param settings render settings public fig enumeration literal object owner rectangle bounds diagram settings settings super owner bounds settings figtext afig figenumerationliteral diagramsettings override protected int get notation provider type return notation provider factory2 type enumeration literal getnotationprovidertype notationproviderfactory2 type_enumeration_literal construct a file filter files with the given suffix and description param suffix the suffix string param d the file type description public suffix filter string suffix string d suffixes new string suffix desc d suffixfilter construct a filter for an array of suffixes param s the suffixes string param d the file type description public suffix filter string s string d suffixes new string s length system arraycopy s 0 suffixes 0 s length desc d suffixfilter public boolean accept file f if f null return false if f is directory return true string extension get extension f for string suffix suffixes if suffix equals ignore case extension return true return false isdirectory getextension equalsignorecase param f the file to get the extension from return the extension string without the dot public static string get extension file f if f null return null return get extension f get name getextension getextension getname param filename the name of the file to get the extension from return the extension string without the dot public static string get extension string filename int i filename last index of if i 0 i filename length 1 return filename substring i 1 to lower case return null getextension lastindexof tolowercase public string get description string buffer result new string buffer desc result append for int i 0 i suffixes length i result append result append suffixes i if i suffixes length 1 result append result append return result to string getdescription stringbuffer stringbuffer tostring return returns the default or preferred suffix for this type of file public string get suffix return suffixes 0 getsuffix return returns the list of all acceptable suffixes public string get suffixes return suffixes getsuffixes adding this function enables easy selection of suffixfilters e g in a combobox inherit doc public string to string return get description inheritdoc tostring getdescription construtor param t the target to create this facade for public argo facade object t if model get facade isa classifier t target t argofacade getfacade isaclassifier public any get classifier string name project p project manager get manager get current project if target null model get facade get name target equals name return new argo any target object classifier p find type in model name p get model if classifier null added search in defined types 2001 10 18 steffen zschaler classifier p find type name false if classifier null throw new ocl type exception cannot find classifier name return new argo any classifier getclassifier projectmanager getmanager getcurrentproject getfacade getname argoany findtypeinmodel getmodel findtype ocltypeexception argoany constructor param cl the argouml classifier argo any object cl classifier cl argoany public type navigate qualified string name type qualifiers throws ocl type exception if classifier null throw new ocl type exception attempting to access features of void if qualifiers null throw new ocl type exception qualified associations not supported yet type type basic navigate any qualified name this qualifiers if type null return type object found assoc type null found attrib type null m classifiers boolean is set false is sequence false cannot be bag first search for appropriate attributes collection attributes model get core helper get attributes inh classifier iterator iter attributes iterator while iter has next found attrib type null object attr iter next if model get facade get name attr equals name found attrib type model get facade get type attr look for associations collection association ends model get core helper get associate ends inh classifier iterator asciter association ends iterator while asciter has next found assoc type null object ae asciter next m association end if model get facade get name ae null name equals model get facade get name ae found assoc type model get facade get type ae else if model get facade get name ae null model get facade get name ae equals string opposite name model get facade get name model get facade get type ae if opposite name null string lower opposite name opposite name substring 0 1 to lower case lower opposite name opposite name substring 1 if lower opposite name equals name found assoc type model get facade get type ae if found assoc type null object multiplicity model get facade get multiplicity ae if multiplicity null model get facade get upper multiplicity 1 model get facade get upper multiplicity 1 if model get extension mechanisms helper has stereotype ae ordered is sequence true else is set true if found assoc type null found attrib type null throw new ocl type exception cannot access feature name of classifier to string because both an attribute and an association end of this name where found object found type if found assoc type null found type found attrib type else found type found assoc type if found type null throw new ocl type exception attribute name not found in classifier to string type result get ocl representation found type if is set result new tudresden ocl check types collection tudresden ocl check types collection set result if is sequence result new tudresden ocl check types collection tudresden ocl check types collection sequence result return result navigatequalified ocltypeexception ocltypeexception ocltypeexception navigateanyqualified foundassoctype foundattribtype mclassifiers isset issequence getcorehelper getattributesinh hasnext foundattribtype getfacade getname foundattribtype getfacade gettype associationends getcorehelper getassociateendsinh associationends hasnext foundassoctype massociationend getfacade getname getfacade getname foundassoctype getfacade gettype getfacade getname getfacade getname oppositename getfacade getname getfacade gettype oppositename loweroppositename oppositename tolowercase loweroppositename oppositename loweroppositename foundassoctype getfacade gettype foundassoctype getfacade getmultiplicity getfacade getupper getfacade getupper getextensionmechanismshelper hasstereotype issequence isset foundassoctype foundattribtype ocltypeexception tostring foundtype foundassoctype foundtype foundattribtype foundtype foundassoctype foundtype ocltypeexception tostring getoclrepresentation foundtype isset issequence java lang string tudresden ocl check types type public type navigate parameterized query string name type qualifiers throws ocl type exception return internal navigate parameterized name qualifiers true navigateparameterizedquery ocltypeexception internalnavigateparameterized java lang string tudresden ocl check types type public type navigate parameterized string name type qualifiers throws ocl type exception return internal navigate parameterized name qualifiers false navigateparameterized ocltypeexception internalnavigateparameterized private type internal navigate parameterized final string name final type params boolean f check is query throws ocl type exception if classifier null throw new ocl type exception attempting to access features of void type type basic navigate any parameterized name params if type null return type object found op null m operation java util collection operations model get facade get operations classifier iterator iter operations iterator while iter has next found op null object op iter next if operation matches call op name params found op op if found op null throw new ocl type exception operation name not found in classifier to string if f check is query query checking added 05 21 01 sz9 if model get facade is query found op throw new ocl type exception non query operations cannot be used in ocl expressions name collection return params model get core helper get return parameters found op object rp if return params size 0 rp null else rp return params iterator next if return params size 1 log warn ocl compiler only handles one return parameter found return params size for model get facade get name found op if rp null model get facade get type rp null log warn warning supposing return type void return new argo any null object return type model get facade get type rp return get ocl representation return type internalnavigateparameterized fcheckisquery ocltypeexception ocltypeexception navigateanyparameterized foundop moperation getfacade getoperations hasnext foundop operationmatchescall foundop foundop ocltypeexception tostring fcheckisquery getfacade isquery foundop ocltypeexception returnparams getcorehelper getreturnparameters foundop returnparams returnparams returnparams returnparams getfacade getname foundop getfacade gettype argoany returntype getfacade gettype getoclrepresentation returntype public boolean conforms to type type if type instanceof argo any argo any other argo any type return equals type model get core helper get all supertypes classifier contains other classifier return false conformsto argoany argoany argoany getcorehelper getallsupertypes public boolean equals object o argo any any null if o instanceof argo any any argo any o return any classifier classifier return false argoany argoany argoany public int hash code if classifier null return 0 return classifier hash code hashcode hashcode public string to string if classifier null return void return model get facade get name classifier tostring getfacade getname public boolean has state string name log warn argo any has state has been called but is not implemented yet return false hasstate argoany hasstate protected type get ocl representation object found type type result null if model get facade get name found type equals int model get facade get name found type equals integer result basic integer if model get facade get name found type equals float model get facade get name found type equals double result basic real if model get facade get name found type equals bool model get facade get name found type equals boolean model get facade get name found type equals boolean result basic boolean if model get facade get name found type equals string result basic string if result null result new argo any found type return result getoclrepresentation foundtype getfacade getname foundtype getfacade getname foundtype getfacade getname foundtype getfacade getname foundtype getfacade getname foundtype getfacade getname foundtype getfacade getname foundtype getfacade getname foundtype argoany foundtype param operation the operation param call name the name that we are trying to match param call params the parameters that we are trying to match return code true code if the given operation names and parameters match the given name and parameters protected boolean operation matches call object operation string call name type call params if call name equals model get facade get name operation return false collection operation parameters model get facade get parameters operation if model get facade is return operation parameters iterator next log warn argo facade argo any expects the first operation parameter to be the return type this isn t the case if model get facade is return operation parameters iterator next operation parameters size call params length 1 return false iterator param iter operation parameters iterator param iter next skip first parameter return type int index 0 while param iter has next object next param param iter next object param type model get facade get type next param m classifier type operation param get ocl representation param type if call params index conforms to operation param return false index return true callname callparams operationmatchescall callname callparams callname getfacade getname operationparameters getfacade getparameters getfacade isreturn operationparameters argofacade argoany getfacade isreturn operationparameters operationparameters callparams paramiter operationparameters paramiter paramiter hasnext nextparam paramiter paramtype getfacade gettype nextparam mclassifier operationparam getoclrepresentation paramtype callparams conformsto operationparam the constructor param association the association modelelement that we represent in textual form public association name notation uml object association super association associationnamenotationuml see org argouml notation providers notation provider get parsing help public string get parsing help return parsing help fig association name notationprovider getparsinghelp getparsinghelp public void parse object model element string text try notation utility uml parse model element model element text catch parse exception pe string msg statusmsg bar error parsing association name object args pe get localized message integer value of pe get error offset argo event pump fire event new argo help event argo event types help changed this translator message format msg args modelelement notationutilityuml parsemodelelement modelelement parseexception getlocalizedmessage valueof geterroroffset argoeventpump fireevent argohelpevent argoeventtypes help_changed messageformat public string to string object model element notation settings settings return to string model element settings is show association names settings is fully handle stereotypes settings is show paths settings is show visibilities settings is use guillemets tostring modelelement notationsettings tostring modelelement isshowassociationnames isfullyhandlestereotypes isshowpaths isshowvisibilities isuseguillemets suppress warnings deprecation deprecated public string to string object model element map args return to string model element boolean args get show association name is value fully handle stereotypes args is value path visible args is value visibility visible args is value use guillemets args suppresswarnings tostring modelelement tostring modelelement showassociationname isvalue fullyhandlestereotypes isvalue pathvisible isvalue visibilityvisible isvalue useguillemets private string to string object model element boolean show association name boolean fully handle stereotypes boolean show path boolean show visibility boolean use guillemets if show association name boolean false return string name model get facade get name model element string buffer sb new string buffer if fully handle stereotypes sb append notation utility uml generate stereotype model element use guillemets if show visibility sb append notation utility uml generate visibility2 model element sb append if show path sb append notation utility uml generate path model element if name null sb append name return sb to string tostring modelelement showassociationname fullyhandlestereotypes showpath showvisibility useguillemets showassociationname getfacade getname modelelement stringbuffer stringbuffer fullyhandlestereotypes notationutilityuml generatestereotype modelelement useguillemets showvisibility notationutilityuml generatevisibility2 modelelement showpath notationutilityuml generatepath modelelement tostring construct a new selection use case for the given fig param f the given fig public selection use case fig f super f selectionusecase selectionusecase override protected icon get icons if model get model management helper is read only get content get owner return new icon null inherit null null null return icons geticons getmodelmanagementhelper isreadonly getcontent getowner override protected string get instructions int index return instructions index base getinstructions override protected object get new edge type int index return edge type index base getnewedgetype edgetype override protected object get new node int index if index 0 index get button if index top index bottom return model get use cases factory create use case return model get use cases factory create actor getnewnode getbutton getusecasesfactory createusecase getusecasesfactory createactor override protected object get new node type int index if index top index bottom return model get meta types get use case return model get meta types get actor getnewnodetype getmetatypes getusecase getmetatypes getactor override protected boolean is reverse edge int index if index bottom return true return false isreverseedge constructor for uml text field2 param doc the plain text document public uml text field2 uml document doc super doc null 0 set font look and feel mgr get instance get standard font add caret listener action copy get instance add caret listener action cut get instance add caret listener action paste get instance add focus listener action paste get instance umltextfield2 umltextfield2 umldocument setfont lookandfeelmgr getinstance getstandardfont addcaretlistener actioncopy getinstance addcaretlistener actioncut getinstance addcaretlistener actionpaste getinstance addfocuslistener actionpaste getinstance see java beans property change listener property change java beans property change event public void property change property change event evt uml document get document property change evt propertychangelistener propertychange propertychangeevent propertychange propertychangeevent umldocument getdocument propertychange see org argouml ui targetmanager targettable model view get targettable model public target listener get targettable model return uml document get document targettablemodelview gettargettablemodel targetlistener gettargettablemodel umldocument getdocument constructor for uml state entry list param data model the model public uml state entry list uml model element list model2 data model super data model umlstateentrylist datamodel umlstateentrylist umlmodelelementlistmodel2 datamodel datamodel see org argouml uml ui uml mutable linked list get popup menu public j popup menu get popup menu return new popup menu new action action new action roles entry this umlmutablelinkedlist getpopupmenu jpopupmenu getpopupmenu popupmenunewaction actionnewaction constructor for uml extended elements list model public uml extended elements list model super extended element umlextendedelementslistmodel umlextendedelementslistmodel extendedelement protected void build model list if get target null set all elements model get facade get extended elements get target buildmodellist gettarget setallelements getfacade getextendedelements gettarget protected boolean is valid element object element return model get facade isa model element element model get facade get extended elements get target contains element isvalidelement getfacade isamodelelement getfacade getextendedelements gettarget the constructor public action add package super button new package put value action name translator localize button new package actionaddpackage putvalue public void action performed action event e object target target manager get instance get model target if model get facade isa package target object new package model get model management factory create package model get core helper add owned element target new package target manager get instance set target new package super action performed e actionperformed actionevent targetmanager getinstance getmodeltarget getfacade isapackage newpackage getmodelmanagementfactory createpackage getcorehelper addownedelement newpackage targetmanager getinstance settarget newpackage actionperformed construct a new fig synch state param owner owning uml element param bounds position and size param settings rendering settings public fig synch state object owner rectangle bounds diagram settings settings super owner bounds settings init figs figsynchstate figsynchstate diagramsettings initfigs the constructor deprecated for 0 27 4 by tfmorris use link fig synch state object rectangle diagram settings suppress warnings deprecation deprecated public fig synch state init figs figsynchstate diagramsettings suppresswarnings figsynchstate initfigs private void init figs set editable false set big port new fig circle x y width height debug color debug color head new fig circle x y width height line color fill color bound new fig text x 2 y 2 0 0 true bound set filled false bound set line width 0 bound set text color text color bound set return action fig text end editing bound set tab action fig text end editing bound set justification fig text justify center bound set editable false bound set text add fig get big port add fig head add fig bound set blink ports false make port invisible unless mouse enters initfigs seteditable setbigport figcircle debug_color debug_color figcircle line_color fill_color figtext setfilled setlinewidth settextcolor text_color setreturnaction figtext end_editing settabaction figtext end_editing setjustification figtext justify_center seteditable settext addfig getbigport addfig addfig setblinkports the constructor param gm the graphmodel not used param node the uml object deprecated for 0 27 4 by tfmorris use link fig synch state object rectangle diagram settings suppress warnings deprecation deprecated public fig synch state suppress warnings unused graph model gm object node this set owner node figsynchstate diagramsettings suppresswarnings figsynchstate suppresswarnings graphmodel setowner override set standard bounds to keep shapes looking right inherit doc override protected void set standard bounds int x int y int w int h if get name fig null return rectangle old bounds get bounds get big port set bounds x y width height head set bounds x y width height bound set bounds x 2 y 2 0 0 bound calc bounds calc bounds update edges fire prop change bounds old bounds get bounds setstandardbounds inheritdoc setstandardbounds getnamefig oldbounds getbounds getbigport setbounds setbounds setbounds calcbounds calcbounds updateedges firepropchange oldbounds getbounds override public object clone fig synch state fig clone fig synch state super clone iterator it fig clone get figs iterator fig clone set big port fig rect it next fig clone head fig circle it next fig clone bound fig text it next return fig clone figsynchstate figclone figsynchstate figclone getfigs figclone setbigport figrect figclone figcircle figclone figtext figclone synch states are fixed size return false override public boolean is resizable return false isresizable see org tigris gef presentation fig set line color java awt color override public void set line color color col head set line color col setlinecolor setlinecolor setlinecolor see org tigris gef presentation fig get line color override public color get line color return head get line color getlinecolor getlinecolor getlinecolor see org tigris gef presentation fig set fill color java awt color override public void set fill color color col head set fill color col setfillcolor setfillcolor setfillcolor see org tigris gef presentation fig get fill color override public color get fill color return head get fill color getfillcolor getfillcolor getfillcolor see org tigris gef presentation fig set filled boolean override public void set filled boolean f ignored setfilled setfilled override public boolean is filled return true isfilled see org tigris gef presentation fig set line width int override public void set line width int w head set line width w setlinewidth setlinewidth setlinewidth see org tigris gef presentation fig get line width override public int get line width return head get line width getlinewidth getlinewidth getlinewidth override protected void model changed property change event mee super model changed mee if mee get property name equals bound if get owner null return int b model get facade get bound get owner string aux if b 0 aux else aux string value of b bound set text aux update bounds damage modelchanged propertychangeevent modelchanged getpropertyname getowner getfacade getbound getowner valueof settext updatebounds see java awt event mouse listener mouse clicked java awt event mouse event override public void mouse clicked mouse event me mouselistener mouseclicked mouseevent mouseclicked mouseevent see org argouml uml diagram ui fig node model element update font override protected void update font super update font font f get settings get font plain bound set font f fignodemodelelement updatefont updatefont updatefont getsettings getfontplain setfont creates a uml change dispatch event type is overriden if a call to one of the event functions is called param uic user interface container to which changes are dispatched param et 1 will add event listener to new target 0 for default public uml change dispatch container uic int et synchronized uic container uic event type et if uic instanceof prop panel target prop panel uic get target umlchangedispatch eventtype umlchangedispatch eventtype proppanel proppanel gettarget see org argouml uml ui uml user interface component target changed public void target changed event type 0 umluserinterfacecomponent targetchanged targetchanged eventtype see org argouml uml ui uml user interface component target reasserted public void target reasserted event type 7 umluserinterfacecomponent targetreasserted targetreasserted eventtype called by invoke later on user interface thread dispatches event to all contained objects implementing uml user interface component if event target changed add adds change listener to new target on completion of dispatch public void run if target null synchronized dispatch container else dispatch container invokelater umluserinterfacecomponent target_changed_add synchronizeddispatch iterates through all children of this container if a child is another container then calls dispatch recursively if a child supports uml user interface component then calls the appropriate method param theawt container awt container private void dispatch container theawt container int count theawt container get component count component component for int i 0 i count i component theawt container get component i if component instanceof container dispatch container component if component instanceof uml user interface component component is visible switch event type case target changed add case target changed uml user interface component component target changed break case target reasserted uml user interface component component target reasserted break umluserinterfacecomponent theawtcontainer theawtcontainer theawtcontainer getcomponentcount theawtcontainer getcomponent umluserinterfacecomponent isvisible eventtype target_changed_add target_changed umluserinterfacecomponent targetchanged target_reasserted umluserinterfacecomponent targetreasserted private void synchronized dispatch container cont if target null throw new illegal state exception target may not be null in synchronized dispatch synchronized target dispatch cont synchronizeddispatch illegalstateexception public collection get children object parent if model get facade isa stimulus parent return collections empty set object ms parent object action model get facade get dispatch action ms collection result new array list result add action return result getchildren getfacade isastimulus empty_set getfacade getdispatchaction arraylist public set get dependencies object parent if model get facade isa stimulus parent set set new hash set set add parent return set return collections empty set getdependencies getfacade isastimulus hashset empty_set see org argouml ui explorer rules perspective rule get rule name public string get rule name return translator localize misc stimulus action perspectiverule getrulename getrulename construct a property panel for uml object elements public prop panel object super label object lookup icon object add field translator localize label name get name text field add field translator localize label namespace get namespace selector add separator add field translator localize label stimili sent get stimuli sender scroll add field translator localize label stimili received get stimuli receiver scroll add separator abstract action add model element2 action new action add instance classifier model get meta types get classifier j scroll pane classifier scroll new j scroll pane new uml mutable linked list new uml instance classifier list model action null null true add field translator localize label classifiers classifier scroll add action new action navigate namespace add action new action new stereotype add action get delete action proppanelobject lookupicon addfield getnametextfield addfield getnamespaceselector addseparator addfield getstimulisenderscroll addfield getstimulireceiverscroll addseparator abstractactionaddmodelelement2 actionaddinstanceclassifier getmetatypes getclassifier jscrollpane classifierscroll jscrollpane umlmutablelinkedlist umlinstanceclassifierlistmodel addfield classifierscroll addaction actionnavigatenamespace addaction actionnewstereotype addaction getdeleteaction constructor for uml message receiver list model public uml message receiver list model super receiver umlmessagereceiverlistmodel umlmessagereceiverlistmodel see org argouml uml ui uml model element list model2 build model list protected void build model list remove all elements add element model get facade get receiver get target umlmodelelementlistmodel2 buildmodellist buildmodellist removeallelements addelement getfacade getreceiver gettarget see org argouml uml ui uml model element list model2 is valid element object protected boolean is valid element object element return model get facade get receiver get target element umlmodelelementlistmodel2 isvalidelement isvalidelement getfacade getreceiver gettarget the constructor public cr interface without component setup head and desc add supported decision uml decision patterns crinterfacewithoutcomponent setupheadanddesc addsupporteddecision umldecision public boolean predicate2 object dm designer dsgr if dm instanceof uml deployment diagram return no problem uml deployment diagram dd uml deployment diagram dm list set offs compute offenders dd if offs null return no problem return problem found umldeploymentdiagram no_problem umldeploymentdiagram umldeploymentdiagram listset computeoffenders no_problem problem_found public to do item to do item object dm designer dsgr uml deployment diagram dd uml deployment diagram dm list set offs compute offenders dd return new uml to do item this offs dsgr todoitem todoitem umldeploymentdiagram umldeploymentdiagram listset computeoffenders umltodoitem public boolean still valid to do item i designer dsgr if is active return false list set offs i get offenders uml deployment diagram dd uml deployment diagram offs get 0 if predicate dm dsgr return false list set new offs compute offenders dd boolean res offs equals new offs return res stillvalid todoitem isactive listset getoffenders umldeploymentdiagram umldeploymentdiagram listset newoffs computeoffenders newoffs if there are interfaces that are not inside a component the returned list set is not null then in the list set are the uml deployment diagram and all fig interfaces with no enclosing fig component param dd the diagram to check return the set of offenders public list set compute offenders uml deployment diagram dd collection figs dd get layer get contents list set offs null iterator fig iter figs iterator while fig iter has next object obj fig iter next if obj instanceof fig interface continue fig interface fi fig interface obj fig enclosing fi get enclosing fig if enclosing null model get facade isa component enclosing get owner if offs null offs new list set offs add dd offs add fi return offs listset listset umldeploymentdiagram figinterfaces figcomponent listset computeoffenders umldeploymentdiagram getlayer getcontents listset figiter figiter hasnext figiter figinterface figinterface figinterface getenclosingfig getfacade isacomponent getowner listset public class init module loader implements init subsystem public list gui settings tab interface get project settings tabs return collections empty list initmoduleloader initsubsystem guisettingstabinterface getprojectsettingstabs emptylist public list gui settings tab interface get settings tabs list gui settings tab interface result new array list gui settings tab interface result add new settings tab modules return result guisettingstabinterface getsettingstabs guisettingstabinterface arraylist guisettingstabinterface settingstabmodules public void init module loader2 get instance module loader2 do load false moduleloader2 getinstance moduleloader2 doload public list abstract argoj panel get details tabs return module loader2 get instance get details tabs abstractargojpanel getdetailstabs moduleloader2 getinstance getdetailstabs the constructor we currently support 2 scopes but this class is written in a way to easily extend that param settings scope the scope of the settings public settings tab diagram appearance int settings scope super scope settings scope initialize settingsscope settingstabdiagramappearance settingsscope settingsscope this method initializes this private void initialize this set layout new border layout j panel top new j panel top set layout new border layout if scope argo scope application j panel warning new j panel warning set layout new box layout warning box layout page axis j label warning label new j label translator localize label warning warning label set alignmentx component right alignment warning add warning label j link button project settings new j link button project settings set action new action project settings project settings set text translator localize button project settings project settings set icon null project settings set alignmentx component right alignment warning add project settings top add warning border layout north j panel settings new j panel jlbl diagram font new j label jlbl diagram font set text translator localize label diagramappearance diagramfont settings add get jbtn diagram font settings add jlbl diagram font top add settings border layout center this add top border layout north this set size new dimension 296 169 setlayout borderlayout jpanel jpanel setlayout borderlayout scope_application jpanel jpanel setlayout boxlayout boxlayout page_axis jlabel warninglabel jlabel warninglabel setalignmentx right_alignment warninglabel jlinkbutton projectsettings jlinkbutton projectsettings setaction actionprojectsettings projectsettings settext projectsettings seticon projectsettings setalignmentx right_alignment projectsettings borderlayout jpanel jpanel jlbldiagramfont jlabel jlbldiagramfont settext getjbtndiagramfont jlbldiagramfont borderlayout borderlayout setsize private j button get jbtn diagram font if jbtn diagram font null jbtn diagram font new j button translator localize label diagramappearance changefont jbtn diagram font add action listener new action listener public void action performed action event e argoj font chooser j font chooser new argoj font chooser argo frame get instance jbtn diagram font selected diagram font name selected diagram font size j font chooser set visible true if j font chooser is ok selected diagram font name j font chooser get result name selected diagram font size j font chooser get result size return jbtn diagram font jbutton getjbtndiagramfont jbtndiagramfont jbtndiagramfont jbutton jbtndiagramfont addactionlistener actionlistener actionperformed actionevent argojfontchooser jfontchooser argojfontchooser argoframe getinstance jbtndiagramfont selecteddiagramfontname selecteddiagramfontsize jfontchooser setvisible jfontchooser isok selecteddiagramfontname jfontchooser getresultname selecteddiagramfontsize jfontchooser getresultsize jbtndiagramfont jbtn diagram font add action listener new action listener public void action performed action event e argoj font chooser j font chooser new argoj font chooser argo frame get instance jbtn diagram font selected diagram font name selected diagram font size j font chooser set visible true if j font chooser is ok selected diagram font name j font chooser get result name selected diagram font size j font chooser get result size jbtndiagramfont addactionlistener actionlistener actionperformed actionevent argojfontchooser jfontchooser argojfontchooser argoframe getinstance jbtndiagramfont selecteddiagramfontname selecteddiagramfontsize jfontchooser setvisible jfontchooser isok selecteddiagramfontname jfontchooser getresultname selecteddiagramfontsize jfontchooser getresultsize public void handle settings tab refresh if scope argo scope application selected diagram font name diagram appearance get instance get configured font name selected diagram font size configuration get integer diagram appearance key font size if scope argo scope project project p project manager get manager get current project project settings ps p get project settings selected diagram font name ps get font name selected diagram font size ps get font size handlesettingstabrefresh scope_application selecteddiagramfontname diagramappearance getinstance getconfiguredfontname selecteddiagramfontsize getinteger diagramappearance key_font_size scope_project projectmanager getmanager getcurrentproject projectsettings getprojectsettings selecteddiagramfontname getfontname selecteddiagramfontsize getfontsize get a boolean from the configuration param key a notation key return a boolean protected static boolean get boolean configuration key key return configuration get boolean key false getboolean configurationkey getboolean public void handle settings tab save if scope argo scope application configuration set string diagram appearance key font name selected diagram font name configuration set integer diagram appearance key font size selected diagram font size if scope argo scope project project p project manager get manager get current project project settings ps p get project settings ps set font name selected diagram font name ps set font size selected diagram font size handlesettingstabsave scope_application setstring diagramappearance key_font_name selecteddiagramfontname setinteger diagramappearance key_font_size selecteddiagramfontsize scope_project projectmanager getmanager getcurrentproject projectsettings getprojectsettings setfontname selecteddiagramfontname setfontsize selecteddiagramfontsize see org argouml ui gui settings tab interface handle settings tab cancel public void handle settings tab cancel handle settings tab refresh guisettingstabinterface handlesettingstabcancel handlesettingstabcancel handlesettingstabrefresh public void handle reset to default if scope argo scope project selected diagram font name diagram appearance get instance get configured font name selected diagram font size configuration get integer diagram appearance key font size handleresettodefault scope_project selecteddiagramfontname diagramappearance getinstance getconfiguredfontname selecteddiagramfontsize getinteger diagramappearance key_font_size see org argouml ui gui settings tab interface get tab key public string get tab key return tab diagramappearance guisettingstabinterface gettabkey gettabkey see org argouml ui gui settings tab interface get tab panel public j panel get tab panel return this guisettingstabinterface gettabpanel jpanel gettabpanel create a localized j button param key the key for the string to be localized return a new checkbox with localized text protected j button create check box string key j button j new j button translator localize key return j jbutton jbutton createcheckbox jbutton jbutton create a localized j label param key the key of the text for the label return a new label with a localized text for the given key protected j label create label string key return new j label translator localize key jlabel jlabel createlabel jlabel create a localized j button param key the key for the string to be localized return a new checkbox with localized text protected j button create button string key return new j button translator localize key jbutton jbutton createbutton jbutton see javax swing j component set visible boolean public void set visible boolean arg0 super set visible arg0 if arg0 handle settings tab refresh jcomponent setvisible setvisible setvisible handlesettingstabrefresh public prop panel create prop panel object object if object instanceof uml sequence diagram return new prop paneluml sequence diagram return null proppanel createproppanel umlsequencediagram proppanelumlsequencediagram static final string visibilitychars the constructor public notation utility uml notationutilityuml public void init int ass pos 0 attribute special strings ass pos new property special string frozen new property operation public void found object element string value if model get facade isa structural feature element if value null the text was frozen model get core helper set read only element true else if false equals ignore case value the text was frozen false model get core helper set read only element false else if true equals ignore case value the text was frozen true model get core helper set read only element true todo add only has been removed in uml 2 x so we should phase out support of it tfm 20070529 attribute special strings ass pos new property special string addonly new property operation public void found object element string value if model get facade isa structural feature element if false equals ignore case value model get core helper set read only element true else model get core helper set changeability element model get changeable kind get add only assert ass pos attribute special strings length operation special strings new property special string 8 int oss pos 0 operation special strings oss pos new property special string sequential new property operation public void found object element string value if model get facade isa operation element model get core helper set concurrency element model get concurrency kind get sequential operation special strings oss pos new property special string guarded new property operation public void found object element string value object kind model get concurrency kind get guarded if value null value equals ignore case false kind model get concurrency kind get sequential if model get facade isa operation element model get core helper set concurrency element kind operation special strings oss pos new property special string concurrent new property operation public void found object element string value object kind model get concurrency kind get concurrent if value null value equals ignore case false kind model get concurrency kind get sequential if model get facade isa operation element model get core helper set concurrency element kind operation special strings oss pos new property special string concurrency new property operation public void found object element string value object kind model get concurrency kind get sequential if guarded equals ignore case value kind model get concurrency kind get guarded else if concurrent equals ignore case value kind model get concurrency kind get concurrent if model get facade isa operation element model get core helper set concurrency element kind operation special strings oss pos new property special string abstract new property operation public void found object element string value boolean is abstract true if value null value equals ignore case false is abstract false if model get facade isa operation element model get core helper set abstract element is abstract operation special strings oss pos new property special string leaf new property operation public void found object element string value boolean is leaf true if value null value equals ignore case false is leaf false if model get facade isa operation element model get core helper set leaf element is leaf operation special strings oss pos new property special string query new property operation public void found object element string value boolean is query true if value null value equals ignore case false is query false if model get facade isa behavioral feature element model get core helper set query element is query operation special strings oss pos new property special string root new property operation public void found object element string value boolean is root true if value null value equals ignore case false is root false if model get facade isa operation element model get core helper set root element is root assert oss pos operation special strings length asspos attributespecialstrings asspos propertyspecialstring propertyoperation getfacade isastructuralfeature getcorehelper setreadonly equalsignorecase getcorehelper setreadonly equalsignorecase getcorehelper setreadonly addonly attributespecialstrings asspos propertyspecialstring propertyoperation getfacade isastructuralfeature equalsignorecase getcorehelper setreadonly getcorehelper setchangeability getchangeablekind getaddonly asspos attributespecialstrings operationspecialstrings propertyspecialstring osspos operationspecialstrings osspos propertyspecialstring propertyoperation getfacade isaoperation getcorehelper setconcurrency getconcurrencykind getsequential operationspecialstrings osspos propertyspecialstring propertyoperation getconcurrencykind getguarded equalsignorecase getconcurrencykind getsequential getfacade isaoperation getcorehelper setconcurrency operationspecialstrings osspos propertyspecialstring propertyoperation getconcurrencykind getconcurrent equalsignorecase getconcurrencykind getsequential getfacade isaoperation getcorehelper setconcurrency operationspecialstrings osspos propertyspecialstring propertyoperation getconcurrencykind getsequential equalsignorecase getconcurrencykind getguarded equalsignorecase getconcurrencykind getconcurrent getfacade isaoperation getcorehelper setconcurrency operationspecialstrings osspos propertyspecialstring propertyoperation isabstract equalsignorecase isabstract getfacade isaoperation getcorehelper setabstract isabstract operationspecialstrings osspos propertyspecialstring propertyoperation isleaf equalsignorecase isleaf getfacade isaoperation getcorehelper setleaf isleaf operationspecialstrings osspos propertyspecialstring propertyoperation isquery equalsignorecase isquery getfacade isabehavioralfeature getcorehelper setquery isquery operationspecialstrings osspos propertyspecialstring propertyoperation isroot equalsignorecase isroot getfacade isaoperation getcorehelper setroot isroot osspos operationspecialstrings new property operation public void found object element string value if model get facade isa structural feature element if value null the text was frozen model get core helper set read only element true else if false equals ignore case value the text was frozen false model get core helper set read only element false else if true equals ignore case value the text was frozen true model get core helper set read only element true propertyoperation getfacade isastructuralfeature getcorehelper setreadonly equalsignorecase getcorehelper setreadonly equalsignorecase getcorehelper setreadonly new property operation public void found object element string value if model get facade isa structural feature element if false equals ignore case value model get core helper set read only element true else model get core helper set changeability element model get changeable kind get add only propertyoperation getfacade isastructuralfeature equalsignorecase getcorehelper setreadonly getcorehelper setchangeability getchangeablekind getaddonly new property operation public void found object element string value if model get facade isa operation element model get core helper set concurrency element model get concurrency kind get sequential propertyoperation getfacade isaoperation getcorehelper setconcurrency getconcurrencykind getsequential new property operation public void found object element string value object kind model get concurrency kind get guarded if value null value equals ignore case false kind model get concurrency kind get sequential if model get facade isa operation element model get core helper set concurrency element kind propertyoperation getconcurrencykind getguarded equalsignorecase getconcurrencykind getsequential getfacade isaoperation getcorehelper setconcurrency new property operation public void found object element string value object kind model get concurrency kind get concurrent if value null value equals ignore case false kind model get concurrency kind get sequential if model get facade isa operation element model get core helper set concurrency element kind propertyoperation getconcurrencykind getconcurrent equalsignorecase getconcurrencykind getsequential getfacade isaoperation getcorehelper setconcurrency new property operation public void found object element string value object kind model get concurrency kind get sequential if guarded equals ignore case value kind model get concurrency kind get guarded else if concurrent equals ignore case value kind model get concurrency kind get concurrent if model get facade isa operation element model get core helper set concurrency element kind propertyoperation getconcurrencykind getsequential equalsignorecase getconcurrencykind getguarded equalsignorecase getconcurrencykind getconcurrent getfacade isaoperation getcorehelper setconcurrency new property operation public void found object element string value boolean is abstract true if value null value equals ignore case false is abstract false if model get facade isa operation element model get core helper set abstract element is abstract propertyoperation isabstract equalsignorecase isabstract getfacade isaoperation getcorehelper setabstract isabstract new property operation public void found object element string value boolean is leaf true if value null value equals ignore case false is leaf false if model get facade isa operation element model get core helper set leaf element is leaf propertyoperation isleaf equalsignorecase isleaf getfacade isaoperation getcorehelper setleaf isleaf new property operation public void found object element string value boolean is query true if value null value equals ignore case false is query false if model get facade isa behavioral feature element model get core helper set query element is query propertyoperation isquery equalsignorecase isquery getfacade isabehavioralfeature getcorehelper setquery isquery new property operation public void found object element string value boolean is root true if value null value equals ignore case false is root false if model get facade isa operation element model get core helper set root element is root propertyoperation isroot equalsignorecase isroot getfacade isaoperation getcorehelper setroot isroot parse a string on the format pre lt lt stereotype gt gt full pathname name pre param me the model element em text em describes param text a string on the above format throws parse exception when it detects an error in the attribute string see also parse error get error offset protected static void parse model element object me string text throws parse exception my tokenizer st list string path null string name null string builder stereotype null string token try st new my tokenizer text u00ab u00bb while st has more tokens token st next token if equals token u00ab equals token if stereotype null string msg parsing error model element name twin stereotypes throw new parse exception translator localize msg st get token index stereotype new string builder while true token st next token if equals token u00bb equals token break stereotype append token else if equals token if name null name name trim if path null name null equals name string msg parsing error model element name anon qualifiers throw new parse exception translator localize msg st get token index if path null path new array list string if name null path add name name null else if name null string msg parsing error model element name twin names throw new parse exception translator localize msg st get token index name token catch no such element exception nsee string msg parsing error model element name unexpected name element throw new parse exception translator localize msg text length catch parse exception pre throw pre if name null name name trim if path null name null equals name string msg parsing error model element name must end with name throw new parse exception translator localize msg 0 if name null name starts with name name substring 1 trim model get core helper set visibility me model get visibility kind get public if name null name starts with name name substring 1 trim model get core helper set visibility me model get visibility kind get private if name null name starts with name name substring 1 trim model get core helper set visibility me model get visibility kind get protected if name null name starts with name name substring 1 trim model get core helper set visibility me model get visibility kind get package if name null model get core helper set name me name stereotype utility deal with stereotypes me stereotype false if path null object nspe model get model management helper get element path model get facade get root me if nspe null model get facade isa namespace nspe string msg parsing error model element name namespace unresolved throw new parse exception translator localize msg 0 object model project manager get manager get current project get root if model get core helper get all possible namespaces me model contains nspe string msg parsing error model element name namespace invalid throw new parse exception translator localize msg 0 model get core helper add owned element nspe me full_pathname modelelement parseexception parseerror geterroroffset parsemodelelement parseexception mytokenizer stringbuilder mytokenizer hasmoretokens nexttoken parseexception gettokenindex stringbuilder nexttoken parseexception gettokenindex arraylist parseexception gettokenindex nosuchelementexception parseexception parseexception parseexception startswith getcorehelper setvisibility getvisibilitykind getpublic startswith getcorehelper setvisibility getvisibilitykind getprivate startswith getcorehelper setvisibility getvisibilitykind getprotected startswith getcorehelper setvisibility getvisibilitykind getpackage getcorehelper setname stereotypeutility dealwithstereotypes getmodelmanagementhelper getelement getfacade getroot getfacade isanamespace parseexception projectmanager getmanager getcurrentproject getroot getcorehelper getallpossiblenamespaces parseexception getcorehelper addownedelement returns a visibility string either for a visibility kind according to the definition in notation provider2 but also for a model element param o a modelelement or a visibilitykind return a string may be the empty string but guaranteed not to be null deprecated for 0 27 2 by tfmorris use link generate visibility2 object and only invoke when a visibility is actually needed instead of depending on project settings public static string generate visibility object o if o null return project p project manager get manager get current project project settings ps p get project settings if ps get show visibility value return generate visibility2 o else return visibilitykind notationprovider2 generatevisibility2 generatevisibility projectmanager getmanager getcurrentproject projectsettings getprojectsettings getshowvisibilityvalue generatevisibility2 param model element the uml element to generate the visibility for or the visibility kind itself param args arguments that influence the generation return a string representing the visibility deprecated for 0 27 3 by tfmorris use link generate visibility2 object deprecated protected static string generate visibility object model element map args if is value visibility visible args string s notation utility uml generate visibility2 model element when nothing is generated omit the space if s length 0 s s return s else return modelelement generatevisibility2 generatevisibility modelelement isvalue visibilityvisible notationutilityuml generatevisibility2 modelelement utility function to determine the presence of a key the default is false param key the string for the key param map the map to check for the presence and value of the key return true if the value for the key is true otherwise false public static boolean is value final string key final map map if map null return false object o map get key if o instanceof boolean return false return boolean o boolean value isvalue booleanvalue returns a visibility string either for a visibility kind or a model element param o a modelelement or a visibilitykind return a string may be the empty string but guaranteed not to be null public static string generate visibility2 object o if o null return if model get facade isa model element o if model get facade is public o return if model get facade is private o return if model get facade is protected o return if model get facade is package o return if model get facade isa visibility kind o if model get visibility kind get public equals o return if model get visibility kind get private equals o return if model get visibility kind get protected equals o return if model get visibility kind get package equals o return return visibilitykind generatevisibility2 getfacade isamodelelement getfacade ispublic getfacade isprivate getfacade isprotected getfacade ispackage getfacade isavisibilitykind getvisibilitykind getpublic getvisibilitykind getprivate getvisibilitykind getprotected getvisibilitykind getpackage param model element the uml element to generate for return a string which represents the path protected static string generate path object model element string builder s new string builder object p model element stack string stack new stack string object ns model get facade get namespace p while ns null model get facade isa model ns stack push model get facade get name ns ns model get facade get namespace ns while stack is empty s append stack pop if s length 0 s last index of s length 1 s append return s to string modelelement generatepath modelelement stringbuilder stringbuilder modelelement getfacade getnamespace getfacade isamodel getfacade getname getfacade getnamespace isempty lastindexof tostring parses a parameter list and aligns the parameter list in op to that specified in param a parameter list generally has the following syntax pre param inout name type initial value list param param pre code inout code is optional and if omitted the old value preserved if no value has been assigned then code in code is assumed p code name code code type code and code initial value code are optional and if omitted the old value preserved p code type code and code initial value code can be given in any order p unspecified properties is carried over by position so if a parameter is inserted into the list then it will inherit properties from the parameter that was there before for unspecified properties p this syntax is compatible with the uml 1 3 specification param op the operation the parameter list belongs to param param the parameter list without enclosing parentheses param param offset the offset to the beginning of the parameter list used for error reports throws java text parse exception when it detects an error in the attribute string see also parse error get error offset static void parse param list object op string param int param offset throws parse exception my tokenizer st new my tokenizer param t parameter custom sep copy returned parameters because it will be a live collection for mdr collection orig param new array list model get facade get parameters op object ns model get facade get root op if model get facade isa operation op object ow model get facade get owner op if ow null model get facade get namespace ow null ns model get facade get namespace ow iterator it orig param iterator while st has more tokens string kind null string name null string tok string type null string builder value null object p null boolean has colon false boolean has eq false while it has next p null p it next if model get facade is return p p null while st has more tokens tok st next token if equals tok break else if equals tok t equals tok if has eq value append tok else if equals tok has colon true has eq false else if equals tok if value null string msg parsing error notation utility two default values throw new parse exception translator localize msg param offset st get token index has eq true has colon false value new string builder else if has colon if type null string msg parsing error notation utility two types throw new parse exception translator localize msg param offset st get token index if tok char at 0 tok char at 0 string msg parsing error notation utility type quoted throw new parse exception translator localize msg param offset st get token index if tok char at 0 string msg parsing error notation utility type expr throw new parse exception translator localize msg param offset st get token index type tok else if has eq value append tok else if name null kind null string msg parsing error notation utility extra text throw new parse exception translator localize msg param offset st get token index if tok char at 0 tok char at 0 string msg parsing error notation utility name kind quoted throw new parse exception translator localize msg param offset st get token index if tok char at 0 string msg parsing error notation utility name kind expr throw new parse exception translator localize msg param offset st get token index kind name name tok if p null object return type project manager get manager get current project find type void p model get core factory build parameter op return type op add parameter p if name null model get core helper set name p name trim if kind null set param kind p kind trim if type null model get core helper set type p get type type trim ns if value null todo find a better default language todo we should know the notation language since it is us project project project manager get manager get current project project settings ps project get project settings string notation language ps get notation language object init expr model get data types factory create expression notation language value to string trim model get core helper set default value p init expr while it has next object p it next if model get facade is return p model get core helper remove parameter op p paramoffset parseexception parseerror geterroroffset parseparamlist paramoffset parseexception mytokenizer mytokenizer parametercustomsep origparam arraylist getfacade getparameters getfacade getroot getfacade isaoperation getfacade getowner getfacade getnamespace getfacade getnamespace origparam hasmoretokens stringbuilder hascolon haseq hasnext getfacade isreturn hasmoretokens nexttoken haseq hascolon haseq parseexception paramoffset gettokenindex haseq hascolon stringbuilder hascolon parseexception paramoffset gettokenindex charat charat parseexception paramoffset gettokenindex charat parseexception paramoffset gettokenindex haseq parseexception paramoffset gettokenindex charat charat parseexception paramoffset gettokenindex charat parseexception paramoffset gettokenindex returntype projectmanager getmanager getcurrentproject findtype getcorefactory buildparameter returntype addparameter getcorehelper setname setparamkind getcorehelper settype gettype projectmanager getmanager getcurrentproject projectsettings getprojectsettings notationlanguage getnotationlanguage initexpr getdatatypesfactory createexpression notationlanguage tostring getcorehelper setdefaultvalue initexpr hasnext getfacade isreturn getcorehelper removeparameter set a parameters kind according to a string description of that kind param parameter the parameter param description the string description private static void set param kind object parameter string description object kind if out equals ignore case description kind model get direction kind get out parameter else if inout equals ignore case description kind model get direction kind get in out parameter else kind model get direction kind get in parameter model get core helper set kind parameter kind setparamkind equalsignorecase getdirectionkind getoutparameter equalsignorecase getdirectionkind getinoutparameter getdirectionkind getinparameter getcorehelper setkind finds the classifier associated with the type named in name param name the name of the type to get param default space the default name space to place the type in return the classifier associated with the name static object get type string name object default space object type null project p project manager get manager get current project should we be getting this from the gui bt 11 aug 2002 type p find type name false if type null no type defined yet type model get core factory build class name default space return type defaultspace gettype defaultspace projectmanager getmanager getcurrentproject findtype getcorefactory buildclass defaultspace applies a list of name value pairs of properties to a model element the name is treated as the tag of a tagged value unless it is one of the property special strings in which case the action of the property special string is invoked param elem an model element to apply the properties to param prop a list with name value pairs of properties param spec an array of property special strings to use static void set properties object elem list string prop property special string spec string name string value int i j next prop for i 0 i 1 prop size i 2 name prop get i value prop get i 1 if name null continue name name trim if value null value value trim if the current property occurs a second time in the given list of properties then skip it for j i 2 j prop size j 2 string s prop get j if s null name equals ignore case s trim continue next prop if spec null for j 0 j spec length j if spec j invoke elem name value continue next prop model get core helper set tagged value elem name value propertyspecialstrings propertyspecialstring propertyspecialstrings setproperties propertyspecialstring nextprop equalsignorecase nextprop nextprop getcorehelper settaggedvalue interface property operation invoked by property special string when it has matched a property name param element the element on which the property was set param value the value of the property may be null if no value was given propertyoperation propertyspecialstring constructs a new property special string that will invoke the action in propop when link invoke object string string is called with name equal to str and then return true from invoke param str the name of this property special string param propop an object containing the method to invoke on a match public property special string string str property operation propop name str op propop propertyspecialstring propertyspecialstring propertyspecialstring propertyoperation called by link notation utility uml set properties object java util vector property special string while searching for an action to invoke for a property if it returns true then set properties may assume that all required actions have been taken and stop searching param pname the name of a property param value the value of a property param element a model element to apply the properties to return code true code if an action is performed otherwise code false code boolean invoke object element string pname string value if name equals ignore case pname return false op found element value return true notationutilityuml setproperties propertyspecialstring setproperties equalsignorecase checks for in strings or chars in separated tokens in order to return an index to the next attribute or operation substring 1 otherwise a inside a string or char delimiters is ignored param s the string to search param start the position to start at return the index to the next attribute static int index of next checked semicolon string s int start if s null start 0 start s length return 1 int end boolean inside false boolean backslashed false char c for end start end s length end c s char at end if inside c return end else if backslashed c c inside inside backslashed backslashed c return end indexofnextcheckedsemicolon charat finds a visibility for the visibility specified by name if no known visibility can be deduced private visibility is used param name the java name of the visibility return a visibility corresponding to name static object get visibility string name if equals name public equals name return model get visibility kind get public else if equals name protected equals name return model get visibility kind get protected else if equals name package equals name return model get visibility kind get package else if equals name private equals name return model get visibility kind get private getvisibility getvisibilitykind getpublic getvisibilitykind getprotected getvisibilitykind getpackage getvisibilitykind getprivate generate the text for one or more stereotype s param st a stereotype uml object or a string or a collection of stereotypes or a modelelement of which the stereotypes are retrieved param args arguments that may determine the notation the value of use guillemets influences the outcome return a string representing the given stereotype s deprecated for 0 27 3 by tfmorris use link generate stereotype object boolean deprecated public static string generate stereotype object st map args if st null return if st instanceof string return format single stereotype string st args if model get facade isa stereotype st return format single stereotype model get facade get name st args if model get facade isa model element st st model get facade get stereotypes st if st instanceof collection object o string buffer sb new string buffer 10 boolean first true iterator iter collection st iterator while iter has next if first sb append o iter next if o null sb append model get facade get name o first false if first return format single stereotype sb to string args return useguillemets generatestereotype generatestereotype formatsinglestereotype getfacade isastereotype formatsinglestereotype getfacade getname getfacade isamodelelement getfacade getstereotypes stringbuffer stringbuffer hasnext getfacade getname formatsinglestereotype tostring create a string representation of a single stereotype this function generates angled brackets or guillemets depending in the project s settings param name the name of the stereotype param args any arguments return the string representation deprecated for 0 27 3 by tfmorris use link format stereotype string boolean deprecated public static string format single stereotype string name map args if name null name length 0 return boolean use guillemets null if args null use guillemets boolean args get use guillemets if use guillemets null todo temporary code for backward compatibility string left string args get left guillemot if left null use guillemets left equals u00ab if use guillemets null default is false for historical compatibility only use guillemets false return format stereotype name use guillemets formatstereotype formatsinglestereotype useguillemets useguillemets useguillemets useguillemets leftguillemot useguillemets useguillemets useguillemets formatstereotype useguillemets generate the text for one or more stereotype s param st one of ul li a stereotype uml object li li a string li li a collection of stereotypes li li a modelelement of which the stereotypes are retrieved li ul param use guillemets true if unicode double angle bracket quote characters should be used return fully formatted string with list of stereotypes separated by commas and surround in brackets public static string generate stereotype object st boolean use guillemets if st null return if st instanceof string return format stereotype string st use guillemets if model get facade isa stereotype st return format stereotype model get facade get name st use guillemets if model get facade isa model element st st model get facade get stereotypes st if st instanceof collection string result null boolean found false for object stereotype collection st string name model get facade get name stereotype if found result name found true else allow concatenation order and separator to be localized result translator localize misc stereo concatenate new object result name if found return format stereotype result use guillemets return useguillemets generatestereotype useguillemets formatstereotype useguillemets getfacade isastereotype formatstereotype getfacade getname useguillemets getfacade isamodelelement getfacade getstereotypes getfacade getname formatstereotype useguillemets create a string representation of a stereotype keyword or comma separate list of names this method just wraps the string in angle brackets or guillemets double angle bracket characters depending on the setting of the flag code use guillemets code param name the name of the stereotype param use guillemets true if unicode double angle bracket quote characters should be used return the string representation public static string format stereotype string name boolean use guillemets if name null name length 0 return string key misc stereo guillemets boolean to string use guillemets return translator localize key new object name useguillemets useguillemets formatstereotype useguillemets tostring useguillemets generates the representation of a parameter on the display diagram the string to be returned will have the following syntax p kind name type expression default value see org argouml notation notation provider2 generate parameter java lang object static string generate parameter object parameter string buffer s new string buffer s append generate kind model get facade get kind parameter if s length 0 s append s append model get facade get name parameter string class ref generate classifier ref model get facade get type parameter if class ref length 0 s append s append class ref string default value generate expression model get facade get default value parameter if default value length 0 s append s append default value return s to string notationprovider2 generateparameter generateparameter stringbuffer stringbuffer generatekind getfacade getkind getfacade getname classref generateclassifierref getfacade gettype classref classref defaultvalue generateexpression getfacade getdefaultvalue defaultvalue defaultvalue tostring private static string generate expression object expr if model get facade isa expression expr return generate uninterpreted string model get facade get body expr else if model get facade isa constraint expr return generate expression model get facade get body expr return generateexpression getfacade isaexpression generateuninterpreted getfacade getbody getfacade isaconstraint generateexpression getfacade getbody private static string generate uninterpreted string un if un null return return un generateuninterpreted private static string generate classifier ref object cls if cls null return return model get facade get name cls generateclassifierref getfacade getname private static string generate kind object parameter etc kind string buffer s new string buffer todo i18n if kind null in is the default kind model get direction kind get in parameter s append in see issue 3421 else if kind model get direction kind get in out parameter s append inout else if kind model get direction kind get return parameter return nothing else if kind model get direction kind get out parameter s append out return s to string generatekind stringbuffer stringbuffer getdirectionkind getinparameter getdirectionkind getinoutparameter getdirectionkind getreturnparameter getdirectionkind getoutparameter tostring param tv a tagged value return a string that represents the tagged value static string generate tagged value object tv if tv null return return model get facade get tag of tag tv generate uninterpreted model get facade get value of tag tv generatetaggedvalue getfacade gettagoftag generateuninterpreted getfacade getvalueoftag generate the text of a multiplicity param element a multiplicity or an element which has a multiplicity param show singular multiplicity if false return the empty string for 1 1 multiplicities return a string containing the formatted multiplicity or the empty string public static string generate multiplicity object element boolean show singular multiplicity object multiplicity if model get facade isa multiplicity element multiplicity element else if model get facade isauml element element multiplicity model get facade get multiplicity element else throw new illegal argument exception it can still be null if the uml element did not have a multiplicity defined if multiplicity null int upper model get facade get upper multiplicity int lower model get facade get lower multiplicity if lower 1 upper 1 show singular multiplicity todo i18n return model get facade to string multiplicity return showsingularmultiplicity generatemultiplicity showsingularmultiplicity getfacade isamultiplicity getfacade isaumlelement getfacade getmultiplicity illegalargumentexception getfacade getupper getfacade getlower showsingularmultiplicity getfacade tostring generate the text of a multiplicity the argument singular multiplicity visible determines if 1 will be returned or in case the multiplicity is 1 param multiplicity owner the modelelement not the multiplicity param args the value singular multiplicity visible influences the outcome return the resulting string deprecated for 0 27 3 by tfmorris use link generate multiplicity object boolean public static string generate multiplicity object multiplicity owner map args return generate multiplicity multiplicity owner notation provider is value singular multiplicity visible args singularmultiplicityvisible multiplicityowner singularmultiplicityvisible generatemultiplicity generatemultiplicity multiplicityowner generatemultiplicity multiplicityowner notationprovider isvalue singularmultiplicityvisible param uml action the action return the generated text never null static string generate action object uml action collection c iterator it string s string builder p boolean first if uml action null return object script model get facade get script uml action if script null model get facade get body script null s model get facade get body script to string else s p new string builder c model get facade get actual arguments uml action if c null it c iterator first true while it has next object arg it next if first todo i18n p append if model get facade get value arg null p append generate expression model get facade get value arg first false if s length 0 p length 0 return if there are no arguments then do not show the this solves issue 1758 arguments are not supported anyhow in the ui yet these brackets are easily confused with the brackets for the operation of a call action if p length 0 return s todo i18n return s p umlaction generateaction umlaction stringbuilder umlaction getfacade getscript umlaction getfacade getbody getfacade getbody tostring stringbuilder getfacade getactualarguments umlaction hasnext getfacade getvalue generateexpression getfacade getvalue callaction generate a textual representation of the given action or action sequence according the uml standard notation param a the uml action or action sequence return the generated textual representation of the given action sequence this value is guaranteed not null public static string generate action sequence object a if model get facade isa action sequence a string buffer str new string buffer collection actions model get facade get actions a iterator i actions iterator if i has next str append generate action i next while i has next str append str append generate action i next return str to string else return generate action a actionsequence actionsequence generateactionsequence getfacade isaactionsequence stringbuffer stringbuffer getfacade getactions hasnext generateaction hasnext generateaction tostring generateaction the constructor param the unique name the name of the member this must be different for all members note that for diagram members this is not the name of the diagram param the project the owning project public abstract project member string the unique name project the project project the project make unique name the unique name theuniquename theproject abstractprojectmember theuniquename theproject theproject makeuniquename theuniquename in contrast to link get zip name returns the member s name without the prepended name of the project but with the extension p todo this is not used anywhere shall we remove it author steffen zschaler return the member s name without any prefix or suffix public string get unique diagram name string s unique name if s null if s ends with get zip file extension s get zip file extension return s getzipname getuniquediagramname uniquename endswith getzipfileextension getzipfileextension returns a unique member s name for storage in a zipfile the project s base name is prepended followed by an underscore the extension is appended p used by argo tee return the name for zip file storage public string get zip name if unique name null return null string s persistence manager get instance get project base name project if unique name length 0 s unique name if s ends with get zip file extension s get zip file extension return s _ getzipname uniquename persistencemanager getinstance getprojectbasename uniquename _ uniquename endswith getzipfileextension getzipfileextension makes a unique name for this member note this is not the diagram name and this appears to be flawed param s a string which will make up part of this unique name protected void make unique name string s unique name s if unique name null return string pbn persistence manager get instance get project base name project if unique name starts with pbn unique name unique name substring pbn length skip leading underscores int i 0 for i unique name length i if unique name char at i break if i 0 unique name unique name substring i if unique name ends with get zip file extension unique name unique name substring 0 unique name length get zip file extension length makeuniquename uniquename uniquename persistencemanager getinstance getprojectbasename uniquename startswith uniquename uniquename uniquename uniquename charat _ uniquename uniquename uniquename endswith getzipfileextension uniquename uniquename uniquename getzipfileextension used by argo tee return a short string defining the member type usually equals the file extension return the file extension string public string get zip file extension return get type getzipfileextension gettype remove this member from its project protected void remove unique name null project null uniquename public string to string return get zip name tostring getzipname construct a property panel for a classififer with the given name and icon param name the title of the properties panel param icon the icon shown next to the name public prop panel classifier string name image icon icon super name icon initialize proppanelclassifier imageicon initialize the panel with the common fields and stuff private void initialize modifiers panel create border panel translator localize label modifiers modifiers panel add new uml generalizable element abstract check box modifiers panel add new uml generalizable element leaf check box modifiers panel add new uml generalizable element root check box modifiers panel add new uml derived check box modifierspanel createborderpanel modifierspanel umlgeneralizableelementabstractcheckbox modifierspanel umlgeneralizableelementleafcheckbox modifierspanel umlgeneralizableelementrootcheckbox modifierspanel umlderivedcheckbox returns the association end scroll return j scroll pane public j scroll pane get association end scroll if association end scroll null association end scroll new scroll list association end list model return association end scroll associationendscroll jscrollpane jscrollpane getassociationendscroll associationendscroll associationendscroll scrolllist associationendlistmodel associationendscroll returns the create action scroll return j scroll pane public j scroll pane get create action scroll if create action scroll null create action scroll new scroll list create action list model return create action scroll createactionscroll jscrollpane jscrollpane getcreateactionscroll createactionscroll createactionscroll scrolllist createactionlistmodel createactionscroll returns the feature scroll return j scroll pane public j scroll pane get feature scroll if feature scroll null feature scroll new scroll list feature list model true false return feature scroll featurescroll jscrollpane jscrollpane getfeaturescroll featurescroll featurescroll scrolllist featurelistmodel featurescroll returns the generalization scroll return j scroll pane public j scroll pane get generalization scroll if generalization scroll null generalization scroll new scroll list generalization list model return generalization scroll generalizationscroll jscrollpane jscrollpane getgeneralizationscroll generalizationscroll generalizationscroll scrolllist generalizationlistmodel generalizationscroll returns the power type range scroll return j scroll pane public j scroll pane get power type range scroll if power type range scroll null power type range scroll new scroll list powertype range list model return power type range scroll powertyperangescroll jscrollpane jscrollpane getpowertyperangescroll powertyperangescroll powertyperangescroll scrolllist powertyperangelistmodel powertyperangescroll returns the specialization scroll return j scroll pane public j scroll pane get specialization scroll if specialization scroll null specialization scroll new scroll list specialization list model return specialization scroll specializationscroll jscrollpane jscrollpane getspecializationscroll specializationscroll specializationscroll scrolllist specializationlistmodel specializationscroll returns the attribute scroll return j scroll pane public j scroll pane get attribute scroll if attribute scroll null attribute scroll new scroll list attribute list model true false return attribute scroll attributescroll jscrollpane jscrollpane getattributescroll attributescroll attributescroll scrolllist attributelistmodel attributescroll returns the operation scroll return j scroll pane public j scroll pane get operation scroll if operation scroll null operation scroll new scroll list operation list model true false return operation scroll operationscroll jscrollpane jscrollpane getoperationscroll operationscroll operationscroll scrolllist operationlistmodel operationscroll return the action for a new reception protected action new reception get action new reception return action new reception actionnewreception getactionnewreception actionnewreception return returns the modifiers panel protected j panel get modifiers panel return modifiers panel modifierspanel jpanel getmodifierspanel modifierspanel constructor for uml association role association end role list model public uml association role association end role list model super connection umlassociationroleassociationendrolelistmodel umlassociationroleassociationendrolelistmodel see org argouml uml ui uml model element list model2 build model list protected void build model list set all elements model get facade get connections get target umlmodelelementlistmodel2 buildmodellist buildmodellist setallelements getfacade getconnections gettarget see org argouml uml ui uml model element list model2 is valid element object protected boolean is valid element object o return model get facade isa association end role o model get facade get connections get target contains o umlmodelelementlistmodel2 isvalidelement isvalidelement getfacade isaassociationendrole getfacade getconnections gettarget public class action stereotype view textual extends action stereotype view default constructor for this action param node the current node public action stereotype view textual fig node model element node super node menu popup stereotype view textual diagram appearance stereotype view textual actionstereotypeviewtextual actionstereotypeview actionstereotypeviewtextual fignodemodelelement diagramappearance stereotype_view_textual build a style panel just layout the relevant boxes public style panel fig use case invoke the parent constructor first super add to display pane ep check box by default we don t show the attribute check box mark this object as a listener for the check box ep check box set selected false ep check box add item listener this stylepanelfigusecase addtodisplaypane epcheckbox epcheckbox setselected epcheckbox additemlistener refresh the display this means setting the check box from the target use case fig see org argouml ui tab target refresh public void refresh refresh transaction true invoke the parent refresh first super refresh fig use case target fig use case get target ep check box set selected target is extension point visible refresh transaction false tabtarget refreshtransaction figusecase figusecase gettarget epcheckbox setselected isextensionpointvisible refreshtransaction something has changed check if its the check box p param e the event that triggered us see java awt event item listener item state changed java awt event item event public void item state changed item event e if refresh transaction if e get source ep check box fig use case target fig use case get target target set extension point visible ep check box is selected else super item state changed e itemlistener itemstatechanged itemevent itemstatechanged itemevent refreshtransaction getsource epcheckbox figusecase figusecase gettarget setextensionpointvisible epcheckbox isselected itemstatechanged return returns the singleton public static gen descendant classes getsingleton return singleton gendescendantclasses public enumeration gen object o set res new hash set if model get facade isa generalizable element o object cls o accumulate descendants cls res return collections enumeration res hashset getfacade isageneralizableelement accumulatedescendants param cls the starting class in fact generalizable element param accum the accumulated list of descendants private void accumulate descendants final object cls collection accum collection gens model get facade get specializations cls if gens null return for object g gens object ge model get facade get specific g if accum contains ge accum add ge accumulate descendants cls accum generalizableelement accumulatedescendants getfacade getspecializations getfacade getspecific accumulatedescendants public collection get children object parent if model get facade isa operation parent object operation parent collection col model get facade get collaborations operation set argo diagram ret new hash set argo diagram project p project manager get manager get current project for argo diagram diagram p get diagram list if diagram instanceof uml collaboration diagram col contains uml collaboration diagram diagram get namespace ret add diagram return ret return collections empty set getchildren getfacade isaoperation getfacade getcollaborations argodiagram hashset argodiagram projectmanager getmanager getcurrentproject argodiagram getdiagramlist umlcollaborationdiagram umlcollaborationdiagram getnamespace empty_set see org argouml ui explorer rules perspective rule get dependencies java lang object public set get dependencies object parent todo what return collections empty set perspectiverule getdependencies getdependencies empty_set see org argouml ui explorer rules perspective rule get rule name public string get rule name return translator localize misc operation collaboration diagram perspectiverule getrulename getrulename private static hashtable statuses new hashtable constructor public check manager checkmanager gets the checklist for an element param dm is the element return a checklist public static checklist get checklist for object dm checklist cl java lang class cls dm get class while cls null cl lookup checklist cls if cl null return cl cls cls get superclass return null getchecklistfor getclass lookupchecklist getsuperclass find an element in the list this is a little more complex than the simple lookup since it might be that we are indexing with a class and the list contains interfaces since the hashtable lookup is a lot faster than the linear search we add the result of the linear search to the hashtable so that the next time we need not do it return checklist or null if noone exist param cls the class to lookup private static checklist lookup checklist class cls if lists contains cls return checklist lists get cls now lets search enumeration enumeration lists keys while enumeration has more elements object clazz enumeration next element class intfs cls get interfaces for int i 0 i intfs length i if intfs i equals clazz we found it checklist chlist checklist lists get clazz enter the class to speed up the next search lists put cls chlist return chlist return null lookupchecklist hasmoreelements nextelement getinterfaces registers a new list used when setting up the checklist stuff param dm the class for which the checklist holds param cl the checklist public static void register object dm checklist cl lists put dm cl get the checklist status for some object if there is none then create one return checklist status a half filled list param dm is the object that we retrieve the checklist for public static checklist status get status for object dm checklist status cls checklist status statuses get dm if cls null cls new checklist status statuses put dm cls return cls checkliststatus checkliststatus checkliststatus getstatusfor checkliststatus checkliststatus checkliststatus constructor for uml model element stereotype combo box model public uml tag definition owner combo box model super owner true model get pump add class model event listener this model get meta types get namespace owned element umlmodelelementstereotypecomboboxmodel umltagdefinitionownercomboboxmodel getpump addclassmodeleventlistener getmetatypes getnamespace ownedelement see org argouml uml ui uml combo box model2 is valid element object protected boolean is valid element object o return model get facade isa stereotype o umlcomboboxmodel2 isvalidelement isvalidelement getfacade isastereotype protected void build model list todo ths following code does not work but we still need to support multiple models in a similar way to be able to pull in stereotypes from a profile model object elem get target collection models project manager get manager get current project get models set elements model get extension mechanisms helper get all possible stereotypes models elem project p project manager get manager get current project object model p get root set elements model get model management helper get all model elements of kind with model model model get meta types get stereotype buildmodellist gettarget projectmanager getmanager getcurrentproject getmodels setelements getextensionmechanismshelper getallpossiblestereotypes projectmanager getmanager getcurrentproject getroot setelements getmodelmanagementhelper getallmodelelementsofkindwithmodel getmetatypes getstereotype protected object get selected model element object owner null if get target null model get facade isa tag definition get target owner model get facade get owner get target return owner getselectedmodelelement gettarget getfacade isatagdefinition gettarget getfacade getowner gettarget private list cues new array list the constructor public wiz cue cards arraylist wizcuecards see org argouml cognitive ui wizard get num steps override public int get num steps return cues size getnumsteps getnumsteps param s the text for the wizard step public void add cue string s cues add s addcue create a new panel for the given step returns a newly created panel or null if there isn t that many steps see org argouml cognitive critics wizard make panel int public j panel make panel int new step if new step get num steps string c string cues get new step 1 return new wiz step cue this c return null makepanel jpanel makepanel newstep newstep getnumsteps newstep wizstepcue this wizard never takes action it just displays step by step instructions see org argouml cognitive critics wizard do action int doaction this wizard cannot automatically finish the task it can only be finished when the user is on the last step see org argouml cognitive critics wizard can finish override public boolean can finish return get step get num steps canfinish canfinish getstep getnumsteps constructor for the critic p sets up the resource name which will allow headline and description to found for the current locale provides a design issue category storage and adds triggers for metaclasses behavioural feature and structural feature public cr constructor needed setup head and desc add supported decision uml decision storage add knowledge type critic kt correctness these may not actually make any difference at present the code behind add trigger needs more work add trigger behavioral feature add trigger structural feature behaviouralfeature structuralfeature crconstructorneeded setupheadanddesc addsupporteddecision umldecision addknowledgetype kt_correctness addtrigger addtrigger behavioralfeature addtrigger structuralfeature the trigger for the critic p first see if we have any instance variables that are not initialised if not there is no problem if there are any uninitialised instance variables then look for a constructor p param dm the link java lang object object to be checked against the critic param dsgr the link org argouml cognitive designer designer creating the model not used this is for future development of argouml return link problem found problem found if the critic is triggered otherwise link no problem no problem override public boolean predicate2 object dm designer dsgr only look at classes if model get facade isa class dm return no problem we don t consider secondary stuff if model get facade is primary object dm return no problem types don t need a constructor if model get facade is type dm return no problem utilities usually do not require a constructor either if model get facade is utility dm return no problem check for uninitialised instance variables and constructor collection operations model get facade get operations dm iterator opers operations iterator while opers has next if model get facade is constructor opers next there is a constructor return no problem iterator attrs model get facade get attributes dm iterator while attrs has next object attr attrs next if model get facade is static attr continue if model get facade is initialized attr continue we have found a non static one that is not initialized return problem found yeah right we don t have an operation and thus no return no problem problem_found problem_found no_problem no_problem getfacade isaclass no_problem getfacade isprimaryobject no_problem getfacade istype no_problem getfacade isutility no_problem getfacade getoperations hasnext getfacade isconstructor no_problem getfacade getattributes hasnext getfacade isstatic getfacade isinitialized problem_found no_problem override public void init wizard wizard w if w instanceof wiz add constructor to do item item to do item w get to do item object me item get offenders get 0 string ins super get instructions string sug null if me null sug model get facade get name me if equals sug sug super get default suggestion wiz add constructor w set instructions ins wiz add constructor w set suggestion sug initwizard wizaddconstructor todoitem todoitem gettodoitem getoffenders getinstructions getfacade getname getdefaultsuggestion wizaddconstructor setinstructions wizaddconstructor setsuggestion see org argouml cognitive critics critic get wizard class org argouml cognitive to do item override public class get wizard class to do item item return wiz add constructor class getwizardclass todoitem getwizardclass todoitem wizaddconstructor see org argouml ui clarifier set fig org tigris gef presentation fig public void set fig fig f fig f setfig setfig see org argouml ui clarifier set to do item org argouml cognitive to do item public void set to do item to do item i settodoitem todoitem settodoitem todoitem public void paint icon component c graphics g int x int y rectangle rect null if fig instanceof fig node model element fig node model element fnme fig node model element fig rect fnme get name bounds else if fig instanceof fig edge model element fig edge model element feme fig edge model element fig rect feme get name bounds if rect null int left rect x 6 int height rect y rect height 4 int right rect x rect width 6 g set color color red int i left while true g draw line i height i wave length height wave height i wave length if i right break g draw line i height wave height i wave length height i wave length if i right break g draw line i height i wave length height wave height 2 i wave length if i right break g draw line i height wave height 2 i wave length height i wave length if i right break fig null painticon fignodemodelelement fignodemodelelement fignodemodelelement getnamebounds figedgemodelelement figedgemodelelement figedgemodelelement getnamebounds setcolor drawline wave_length wave_height wave_length drawline wave_height wave_length wave_length drawline wave_length wave_height wave_length drawline wave_height wave_length wave_length see javax swing icon get icon width public int get icon width return 0 geticonwidth geticonwidth see javax swing icon get icon height public int get icon height return 0 geticonheight geticonheight public boolean hit int x int y rectangle rect null if fig instanceof fig node model element fig node model element fnme fig node model element fig rect fnme get name bounds else if fig instanceof fig edge model element fig edge model element feme fig edge model element fig rect feme get name bounds fig null return rect null rect contains x y fignodemodelelement fignodemodelelement fignodemodelelement getnamebounds figedgemodelelement figedgemodelelement figedgemodelelement getnamebounds return returns the the instance public static cl class name get the instance return the instance theinstance clclassname gettheinstance theinstance don t let this class be instantiated private argo change the default startup directory param dir the directory to save public static void set directory string dir store in the user configuration and let gef know also org tigris gef base globals set last directory dir configuration set string key startup dir dir setdirectory setlastdirectory setstring key_startup_dir get the default startup directory return the startup directory public static string get directory use the configuration if it exists otherwise use what gef thinks return configuration get string key startup dir org tigris gef base globals get last directory getdirectory getstring key_startup_dir getlastdirectory supply the encoding to be used throughout the persistence mechanism return the encoding public static string get encoding return utf 8 getencoding see org argouml ui explorer rules perspective rule get rule name public string get rule name return translator localize misc state machine state perspectiverule getrulename getrulename public collection get children object parent if model get facade isa state machine parent if model get facade get top parent null return model get facade get subvertices model get facade get top parent return collections empty set getchildren getfacade isastatemachine getfacade gettop getfacade getsubvertices getfacade gettop empty_set public set get dependencies object parent if model get facade isa state machine parent set set new hash set set add parent if model get facade get top parent null set add model get facade get top parent return set return collections empty set getdependencies getfacade isastatemachine hashset getfacade gettop getfacade gettop empty_set construct an action to create a new to do item public action new to do item super translator localize action new todo item resource loader wrapper lookup icon action new todo item set the tooltip string put value action short description translator localize action new todo item todo actionnewtodoitem resourceloaderwrapper lookupicon putvalue short_description override public void action performed action event ae super action performed ae add to do item dialog dialog new add to do item dialog new uml list cell renderer2 true dialog set visible true actionperformed actionevent actionperformed addtodoitemdialog addtodoitemdialog umllistcellrenderer2 setvisible constructor for uml model element client dependency list model public uml dependency client list model super client umlmodelelementclientdependencylistmodel umldependencyclientlistmodel protected void build model list if get target null set all elements model get facade get clients get target buildmodellist gettarget setallelements getfacade getclients gettarget see org argouml uml ui uml model element list model2 is valid element object protected boolean is valid element object o return model get facade isa model element o model get facade get clients get target contains o umlmodelelementlistmodel2 isvalidelement isvalidelement getfacade isamodelelement getfacade getclients gettarget get the single instance of the look and feel mgr return the single instance of the look and feel mgr public static look and feel mgr get instance return singleton lookandfeelmgr lookandfeelmgr lookandfeelmgr getinstance creates a new instance of look and feel mgr private look and feel mgr look and feel laf ui manager get look and feel if laf null default laf class laf get class get name else default laf class null lookandfeelmgr lookandfeelmgr lookandfeel uimanager getlookandfeel defaultlafclass getclass getname defaultlafclass sets the appearance of the ui using the current values of the look and feel and theme properties public void initialize look and feel string n get current look and feel set look and feel n if is theme compatible look and feel n set theme get metal theme get current theme class name lookandfeel initializelookandfeel getcurrentlookandfeel setlookandfeel isthemecompatiblelookandfeel settheme getmetaltheme getcurrentthemeclassname detecting the theme from the command line param arg the argument from the command line return the theme public string get theme class name from arg string arg if arg equals ignore case big return big theme get class get name else if arg equals ignore case huge return huge theme get class get name return null getthemeclassnamefromarg equalsignorecase big_theme getclass getname equalsignorecase huge_theme getclass getname outputs command line arguments supported by this class public void print theme args system err println big use big fonts system err println huge use huge fonts printthemeargs returns the display names of the available look and feel choices this may be used to fill a combobox to allow the user to select the laf return look and feel display names public string get available look and feel names ui manager look and feel info lafs ui manager get installed look and feels string names new string lafs length 1 names 0 default key for int i 0 i lafs length i names i 1 lafs i get name return names getavailablelookandfeelnames uimanager lookandfeelinfo uimanager getinstalledlookandfeels default_key getname returns the display names of the available theme choices this may be used to fill a combobox to allow the user to select the theme return theme display names public string get available theme names string names new string look and feel mgr themes length for int i 0 i themes length i names i themes i get name return names getavailablethemenames lookandfeelmgr getname returns the look and feel class name identifier for the specified display name or null if no such look and feel is found param name display name of desired look and feel return class name for desired look and feel public string get look and feel from name string name if name null default key equals name return null string class name null ui manager look and feel info lafs ui manager get installed look and feels for int i 0 i lafs length i if lafs i get name equals name class name lafs i get class name return class name getlookandfeelfromname default_key classname uimanager lookandfeelinfo uimanager getinstalledlookandfeels getname classname getclassname classname returns the theme class name identifier for the specified display name or null if no such theme is found param name display name of desired theme return class name for desired theme public string get theme from name string name if name null return null string class name null for int i 0 i themes length i if themes i get name equals name class name themes i get class get name return class name getthemefromname classname getname classname getclass getname classname returns true if the specified look and feel class supports setting different themes param laf class look and feel class name return true if supports themes public boolean is theme compatible look and feel string laf class if laf class null return false return laf class null laf class equals metal laf class name lafclass isthemecompatiblelookandfeel lafclass lafclass lafclass lafclass metal_laf_class_name returns the string identifier for the current look and feel this is the class name of the look and feel class for the look and feel returns null if no look and feel has been specified in which case swing s default look and feel should be used return current look and feel class name public string get current look and feel string value configuration get string argo key look and feel class null if default key equals value value null return value lookandfeel getcurrentlookandfeel getstring key_look_and_feel_class default_key returns the display name of the current look and feel return look and feel display name public string get current look and feel name string current look and feel get current look and feel if current look and feel null return default key string name null ui manager look and feel info lafs ui manager get installed look and feels for int i 0 i lafs length i if lafs i get class name equals current look and feel name lafs i get name return name getcurrentlookandfeelname currentlookandfeel getcurrentlookandfeel currentlookandfeel default_key uimanager lookandfeelinfo uimanager getinstalledlookandfeels getclassname currentlookandfeel getname sets the current look and feel storing the new value in configuration if argument is null indicates that swing s default look and feel should be used param laf name the name of desired look and feel param theme name the name of the theme public void set currentlaf and theme by name string laf name string theme name string laf class get look and feel from name laf name string current look and feel get current look and feel if laf class null current look and feel null return disabled since it gives various problems e g the toolbar icons get too wide also the default does not give the new java 5 0 looks if laf class null laf class equals current look and feel set look and feel laf class component tree project browser get instance swing utilities update component treeui swing utilities get root pane tree if laf class null laf class default key configuration set string argo key look and feel class laf class set current theme get theme from name theme name lafname themename setcurrentlafandthemebyname lafname themename lafclass getlookandfeelfromname lafname currentlookandfeel getcurrentlookandfeel lafclass currentlookandfeel lafclass lafclass currentlookandfeel setlookandfeel lafclass projectbrowser getinstance swingutilities updatecomponenttreeui swingutilities getrootpane lafclass lafclass default_key setstring key_look_and_feel_class lafclass setcurrenttheme getthemefromname themename returns the string identifier for the current theme this is the class name of the metal theme class for the theme this method returns null when the configuration does not return a valid metaltheme return current theme class name or null public string get current theme class name string value configuration get string argo key theme class null if default key equals value value null return value metaltheme getcurrentthemeclassname getstring key_theme_class default_key returns the display name of the current theme guaranteed to return the display name of one of the themes in the themes list return theme display name public string get current theme name string current theme class name get current theme class name if current theme class name null make up a default return themes 0 get name for int i 0 i themes length i if themes i get class get name equals current theme class name return themes i get name return themes 0 get name getcurrentthemename currentthemeclassname getcurrentthemeclassname currentthemeclassname getname getclass getname currentthemeclassname getname getname sets the current theme storing the new value in configuration argument should not be null and argument class should be an instance of metal theme param theme class class name of desired theme public void set current theme string theme class metal theme theme get metal theme theme class if theme get class get name equals get current theme class name return set theme theme disabled since it gives various problems e g the toolbar icons get too wide also the default does not give the new java 5 0 looks component tree project browser get instance swing utilities update component treeui swing utilities get root pane tree string theme value theme class if theme value null theme value default key configuration set string argo key theme class theme value metaltheme themeclass setcurrenttheme themeclass metaltheme getmetaltheme themeclass getclass getname getcurrentthemeclassname settheme projectbrowser getinstance swingutilities updatecomponenttreeui swingutilities getrootpane themevalue themeclass themevalue themevalue default_key setstring key_theme_class themevalue return the standard textfield font public font get standard font font font ui manager get defaults get font text field font if font null font new javax swing j text field get font return font getstandardfont uimanager getdefaults getfont textfield jtextfield getfont return the small font public font get small font font font get standard font if font get size2d 12f return font derive font font get size2d 2f return font getsmallfont getstandardfont getsize2d derivefont getsize2d sets the look and feel in the gui by calling ui manager set look and feel param laf class class name of look and feel private void set look and feel string laf class try if laf class null default laf class null set to the default laf ui manager set look and feel default laf class else set a custom laf ui manager set look and feel laf class catch unsupported look and feel exception e log error e catch class not found exception e log error e catch instantiation exception e log error e catch illegal access exception e log error e uimanager setlookandfeel lafclass setlookandfeel lafclass lafclass defaultlafclass uimanager setlookandfeel defaultlafclass uimanager setlookandfeel lafclass unsupportedlookandfeelexception classnotfoundexception instantiationexception illegalaccessexception sets the metal theme in the gui by calling metal look and feel set current theme param theme new metal theme to set private void set theme metal theme theme string current look and feel get current look and feel if laf is metal either set explicitly or as the default if current look and feel null current look and feel equals metal laf class name current look and feel null default laf class equals metal laf class name try metal look and feel set current theme theme ui manager set look and feel metal laf class name catch unsupported look and feel exception e log error e catch class not found exception e log error e catch instantiation exception e log error e catch illegal access exception e log error e metallookandfeel setcurrenttheme metaltheme settheme metaltheme currentlookandfeel getcurrentlookandfeel currentlookandfeel currentlookandfeel metal_laf_class_name currentlookandfeel defaultlafclass metal_laf_class_name metallookandfeel setcurrenttheme uimanager setlookandfeel metal_laf_class_name unsupportedlookandfeelexception classnotfoundexception instantiationexception illegalaccessexception returns the metal theme for the specified class name returns the default theme if a corresponding metal theme class can not be found param theme class metal theme class name return metal theme object for class name private metal theme get metal theme string theme class metal theme theme null for int i 0 i themes length i if themes i get class get name equals theme class theme themes i if theme null theme default theme return theme metaltheme metaltheme themeclass metaltheme metaltheme metaltheme getmetaltheme themeclass metaltheme getclass getname themeclass default_theme param x location x param y location y param w width param h height param expand only impacts behavior deprecated for 0 27 3 by tfmorris suppress warnings deprecation deprecated public fig multi line text with bold int x int y int w int h boolean expand only super x y w h expand only expandonly suppresswarnings figmultilinetextwithbold expandonly expandonly param owner owning uml element param bounds position and size param settings render settings param expand only true if fig should never shrink public fig multi line text with bold object owner rectangle bounds diagram settings settings boolean expand only super owner bounds settings expand only expandonly figmultilinetextwithbold diagramsettings expandonly expandonly override protected int get fig font style boolean show bold name get settings is show bold names int bold style show bold name font bold font plain return super get fig font style bold style getfigfontstyle showboldname getsettings isshowboldnames boldstyle showboldname getfigfontstyle boldstyle the constructor param name the name that will be localized public tree model composite string name super name treemodelcomposite see javax swing tree tree model get root public object get root return root treemodel getroot getroot public object get child object parent int index for tree model tm get go rule list int child count tm get child count parent if index child count return tm get child parent index index child count return null getchild treemodel getgorulelist childcount getchildcount childcount getchild childcount public int get child count object parent int child count 0 for tree model tm get go rule list child count tm get child count parent return child count getchildcount childcount treemodel getgorulelist childcount getchildcount childcount public int get index of child object parent object child int child count 0 for tree model tm get go rule list int child index tm get index of child parent child if child index 1 return child index child count child count tm get child count parent log debug child not found the child is sometimes not found when the tree is being updated return 1 getindexofchild childcount treemodel getgorulelist childindex getindexofchild childindex childindex childcount childcount getchildcount public boolean is leaf object node for tree model tm get go rule list if tm is leaf node return false return true isleaf treemodel getgorulelist isleaf see javax swing tree tree model value for path changed javax swing tree tree path java lang object public void value for path changed tree path path object new value empty implementation not used treemodel valueforpathchanged treepath valueforpathchanged treepath newvalue param r the root of the model public void set root object r root r setroot return the shortcuts as an action wrapper array return an array of action wrappers static action wrapper get shortcuts action wrapper actions shortcut hash values to array new action wrapper shortcut hash size arrays sort actions new comparator action wrapper public int compare action wrapper o1 action wrapper o2 string name1 o1 get action name if name1 null name1 string name2 o2 get action name if name2 null name2 return name1 compare to name2 return actions actionwrapper actionwrappers actionwrapper getshortcuts actionwrapper shortcuthash toarray actionwrapper shortcuthash actionwrapper actionwrapper actionwrapper getactionname getactionname compareto arrays sort actions new comparator action wrapper public int compare action wrapper o1 action wrapper o2 string name1 o1 get action name if name1 null name1 string name2 o2 get action name if name2 null name2 return name1 compare to name2 actionwrapper actionwrapper actionwrapper getactionname getactionname compareto assign a shortcut to the given j menu item param menu item the menu item param shortcut key the shortcut key public static void assign accelerator j menu item menu item string shortcut key action wrapper shortcut shortcut hash get shortcut key if shortcut null key stroke key stroke shortcut get current shortcut if key stroke null menu item set accelerator key stroke key stroke alternative key stroke duplicate get key stroke if alternative key stroke null string action name string menu item get action get value abstract action name menu item get input map j component when in focused window put alternative key stroke action name menu item get action map put action name menu item get action jmenuitem menuitem shortcutkey assignaccelerator jmenuitem menuitem shortcutkey actionwrapper shortcuthash shortcutkey keystroke keystroke getcurrentshortcut keystroke menuitem setaccelerator keystroke keystroke alternativekeystroke keystroke alternativekeystroke actionname menuitem getaction getvalue abstractaction menuitem getinputmap jcomponent when_in_focused_window alternativekeystroke actionname menuitem getactionmap actionname menuitem getaction assign a shortcut to the given j panel only when focused param panel the panel param shortcut key the shortcut key public static void assign accelerator j panel panel string shortcut key action wrapper shortcut shortcut hash get shortcut key if shortcut null key stroke key stroke shortcut get current shortcut if key stroke null todo this method is obsolete use get input map etc as below panel register keyboard action shortcut get action instance key stroke j component when focused key stroke alternative key stroke duplicate get key stroke if alternative key stroke null string action name string shortcut get action instance get value abstract action name panel get input map j component when focused put alternative key stroke action name panel get action map put action name shortcut get action instance jpanel shortcutkey assignaccelerator jpanel shortcutkey actionwrapper shortcuthash shortcutkey keystroke keystroke getcurrentshortcut keystroke getinputmap registerkeyboardaction getactioninstance keystroke jcomponent when_focused keystroke alternativekeystroke keystroke alternativekeystroke actionname getactioninstance getvalue abstractaction getinputmap jcomponent when_focused alternativekeystroke actionname getactionmap actionname getactioninstance search for the duplicate of a given key stroke param key stroke the key stroke to search for return the duplicate or null if not present static key stroke get duplicate key stroke key stroke return duplicate get key stroke keystroke keystroke keystroke keystroke getduplicate keystroke keystroke keystroke returns a shortcut for the given action id param action id the id of the action return the given action or null if the action is not found public static action wrapper get shortcut string action id return shortcut hash get action id actionid actionwrapper getshortcut actionid shortcuthash actionid private static void put default shortcut string shortcut key key stroke default key stroke abstract action action put default shortcut shortcut key default key stroke action get action default name action putdefaultshortcut shortcutkey keystroke defaultkeystroke abstractaction putdefaultshortcut shortcutkey defaultkeystroke getactiondefaultname private static void put default shortcut string shortcut key key stroke default key stroke abstract action action string action name let s load the current shortcut from the configuration as a string string conf current shortcut configuration get string configuration make key shortcut key null key stroke current key stroke null if conf current shortcut null if the current shortcut has not been set then the actual shortcut value is the default one current key stroke default key stroke else if conf current shortcut compare to 0 if the current shortcut has been set but is void then the current shortcut is not set then the default value does not change current key stroke decode key stroke conf current shortcut action wrapper current shortcut new action wrapper shortcut key current key stroke default key stroke action action name shortcut hash put shortcut key current shortcut putdefaultshortcut shortcutkey keystroke defaultkeystroke abstractaction actionname confcurrentshortcut getstring makekey shortcutkey keystroke currentkeystroke confcurrentshortcut currentkeystroke defaultkeystroke confcurrentshortcut compareto currentkeystroke decodekeystroke confcurrentshortcut actionwrapper currentshortcut actionwrapper shortcutkey currentkeystroke defaultkeystroke actionname shortcuthash shortcutkey currentshortcut this method decodes the given string into the corresponding key stroke param str key stroke the string to be decoded return the corresponding key stroke public static key stroke decode key stroke string str key stroke assert str key stroke null string tokenizer tokenizer new string tokenizer str key stroke key event utils modifier joiner int modifiers 0 while tokenizer has more elements string next element string tokenizer next element if tokenizer has more tokens modifiers decode modifier next element else try field f key event class get field vk next element return key stroke get key stroke f get int null modifiers catch exception exc log error exception exc return null keystroke strkeystroke keystroke keystroke decodekeystroke strkeystroke strkeystroke stringtokenizer stringtokenizer strkeystroke keyeventutils modifier_joiner hasmoreelements nextelement nextelement hasmoretokens decodemodifier nextelement keyevent getfield vk_ nextelement keystroke getkeystroke getint saves the given actions in the configuration file param new actions the actions array static void save shortcuts action wrapper new actions for int i 0 i new actions length i action wrapper old action shortcut hash get new actions i get key if new actions i get current shortcut null new actions i get default shortcut null if a default action was voided then we have to save it configuration set string configuration make key old action get key else if new actions i get current shortcut null new actions i get current shortcut equals new actions i get default shortcut if a not default current shortcut was added then we have to save it configuration set string configuration make key old action get key key event utils format key stroke new actions i get current shortcut else if the actual is not going to be saved then try to remove it as it could have been cancelled configuration remove key configuration make key old action get key newactions saveshortcuts actionwrapper newactions newactions actionwrapper oldaction shortcuthash newactions getkey newactions getcurrentshortcut newactions getdefaultshortcut setstring makekey oldaction getkey newactions getcurrentshortcut newactions getcurrentshortcut newactions getdefaultshortcut setstring makekey oldaction getkey keyeventutils formatkeystroke newactions getcurrentshortcut removekey makekey oldaction getkey private static int decode modifier string modifier if modifier null modifier length 0 return 0 else if modifier equals key event utils ctrl modifier return input event ctrl down mask else if modifier equals key event utils alt modifier return input event alt down mask else if modifier equals key event utils alt graph modifier return input event alt graph down mask else if modifier equals key event utils meta modifier return input event meta down mask else if modifier equals key event utils shift modifier return input event shift down mask else it should never go here log debug unknown modifier modifier return 0 decodemodifier keyeventutils ctrl_modifier inputevent ctrl_down_mask keyeventutils alt_modifier inputevent alt_down_mask keyeventutils alt_graph_modifier inputevent alt_graph_down_mask keyeventutils meta_modifier inputevent meta_down_mask keyeventutils shift_modifier inputevent shift_down_mask private static string get action default name abstract action action return string action get value abstract action name getactiondefaultname abstractaction getvalue abstractaction construct a language instance with all its properties param the name the name of the language param the title a string representing the language for display param the icon an icon for the language public language string the name string the title icon the icon this name the name if the title null this title the name else this title the title this icon the icon thename thetitle theicon thename thetitle theicon thename thetitle thename thetitle theicon creates a language with no icon param the name the name of the language param the title a string representing the language for display public language string the name string the title this the name the title null thename thetitle thename thetitle thename thetitle creates a language with title equal to the name param the name the name of the language param the icon an icon for the language public language string the name icon the icon this the name the name the icon thename theicon thename theicon thename thename theicon creates a language with title equal to the name and no icon param the name the name of the language public language string the name this the name the name null thename thename thename thename return returns the icon public icon get icon return icon geticon param the icon the icon to set public void set icon icon the icon this icon the icon theicon seticon theicon theicon return returns the name public string get name return name getname param the name the name to set public void set name string the name this name the name thename setname thename thename return returns the title which should be a string representing the language in a form suitable for display public string get title return title gettitle param the title a string representing the language in a form suitable for display public void set title string the title this title the title thetitle settitle thetitle thetitle public string to string string tit get title return tit null no name tit tostring gettitle constructor param title the title of the panel param horizontal determines the orientation public uml parameter direction kind radio button panel string title boolean horizontal super title label texts and action commands kind action set parameter direction kind get instance horizontal umlparameterdirectionkindradiobuttonpanel labeltextsandactioncommands actionsetparameterdirectionkind getinstance public void build model if get target null object target get target object kind model get facade get kind target if kind null set selected null else if kind equals model get direction kind get in parameter set selected action set parameter direction kind in command else if kind equals model get direction kind get in out parameter set selected action set parameter direction kind inout command else if kind equals model get direction kind get out parameter set selected action set parameter direction kind out command else set selected action set parameter direction kind return command buildmodel gettarget gettarget getfacade getkind setselected getdirectionkind getinparameter setselected actionsetparameterdirectionkind in_command getdirectionkind getinoutparameter setselected actionsetparameterdirectionkind inout_command getdirectionkind getoutparameter setselected actionsetparameterdirectionkind out_command setselected actionsetparameterdirectionkind return_command private map string image images new hash map string image public image get icon for stereotype object stereotype return images get model get facade get name stereotype hashmap geticonforstereotype getfacade getname adds a new descriptor to this strategy param fnd public void add desrciptor fig node descriptor fnd images put fnd stereotype fnd img adddesrciptor fignodedescriptor return if this descriptor ir valid public boolean is valid return stereotype null src null length 0 isvalid the default constructor for this class param file the file from where the model should be read throws profile exception if the profile could not be loaded public user defined profile file file throws profile exception log info load file display name file get name model file file profile reference reference null try reference new user profile reference file get path catch malformedurl exception e throw new profile exception failed to create the profile reference e profile packages new file model loader load model reference finish loading profileexception userdefinedprofile profileexception displayname getname modelfile profilereference userprofilereference getpath malformedurlexception profileexception profilereference profilepackages filemodelloader loadmodel finishloading a constructor that reads a file from an url param url the url throws profile exception if the profile can t be read or is not valid public user defined profile url url throws profile exception log info load url profile reference reference null reference new user profile reference url get path url profile packages new url model loader load model reference finish loading profileexception userdefinedprofile profileexception profilereference userprofilereference getpath profilepackages urlmodelloader loadmodel finishloading a constructor that reads a file from an url associated with some profiles param dn the display name of the profile param url the url of the profile mode param critics the critics defined by this profile param dependencies the dependencies of this profile throws profile exception if the model cannot be loaded public user defined profile string dn url url set critic critics set string dependencies throws profile exception log info load url this display name dn if url null profile reference reference null reference new user profile reference url get path url profile packages new url model loader load model reference else profile packages new array list 0 this set critics critics for string profileid dependencies add profile dependency profileid finish loading profileexception userdefinedprofile profileexception displayname profilereference userprofilereference getpath profilepackages urlmodelloader loadmodel profilepackages arraylist setcritics addprofiledependency finishloading reads the informations defined as tagged values private void finish loading collection packages in profile filter packages for object obj packages in profile if there is only one package in the model we should suppose it s the profile model if there is more than one we take the ones marked as profile if model get facade isa model element obj model get extension mechanisms helper has stereotype obj profile packages in profile size 1 load profile name string name model get facade get name obj if name null display name name else if display name null display name translator localize misc profile unnamed log info profile display name load profile dependencies string dependency list str model get facade get tagged value value obj dependency string tokenizer st new string tokenizer dependency list str string profile null while st has more tokens profile st next token if profile null log debug adding dependency profile this add profile dependency profile facade get manager look for registered profile profile load fig nodes collection all stereotypes model get extension mechanisms helper get stereotypes packages in profile for object stereotype all stereotypes collection tags model get facade get tagged values collection stereotype for object tag tags string tag name model get facade get tag tag if tag name null log debug profile package with stereotype model get facade get name stereotype contains a null tag definition else if tag name to lower case equals figure log debug add fig node model get facade get name stereotype string value model get facade get value of tag tag file f new file value fig node descriptor fnd null try fnd load image model get facade get name stereotype to string f fig node strategy add desrciptor fnd catch io exception e log error error loading fig node e load critiques set critic my critics this get critics my critics add all get all critiques in model this set critics my critics taggedvalues finishloading packagesinprofile filterpackages packagesinprofile getfacade isamodelelement getextensionmechanismshelper hasstereotype packagesinprofile getfacade getname displayname displayname displayname displayname dependencyliststr getfacade gettaggedvaluevalue stringtokenizer stringtokenizer dependencyliststr hasmoretokens nexttoken addingdependency addprofiledependency profilefacade getmanager lookforregisteredprofile allstereotypes getextensionmechanismshelper getstereotypes packagesinprofile allstereotypes getfacade gettaggedvaluescollection tagname getfacade gettag tagname getfacade getname tagname tolowercase addfignode getfacade getname getfacade getvalueoftag fignodedescriptor loadimage getfacade getname tostring fignodestrategy adddesrciptor ioexception fignode mycritics getcritics mycritics addall getallcritiquesinmodel setcritics mycritics return the packages in the code profile packages code private collection filter packages collection ret new array list for object object profile packages if model get facade isa package object ret add object return ret profilepackages filterpackages arraylist profilepackages getfacade isapackage private crocl generate critic from comment object critique string ocl model get facade get body critique string headline null string description null int priority to do item high priority list decision supported decisions new array list decision list string knowledge types new array list string string more infourl null collection tags model get facade get tagged values collection critique boolean i18n found false for object tag tags if model get facade get tag tag to lower case equals i18n i18n found true string i18n source model get facade get value of tag tag headline translator localize i18n source head description translator localize i18n source desc more infourl translator localize i18n source more infourl else if i18n found model get facade get tag tag to lower case equals headline headline model get facade get value of tag tag else if i18n found model get facade get tag tag to lower case equals description description model get facade get value of tag tag else if model get facade get tag tag to lower case equals priority priority str2 priority model get facade get value of tag tag else if model get facade get tag tag to lower case equals supporteddecision string dec str model get facade get value of tag tag string tokenizer st new string tokenizer dec str while st has more tokens decision decision str2 decision st next token trim to lower case if decision null supported decisions add decision else if model get facade get tag tag to lower case equals knowledgetype string kt str model get facade get value of tag tag string tokenizer st new string tokenizer kt str while st has more tokens string knowledge str2 knowledge type st next token trim to lower case if knowledge null knowledge types add knowledge else if i18n found model get facade get tag tag to lower case equals moreinfourl more infourl model get facade get value of tag tag log debug ocl critic ocl try return new crocl ocl headline description priority supported decisions knowledge types more infourl catch invalid ocl exception e log error invalid ocl in xmi e return null generatecriticfromcomment getfacade getbody todoitem high_priority supporteddecisions arraylist knowledgetypes arraylist moreinfourl getfacade gettaggedvaluescollection i18nfound getfacade gettag tolowercase i18nfound i18nsource getfacade getvalueoftag i18nsource i18nsource moreinfourl i18nsource moreinfourl i18nfound getfacade gettag tolowercase getfacade getvalueoftag i18nfound getfacade gettag tolowercase getfacade getvalueoftag getfacade gettag tolowercase str2priority getfacade getvalueoftag getfacade gettag tolowercase decstr getfacade getvalueoftag stringtokenizer stringtokenizer decstr hasmoretokens str2decision nexttoken tolowercase supporteddecisions getfacade gettag tolowercase ktstr getfacade getvalueoftag stringtokenizer stringtokenizer ktstr hasmoretokens str2knowledgetype nexttoken tolowercase knowledgetypes i18nfound getfacade gettag tolowercase moreinfourl getfacade getvalueoftag supporteddecisions knowledgetypes moreinfourl invalidoclexception private string str2 knowledge type string token string knowledge null if token equals completeness knowledge critic kt completeness if token equals consistency knowledge critic kt consistency if token equals correctness knowledge critic kt correctness if token equals designers knowledge critic kt designers if token equals experiencial knowledge critic kt experiencial if token equals optimization knowledge critic kt optimization if token equals organizational knowledge critic kt organizational if token equals presentation knowledge critic kt presentation if token equals semantics knowledge critic kt semantics if token equals syntax knowledge critic kt syntax if token equals tool knowledge critic kt tool return knowledge str2knowledgetype kt_completeness kt_consistency kt_correctness kt_designers kt_experiencial kt_optimization kt_organizational kt_presentation kt_semantics kt_syntax kt_tool private int str2 priority string prio str int prio to do item med priority if prio str to lower case equals high prio to do item high priority else if prio str to lower case equals med prio to do item med priority else if prio str to lower case equals low prio to do item low priority else if prio str to lower case equals interruptive prio to do item interruptive priority return prio str2priority priostr todoitem med_priority priostr tolowercase todoitem high_priority priostr tolowercase todoitem med_priority priostr tolowercase todoitem low_priority priostr tolowercase todoitem interruptive_priority private decision str2 decision string token decision decision null if token equals behavior decision uml decision behavior if token equals containment decision uml decision containment if token equals classselection decision uml decision class selection if token equals codegen decision uml decision code gen if token equals expectedusage decision uml decision expected usage if token equals inheritance decision uml decision inheritance if token equals instantiation decision uml decision instanciation if token equals methods decision uml decision methods if token equals modularity decision uml decision modularity if token equals naming decision uml decision naming if token equals patterns decision uml decision patterns if token equals plannedextensions decision uml decision planned extensions if token equals relationships decision uml decision relationships if token equals statemachines decision uml decision state machines if token equals stereotypes decision uml decision stereotypes if token equals storage decision uml decision storage return decision str2decision umldecision umldecision umldecision class_selection umldecision code_gen umldecision expected_usage umldecision umldecision umldecision umldecision umldecision umldecision umldecision planned_extensions umldecision umldecision state_machines umldecision umldecision private list crocl get all critiques in model list crocl ret new array list crocl collection object comments get all comments in model profile packages for object comment comments if model get extension mechanisms helper has stereotype comment critic crocl cr generate critic from comment comment if cr null ret add cr return ret getallcritiquesinmodel arraylist getallcommentsinmodel profilepackages getextensionmechanismshelper hasstereotype generatecriticfromcomment suppress warnings unchecked private collection object get all comments in model collection objs collection object col new array list object for object obj objs if model get facade isa comment obj col add obj else if model get facade isa namespace obj collection contents model get model management helper get all contents obj if contents null col add all contents return col suppresswarnings getallcommentsinmodel arraylist getfacade isacomment getfacade isanamespace getmodelmanagementhelper getallcontents addall return the string that should represent this profile in the gui public string get display name return display name getdisplayname displayname returns null this profile has no formatting strategy return null override public formating strategy get formating strategy return null formatingstrategy getformatingstrategy returns null this profile has no figure strategy return null override public fig node strategy get figure strategy return fig node strategy fignodestrategy getfigurestrategy fignodestrategy return the file passed at the constructor public file get model file return model file getmodelfile modelfile return the name of the model and the file name override public string to string file str get model file return super to string str null str tostring getmodelfile tostring override public collection get profile packages return profile packages getprofilepackages profilepackages private fig node descriptor load image string stereotype file f throws io exception fig node descriptor descriptor new fig node descriptor descriptor length int f length descriptor src f get path descriptor stereotype stereotype buffered input stream bis new buffered input stream new file input stream f byte buf new byte descriptor length try bis read buf catch io exception e e print stack trace descriptor img new image icon buf get image return descriptor fignodedescriptor loadimage ioexception fignodedescriptor fignodedescriptor getpath bufferedinputstream bufferedinputstream fileinputstream ioexception printstacktrace imageicon getimage creates a new field that selects the language for an expression param expression model expression model should be shared between language and body fields param notify only one of language and body fields should forward events to model public uml expression language field uml expression model2 expression model boolean notify model expression model notify model notify get document add document listener this set tool tip text translator localize label language tooltip set font look and feel mgr get instance get standard font expressionmodel umlexpressionlanguagefield umlexpressionmodel2 expressionmodel expressionmodel notifymodel getdocument adddocumentlistener settooltiptext setfont lookandfeelmgr getinstance getstandardfont public void target changed if notify model model target changed update targetchanged notifymodel targetchanged see org argouml uml ui uml user interface component target reasserted public void target reasserted umluserinterfacecomponent targetreasserted targetreasserted private void update string old text get text string new text model get language if old text null new text null old text equals new text if old text new text set text new text oldtext gettext newtext getlanguage oldtext newtext oldtext newtext oldtext newtext settext newtext see javax swing event document listener changed update javax swing event document event public void changed update final document event p1 model set language get text documentlistener changedupdate documentevent changedupdate documentevent setlanguage gettext see javax swing event document listener remove update javax swing event document event public void remove update final document event p1 model set language get text documentlistener removeupdate documentevent removeupdate documentevent setlanguage gettext see javax swing event document listener insert update javax swing event document event public void insert update final document event p1 model set language get text documentlistener insertupdate documentevent insertupdate documentevent setlanguage gettext constructor protected action new action sequence super put value action name translator localize button new actionsequence actionnewactionsequence putvalue see org argouml uml ui behavior common behavior action new action create action protected object create action return model get common behavior factory create action sequence common_behavior actionnewaction createaction createaction getcommonbehaviorfactory createactionsequence return returns the singleton public static action new action sequence get instance return singleton actionnewactionsequence getinstance public static action new action get button instance action new action a new action new action sequence public void action performed action event e object target target manager get instance get model target if model get facade isa transition target return set target target super action performed e a put value short description a get value action name object icon resource loader wrapper lookup icon resource action sequence a put value small icon icon a put value role roles effect return a actionnewaction getbuttoninstance actionnewaction actionnewactionsequence actionperformed actionevent targetmanager getinstance getmodeltarget getfacade isatransition settarget actionperformed putvalue short_description getvalue resourceloaderwrapper lookupiconresource actionsequence putvalue small_icon putvalue public void action performed action event e object target target manager get instance get model target if model get facade isa transition target return set target target super action performed e actionperformed actionevent targetmanager getinstance getmodeltarget getfacade isatransition settarget actionperformed this is the only constructor for save swing worker param a file the file that s going to be saved param a overwrite whether to show the ui or not public save swing worker boolean a overwrite file a file super argo save project thread overwrite a overwrite file a file saveswingworker afile aoverwrite saveswingworker aoverwrite afile argosaveprojectthread aoverwrite afile implements org argouml swingext swing worker construct this is the main method for this swing worker in this case it simply loads the project param pmw the progress monitor window used by project browser return always null public object construct progress monitor pmw save project at slightly lower priority to keep ui responsive thread current thread thread current thread current thread set priority current thread get priority 1 saves the project result project browser get instance try save overwrite file pmw return null swingworker swingworker progressmonitorwindow projectbrowser progressmonitor currentthread currentthread currentthread setpriority currentthread getpriority projectbrowser getinstance trysave implements org argouml swingext swing worker init progress monitor window it just creates an instance of progress monitor window return an instance of progress monitor window public progress monitor init progress monitor window object msg args new object file get path ui manager put progress monitor progress text translator localize filechooser save as project return new progress monitor window argo frame get instance translator message format dialog saveproject title msg args swingworker initprogressmonitorwindow progressmonitorwindow progressmonitorwindow progressmonitor initprogressmonitorwindow msgargs getpath uimanager progressmonitor progresstext progressmonitorwindow argoframe getinstance messageformat msgargs overrides the finished method of the swing worker class to update the gui public void finished super finished if result project browser get instance build title with current project name todo why isn t this done in save undo manager get instance empty swingworker projectbrowser getinstance buildtitlewithcurrentprojectname undomanager getinstance construct a graphical jvm heap monitor component public heap monitor super dimension size new dimension 200 20 set preferred size size todo add a button to force garbage collection update stats timer timer new timer 1000 this timer start heapmonitor setpreferredsize updatestats public void paint graphics g rectangle bounds get bounds int usedx int used bounds width total int warnx orange threshold bounds width 100 int dangerx red threshold bounds width 100 color saved color g get color g set color green todo we want something minimally distracting here another option might be just the background color with a solid end line g set color get background darker g fill rect 0 0 math min usedx warnx bounds height g set color orange g fill rect warnx 0 math min usedx warnx dangerx warnx bounds height g set color red g fill rect dangerx 0 math min usedx dangerx bounds width dangerx bounds height g set color get foreground string s message format format 0 m used of 1 m total new object long used m long total m int x bounds width g get font metrics string width s 2 int y bounds height g get font metrics get height 2 g draw string s x y g set color saved color getbounds orange_threshold red_threshold savedcolor getcolor setcolor setcolor getbackground fillrect setcolor fillrect setcolor fillrect setcolor getforeground messageformat getfontmetrics stringwidth getfontmetrics getheight drawstring setcolor savedcolor timer action method periodically update our stats and force a repaint public void action performed action event e update stats repaint actionperformed actionevent updatestats private void update stats free runtime get runtime free memory total runtime get runtime total memory max runtime get runtime max memory used total free string tip message format format heap use 0 1 m used of 2 m total max 3 m new object used 100 total long used m long total m long max m set tool tip text tip updatestats getruntime freememory getruntime totalmemory getruntime maxmemory messageformat settooltiptext the constructor param o the uml modelelement to be added public add existing node command object o object o addexistingnodecommand the constructor param o the uml modelelement to be added param event the drop target drop event that caused this also code null code is acceptable param cnt 0 if this is the 1st element dropped here n if this is the n 1 th element dropped here public add existing node command object o drop target drop event event int cnt object o location event get location count cnt droptargetdropevent addexistingnodecommand droptargetdropevent getlocation param o the uml modelelement to be added param drop location the point where to drop the node also code null code is acceptable param cnt 0 if this is the 1st element dropped here n if this is the n 1 th element dropped here public add existing node command object o point drop location int cnt object o location drop location count cnt droplocation addexistingnodecommand droplocation droplocation public void execute editor ce globals cur editor graph model gm ce get graph model if gm instanceof mutable graph model return string instructions null mode place place mode null if object null argo diagram active diagram diagram utils get active diagram if active diagram instanceof uml diagram uml diagram active diagram does accept object instructions uml diagram active diagram get instructions object place mode uml diagram active diagram get mode place this instructions place mode set add related edges true else todo work here instructions translator localize misc message click on diagram to add new object model get facade to string object place mode new mode place this instructions place mode set add related edges true globals show status instructions if location null globals mode place mode false else calculate the drop location and place every n th element at an offset proportional to n point p new point location x count 100 location y take canvas scrolling into account the implementation below does place the element correctly when the canvas has been scrolled rectangle r ce getj component get visible rect p translate r x r y simulate a press of the mouse above the calculated point mouse event me new mouse event ce getj component 0 0 0 p x p y 0 false place mode mouse pressed me simulate a release of the mouse me new mouse event ce getj component 0 0 0 p x p y 0 false place mode mouse released me set the size of the object s fig to minimum see issue 3410 this binds the use of this command to the current diagram of the current project argo diagram diagram diagram utils get active diagram fig a fig diagram presentation for object a fig set size a fig get preferred size cureditor graphmodel getgraphmodel mutablegraphmodel modeplace placemode argodiagram activediagram diagramutils getactivediagram activediagram umldiagram umldiagram activediagram doesaccept umldiagram activediagram getinstructions placemode umldiagram activediagram getmodeplace placemode setaddrelatededges getfacade tostring placemode modeplace placemode setaddrelatededges showstatus placemode getjcomponent getvisiblerect mouseevent mouseevent getjcomponent placemode mousepressed mouseevent getjcomponent placemode mousereleased argodiagram diagramutils getactivediagram afig presentationfor afig setsize afig getpreferredsize see org tigris gef graph graph factory make graph model public graph model make graph model return null graphfactory makegraphmodel graphmodel makegraphmodel see org tigris gef graph graph factory make edge public object make edge return null graphfactory makeedge makeedge see org tigris gef graph graph factory make node public object make node return object graphfactory makenode makenode the main constructor deprecated for 0 27 3 by mvw use link fig simple state object rectangle diagram settings suppress warnings deprecation deprecated public fig simple state initialize simple state figsimplestate diagramsettings suppresswarnings figsimplestate initializesimplestate the constructor that hooks into an existing uml element param gm ignored param node the uml element deprecated for 0 27 3 by mvw use link fig simple state object rectangle diagram settings suppress warnings deprecation deprecated public fig simple state suppress warnings unused graph model gm object node this set owner node figsimplestate diagramsettings suppresswarnings figsimplestate suppresswarnings graphmodel setowner constructor used by pgml parser param owner the owning uml element param bounds rectangle describing bounds param settings rendering settings public fig simple state object owner rectangle bounds diagram settings settings super owner bounds settings initialize simple state figsimplestate diagramsettings initializesimplestate private void initialize simple state cover new figr rect get initialx get initialy get initial width get initial height line color fill color get big port set line width 0 divider new fig line get initialx get initialy 2 get name fig get bounds height 1 get initial width 1 get initialy 2 get name fig get bounds height 1 line color add figs to the fig node in back to front order add fig get big port add fig cover add fig get name fig add fig divider add fig get internal set blink ports false make port invisble unless mouse enters rectangle r get bounds set bounds r x r y r width r height initializesimplestate figrrect getinitialx getinitialy getinitialwidth getinitialheight line_color fill_color getbigport setlinewidth figline getinitialx getinitialy getnamefig getbounds getinitialwidth getinitialy getnamefig getbounds line_color fignode addfig getbigport addfig addfig getnamefig addfig addfig getinternal setblinkports getbounds setbounds override public object clone fig simple state fig clone fig simple state super clone iterator it fig clone get figs iterator fig clone set big port figr rect it next fig clone cover fig rect it next fig clone set name fig fig text it next fig clone divider fig line it next fig clone set internal fig text it next return fig clone figsimplestate figclone figsimplestate figclone getfigs figclone setbigport figrrect figclone figrect figclone setnamefig figtext figclone figline figclone setinternal figtext figclone override public dimension get minimum size dimension name dim get name fig get minimum size dimension internal dim get internal get minimum size int h space top name dim height space middle internal dim height space bottom int w math max name dim width 2 margin internal dim width 2 margin return new dimension w h getminimumsize namedim getnamefig getminimumsize internaldim getinternal getminimumsize space_top namedim space_middle internaldim space_bottom namedim internaldim override set bounds to keep shapes looking right inherit doc override protected void set standard bounds int x int y int w int h if get name fig null return rectangle old bounds get bounds dimension name dim get name fig get minimum size get name fig set bounds x margin y space top w 2 margin name dim height divider set shape x y divider y name dim height x w 1 y divider y name dim height get internal set bounds x margin y space top name dim height space middle w 2 margin h space top name dim height space middle space bottom get big port set bounds x y w h cover set bounds x y w h calc bounds x x y y w w h h update edges fire prop change bounds old bounds get bounds setbounds inheritdoc setstandardbounds getnamefig oldbounds getbounds namedim getnamefig getminimumsize getnamefig setbounds space_top namedim setshape divider_y namedim divider_y namedim getinternal setbounds space_top namedim space_middle space_top namedim space_middle space_bottom getbigport setbounds setbounds calcbounds _x _y _w _h updateedges firepropchange oldbounds getbounds override public void set line color color col cover set line color col divider set line color col setlinecolor setlinecolor setlinecolor see org tigris gef presentation fig get line color override public color get line color return cover get line color getlinecolor getlinecolor getlinecolor see org tigris gef presentation fig set fill color java awt color override public void set fill color color col cover set fill color col setfillcolor setfillcolor setfillcolor see org tigris gef presentation fig get fill color override public color get fill color return cover get fill color getfillcolor getfillcolor getfillcolor override public void set filled boolean f cover set filled f get big port set filled f setfilled setfilled getbigport setfilled override public boolean is filled return cover is filled isfilled isfilled override public void set line width int w cover set line width w divider set line width w setlinewidth setlinewidth setlinewidth see org tigris gef presentation fig get line width override public int get line width return cover get line width getlinewidth getlinewidth getlinewidth see org argouml uml diagram state ui fig state get initial height override protected int get initial height return 40 figstate getinitialheight getinitialheight see org argouml uml diagram state ui fig state get initial width override protected int get initial width return 70 figstate getinitialwidth getinitialwidth see org argouml uml diagram state ui fig state get initialx override protected int get initialx return 0 figstate getinitialx getinitialx see org argouml uml diagram state ui fig state get initialy override protected int get initialy return 0 figstate getinitialy getinitialy param event type reported by this event param src object that caused the event public argo generator event int event type object src super event type src eventtype argogeneratorevent eventtype eventtype indicates the start of the 100 digit range for generator events return the first id reserved for events the constructor param transition the transition represented by this notation public transition notation uml object transition super transition transitionnotationuml public void parse object model element string text try parse transition model element text catch parse exception pe string msg statusmsg bar error parsing transition object args pe get localized message integer value of pe get error offset argo event pump fire event new argo help event argo event types help changed this translator message format msg args modelelement parsetransition modelelement parseexception getlocalizedmessage valueof geterroroffset argoeventpump fireevent argohelpevent argoeventtypes help_changed messageformat parse a transition description line of the form pre event signature guard condition action expression pre if the last character of this line is a then it is ignored p the event signature may be one of the 4 formats ul li change event when condition li time event after duration li call event a parameter list li signal event any string without ul remark the uml standard does not make a distinction between the syntax of a call event and signal event both may have parameters between for simplicity and user friendliness we chose for this distinction if a user wants parameters for a signal event then he may add them in the properties panels but not on the diagram p an alternative solution would be to create a call event by default and when editing an existing event do not change the type p todo this function fails when the event signature contains a or a param trans the transition object to which this string applies param s the string to be parsed return the transition object throws parse exception when no matching are found protected object parse transition object trans string s throws parse exception s s trim int a s index of int b s index of int c s index of if a 0 b 0 b 0 a 0 b a string msg parsing error transition no matching square brackets throw new parse exception translator localize msg 0 if c 0 c b string msg parsing error transition found bracket instead slash throw new parse exception translator localize msg 0 string tokenizer tokenizer new string tokenizer s string event signature null string guard condition null string action expression null while tokenizer has more tokens string next token tokenizer next token trim if next token ends with guard condition next token substring 0 next token length 1 else if s starts with next token event signature next token else if s ends with next token action expression next token if event signature null parse event signature trans event signature parse trigger trans event signature if guard condition null parse guard trans guard condition substring guard condition index of 1 if action expression null parse effect trans action expression trim return trans changeevent timeevent callevent signalevent callevent signalevent signalevent callevent parseexception parsetransition parseexception indexof indexof indexof parseexception parseexception stringtokenizer stringtokenizer eventsignature guardcondition actionexpression hasmoretokens nexttoken nexttoken nexttoken endswith guardcondition nexttoken nexttoken startswith nexttoken eventsignature nexttoken endswith nexttoken actionexpression nexttoken eventsignature parseeventsignature eventsignature parsetrigger eventsignature guardcondition parseguard guardcondition guardcondition indexof actionexpression parseeffect actionexpression parse the event that is the trigger of the given transition param trans the transition which is triggered by the given event param trigger the given trigger throws parse exception private void parse trigger object trans string trigger throws parse exception let s look for a time event change event call event or signal event string s boolean time event false boolean change event false boolean call event false boolean signal event false trigger trigger trim string tokenizer tokenizer new string tokenizer trigger string name tokenizer next token trim if name equals ignore case after time event true else if name equals ignore case when change event true else the part after the is for when there s nothing between the if tokenizer has more tokens trigger index of 0 trigger index of 1 call event true if trigger ends with trigger index of 0 string msg parsing error transition no matching brackets throw new parse exception translator localize msg 0 else signal event true if time event change event call event if tokenizer has more tokens s tokenizer next token trim else the empty s will do we can distinguish between 4 cases 1 a trigger is given none exists yet 2 the trigger was present and it is the same type or a different type and its text is changed or the same 3 a trigger is not given none exists yet 4 the name of the trigger was present but is removed the reaction in these cases should be 1 create a new trigger name it and hook it to the transition 2 rename the trigger 3 nop 4 unhook and erase the existing trigger object evt model get facade get trigger trans it is safe to give a null to the next function since a statemachine is always composed by a model anyhow object ns model get state machines helper find namespace for event trans null state machines factory sm factory model get state machines factory boolean created event false if trigger length 0 case 1 and 2 if evt null case 1 if time event after evt sm factory build time event s ns do not set the name if change event when evt sm factory build change event s ns do not set the name if call event operation paramlist string trigger name trigger index of 0 trigger substring 0 trigger index of trim trigger evt sm factory build call event trans trigger name ns and parse the parameter list notation utility uml parse param list evt s 0 if signal event signalname evt sm factory build signal event trigger ns created event true else case 2 if time event if model get facade isa time event evt just change the time expression object time expr model get facade get when evt model get data types helper set body time expr s else it s a time event now but was of another type before delete evt todo what if used elsewhere evt sm factory build time event s ns created event true if change event if model get facade isa change event evt just change the change expression object change expr model get facade get change expression evt if change expr null create a new expression change expr model get data types factory create boolean expression s model get state machines helper set expression evt change expr else model get data types helper set body change expr s else the parsed text describes a change event but the model contains another type delete evt todo what if used elsewhere evt sm factory build change event s ns created event true if call event if model get facade isa call event evt just change the name and linked operation string trigger name trigger index of 0 trigger substring 0 trigger index of trim trigger if model get facade get name evt equals trigger name model get core helper set name evt trigger name todo change the linked operation else delete evt todo what if used elsewhere evt sm factory build call event trans trigger ns and parse the parameter list notation utility uml parse param list evt s 0 created event true if signal event if model get facade isa signal event evt just change the name and linked signal if model get facade get name evt equals trigger model get core helper set name evt trigger todo link to the signal else delete evt todo what if used elsewhere evt sm factory build signal event trigger ns created event true if created event evt null model get state machines helper set event as trigger trans evt else case 3 and 4 if evt null case 3 else case 4 delete evt erase it parseexception parsetrigger parseexception timeevent changeevent callevent signalevent timeevent changeevent callevent signalevent stringtokenizer stringtokenizer nexttoken equalsignorecase timeevent equalsignorecase changeevent hasmoretokens indexof indexof callevent endswith indexof parseexception signalevent timeevent changeevent callevent hasmoretokens nexttoken getfacade gettrigger getstatemachineshelper findnamespaceforevent statemachinesfactory smfactory getstatemachinesfactory createdevent timeevent smfactory buildtimeevent changeevent smfactory buildchangeevent callevent triggername indexof indexof smfactory buildcallevent triggername notationutilityuml parseparamlist signalevent smfactory buildsignalevent createdevent timeevent getfacade isatimeevent timeexpr getfacade getwhen getdatatypeshelper setbody timeexpr smfactory buildtimeevent createdevent changeevent getfacade isachangeevent changeexpression changeexpr getfacade getchangeexpression changeexpr changeexpr getdatatypesfactory createbooleanexpression getstatemachineshelper setexpression changeexpr getdatatypeshelper setbody changeexpr smfactory buildchangeevent createdevent callevent getfacade isacallevent triggername indexof indexof getfacade getname triggername getcorehelper setname triggername smfactory buildcallevent notationutilityuml parseparamlist createdevent signalevent getfacade isasignalevent getfacade getname getcorehelper setname smfactory buildsignalevent createdevent createdevent getstatemachineshelper seteventastrigger handle the guard of a transition p we can distinct between 4 cases ol li a guard is given none exists yet li the expression of the guard was present but is altered li a guard is not given none exists yet li the expression of the guard was present but is removed ol the reaction in these cases should be ol li create a new guard set its name language expression and hook it to the transition li change the guard s expression leave the name language untouched see also issue 2742 li nop li unhook and erase the existing guard ol param trans the uml element transition param guard the string that represents the guard expression private void parse guard object trans string guard object g model get facade get guard trans if guard length 0 if g null case 1 todo in the next line i should use build guard but it doesn t show the guard on the diagram why mvw g model get state machines factory create guard if g null model get state machines helper set expression g model get data types factory create boolean expression guard model get core helper set name g anon model get common behavior helper set transition g trans nsuml does this model get facade set guard trans g else case 2 object expr model get facade get expression g string language todo this does not work mvw model get facade set body expr guard model get facade set expression g expr hence a less elegant workaround that works if expr null language model get data types helper get language expr model get state machines helper set expression g model get data types factory create boolean expression language guard todo in this case the properties panel is not updated with the changed expression else if g null case 3 else case 4 delete g erase it parseguard getfacade getguard buildguard getstatemachinesfactory createguard getstatemachineshelper setexpression getdatatypesfactory createbooleanexpression getcorehelper setname getcommonbehaviorhelper settransition getfacade setguard getfacade getexpression getfacade setbody getfacade setexpression getdatatypeshelper getlanguage getstatemachineshelper setexpression getdatatypesfactory createbooleanexpression handle the effect action of a transition p we can distinct between 4 cases ul li 1 an effect is given none exists yet li 2 the expression of the effect was present but is altered li 3 an effect is not given none exists yet li 4 the expression of the effect was present but is removed ul the reaction in these cases should be ul li 1 create a new call action set its name language expression and hook it to the transition li 2 change the effect s expression leave the actiontype name language untouched li 3 nop li 4 unhook and erase the existing effect ul param actions the string to be parsed param trans the transition that causes the effect actions private void parse effect object trans string actions object effect model get facade get effect trans if actions length 0 if effect null case 1 effect model get common behavior factory create call action and hook it to the transition immediately so that an exception can not cause it to remain dangling model get state machines helper set effect trans effect model get common behavior helper set script effect model get data types factory create action expression language actions model get core helper set name effect anon else case 2 object script model get facade get script effect string language script null null model get data types helper get language script model get common behavior helper set script effect model get data types factory create action expression language actions else case 3 4 if effect null case 3 else case 4 delete effect erase it callaction parseeffect getfacade geteffect getcommonbehaviorfactory createcallaction getstatemachineshelper seteffect getcommonbehaviorhelper setscript getdatatypesfactory createactionexpression getcorehelper setname getfacade getscript getdatatypeshelper getlanguage getcommonbehaviorhelper setscript getdatatypesfactory createactionexpression this deletes modelelements and swallows null without barking author mvw tigris org param obj the modelelement to be deleted private void delete object obj if obj null model get uml factory delete obj getumlfactory see org argouml uml notation notation provider get parsing help public string get parsing help return parsing help fig transition notationprovider getparsinghelp getparsinghelp override public string to string object model element notation settings settings return to string model element tostring modelelement notationsettings tostring modelelement suppress warnings deprecation deprecated public string to string object model element map args return to string model element suppresswarnings tostring modelelement tostring modelelement private string to string object model element object trigger model get facade get trigger model element object guard model get facade get guard model element object effect model get facade get effect model element string t generate event trigger string g generate guard guard string e notation utility uml generate action sequence effect if g length 0 t g if e length 0 t e return t tostring modelelement getfacade gettrigger modelelement getfacade getguard modelelement getfacade geteffect modelelement generateevent generateguard notationutilityuml generateactionsequence generates the text for a trigger event param m object of any m event kind return the string representing the event private string generate event object m if m null return string buffer event new string buffer if model get facade isa change event m event append when event append generate expression model get facade get expression m event append else if model get facade isa time event m event append after event append generate expression model get facade get expression m event append else if model get facade isa signal event m event append model get facade get name m else if model get facade isa call event m event append model get facade get name m event append generate parameter list m return event to string mevent generateevent stringbuffer stringbuffer getfacade isachangeevent generateexpression getfacade getexpression getfacade isatimeevent generateexpression getfacade getexpression getfacade isasignalevent getfacade getname getfacade isacallevent getfacade getname generateparameterlist tostring private string generate guard object m if m null if model get facade get expression m null return generate expression model get facade get expression m return generateguard getfacade getexpression generateexpression getfacade getexpression generates a list of parameters the parameters belong to the given object the returned string will have the following syntax p param1 param2 param3 paramn p if there are no parameters then is returned param parameter list owner the owner of the parameters return the generated parameter list private string generate parameter list object parameter list owner iterator it model get facade get parameters parameter list owner iterator string buffer list new string buffer list append if it has next while it has next object param it next list append generate parameter param if it has next list append list append return list to string parameterlistowner generateparameterlist parameterlistowner getfacade getparameters parameterlistowner stringbuffer stringbuffer hasnext hasnext generateparameter hasnext tostring private string generate expression object expr if model get facade isa expression expr object body model get facade get body expr if body null return string body return generateexpression getfacade isaexpression getfacade getbody generates the representation of a parameter on the display diagram the string to be returned will have the following syntax p kind name type expression default value param parameter the parameter return the generated text public string generate parameter object parameter string buffer s new string buffer s append generate kind model get facade get kind parameter if s length 0 s append s append model get facade get name parameter string class ref generate classifier ref model get facade get type parameter if class ref length 0 s append s append class ref string default value generate expression model get facade get default value parameter if default value length 0 s append s append default value return s to string generateparameter stringbuffer stringbuffer generatekind getfacade getkind getfacade getname classref generateclassifierref getfacade gettype classref classref defaultvalue generateexpression getfacade getdefaultvalue defaultvalue defaultvalue tostring private string generate kind object parameter etc kind string buffer s new string buffer if kind null in is the default kind model get direction kind get in parameter s append in see issue 3421 else if kind model get direction kind get in out parameter s append inout else if kind model get direction kind get return parameter return nothing else if kind model get direction kind get out parameter s append out return s to string generatekind stringbuffer stringbuffer getdirectionkind getinparameter getdirectionkind getinoutparameter getdirectionkind getreturnparameter getdirectionkind getoutparameter tostring generate the type of a parameter i e a reference to a classifier param cls the classifier return the generated text private string generate classifier ref object cls if cls null return return model get facade get name cls generateclassifierref getfacade getname see org argouml uml notation notation provider initialise listener java beans property change listener java lang object public void initialise listener property change listener listener object model element add listeners for transition listener model element notationprovider initialiselistener propertychangelistener initialiselistener propertychangelistener modelelement addlistenersfortransition modelelement private void add listeners for action property change listener listener object action if action null add element listener listener action new string todo action isn t a valid property name or is it double check validity checking code script actual argument action collection args model get facade get actual arguments action iterator i args iterator while i has next object argument i next add element listener listener argument value if model get facade isa action sequence action collection subactions model get facade get actions action i subactions iterator while i has next object a i next add listeners for action listener a addlistenersforaction propertychangelistener addelementlistener actualargument getfacade getactualarguments hasnext addelementlistener getfacade isaactionsequence getfacade getactions hasnext addlistenersforaction private void add listeners for event property change listener listener object event if event null if model get facade isa event event add element listener listener event new string parameter name if model get facade isa time event event add element listener listener event new string when if model get facade isa change event event add element listener listener event new string change expression collection prms model get facade get parameters event iterator i prms iterator while i has next object parameter i next add element listener listener parameter addlistenersforevent propertychangelistener getfacade isaevent addelementlistener getfacade isatimeevent addelementlistener getfacade isachangeevent addelementlistener changeexpression getfacade getparameters hasnext addelementlistener private void add listeners for transition property change listener listener object transition add element listener listener transition new string guard trigger effect object guard model get facade get guard transition if guard null add element listener listener guard expression object trigger model get facade get trigger transition add listeners for event listener trigger object effect model get facade get effect transition add listeners for action listener effect addlistenersfortransition propertychangelistener addelementlistener getfacade getguard addelementlistener getfacade gettrigger addlistenersforevent getfacade geteffect addlistenersforaction constructor public action revert to saved super translator localize action revert to saved actionreverttosaved performs the action param e an event public void action performed action event e project p project manager get manager get current project if p null project browser get instance get save action is enabled return string message message format format translator localize optionpane revert to saved confirm new object p get name int response j option pane show confirm dialog argo frame get instance message translator localize optionpane revert to saved confirm title j option pane yes no option if response j option pane yes option project browser get instance load project with progress monitor new file p geturi true actionperformed actionevent projectmanager getmanager getcurrentproject projectbrowser getinstance getsaveaction isenabled messageformat getname joptionpane showconfirmdialog argoframe getinstance joptionpane yes_no_option joptionpane yes_option projectbrowser getinstance loadprojectwithprogressmonitor see org argouml ui explorer rules perspective rule get rule name public string get rule name return translator localize misc diagram edge perspectiverule getrulename getrulename public collection get children object parent if parent instanceof diagram return diagram parent get edges return collections empty set getchildren getedges empty_set see org argouml ui explorer rules perspective rule get dependencies java lang object public set get dependencies object parent todo what return collections empty set perspectiverule getdependencies getdependencies empty_set the constructor public cr no operations setup head and desc add supported decision uml decision behavior set knowledge types critic kt completeness add trigger behavioral feature crnooperations setupheadanddesc addsupporteddecision umldecision setknowledgetypes kt_completeness addtrigger behavioralfeature override public boolean predicate2 object dm designer dsgr if model get facade isa class dm model get facade isa interface dm return no problem if model get facade is primary object dm return no problem if the object does not have a name than no problem if model get facade get name dm null equals model get facade get name dm return no problem types can probably contain operations but we should not nag at them not having any if model get facade is type dm return no problem utility is a namespace collection also not strictly required to have operations if model get facade is utility dm return no problem todo different critic or special message for classes that inherit all ops but define none of their own if find instance operation in inherited dm 0 return no problem return problem found getfacade isaclass getfacade isainterface no_problem getfacade isprimaryobject no_problem getfacade getname getfacade getname no_problem getfacade istype no_problem getfacade isutility no_problem findinstanceoperationininherited no_problem problem_found see org argouml cognitive poster get clarifier override public icon get clarifier return cl operation compartment get the instance getclarifier getclarifier cloperationcompartment gettheinstance private boolean find instance operation in inherited object dm int depth iterator ops model get facade get operations dm iterator while ops has next if model get facade is static ops next return true if depth 50 return false iterator iter model get facade get generalizations dm iterator while iter has next object parent model get facade get general iter next if parent dm continue if model get facade isa classifier parent find instance operation in inherited parent depth 1 return true return false findinstanceoperationininherited getfacade getoperations hasnext getfacade isstatic getfacade getgeneralizations hasnext getfacade getgeneral getfacade isaclassifier findinstanceoperationininherited override public void init wizard wizard w if w instanceof wiz add operation string ins super get instructions string sug super get default suggestion wiz add operation w set instructions ins wiz add operation w set suggestion sug initwizard wizaddoperation getinstructions getdefaultsuggestion wizaddoperation setinstructions wizaddoperation setsuggestion see org argouml cognitive critics critic get wizard class org argouml cognitive to do item override public class get wizard class to do item item return wiz add operation class getwizardclass todoitem getwizardclass todoitem wizaddoperation public set object get criticized design materials set object ret new hash set object ret add model get meta types getuml class ret add model get meta types get interface return ret getcriticizeddesignmaterials hashset getmetatypes getumlclass getmetatypes getinterface construct the undo action with a display name param name the name for this action public action undo string name super name actionundo construct the undo action with a display name and icon param name the name for this action param icon the icon to display for this action public action undo string name icon icon super name icon actionundo public void action performed action event e project p project manager get manager get current project p get undo manager undo actionperformed actionevent projectmanager getmanager getcurrentproject getundomanager return return the singleton public static gen composite classes2 get instance return singleton gencompositeclasses2 getinstance public iterator child iterator object parent return collect children parent iterator childiterator collectchildren see org argouml ui explorer rules perspective rule get rule name public string get rule name return translator localize misc state internal transitions perspectiverule getrulename getrulename public collection get children object parent if model get facade isa state parent return model get facade get internal transitions parent return collections empty set getchildren getfacade isastate getfacade getinternaltransitions empty_set public set get dependencies object parent if model get facade isa state parent set set new hash set set add parent return set return collections empty set getdependencies getfacade isastate hashset empty_set override public fig node get fig node for graph model gm layer lay object node map style attributes fig node fig node null although not generally true for gef for argo we know that the layer is a layer perspective which knows the associated diagram diagram diag layer perspective lay get diagram if diag instanceof uml diagram uml diagram diag does accept node fig node uml diagram diag drop node null else fig node super get fig node for gm lay node style attributes if fig node null return null lay add fig node return fig node fignode getfignodefor graphmodel styleattributes fignode fignode layerperspective layerperspective getdiagram umldiagram umldiagram doesaccept fignode umldiagram fignode getfignodefor styleattributes fignode fignode fignode constructor for action add classifier role base protected action add signals to signal event super set multi select false actionaddclassifierrolebase actionaddsignalstosignalevent setmultiselect protected list get choices list vec new array list vec add all model get model management helper get all model elements of kind model get facade get model get target model get meta types get signal return vec getchoices arraylist addall getmodelmanagementhelper getallmodelelementsofkind getfacade getmodel gettarget getmetatypes getsignal protected list get selected list vec new array list object signal model get facade get signal get target if signal null vec add signal return vec getselected arraylist getfacade getsignal gettarget protected string get dialog title return translator localize dialog title add signal getdialogtitle override protected void do it collection selected object event get target if selected null selected size 0 model get common behavior helper set signal event null else model get common behavior helper set signal event selected iterator next doit gettarget getcommonbehaviorhelper setsignal getcommonbehaviorhelper setsignal new cr singleton violated only private constructors public list gui settings tab interface get project settings tabs return collections empty list crsingletonviolatedonlyprivateconstructors guisettingstabinterface getprojectsettingstabs emptylist public list gui settings tab interface get settings tabs return collections empty list guisettingstabinterface getsettingstabs emptylist public void init object class cls model get meta types getuml class agency register cr consider singleton class cls agency register cr singleton violatedmsa class cls agency register cr singleton violatedopc class cls classcls getmetatypes getumlclass crconsidersingleton classcls crsingletonviolatedmsa classcls crsingletonviolatedopc classcls public list abstract argoj panel get details tabs return collections empty list abstractargojpanel getdetailstabs emptylist constructor public cr no incoming transitions setup head and desc add supported decision uml decision state machines add trigger incoming crnoincomingtransitions setupheadanddesc addsupporteddecision umldecision state_machines addtrigger this is the decision routine for the critic param dm is the uml entity that is being checked param dsgr is for future development and can be ignored return boolean problem found public boolean predicate2 object dm designer dsgr if model get facade isa state vertex dm return no problem object sv m state vertex dm if model get facade isa state sv object sm model get facade get state machine sv if sm null model get facade get top sm sv return no problem if model get facade isa pseudostate sv object k model get facade get kind sv if k equals model get pseudostate kind get choice return no problem if k equals model get pseudostate kind get junction return no problem collection incoming model get facade get incomings sv boolean needs incoming incoming null incoming size 0 if model get facade isa pseudostate sv if model get facade get kind sv equals model get pseudostate kind get initial needs incoming false if needs incoming return problem found return no problem getfacade isastatevertex no_problem mstatevertex getfacade isastate getfacade getstatemachine getfacade gettop no_problem getfacade isapseudostate getfacade getkind getpseudostatekind getchoice no_problem getpseudostatekind getjunction no_problem getfacade getincomings needsincoming getfacade isapseudostate getfacade getkind getpseudostatekind getinitial needsincoming needsincoming problem_found no_problem public set object get criticized design materials set object ret new hash set object ret add model get meta types get state vertex return ret getcriticizeddesignmaterials hashset getmetatypes getstatevertex the constructor public cr multiple initial states setup head and desc add supported decision uml decision state machines add trigger parent add trigger kind crmultipleinitialstates setupheadanddesc addsupporteddecision umldecision state_machines addtrigger addtrigger override public boolean predicate2 object dm designer dsgr if model get facade isa pseudostate dm return no problem object k model get facade get kind dm if model get facade equals pseudostate kind k model get pseudostate kind get initial return no problem container state composite state object cs model get facade get container dm if cs null log debug null parent state return no problem int initial state count 0 collection peers model get facade get subvertices cs for object sv peers if model get facade isa pseudostate sv model get facade equals pseudostate kind model get facade get kind sv model get pseudostate kind get initial initial state count if initial state count 1 return problem found return no problem getfacade isapseudostate no_problem getfacade getkind getfacade equalspseudostatekind getpseudostatekind getinitial no_problem getfacade getcontainer no_problem initialstatecount getfacade getsubvertices getfacade isapseudostate getfacade equalspseudostatekind getfacade getkind getpseudostatekind getinitial initialstatecount initialstatecount problem_found no_problem override public to do item to do item object dm designer dsgr list set offs compute offenders dm return new uml to do item this offs dsgr todoitem todoitem listset computeoffenders umltodoitem param ps the object to check return the list of offenders protected list set compute offenders object ps list set offs new list set ps object cs model get facade get container ps if cs null log debug null parent in still valid return offs collection peers model get facade get subvertices cs for object sv peers if model get facade isa pseudostate sv model get facade equals pseudostate kind model get facade get kind sv model get pseudostate kind get initial offs add sv return offs listset computeoffenders listset listset getfacade getcontainer getfacade getsubvertices getfacade isapseudostate getfacade equalspseudostatekind getfacade getkind getpseudostatekind getinitial override public boolean still valid to do item i designer dsgr if is active return false list set offs i get offenders object dm offs get 0 list set new offs compute offenders dm boolean res offs equals new offs return res stillvalid todoitem isactive listset getoffenders listset newoffs computeoffenders newoffs public set object get criticized design materials set object ret new hash set object ret add model get meta types get pseudostate return ret getcriticizeddesignmaterials hashset getmetatypes getpseudostate public collection get children object parent if model get facade isa link parent return collections empty set return model get facade get stimuli parent getchildren getfacade isalink empty_set getfacade getstimuli see org argouml ui explorer rules perspective rule get rule name public string get rule name return translator localize misc link stimuli perspectiverule getrulename getrulename public set get dependencies object parent if model get facade isa link parent set set new hash set set add parent return set return collections empty set getdependencies getfacade isalink hashset empty_set public class left arrow icon implements icon public void paint icon component c graphics g int x int y int w get icon width h get icon height g set color color black polygon p new polygon p add point x 1 y h 2 1 p add point x w y p add point x w y h g fill polygon p leftarrowicon painticon geticonwidth geticonheight setcolor addpoint addpoint addpoint fillpolygon g fill polygon p public int get icon width return 9 fillpolygon geticonwidth return 9 public int get icon height return 9 geticonheight constructor for uml generalization powertype combo box model public uml generalization powertype combo box model super powertype true model get pump add class model event listener this model get meta types get namespace owned element umlgeneralizationpowertypecomboboxmodel umlgeneralizationpowertypecomboboxmodel getpump addclassmodeleventlistener getmetatypes getnamespace ownedelement protected object get selected model element if get target null return model get facade get powertype get target return null getselectedmodelelement gettarget getfacade getpowertype gettarget protected void build model list set object elements new tree set object new path comparator project p project manager get manager get current project for object model p get user defined model list elements add all model get model management helper get all model elements of kind model model get meta types get classifier elements add all p get profile configuration find by meta type model get meta types get classifier remove all elements add all elements buildmodellist treeset pathcomparator projectmanager getmanager getcurrentproject getuserdefinedmodellist addall getmodelmanagementhelper getallmodelelementsofkind getmetatypes getclassifier addall getprofileconfiguration findbymetatype getmetatypes getclassifier removeallelements addall override protected void build minimal model list collection list new array list 1 object element get selected model element if element null element list add element set elements list set model invalid buildminimalmodellist arraylist getselectedmodelelement setelements setmodelinvalid override protected boolean is lazy return true islazy see org argouml uml ui uml combo box model2 is valid element object protected boolean is valid element object element return model get facade isa classifier element umlcomboboxmodel2 isvalidelement isvalidelement getfacade isaclassifier private string print string null protected predicate type class pats this pats pats length printstring predicatetype protected predicate type class pats int num pats patterns pats pattern count num pats predicatetype numpats patterncount numpats public static predicate type create return new predicate type null 0 predicatetype predicatetype public static predicate type create class c0 class classes new class 1 classes 0 c0 return new predicate type classes predicatetype predicatetype public static predicate type create class c0 class c1 class classes new class 2 classes 0 c0 classes 1 c1 return new predicate type classes predicatetype predicatetype public static predicate type create class c0 class c1 class c2 class classes new class 3 classes 0 c0 classes 1 c1 classes 2 c2 return new predicate type classes predicatetype predicatetype public boolean evaluate object o if pattern count 0 return true for int i 0 i pattern count i if patterns i is instance o return true return false patterncount patterncount isinstance override public string to string if print string null return print string if pattern count 0 return any type string res for int i 0 i pattern count i string cls name patterns i get name int last dot cls name last index of cls name cls name substring last dot 1 res cls name if i pattern count 1 res print string res return res tostring printstring printstring patterncount patterncount clsname getname lastdot clsname lastindexof clsname clsname lastdot clsname patterncount printstring constructor for uml guard transition list model public uml guard transition list model super transition umlguardtransitionlistmodel umlguardtransitionlistmodel see org argouml uml ui uml model element list model2 build model list protected void build model list remove all elements add element model get facade get transition get target umlmodelelementlistmodel2 buildmodellist buildmodellist removeallelements addelement getfacade gettransition gettarget see org argouml uml ui uml model element list model2 is valid element object protected boolean is valid element object element return element model get facade get transition get target umlmodelelementlistmodel2 isvalidelement isvalidelement getfacade gettransition gettarget the constructor settings tab appearance set layout new border layout int label gap 10 int component gap 10 j panel top new j panel new labelled layout label gap component gap j label label new j label translator localize label look and feel look and feel new j combo box look and feel mgr get instance get available look and feel names look and feel add action listener new action listener public void action performed action event e set metal theme state label set label for look and feel top add label top add look and feel metal label new j label translator localize label metal theme metal theme new j combo box look and feel mgr get instance get available theme names metal label set label for metal theme top add metal label top add metal theme j check box j new j check box translator localize label smooth edges smooth edges j j label empty label new j label empty label set label for smooth edges top add empty label top add smooth edges j label language label new j label translator localize label language collection my locale c my locale get locales language new j combo box c to array object o my locale get default c if o null language set selected item o else language set selected index 1 language add action listener new action listener public void action performed action event e j combo box combo j combo box e get source locale my locale combo get selected item get locale language label set label for language top add language label top add language top set border border factory create empty border 10 10 10 10 add top border layout center j label restart new j label translator localize label restart application restart set horizontal alignment swing constants center restart set vertical alignment swing constants center restart set border border factory create empty border 10 2 10 2 add restart border layout south set metal theme state settingstabappearance setlayout borderlayout labelgap componentgap jpanel jpanel labelledlayout labelgap componentgap jlabel jlabel lookandfeel jcombobox lookandfeelmgr getinstance getavailablelookandfeelnames lookandfeel addactionlistener actionlistener actionperformed actionevent setmetalthemestate setlabelfor lookandfeel lookandfeel metallabel jlabel metaltheme jcombobox lookandfeelmgr getinstance getavailablethemenames metallabel setlabelfor metaltheme metallabel metaltheme jcheckbox jcheckbox smoothedges jlabel emptylabel jlabel emptylabel setlabelfor smoothedges emptylabel smoothedges jlabel languagelabel jlabel mylocale mylocale getlocales jcombobox toarray mylocale getdefault setselecteditem setselectedindex addactionlistener actionlistener actionperformed actionevent jcombobox jcombobox getsource mylocale getselecteditem getlocale languagelabel setlabelfor languagelabel setborder borderfactory createemptyborder borderlayout jlabel jlabel sethorizontalalignment swingconstants setverticalalignment swingconstants setborder borderfactory createemptyborder borderlayout setmetalthemestate get available look and feel names look and feel add action listener new action listener public void action performed action event e set metal theme state getavailablelookandfeelnames lookandfeel addactionlistener actionlistener actionperformed actionevent setmetalthemestate language add action listener new action listener public void action performed action event e j combo box combo j combo box e get source locale my locale combo get selected item get locale addactionlistener actionlistener actionperformed actionevent jcombobox jcombobox getsource mylocale getselecteditem getlocale enables or disables the metal theme controls depending on whether or not themes are supported by the selected look and feel private void set metal theme state string laf name string look and feel get selected item boolean enabled look and feel mgr get instance is theme compatible look and feel look and feel mgr get instance get look and feel from name laf name metal label set enabled enabled metal theme set enabled enabled setmetalthemestate lafname lookandfeel getselecteditem lookandfeelmgr getinstance isthemecompatiblelookandfeel lookandfeelmgr getinstance getlookandfeelfromname lafname metallabel setenabled metaltheme setenabled public void handle settings tab refresh string laf look and feel mgr get instance get current look and feel name string theme look and feel mgr get instance get current theme name look and feel set selected item laf metal theme set selected item theme smooth edges set selected configuration get boolean argo key smooth edges false handlesettingstabrefresh lookandfeelmgr getinstance getcurrentlookandfeelname lookandfeelmgr getinstance getcurrentthemename lookandfeel setselecteditem metaltheme setselecteditem smoothedges setselected getboolean key_smooth_edges public void handle settings tab save look and feel mgr get instance set currentlaf and theme by name string look and feel get selected item string metal theme get selected item make the result inmediately visible in case of apply disabled since it gives various problems e g the toolbar icons get too wide also the default does not give the new java 5 0 looks swing utilities update component treeui swing utilities get root pane this configuration set boolean argo key smooth edges smooth edges is selected if locale null configuration set string argo key locale locale to string handlesettingstabsave lookandfeelmgr getinstance setcurrentlafandthemebyname lookandfeel getselecteditem metaltheme getselecteditem swingutilities updatecomponenttreeui swingutilities getrootpane setboolean key_smooth_edges smoothedges isselected setstring key_locale tostring see gui settings tab interface handle settings tab cancel public void handle settings tab cancel guisettingstabinterface handlesettingstabcancel handlesettingstabcancel see org argouml ui gui settings tab interface handle reset to default public void handle reset to default do nothing these buttons are not shown guisettingstabinterface handleresettodefault handleresettodefault see gui settings tab interface get tab key public string get tab key return tab appearance guisettingstabinterface gettabkey gettabkey see gui settings tab interface get tab panel public j panel get tab panel return this guisettingstabinterface gettabpanel jpanel gettabpanel the constructor param locale the locale my locale locale locale my locale locale mylocale mylocale return returns the locale locale get locale return my locale getlocale mylocale public string to string string buffer display string new string buffer my locale to string display string append display string append my locale get display language my locale if my locale get display country my locale null my locale get display country my locale length 0 display string append display string append my locale get display country my locale display string append if my locale equals translator get system default locale display string append default return display string to string tostring stringbuffer displaystring stringbuffer mylocale tostring displaystring displaystring mylocale getdisplaylanguage mylocale mylocale getdisplaycountry mylocale mylocale getdisplaycountry mylocale displaystring displaystring mylocale getdisplaycountry mylocale displaystring mylocale getsystemdefaultlocale displaystring displaystring tostring static collection my locale get locales collection my locale c new array list my locale for locale locale arrays as list translator get locales c add new my locale locale return c mylocale getlocales mylocale arraylist mylocale aslist getlocales mylocale static my locale get default collection my locale c locale locale locale get default for my locale ml c if locale equals ml get locale return ml return null mylocale getdefault mylocale getdefault mylocale getlocale this constructor is used to build a dummy collaboration diagram so that a project will load properly deprecated for 0 28 by tfmorris use link uml activity diagram string object graph model deprecated public uml collaboration diagram try set name get new diagram name catch property veto exception pve todo all super constrcutors should take a graph model set graph model create graph model umlactivitydiagram graphmodel umlcollaborationdiagram setname getnewdiagramname propertyvetoexception graphmodel setgraphmodel creategraphmodel the constructor param collaboration the collaboration aka namespace for the diagram deprecated for 0 28 by tfmorris use link uml activity diagram string object graph model deprecated public uml collaboration diagram object collaboration this set namespace collaboration umlactivitydiagram graphmodel umlcollaborationdiagram setnamespace return the number of uml messages in the diagram public int get num messages layer lay get layer collection figs lay get contents int res 0 iterator it figs iterator while it has next fig f fig it next if model get facade isa message f get owner res return res getnummessages getlayer getcontents hasnext getfacade isamessage getowner method to perform a number of important initializations of a em collaboration diagram em p each diagram type has a similar em um lxxx diagram em class p changed em lay em from em layer perspective em to em layer perspective mutable em this class is a child of em layer perspective em and was implemented to correct some difficulties in changing the model em lay em is used mainly in em layer manager em gef to control the adding changing and deleting layers on the diagram param handle the collaboration from the uml model author psager tigris org jan 24 2002 public void set namespace object handle if model get facade isa namespace handle log error illegal argument object handle is not a namespace throw new illegal argument exception illegal argument object handle is not a namespace super set namespace handle collab diagram graph model gm create graph model gm set collaboration handle layer perspective lay new layer perspective mutable model get facade get name handle gm collab diagram renderer rend new collab diagram renderer singleton lay set graph node renderer rend lay set graph edge renderer rend set layer lay collaborationdiagram umlxxxdiagram layerperspective layerperspectivemutable layerperspective layermanager setnamespace getfacade isanamespace illegalargumentexception setnamespace collabdiagramgraphmodel creategraphmodel setcollaboration layerperspective layerperspectivemutable getfacade getname collabdiagramrenderer collabdiagramrenderer setgraphnoderenderer setgraphedgerenderer setlayer should be created in constructor private collab diagram graph model create graph model if get graph model instanceof collab diagram graph model return collab diagram graph model get graph model else return new collab diagram graph model collabdiagramgraphmodel creategraphmodel getgraphmodel collabdiagramgraphmodel collabdiagramgraphmodel getgraphmodel collabdiagramgraphmodel get the actions from which to create a toolbar or equivalent graphic triggers inherit doc protected object get uml actions object actions get action classifier role null get association actions get action generalize get action depend null get action message this one behaves differently hence seperated return actions inheritdoc getumlactions getactionclassifierrole getassociationactions getactiongeneralize getactiondepend getactionmessage private object get association actions object actions get action association get action uni association get action aggregation get action uni aggregation get action composition get action uni composition tool bar utility manage default actions diagram collaboration association return actions getassociationactions getactionassociation getactionuniassociation getactionaggregation getactionuniaggregation getactioncomposition getactionunicomposition toolbarutility managedefault after loading the diagram it is necessary to connect every fig message to its fig association role this is done by adding the fig message to the path items of its fig association role public void post load super post load if get namespace null throw new illegal state exception the namespace of the collaboration diagram is not set collection messages iterator msg iterator collection owned elements model get facade get owned elements get namespace iterator oe iterator owned elements iterator layer lay get layer while oe iterator has next object me oe iterator next if model get facade isa association role me messages model get facade get messages me msg iterator messages iterator while msg iterator has next object message msg iterator next fig message fig message fig message lay presentation for message if fig message null fig message add path item to fig association role lay figmessage figassociationrole figmessage pathitems figassociationrole postload postload getnamespace illegalstateexception msgiterator ownedelements getfacade getownedelements getnamespace oeiterator ownedelements getlayer oeiterator hasnext oeiterator getfacade isaassociationrole getfacade getmessages msgiterator msgiterator hasnext msgiterator figmessage figmessage figmessage presentationfor figmessage figmessage addpathitemtofigassociationrole see org argouml uml diagram ui uml diagram get label name public string get label name return translator localize label collaboration diagram umldiagram getlabelname getlabelname return returns the action classifier role private action get action classifier role if action classifier role null action classifier role new radio action new action add classifier role return action classifier role actionclassifierrole getactionclassifierrole actionclassifierrole actionclassifierrole radioaction actionaddclassifierrole actionclassifierrole return returns the action association protected action get action association if action association null action association new radio action new action add association role model get aggregation kind get none false button new associationrole association return action association actionassociation getactionassociation actionassociation actionassociation radioaction actionaddassociationrole getaggregationkind getnone actionassociation return returns the action composition protected action get action composition if action composition null action composition new radio action new action add association role model get aggregation kind get composite false button new composition return action composition actioncomposition getactioncomposition actioncomposition actioncomposition radioaction actionaddassociationrole getaggregationkind getcomposite actioncomposition return returns the action depend protected action get action depend if action depend null action depend new radio action new action set mode mode create poly edge class edge class model get meta types get dependency button new dependency return action depend actiondepend getactiondepend actiondepend actiondepend radioaction actionsetmode modecreatepolyedge edgeclass getmetatypes getdependency actiondepend return returns the action generalize protected action get action generalize if action generalize null action generalize new radio action new action set mode mode create poly edge class edge class model get meta types get generalization button new generalization return action generalize actiongeneralize getactiongeneralize actiongeneralize actiongeneralize radioaction actionsetmode modecreatepolyedge edgeclass getmetatypes getgeneralization actiongeneralize return returns the action uni aggregation protected action get action uni aggregation if action uni aggregation null action uni aggregation new radio action new action add association role model get aggregation kind get aggregate true button new uniaggregation return action uni aggregation actionuniaggregation getactionuniaggregation actionuniaggregation actionuniaggregation radioaction actionaddassociationrole getaggregationkind getaggregate actionuniaggregation return returns the action uni association protected action get action uni association if action uni association null action uni association new radio action new action add association role model get aggregation kind get none true button new uniassociation return action uni association actionuniassociation getactionuniassociation actionuniassociation actionuniassociation radioaction actionaddassociationrole getaggregationkind getnone actionuniassociation return returns the action uni composition protected action get action uni composition if action uni composition null action uni composition new radio action new action add association role model get aggregation kind get composite true button new unicomposition return action uni composition actionunicomposition getactionunicomposition actionunicomposition actionunicomposition radioaction actionaddassociationrole getaggregationkind getcomposite actionunicomposition return returns the action aggregation private action get action aggregation if action aggregation null action aggregation new radio action new action add association role model get aggregation kind get aggregate false button new aggregation return action aggregation actionaggregation getactionaggregation actionaggregation actionaggregation radioaction actionaddassociationrole getaggregationkind getaggregate actionaggregation return returns the action message private action get action message if action message null action message action add message get target follower return action message actionmessage getactionmessage actionmessage actionmessage actionaddmessage gettargetfollower actionmessage see org argouml uml diagram ui uml diagram get dependent element override public object get dependent element return get namespace the collaboration umldiagram getdependentelement getdependentelement getnamespace public boolean is relocation allowed object base todo we may return the following when the relocate has been implemented if model get facade isa operation base model get facade isa namespace base return model get collaborations helper is adding collaboration allowed base return false isrelocationallowed getfacade isaoperation getfacade isanamespace getcollaborationshelper isaddingcollaborationallowed see org argouml uml diagram ui uml diagram relocate java lang object public boolean relocate object base return false umldiagram suppress warnings unchecked public collection get relocation candidates object root todo we may return something useful when the relocate has been implemented collection c new hash set c add get owner return c suppresswarnings getrelocationcandidates hashset getowner public void encloser changed fig node enclosed fig node old encloser fig node new encloser do nothing encloserchanged fignode fignode oldencloser fignode newencloser a sequence diagram can accept all classifiers it will add them as a new classifier role with that classifier as a base all other accepted figs are added as is param object to accept return true if the diagram can accept the object else false see org argouml uml diagram ui uml diagram does accept java lang object override public boolean does accept object object to accept if model get facade isa classifier role object to accept return true else if model get facade isa message object to accept return true else if model get facade isa comment object to accept return true else if model get facade isa classifier object to accept return true return false objecttoaccept umldiagram doesaccept doesaccept objecttoaccept getfacade isaclassifierrole objecttoaccept getfacade isamessage objecttoaccept getfacade isacomment objecttoaccept getfacade isaclassifier objecttoaccept creates a new classifier role with a specified base param base return the new cr private object make newcr object base object node null editor ce globals cur editor graph model gm ce get graph model if gm instanceof collab diagram graph model object collaboration collab diagram graph model gm get home model node model get collaborations factory build classifier role collaboration model get collaborations helper add base node base return node makenewcr cureditor graphmodel getgraphmodel collabdiagramgraphmodel collabdiagramgraphmodel gethomemodel getcollaborationsfactory buildclassifierrole getcollaborationshelper addbase creates the fig for the cr y position will be adjusted to match other the other c rs param classifier role param location the position where to put the new fig return private fig classifier role make new figcr object classifier role point location if classifier role null fig classifier role newcr new fig classifier role classifier role new rectangle location get diagram settings get graph model get nodes add newcr get owner return newcr return null crs classifierrole figclassifierrole makenewfigcr classifierrole classifierrole figclassifierrole figclassifierrole classifierrole getdiagramsettings getgraphmodel getnodes getowner override public fig node drop object dropped object point location fig node fig node null graph model gm get graph model layer lay globals cur editor get layer manager get active layer if location is non null convert to a rectangle that we can use rectangle bounds null if location null bounds new rectangle location x location y 0 0 diagram settings settings get diagram settings if model get facade isa classifier role dropped object fig node new fig classifier role dropped object bounds settings else if model get facade isa message dropped object fig node new fig message dropped object bounds settings else if model get facade isa comment dropped object fig node new fig comment dropped object bounds settings else if model get facade isa classifier role dropped object fig node make new figcr dropped object location else if model get facade isa classifier dropped object fig node make new figcr make newcr dropped object location if fig node null log debug dropped object dropped object converted to fig node else log debug dropped object not added dropped object return fig node fignode droppedobject fignode fignode graphmodel getgraphmodel cureditor getlayermanager getactivelayer diagramsettings getdiagramsettings getfacade isaclassifierrole droppedobject fignode figclassifierrole droppedobject getfacade isamessage droppedobject fignode figmessage droppedobject getfacade isacomment droppedobject fignode figcomment droppedobject getfacade isaclassifierrole droppedobject fignode makenewfigcr droppedobject getfacade isaclassifier droppedobject fignode makenewfigcr makenewcr droppedobject fignode droppedobject fignode droppedobject fignode override public string get instructions object dropped object if model get facade isa classifier role dropped object return super get instructions dropped object else if model get facade isa classifier dropped object return translator localize misc message click on diagram to add as cr new object model get facade to string dropped object return super get instructions dropped object getinstructions droppedobject getfacade isaclassifierrole droppedobject getinstructions droppedobject getfacade isaclassifier droppedobject getfacade tostring droppedobject getinstructions droppedobject the constructor public cr fork outgoing transition setup head and desc add supported decision uml decision state machines add trigger outgoing crforkoutgoingtransition setupheadanddesc addsupporteddecision umldecision state_machines addtrigger public boolean predicate2 object dm designer dsgr if model get facade isa transition dm return no problem object tr dm object target model get facade get target tr object source model get facade get source tr if model get facade isa pseudostate source return no problem if model get facade equals pseudostate kind model get facade get kind source model get pseudostate kind get fork return no problem if model get facade isa state target return no problem return problem found getfacade isatransition no_problem getfacade gettarget getfacade getsource getfacade isapseudostate no_problem getfacade equalspseudostatekind getfacade getkind getpseudostatekind getfork no_problem getfacade isastate no_problem problem_found public set object get criticized design materials set object ret new hash set object ret add model get meta types get transition return ret getcriticizeddesignmaterials hashset getmetatypes gettransition the constructor public cr missing state name setup head and desc add supported decision uml decision naming set knowledge types critic kt completeness critic kt syntax add trigger name crmissingstatename setupheadanddesc addsupporteddecision umldecision setknowledgetypes kt_completeness kt_syntax addtrigger override public boolean predicate2 object dm designer dsgr if model get facade isa state vertex dm return no problem if model get facade isa composite state dm model get facade is top dm return no problem if model get facade isa final state dm return no problem if model get facade isa pseudostate dm return no problem if model get facade isa action state dm return no problem if model get facade isa object flow state dm return no problem string my name model get facade get name dm if my name null my name equals my name length 0 return problem found return no problem getfacade isastatevertex no_problem getfacade isacompositestate getfacade istop no_problem getfacade isafinalstate no_problem getfacade isapseudostate no_problem getfacade isaactionstate no_problem getfacade isaobjectflowstate no_problem myname getfacade getname myname myname myname problem_found no_problem see org argouml cognitive poster get clarifier override public icon get clarifier return cl class name get the instance getclarifier getclarifier clclassname gettheinstance override public void init wizard wizard w if w instanceof wizme name to do item item to do item w get to do item object me item get offenders get 0 string ins super get instructions string sug super get default suggestion if model get facade isa state vertex me object sv me int count 1 if model get facade get container sv null count model get facade get subvertices model get facade get container sv size sug s count 1 wizme name w set instructions ins wizme name w set suggestion sug initwizard wizmename todoitem todoitem gettodoitem getoffenders getinstructions getdefaultsuggestion getfacade isastatevertex getfacade getcontainer getfacade getsubvertices getfacade getcontainer wizmename setinstructions wizmename setsuggestion see org argouml cognitive critics critic get wizard class org argouml cognitive to do item override public class get wizard class to do item item return wizme name class getwizardclass todoitem getwizardclass todoitem wizmename public set object get criticized design materials set object ret new hash set object ret add model get meta types get state vertex return ret getcriticizeddesignmaterials hashset getmetatypes getstatevertex this is the only constructor for load swing worker param a file the file that s going to be opened as a project param a show ui whether to show the ui or not public load swing worker file a file boolean a show ui super argo load project thread this show ui a show ui this file a file loadswingworker afile ashowui loadswingworker afile ashowui argoloadprojectthread showui ashowui afile implements org argouml swingext swing worker construct this is the main method for this swing worker in this case it simply loads the project param pmw the progress monitor window used by project browser return always null public object construct progress monitor pmw load project at slightly lower priority to keep ui responsive thread current thread thread current thread current thread set priority current thread get priority 1 loads the project project browser get instance load project file show ui pmw return null swingworker swingworker progressmonitorwindow projectbrowser progressmonitor currentthread currentthread currentthread setpriority currentthread getpriority projectbrowser getinstance loadproject showui implements org argouml swingext swing worker init progress monitor window it just creates an instance of progress monitor window return an instance of progress monitor window public progress monitor init progress monitor window ui manager put progress monitor progress text translator localize filechooser open project object msg args new object this file get path return new progress monitor window argo frame get instance translator message format dialog openproject title msg args swingworker initprogressmonitorwindow progressmonitorwindow progressmonitorwindow progressmonitor initprogressmonitorwindow uimanager progressmonitor progresstext msgargs getpath progressmonitorwindow argoframe getinstance messageformat msgargs overrides the finished method of the swing worker class to update the gui public void finished super finished try project browser get instance add file saved file catch io exception exc log error failed to save file file in most recently used list swingworker projectbrowser getinstance addfilesaved ioexception constructor for uml state entry list param data model the model public uml call state entry list uml model element list model2 data model super data model umlstateentrylist datamodel umlcallstateentrylist umlmodelelementlistmodel2 datamodel datamodel see org argouml uml ui uml mutable linked list get popup menu public j popup menu get popup menu return new popup menu new call action action new action roles entry this umlmutablelinkedlist getpopupmenu jpopupmenu getpopupmenu popupmenunewcallaction actionnewaction constructs a new popupmenu the given parameter role determines what the purpose is of the actions that can be created via this popupmenu the parameter must comply to the interface roles defined on action new action param role the role param list the list public popup menu new call action string role uml mutable linked list list super j menu new menu new j menu new menu set text translator localize action new new menu add action new call action get instance action new call action get instance set target list get target action new call action get instance put value action new action role role add new menu add separator action remove model element singleton set object to remove action new action get action role list get target add action remove model element singleton actionnewaction popupmenunewcallaction umlmutablelinkedlist jmenu newmenu jmenu newmenu settext newmenu actionnewcallaction getinstance actionnewcallaction getinstance settarget gettarget actionnewcallaction getinstance putvalue actionnewaction newmenu addseparator actionremovemodelelement setobjecttoremove actionnewaction getaction gettarget actionremovemodelelement return returns the singleton public static persistence manager get instance return instance persistencemanager getinstance the constructor private persistence manager these are the file formats i know about default persister new old zargo file persister quick view dump new uml file persister xmi persister new xmi file persister other persisters add xmi persister xml persister new xml file persister other persisters add xml persister uml persister new uml file persister other persisters add uml persister zip persister new zip file persister other persisters add zip persister persistencemanager defaultpersister oldzargofilepersister quickviewdump umlfilepersister xmipersister xmifilepersister otherpersisters xmipersister xmlpersister xmlfilepersister otherpersisters xmlpersister umlpersister umlfilepersister otherpersisters umlpersister zippersister zipfilepersister otherpersisters zippersister this function allows to add new persisters this can be done e g by plugins modules param fp the persister public void register abstract file persister fp other persisters add fp abstractfilepersister otherpersisters param name the filename return the persister public abstract file persister get persister from file name string name if default persister is file extension applicable name return default persister for abstract file persister persister other persisters if persister is file extension applicable name return persister return null abstractfilepersister getpersisterfromfilename defaultpersister isfileextensionapplicable defaultpersister abstractfilepersister otherpersisters isfileextensionapplicable param chooser the filechooser of which the filters will be set param file name the filename of the file to be saved optional public void set save file chooser filters j file chooser chooser string file name chooser add choosable file filter default persister abstract file persister default file filter default persister for abstract file persister fp other persisters if fp is save enabled fp equals xmi persister fp equals xml persister chooser add choosable file filter fp if file name null fp is file extension applicable file name default file filter fp chooser set file filter default file filter filename setsavefilechooserfilters jfilechooser filename addchoosablefilefilter defaultpersister abstractfilepersister defaultfilefilter defaultpersister abstractfilepersister otherpersisters issaveenabled xmipersister xmlpersister addchoosablefilefilter filename isfileextensionapplicable filename defaultfilefilter setfilefilter defaultfilefilter param chooser the filechooser of which the filters will be set public void set open file chooser filter j file chooser chooser multitype file filter mf new multitype file filter mf add default persister chooser add choosable file filter mf chooser add choosable file filter default persister iterator iter other persisters iterator while iter has next abstract file persister ff abstract file persister iter next if ff is load enabled mf add ff chooser add choosable file filter ff chooser set file filter mf setopenfilechooserfilter jfilechooser multitypefilefilter multitypefilefilter defaultpersister addchoosablefilefilter addchoosablefilefilter defaultpersister otherpersisters hasnext abstractfilepersister abstractfilepersister isloadenabled addchoosablefilefilter setfilefilter param chooser the filechooser of which the filters will be set public void set xmi file chooser filter j file chooser chooser chooser add choosable file filter xmi persister chooser set file filter xmi persister setxmifilechooserfilter jfilechooser addchoosablefilefilter xmipersister setfilefilter xmipersister return the extension of the default persister just the text not the public string get default extension return default persister get extension getdefaultextension defaultpersister getextension return the extension of the xmi persister just the text not the public string get xmi extension return xmi persister get extension getxmiextension xmipersister getextension param in the input file or path name which may or may not have a recognised extension return the amended file or pathname guaranteed to have a recognised extension public string fix extension string in if get persister from file name in null in get default extension return in fixextension getpersisterfromfilename getdefaultextension param in the input file or path name which may or may not have a xmi extension return the amended file or pathname guaranteed to have a xmi extension public string fix xmi extension string in if get persister from file name in xmi persister in get xmi extension return in fixxmiextension getpersisterfromfilename xmipersister getxmiextension param in the input uri which may or may not have a recognised extension return the uri with default extension added if it did not have a valid extension yet public uri fix uri extension uri in uri new uri string n in to string n fix extension n try new uri new uri n catch java net uri syntax exception e throw new unexpected exception e return new uri fixuriextension newuri tostring fixextension newuri urisyntaxexception unexpectedexception newuri find the base name of the given filename p this is the name minus any valid file extension invalid extensions are left alone param n the given file name return the name a string without extension public string get base name string n abstract file persister p get persister from file name n if p null return n int ext length p get extension length 1 return n substring 0 n length ext length getbasename abstractfilepersister getpersisterfromfilename extlength getextension extlength param p the project return the basename of the project public string get project base name project p uri uri p get uri string name translator localize label projectbrowser title if uri null name new file uri get name return get base name name getprojectbasename geturi getname getbasename param n the new project name param p the project that receives the name throws uri syntax exception if the uri is malformed public void set project name final string n project p throws uri syntax exception string s if p geturi null s p geturi to string s s substring 0 s last index of 1 n set projecturi new uri s p urisyntaxexception setprojectname urisyntaxexception tostring lastindexof setprojecturi param the uri the uri for the project param p the project that receives the uri public void set projecturi uri the uri project p if the uri null the uri fix uri extension the uri p set uri the uri theuri setprojecturi theuri theuri theuri fixuriextension theuri seturi theuri generates a string dump of the current model for quick viewing param project the project to generate return the whole model in a string public string get quick view dump project project byte array output stream stream new byte array output stream try quick view dump write project project stream null catch exception e if anything goes wrong return the stack trace as a string so that we get some useful feedback e print stack trace new print stream stream try return stream to string argo get encoding catch unsupported encoding exception e return e to string getquickviewdump bytearrayoutputstream bytearrayoutputstream quickviewdump writeproject printstacktrace printstream tostring getencoding unsupportedencodingexception tostring get the file persister for diagrams return the diagram file persister diagram member file persister get diagram member file persister return diagram member file persister diagrammemberfilepersister getdiagrammemberfilepersister diagrammemberfilepersister set an alternative file persister for diagrams param persister the persister to use instead of the default public void set diagram member file persister diagram member file persister persister diagram member file persister persister setdiagrammemberfilepersister diagrammemberfilepersister diagrammemberfilepersister returns true if we are allowed to overwrite the given file param overwrite if true then the user is not asked param file the given file return true if we are allowed to overwrite the given file param frame the component to display the confirmation dialog on public boolean confirm overwrite component frame boolean overwrite file file if file exists overwrite string s confirm translator message format optionpane confirm overwrite new object file int n result j option pane show confirm dialog frame s confirm translator localize optionpane confirm overwrite title j option pane yes no option j option pane question message if n result j option pane yes option return false return true confirmoverwrite sconfirm messageformat nresult joptionpane showconfirmdialog sconfirm joptionpane yes_no_option joptionpane question_message nresult joptionpane yes_option sets the currently used persister for saving param persister the persister public void set save persister abstract file persister persister save persister persister setsavepersister abstractfilepersister savepersister gets the currently used persister for saving return the persister or null public abstract file persister get save persister return save persister abstractfilepersister getsavepersister savepersister figs are stored by class name and recreated by reflection if the class name changes or moves this provides a simple way of translating from class name at time of save to the current class name without need for xsl param original class name the class name that may be in the save file param new class name the class name to use in preference public void add translation final string original class name final string new class name get diagram member file persister add translation original class name new class name originalclassname newclassname addtranslation originalclassname newclassname getdiagrammemberfilepersister addtranslation originalclassname newclassname constructor public multitype file filter super filters new array list file filter extensions new array list string multitypefilefilter arraylist filefilter arraylist add a file filter to list of file filters to be accepted param filter file filter to be added public void add abstract file persister filter filters add filter string extension filter get extension if extensions contains extension extensions add filter get extension desc desc null desc extension filefilter filefilter abstractfilepersister getextension getextension return all added file filters return collection of file filters public collection file filter get all return filters filefilters filefilters filefilter getall accept any file that any of our filters will accept inherit doc override public boolean accept file arg0 for file filter ff filters if ff accept arg0 return true return false inheritdoc filefilter override public string get description object s desc return translator message format filechooser all types desc s getdescription messageformat construct a property panel with a given name and icon param diagram name the diagram name to use as the title of the panel param icon an icon to display on the panel protected prop panel diagram string diagram name image icon icon super diagram name icon j text field field new j text field todo this should probably only update the project when the user presses return or focus is lost field get document add document listener new diagram name document field add field label name field add field label home model get home model selector add action new action navigate up from diagram add action action delete model elements get target follower diagramname proppaneldiagram diagramname imageicon diagramname jtextfield jtextfield getdocument adddocumentlistener diagramnamedocument addfield addfield gethomemodelselector addaction actionnavigateupfromdiagram addaction actiondeletemodelelements gettargetfollower default constructor if there is no child of this class that can show the diagram public prop panel diagram this diagram null proppaneldiagram returns the home model selector this is a component which allows the user to select a single item as the home model i e the owner of the diagram return a component for selecting the home model protected j component get home model selector if home model selector null home model selector new uml searchable combo box home model combo box model new action set diagram home model true return new uml combo box navigator translator localize label namespace navigate tooltip home model selector jcomponent gethomemodelselector homemodelselector homemodelselector umlsearchablecombobox homemodelcomboboxmodel actionsetdiagramhomemodel umlcomboboxnavigator homemodelselector class uml diagram home model combo box model extends uml combo box model2 public uml diagram home model combo box model super argo diagram namespace key false umldiagramhomemodelcomboboxmodel umlcomboboxmodel2 umldiagramhomemodelcomboboxmodel argodiagram namespace_key override protected void build model list object target get target list list new array list if target instanceof relocatable relocatable diagram relocatable target for object obj diagram get relocation candidates get model management factory get root model if diagram is relocation allowed obj list add obj this should not be needed if the above is correct but let s be sure list add get selected model element collections sort list new path comparator set elements list buildmodellist gettarget arraylist getrelocationcandidates getmodelmanagementfactory getrootmodel isrelocationallowed getselectedmodelelement pathcomparator setelements override protected void build minimal model list collection list new array list 1 list add get selected model element set elements list set model invalid buildminimalmodellist arraylist getselectedmodelelement setelements setmodelinvalid override protected boolean is lazy return true islazy override protected object get selected model element object t get target if t instanceof argo diagram return argo diagram t get owner return null getselectedmodelelement gettarget argodiagram argodiagram getowner override protected boolean is valid element object element object t get target if t instanceof relocatable return relocatable t is relocation allowed element return false isvalidelement gettarget isrelocationallowed class action set diagram home model extends undoable action protected action set diagram home model super actionsetdiagramhomemodel undoableaction actionsetdiagramhomemodel public void action performed action event e object source e get source if source instanceof uml combo box2 uml combo box2 box uml combo box2 source object diagram box get target object home model box get selected item if diagram instanceof relocatable relocatable d relocatable diagram if d is relocation allowed home model d relocate home model actionperformed actionevent getsource umlcombobox2 umlcombobox2 umlcombobox2 gettarget homemodel getselecteditem isrelocationallowed homemodel homemodel the constructor public action navigate up from diagram super button go up true actionnavigateupfromdiagram protected object navigate to object source if source instanceof argo diagram return argo diagram source get namespace return null navigateto argodiagram argodiagram getnamespace see javax swing action is enabled override public boolean is enabled return true isenabled isenabled override public void action performed action event e object target target manager get instance get target object destination navigate to target if destination null target manager get instance set target destination actionperformed actionevent targetmanager getinstance gettarget navigateto targetmanager getinstance settarget the constructor public uml operation methods list model super method umloperationmethodslistmodel protected void build model list if get target null collection methods null object target get target if model get facade isa operation target methods model get facade get methods target set all elements methods buildmodellist gettarget gettarget getfacade isaoperation getfacade getmethods setallelements protected boolean is valid element object element collection methods null object target get target if model get facade isa operation target methods model get facade get methods target return methods null methods contains element isvalidelement gettarget getfacade isaoperation getfacade getmethods the constructor public cr instance without classifier setup head and desc add supported decision uml decision patterns crinstancewithoutclassifier setupheadanddesc addsupporteddecision umldecision public boolean predicate2 object dm designer dsgr if dm instanceof uml deployment diagram return no problem uml deployment diagram dd uml deployment diagram dm list set offs compute offenders dd if offs null return no problem return problem found umldeploymentdiagram no_problem umldeploymentdiagram umldeploymentdiagram listset computeoffenders no_problem problem_found public to do item to do item object dm designer dsgr uml deployment diagram dd uml deployment diagram dm list set offs compute offenders dd return new uml to do item this offs dsgr todoitem todoitem umldeploymentdiagram umldeploymentdiagram listset computeoffenders umltodoitem public boolean still valid to do item i designer dsgr if is active return false list set offs i get offenders uml deployment diagram dd uml deployment diagram offs get 0 if predicate dm dsgr return false list set new offs compute offenders dd boolean res offs equals new offs return res stillvalid todoitem isactive listset getoffenders umldeploymentdiagram umldeploymentdiagram listset newoffs computeoffenders newoffs if there are instances that have no classifiers they belong to the returned list set is not null then in the list set are the uml deployment diagram and all fig objects fig component instances and figm node instances with no classifier param dd the diagram to check return the set of offenders public list set compute offenders uml deployment diagram dd collection figs dd get layer get contents list set offs null iterator fig iter figs iterator while fig iter has next object obj fig iter next if obj instanceof fig node model element continue fig node model element fig node model element fig node model element obj if fig node model element null model get facade isa instance fig node model element get owner object instance fig node model element get owner if instance null collection col model get facade get classifiers instance if col size 0 continue if offs null offs new list set offs add dd offs add fig node model element return offs listset listset umldeploymentdiagram figobjects figcomponentinstances figmnodeinstances listset computeoffenders umldeploymentdiagram getlayer getcontents listset figiter figiter hasnext figiter fignodemodelelement fignodemodelelement fignodemodelelement fignodemodelelement fignodemodelelement getfacade isainstance fignodemodelelement getowner fignodemodelelement getowner getfacade getclassifiers listset fignodemodelelement construct a property panel for a relationship with the given name and icon param name the name of the panel to be shown at the top param icon the icon to be shown next to the name public prop panel relationship string name image icon icon super name icon proppanelrelationship imageicon constructor for prop panel relationship public prop panel relationship super label relationship lookup icon relationship proppanelrelationship proppanelrelationship lookupicon the constructor public cr name conflict setup head and desc add supported decision uml decision naming set knowledge types critic kt syntax add trigger name add trigger feature name crnameconflict setupheadanddesc addsupporteddecision umldecision setknowledgetypes kt_syntax addtrigger addtrigger feature_name java lang object org argouml cognitive designer override public boolean predicate2 object dm designer dsgr return compute offenders dm size 1 computeoffenders override public to do item to do item object dm designer dsgr list set offs compute offenders dm return new uml to do item this offs dsgr todoitem todoitem listset computeoffenders umltodoitem param dm the object to check return the set of offenders protected list set compute offenders object dm list set offender result new list set if model get facade isa namespace dm hash map string object names new hash map string object for object name1 object model get facade get owned elements dm if model get facade isa generalization name1 object continue string name model get facade get name name1 object if name null continue if equals name continue if names contains key name object offender names get name if offender result contains offender offender result add offender offender result add name1 object names put name name1 object return offender result listset computeoffenders listset offenderresult listset getfacade isanamespace hashmap hashmap name1object getfacade getownedelements getfacade isageneralization name1object getfacade getname name1object containskey offenderresult offenderresult offenderresult name1object name1object offenderresult override public boolean still valid to do item i designer dsgr if is active return false list set offs i get offenders first element is e g the class but we need to have its namespace to recompute the offenders object f offs get 0 object ns model get facade get namespace f if predicate ns dsgr return false list set new offs compute offenders ns boolean res offs equals new offs return res stillvalid todoitem isactive listset getoffenders getfacade getnamespace listset newoffs computeoffenders newoffs public set object get criticized design materials set object ret new hash set object ret add model get meta types get namespace return ret getcriticizeddesignmaterials hashset getmetatypes getnamespace construct a property panel for a change event public prop panel change event super label change event lookup icon change event proppanelchangeevent lookupicon changeevent override public void initialize super initialize uml expression model2 change model new uml change expression model this change expression j panel change panel create border panel label change change panel add new j scroll pane new uml expression body field change model true change panel add new uml expression language field change model false add change panel add action get delete action umlexpressionmodel2 changemodel umlchangeexpressionmodel changeexpression jpanel changepanel createborderpanel changepanel jscrollpane umlexpressionbodyfield changemodel changepanel umlexpressionlanguagefield changemodel changepanel addaction getdeleteaction the constructor public action new set the name and icon super translator localize action new resource loader wrapper lookup icon action new set the tooltip string put value action short description translator localize action new actionnew resourceloaderwrapper lookupicon putvalue short_description public void action performed action event e model get pump flush model events model get pump stop pumping events model get pump flush model events project p project manager get manager get current project if get value non interactive null if project browser get instance ask confirmation and save return project browser get instance clear dialogs designer disable critiquing designer clear critiquing clean the history target manager get instance clean history p remove p project manager get manager make empty project target manager get instance set target p get diagram list get 0 designer enable critiquing model get pump start pumping events actionperformed actionevent getpump flushmodelevents getpump stoppumpingevents getpump flushmodelevents projectmanager getmanager getcurrentproject getvalue projectbrowser getinstance askconfirmationandsave projectbrowser getinstance cleardialogs disablecritiquing clearcritiquing targetmanager getinstance cleanhistory projectmanager getmanager makeemptyproject targetmanager getinstance settarget getdiagramlist enablecritiquing getpump startpumpingevents constructor for uml submachine state combo box model public uml submachine state combo box model super submachine true umlsubmachinestatecomboboxmodel umlsubmachinestatecomboboxmodel protected boolean is valid element object element return model get facade isa state machine element element model get state machines helper get state machine get target isvalidelement getfacade isastatemachine getstatemachineshelper getstatemachine gettarget protected void build model list remove all elements project p project manager get manager get current project object model p get model set elements model get state machines helper get all possible statemachines model get target buildmodellist removeallelements projectmanager getmanager getcurrentproject getmodel setelements getstatemachineshelper getallpossiblestatemachines gettarget protected object get selected model element if get target null return model get facade get submachine get target return null getselectedmodelelement gettarget getfacade getsubmachine gettarget construct a property panel for a namespace with the given name and icon param panel name the name of the panel to be shown at the top param icon the icon to be shown next to the name public prop panel namespace string panel name image icon icon super panel name icon panelname proppanelnamespace panelname imageicon panelname create a class public void add class object target get target if model get facade isa namespace target object ns target object owned elem model get core factory build class model get core helper add owned element ns owned elem target manager get instance set target owned elem addclass gettarget getfacade isanamespace ownedelem getcorefactory buildclass getcorehelper addownedelement ownedelem targetmanager getinstance settarget ownedelem create a new interface public void add interface object target get target if model get facade isa namespace target object ns target object owned elem model get core factory create interface model get core helper add owned element ns owned elem target manager get instance set target owned elem addinterface gettarget getfacade isanamespace ownedelem getcorefactory createinterface getcorehelper addownedelement ownedelem targetmanager getinstance settarget ownedelem create a new package within the namespace public void add package object target get target if model get facade isa namespace target object ns target object owned elem model get model management factory create package model get core helper add owned element ns owned elem target manager get instance set target owned elem addpackage gettarget getfacade isanamespace ownedelem getmodelmanagementfactory createpackage getcorehelper addownedelement ownedelem targetmanager getinstance settarget ownedelem returns the owned elements scroll return j scroll pane public j scroll pane get owned elements scroll if owned elements scroll null owned elements scroll new scroll list owned element list model true false return owned elements scroll ownedelementsscroll jscrollpane jscrollpane getownedelementsscroll ownedelementsscroll ownedelementsscroll scrolllist ownedelementlistmodel ownedelementsscroll the constructor public cr comp instance without node setup head and desc add supported decision uml decision patterns crcompinstancewithoutnode setupheadanddesc addsupporteddecision umldecision public boolean predicate2 object dm designer dsgr if dm instanceof uml deployment diagram return no problem uml deployment diagram dd uml deployment diagram dm list set offs compute offenders dd if offs null return no problem return problem found umldeploymentdiagram no_problem umldeploymentdiagram umldeploymentdiagram listset computeoffenders no_problem problem_found public to do item to do item object dm designer dsgr uml deployment diagram dd uml deployment diagram dm list set offs compute offenders dd return new uml to do item this offs dsgr todoitem todoitem umldeploymentdiagram umldeploymentdiagram listset computeoffenders umltodoitem public boolean still valid to do item i designer dsgr if is active return false list set offs i get offenders uml deployment diagram dd uml deployment diagram offs get 0 if predicate dm dsgr return false list set new offs compute offenders dd boolean res offs equals new offs return res stillvalid todoitem isactive listset getoffenders umldeploymentdiagram umldeploymentdiagram listset newoffs computeoffenders newoffs if there are component instances that have no enclosing figm node instance the returned list set is not null then in the list set are the uml deployment diagram and all fig component instances with no enclosing figm node instance param deployment diagram the diagram to check return the set of offenders public list set compute offenders uml deployment diagram deployment diagram collection figs deployment diagram get layer get contents list set offs null boolean is node false iterator it figs iterator object obj null while it has next obj it next if obj instanceof fig node instance is node true it figs iterator while it has next obj it next if obj instanceof fig component instance continue fig component instance fc fig component instance obj if fc get enclosing fig null is node if offs null offs new list set offs add deployment diagram offs add fc else if fc get enclosing fig null model get facade get node instance fc get owner null if offs null offs new list set offs add deployment diagram offs add fc return offs figmnodeinstance listset listset umldeploymentdiagram figcomponentinstances figmnodeinstance deploymentdiagram listset computeoffenders umldeploymentdiagram deploymentdiagram deploymentdiagram getlayer getcontents listset isnode hasnext fignodeinstance isnode hasnext figcomponentinstance figcomponentinstance figcomponentinstance getenclosingfig isnode listset deploymentdiagram getenclosingfig getfacade getnodeinstance getowner listset deploymentdiagram reply a collection of the children of the given object inherit doc public iterator child iterator object o todo this could be made more efficient by working with iterators directly and creating a composite iterator made up of all the various sub iterators list res new array list if o instanceof project project p project o res add all p get user defined model list res add all p get diagram list else if o instanceof argo diagram argo diagram d argo diagram o res add all d get graph model get nodes res add all d get graph model get edges else if model get facade isa model element o res add all model get facade get model element contents o return res iterator inheritdoc childiterator arraylist addall getuserdefinedmodellist addall getdiagramlist argodiagram argodiagram argodiagram addall getgraphmodel getnodes addall getgraphmodel getedges getfacade isamodelelement addall getfacade getmodelelementcontents the constructor param classifier role the uml element public classifier role notation object classifier role if model get facade isa classifier role classifier role throw new illegal argument exception this is not a classifier role classifierrole classifierrolenotation classifierrole getfacade isaclassifierrole classifierrole illegalargumentexception classifierrole override public void initialise listener property change listener listener object model element super initialise listener listener model element collection classifiers model get facade get bases model element for object c classifiers add element listener listener c name initialiselistener propertychangelistener modelelement initialiselistener modelelement getfacade getbases modelelement addelementlistener constructor public action cut super translator localize localize key icon icon resource loader wrapper lookup icon localize key if icon null put value action small icon icon put value action short description translator localize localize key actioncut localize_key resourceloaderwrapper lookupicon localize_key putvalue small_icon putvalue short_description localize_key return the singleton public static action cut get instance return instance actioncut getinstance public void action performed action event ae if text source null if remove from diagram allowed cut action cmd new cut action translator localize action cut cmd action performed ae else text source cut if is system clip board empty globals clip board null globals clip board is empty action paste get instance set enabled false else action paste get instance set enabled true actionperformed actionevent textsource removefromdiagramallowed cutaction cutaction actionperformed textsource issystemclipboardempty clipboard clipboard isempty actionpaste getinstance setenabled actionpaste getinstance setenabled disable cutting figs from a diagram to prevent issue 3480 see also action paste which is also disabled for similar reasons return true if cut is allowed for the selected items private boolean remove from diagram allowed return false actionpaste removefromdiagramallowed public void caret update caret event e if e get mark e get dot there is a selection set enabled true text source j text component e get source else collection fig selection globals cur editor get selection manager selections if fig selection null fig selection is empty set enabled false else set enabled true text source null caretupdate caretevent getmark getdot setenabled textsource jtextcomponent getsource figselection cureditor getselectionmanager figselection figselection isempty setenabled setenabled textsource private boolean is system clip board empty if there is a selection on the clipboard boolean has contents false transferable content toolkit get default toolkit get system clipboard get contents null data flavor flavors content get transfer data flavors try for int i 0 i flavors length i if content get transfer data flavors i null has contents true break catch unsupported flavor exception ignorable catch io exception ignorable return has contents issystemclipboardempty hascontents getdefaulttoolkit getsystemclipboard getcontents dataflavor gettransferdataflavors gettransferdata hascontents unsupportedflavorexception ioexception hascontents constructor for uml interaction messages list model public uml interaction messages list model super message umlinteractionmessageslistmodel umlinteractionmessageslistmodel protected void build model list remove all elements iterator it model get facade get messages get target iterator while it has next add element it next buildmodellist removeallelements getfacade getmessages gettarget hasnext addelement see org argouml uml ui uml model element list model2 is valid element object protected boolean is valid element object elem return model get facade isa message elem model get facade get interaction elem get target umlmodelelementlistmodel2 isvalidelement isvalidelement getfacade isamessage getfacade getinteraction gettarget constructor for action new final state protected action new final state super put value action name translator localize button new finalstate actionnewfinalstate actionnewfinalstate putvalue see java awt event action listener action performed java awt event action event public void action performed action event e super action performed e model get state machines factory build final state get target actionlistener actionperformed actionevent actionperformed actionevent actionperformed getstatemachinesfactory buildfinalstate gettarget return returns the singleton public static action new final state get singleton return singleton actionnewfinalstate getsingleton constructor for uml instance link end list model public uml link connection list model super link end umlinstancelinkendlistmodel umllinkconnectionlistmodel linkend protected void build model list if get target null set all elements model get facade get connections get target buildmodellist gettarget setallelements getfacade getconnections gettarget see org argouml uml ui uml model element list model2 is valid element object protected boolean is valid element object element return model get facade get connections get target contains element umlmodelelementlistmodel2 isvalidelement isvalidelement getfacade getconnections gettarget protected void move down int index object link get target list c new array list model get facade get connections link if index c size 1 collections swap c index index 1 model get core helper set connections link c the mdr model does not support the 2nd method below for link ends hence we can not replace the above inefficient code by the code below model get core helper remove connection link mem1 model get core helper add connection link index2 mem1 movedown gettarget arraylist getfacade getconnections getcorehelper setconnections linkends getcorehelper removeconnection getcorehelper addconnection see org argouml uml ui uml model element ordered list model2 move to bottom int override protected void move to bottom int index object link get target list c new array list model get facade get connections link if index c size 1 object mem c get index c remove mem c add mem model get core helper set connections link c umlmodelelementorderedlistmodel2 movetobottom movetobottom gettarget arraylist getfacade getconnections getcorehelper setconnections see org argouml uml ui uml model element ordered list model2 move to top int override protected void move to top int index object link get target list c new array list model get facade get connections link if index 0 object mem c get index c remove mem c add 0 mem model get core helper set connections link c umlmodelelementorderedlistmodel2 movetotop movetotop gettarget arraylist getfacade getconnections getcorehelper setconnections constructor deprecated for 0 28 by tfmorris use link fig edge port object rectangle diagram settings suppress warnings deprecation deprecated public fig edge port super initialize figedgeport diagramsettings suppresswarnings figedgeport private void initialize invisible allowed true big port new fig circle 0 0 1 1 line color fill color add fig big port invisibleallowed bigport figcircle line_color fill_color addfig bigport param owner owning uml element param bounds ignored param settings ignored public fig edge port object owner rectangle bounds diagram settings settings super owner bounds settings initialize figedgeport diagramsettings see org tigris gef presentation fig hit java awt rectangle override public boolean hit rectangle r return false override deprecated public void set owner object own big port set owner own super set owner own setowner bigport setowner setowner override public object get owner if super get owner null return super get owner fig group this while group null group instanceof fig edge group group get group if group null return null else return group get owner getowner getowner getowner figedge getgroup getowner used by pgml tee override public string class name and bounds return get class get name getx gety get width get height classnameandbounds getclass getname getwidth getheight see org tigris gef presentation fig node hit port int int override public object hit port int x int y return null fignode hitport hitport see org tigris gef presentation fig group hit fig java awt rectangle override public fig hit fig rectangle r return null figgroup hitfig hitfig see org tigris gef presentation fig is selectable override public boolean is selectable return false isselectable isselectable see org tigris gef presentation fig node get port fig java lang object public fig get port fig object port return big port fignode getportfig getportfig bigport see org argouml ui explorer rules perspective rule get rule name public string get rule name return translator localize misc summary incoming dependency perspectiverule getrulename getrulename public collection get children object parent if parent instanceof incoming dependency node list list new array list iterator it model get facade get supplier dependencies incoming dependency node parent get parent iterator while it has next object next it next if model get facade isa abstraction next list add next return list return collections empty set getchildren incomingdependencynode arraylist getfacade getsupplierdependencies incomingdependencynode getparent hasnext getfacade isaabstraction empty_set public set get dependencies object parent if parent instanceof incoming dependency node set set new hash set set add incoming dependency node parent get parent return set return collections empty set getdependencies incomingdependencynode hashset incomingdependencynode getparent empty_set constructor public uml reception specification document super specification umlreceptionspecificationdocument protected void set property string text if model get facade isa reception get target model get common behavior helper set specification get target text setproperty getfacade isareception gettarget getcommonbehaviorhelper setspecification gettarget protected string get property if model get facade isa reception get target return model get facade get specification get target return null getproperty getfacade isareception gettarget getfacade getspecification gettarget this function calculates the default url to describe this critic return the url in string format public final string default more infourl string cls name get class get name cls name cls name substring cls name last index of 1 return application version get manual for critic cls name defaultmoreinfourl clsname getclass getname clsname clsname clsname lastindexof applicationversion getmanualforcritic clsname construct a new critic instance typically only one instance of each critic class is created and stored in a static variable as per the singleton pattern each domain extension should define a static initializer block to make one instance of each critic and call link agency register critic object with that instance public critic todo this is a hack a much better way of doing this would be not to start the critic in the first place if configuration get boolean get critic key true add control rec enabled boolean true is active true else add control rec enabled boolean false is active false add control rec snooze order new snooze order critic type correctness knowledge types add kt correctness decision category checking more infourl default more infourl description translator localize misc critic no description headline translator message format misc critic default headline new object get class get name priority to do item med priority getboolean getcritickey addcontrolrec isactive addcontrolrec isactive addcontrolrec snooze_order snoozeorder critictype knowledgetypes kt_correctness decisioncategory moreinfourl defaultmoreinfourl messageformat getclass getname todoitem med_priority returns the link org argouml configuration configuration key that the critic uses to determine if it is enabled or disabled p the string resulting from the configuration key code argo critic critic category critic name code p code critic category code would describe the type of critic and is taken from link get critic category p code critic name code would describe the function of the critic and is taken from link get critic name p some examples p ul li argo critic layout overlap li argo critic uml reserved word li argo critic java reserved word li argo critic idl reserved word ul see org argouml configuration configuration make key string string string see get critic category see get critic name since 0 9 4 return the key public configuration key get critic key return configuration make key critic get critic category get critic name configurationkey configurationkey critic_category critic_name critic_category getcriticcategory critic_name getcriticname reservedword reservedword reservedword makekey getcriticcategory getcriticname configurationkey getcritickey makekey getcriticcategory getcriticname returns a default critic category critics should override this to provide specific classification information since 0 9 4 return a default category public string get critic category return translator localize misc critic unclassified getcriticcategory returns a default critic name by default this is the simple class name critic implementations should override this to provide a better more descriptive string since 0 9 4 return a default critic name public string get critic name return get class get name substring get class get name last index of 1 getcriticname getclass getname getclass getname lastindexof examine the given object and designer and if appropriate produce one or more to do item s and add them to the offending design material s and the designer s to do list by default this is basically a simple if statement that relies on predicate to determine if there is some appropriate feedback and to do item to produce the to do item the predicate and to do item pair of methods is simple and convient for many critics more sophisticated critics that produce more than one to do item per critiquing or that produce to do item s that contain information that was already computed in the predicate should override critique if you override this method you should call super critique see critic predicate see critic to do item param dm the design material param dsgr the designer public void critique object dm designer dsgr the following debug line is now the single most memory consuming line in the whole of argouml it allocates approximately 18 of all memory allocated suggestions for solutions check if there is a log debug string string method that can be used instead use two calls for now i linus just comment it out log debug applying critic headline if predicate dm dsgr log debug predicate returned true creating to do item to do item item to do item dm dsgr post item item dm dsgr todoitem todolist todoitem todoitem todoitem todoitem todoitem todoitem _headline todoitem todoitem todoitem postitem param item the todo item param dm the designmaterial offender to be informed param dsgr the designer public void post item to do item item object dm designer dsgr if dm instanceof offender offender dm inform item dsgr inform item postitem todoitem perform the critic s analysis of the design subclasses should test the given object to make sure that it is the type of object that is expected each object in the design registers its own critics with the run time system the dm parameter is bound to each design object that registered this critic one per call returning true means that feedback should be delivered to the designer by convention subclasses should return their superclass predicate method if their own predicate would return false param dm the design material which is to be checked param dsgr the designer return the critic result public boolean predicate object dm designer dsgr return false return true iff the given to do item is still valid and should be kept in the given designers to do list critics that are not enabled should always return false so that their to do items will be removed subclasses of critic that supply multiple offenders should always override this method p by default this method basically asks the critic to again critique the offending object and then it checks if the resulting to do item is the same as the one already posted this is simple and it works fine for light weight critics critics that expend a lot of computational effort in making feedback that can be easily check to see if it still holds should override this method p todo maybe to do item should carry some data to make this method more efficient inherit doc public boolean still valid to do item i designer dsgr if is active log warn got to stillvalid while not active return false if i get offenders size 1 return true if predicate i get offenders get 0 dsgr now we know that this critic is still valid what we need to figure out is if the corresponding to do item is still valid the to do item is to be replaced if the name of some offender has changed that affects its description or if the contents of the list of offenders has changed we check that by creating a new to do item and then verifying that it looks exactly the same this really creates a lot of to do items that goes to waste to do item item to do item i get offenders get 0 dsgr return item equals i return false todoitem todolist todoitems todoitem todoitem inheritdoc stillvalid todoitem isactive getoffenders getoffenders todoitem todoitem todoitem getoffenders see org argouml cognitive poster supports org argouml cognitive decision public boolean supports decision d return supported decisions contains d supporteddecisions public list decision get supported decisions return supported decisions getsupporteddecisions supporteddecisions param d the decision public void add supported decision decision d supported decisions add d addsupporteddecision supporteddecisions see org argouml cognitive poster supports org argouml cognitive goal public boolean supports goal g return supported goals contains g supportedgoals public list goal get supported goals return supported goals getsupportedgoals supportedgoals param g the goal public void add supported goal goal g supported goals add g addsupportedgoal supportedgoals see org argouml cognitive poster contains knowledge type java lang string public boolean contains knowledge type string type return knowledge types contains type containsknowledgetype containsknowledgetype knowledgetypes param type the knowledgetype public void add knowledge type string type knowledge types add type addknowledgetype knowledgetypes return the knowledgetypes public list set string get knowledge types return knowledge types listset getknowledgetypes knowledgetypes param kt the knowledgetypes public void set knowledge types list set string kt knowledge types kt setknowledgetypes listset knowledgetypes reset all knowledgetypes and add the given one param t1 the only knowledgetype in string format public void set knowledge types string t1 knowledge types new list set string add knowledge type t1 setknowledgetypes knowledgetypes listset addknowledgetype reset all knowledgetypes and add the given ones param t1 a knowledgetype in string format param t2 a knowledgetype in string format public void set knowledge types string t1 string t2 knowledge types new list set string add knowledge type t1 add knowledge type t2 setknowledgetypes knowledgetypes listset addknowledgetype addknowledgetype reset all knowledgetypes and add the given ones param t1 a knowledgetype in string format param t2 a knowledgetype in string format param t3 a knowledgetype in string format public void set knowledge types string t1 string t2 string t3 knowledge types new list set string add knowledge type t1 add knowledge type t2 add knowledge type t3 setknowledgetypes knowledgetypes listset addknowledgetype addknowledgetype addknowledgetype param s the reason return the code for the given reason public static int reason code for string s return 1 s hash code 62 reasoncodefor hashcode return the trigger mask public long get trigger mask return trigger mask gettriggermask triggermask param s the trigger to be added is o red into the mask public void add trigger string s int new code reason code for s trigger mask new code ored addtrigger newcode reasoncodefor triggermask newcode param pattern code the mask to be checked return true if it matches a trigger public boolean match reason long pattern code return trigger mask 0 trigger mask pattern code 0 patterncode matchreason patterncode triggermask triggermask patterncode see org argouml cognitive poster expand java lang string org argouml cognitive list set public string expand string desc list set offs return desc listset listset see org argouml cognitive poster get clarifier public icon get clarifier return clarifier getclarifier getclarifier reply true iff this critic can execute this fact is normally determined by a control mech return true iff this critic can execute controlmech make this critic active from now on it can be applied to a design material in critiquing public void be active if is active configuration set boolean get critic key true is active true set changed notify observers this beactive isactive setboolean getcritickey isactive setchanged notifyobservers make this critic inactive from now on it will be idle and will not be applied to a design material in critiquing public void be inactive if is active configuration set boolean get critic key false is active false set changed notify observers this beinactive isactive setboolean getcritickey isactive setchanged notifyobservers add some attribute used by control mech to determine if this critic should be active critics store control record so that stateful control mech s do not need to store a parallel data structure but critic s do not directy use or modify this data param name the key param control data the value return the previous value of the specified key in this hashtable or code null code if it did not have one public object add control rec string name object control data return control recs put name control data controlmech controlmech controldata addcontrolrec controldata controlrecs controldata reply the named control record or null if not defined param name the key return the value public object get control rec string name return control recs get name getcontrolrec controlrecs this is a convient method for accessing one well known control record the enabled control record is a boolean that the user can turn on or off to manually enable or disable this critic it is normally combined with other control mech determinations with a logic and return true if enabled public boolean is enabled if this get critic name null this get critic name equals cr no guard system current time millis return boolean get control rec enabled boolean value controlmech isenabled getcriticname getcriticname crnoguard currenttimemillis getcontrolrec booleanvalue param e the value to be set for the key enabled public void set enabled boolean e boolean enabled bool e boolean true boolean false add control rec enabled enabled bool setenabled enabledbool addcontrolrec enabledbool reply the snooze order that is defined for this critic return the snooze order public snooze order snooze order return snooze order get control rec snooze order snoozeorder snoozeorder snoozeorder snoozeorder getcontrolrec snooze_order disable this critic for the next few minutes public void snooze snooze order snooze snoozeorder public void snooze snooze order snooze lift any previous snooze order public void unsnooze snooze order unsnooze snoozeorder snoozeorder snoozeorder checks if the critic is currently snoozed return true if the critic is snoozed public boolean is snoozed return snooze order get snoozed issnoozed snoozeorder getsnoozed reply true if this critic is relevant to the decisions that the designer is considering by default just asks the designer if he she is considering my decision category really this is something for a control mech to compute but if a subclass of critic encapsulates some information you may need to override this method param dsgr the designer return true if relevant public boolean is relevant to decisions designer dsgr for decision d get supported decisions todo make use of the constants defined in the to do item class if d get priority 0 d get priority get priority return true return false decisioncategory controlmech isrelevanttodecisions getsupporteddecisions todoitem getpriority getpriority getpriority reply true iff this critic is relevant to the goals that the designer is trying to achieve by default all critic s are relevant regardless of the goal model really this is something for a control mech to compute but if a subclass of critic encapsulates some information you may need to override this method p todo i would like a better default action but goals are typed and their values must be interperted by critics they are not as generic as the decision model param dsgr the designer return true if relevant public boolean is relevant to goals designer dsgr return true goalmodel controlmech decisionmodel isrelevanttogoals create a new wizard to help the user fix the identified problem this version assumes subclasses override get wiz class to return the appropriate class of wizard critic subclasses that need to initialize their wizard might override this to call super make wizard and then work with the result param item the todo item return the wizard public wizard make wizard to do item item class wiz class get wizard class item if wiz class is not a subclass of wizard print a warning if wiz class null try wizard w wizard wiz class new instance w set to do item item init wizard w return w catch illegal access exception ill ex log error could not access wizard ill ex catch instantiation exception inst ex log error could not instantiate wizard inst ex return null getwizclass makewizard makewizard todoitem wizclass getwizardclass wizclass wizclass wizclass newinstance settodoitem initwizard illegalaccessexception illex illex instantiationexception instex instex return the class of wizard that can fix the problem identifed by this critic this method returns null subclasses with wizards should override it param item the todo item return null if no wizard is defined public class get wizard class to do item item return null getwizardclass todoitem initialize a newly created wizard with information found by the critic this is called right after the wizard is made in make wizard and after the wizard s to do item is set any critic that supports wizards should probably override this method and call super init wizard first param w the wizard public void init wizard wizard w makewizard todoitem initwizard initwizard reply a string used to determine if this critic would be relevant to current design decisions strings returned from here are compared to strings in the decision model return the decision category public string get decision category return decision category decisionmodel getdecisioncategory decisioncategory set the decision category usually done in the constructor i have not yet thought of a case where dynamically changing the critic s decision category is useful param c the category protected void set decision category string c decision category c decisioncategory decisioncategory setdecisioncategory decisioncategory reply a string used to contol critics according to type examples include correctness completeness consistency optimization presentation and alternative return the critic knowledge type public string get critic type return critic type getcritictype critictype reply the headline used in feedback produced by this critic param dm the design material param dsgr the designer return the headline public string get headline object dm designer dsgr return get headline getheadline getheadline reply the headline used in feedback produced by this critic param offenders the set of offenders param dsgr the designer return the headline public string get headline list set offenders designer dsgr return get headline offenders get 0 dsgr getheadline listset getheadline reply the headline used in feedback produced by this critic return the headline public string get headline return headline getheadline set the headline used in feedback produced by this critic param h the headline public void set headline string h headline h setheadline reply the priority used in feedback produced by this critic param offenders the offenders param dsgr the designer return the priority public int get priority list set offenders designer dsgr return priority getpriority listset param p the priority public void set priority int p priority p setpriority return the priority public int get priority return priority getpriority reply the description used in feedback produced by this critic param offenders the offenders param dsgr the designer return the description public string get description list set offenders designer dsgr return description getdescription listset param d the description public void set description string d description d setdescription return the description public string get description template return description getdescriptiontemplate reply the more infourl used in feedback produced by this critic param offenders the offenders param dsgr the designer return the more info url public string get more infourl list set offenders designer dsgr return more infourl moreinfourl getmoreinfourl listset moreinfourl param m the more info url public void set more infourl string m more infourl m setmoreinfourl moreinfourl return the more info url public string get more infourl return get more infourl null null getmoreinfourl getmoreinfourl param name the key param value the value deprecated for 0 25 4 by linus tolke this way of storing information encourages violation of type safety create member attributes instead deprecated protected void set arg string name object value args put name value setarg param name the key return the value deprecated for 0 25 4 by linus tolke this way of storing information encourages violation of type safety create member attributes instead deprecated protected object get arg string name return args get name getarg return the key value pairs deprecated for 0 25 4 by linus tolke this way of storing information encourages violation of type safety create member attributes instead deprecated public hashtable string object get args return args getargs param h the new table of key value pairs deprecated for 0 25 4 by linus tolke this way of storing information encourages violation of type safety create member attributes instead deprecated public void set args hashtable string object h args h setargs get the design materials to be criticized by this critic return the design materials public set object get criticized design materials set object ret new hash set object return ret getcriticizeddesignmaterials hashset reply the to do item that the designer should see iff predicate returns true by default it just fills in the fields of the to do item from accessor methods of this critic critic subclasses may override this method or the accessor methods to add computed fields to the to do item todo critic s may want to add new fields to a to do item to make still valid more efficent see critic critique param dm the offender param dsgr the designer return to do item public to do item to do item object dm designer dsgr return new to do item this dm dsgr todoitem todoitem todoitem todoitem stillvalid todoitem todoitem todoitem todoitem see critic fix it public boolean can fix it to do item item return false fixit canfixit todoitem see org argouml cognitive poster fix it org argouml cognitive to do item java lang object public void fix it to do item item object arg fixit todoitem fixit todoitem override public string to string return get critic name return get headline tostring getcriticname getheadline instantiation not allowed static methods only private diagram utils not allowed diagramutils return the diagram containing the mouse or which most recently contained the mouse public static argo diagram get active diagram layer perspective layer get active layer if layer null return argo diagram layer get diagram log debug no active diagram return null argodiagram getactivediagram layerperspective getactivelayer argodiagram getdiagram return the active diagram layer if the currently active layer is not a layer perspective it can t be associated with a diagram so return null private static layer perspective get active layer editor editor globals cur editor if editor null layer manager manager editor get layer manager if manager null layer layer manager get active layer if layer instanceof layer perspective return layer perspective layer return null layerperspective layerperspective getactivelayer cureditor layermanager getlayermanager getactivelayer layerperspective layerperspective the constructor public cr consider facade setup head and desc add supported decision uml decision patterns add trigger owned element crconsiderfacade setupheadanddesc addsupporteddecision umldecision addtrigger ownedelement java lang object org argouml cognitive designer public boolean predicate2 object dm designer dsgr todo add implementation return no problem no_problem creates a new horizontal fig message port that s not displayed param owner the message that the fig message port represents param x first x coordinate param y y coordinate param x2 second x coordinate public fig message port object owner int x int y int x2 super set owner owner fig line my line new fig line x y x2 y line color add fig my line set visible false figmessageport figmessageport figmessageport setowner figline myline figline line_color addfig myline setvisible public void add fig fig to add if to add instanceof fig line throw new illegal argument exception unexpect fig to add if get figs size 0 to add set visible false super add fig to add else is this an error condition also addfig toadd toadd figline illegalargumentexception toadd getfigs toadd setvisible addfig toadd protected void set bounds impl int x int y int w int h if w 20 throw new illegal argument exception if get figs size 0 get my line set shape x y x w y calc bounds setboundsimpl illegalargumentexception getfigs getmyline setshape calcbounds public void calc bounds if get figs size 0 fig line line get my line x line getx y line gety w line get width h 1 fire prop change bounds null null calcbounds getfigs figline getmyline _x _y _w getwidth _h firepropchange creates a new fig message port that s not displayed used when loading pgml public fig message port object owner set visible false set owner owner figmessageport figmessageport setvisible setowner public list get gravity points array list ret new array list fig line my line get my line point p1 new point my line getx my line gety point p2 new point my line getx my line get width my line gety my line get height ret add p1 ret add p2 return ret getgravitypoints arraylist arraylist figline myline getmyline myline myline myline myline getwidth myline myline getheight message node get node if node null fig classifier role this get group get group set matching node this return node messagenode getnode figclassifierrole getgroup getgroup setmatchingnode void set node message node n node n setnode messagenode todo question how does this differ to gety public int gety1 return get my line gety1 getmyline private fig line get my line return fig line get figs get 0 figline getmyline figline getfigs looks for profiles in the jars in the directories used by the module loader to load modules public void do load list string ext dirs module loader2 get instance get extension locations for string ext dir ext dirs hunt for profiles in dir ext dir moduleloader doload extdirs moduleloader2 getinstance getextensionlocations extdir extdirs huntforprofilesindir extdir private void hunt for profiles in dir string dir log info looking for profiles in dir file extension dir new file dir if extension dir is directory file files extension dir list files new jar file filter for file file files jar file jarfile null try jarfile new jar file file if jarfile null log info looking for profiles in the jar jarfile get name class loader classloader new url class loader new url file touri tourl load profiles from jar file jarfile get manifest file classloader catch io exception ioe log debug cannot open jar file file ioe huntforprofilesindir extensiondir extensiondir isdirectory extensiondir listfiles jarfilefilter jarfile jarfile getname classloader urlclassloader loadprofilesfromjarfile getmanifest ioexception interprets the manifest file in the jar in order to load the declared profile param file the file object referencing the jar param manifest the manifest file of the jar param classloader the classloader that loads the classes referenced by the jar private void load profiles from jar file manifest manifest file file class loader classloader map string attributes entries manifest get entries boolean class loader already added false for string entry name entries key set attributes attr entries get entry name if new boolean attr get value profile boolean value try we only need to add the classloader once and if and only if there is at least a profile in the jar if class loader already added translator add class loader classloader class loader already added true set critic critics load java critics for profile attr classloader string model path attr get value model url modelurl null if model path null modelurl new url jar prefix file prefix file get canonical path model path user defined profile udp new user defined profile entry name modelurl critics load manifest dependencies for profile attr profile facade get manager register profile udp log debug registered profile udp get display name catch profile exception e log error exception e catch io exception e log error exception e loadprofilesfromjarfile classloader getentries classloaderalreadyadded entryname keyset entryname getvalue booleanvalue classloaderalreadyadded addclassloader classloaderalreadyadded loadjavacriticsforprofile modelpath getvalue modelpath jar_prefix file_prefix getcanonicalpath modelpath userdefinedprofile userdefinedprofile entryname loadmanifestdependenciesforprofile profilefacade getmanager registerprofile getdisplayname profileexception ioexception resolves the dependencies for a profile param attr a group of attributes in the manifest file for this jar return the set of defined profiles private set string load manifest dependencies for profile attributes attr set string ret new hash set string string value attr get value depends on if value null string tokenizer st new string tokenizer value while st has more elements string entry st next token trim ret add entry return ret loadmanifestdependenciesforprofile hashset getvalue stringtokenizer stringtokenizer hasmoreelements nexttoken loads the java critics defined by a profile param attr the manifest section of the profile param classloader the classloader of the jar return the set of defined critics private set critic load java critics for profile attributes attr class loader classloader set critic ret new hash set critic string value attr get value java critics if value null string tokenizer st new string tokenizer value while st has more elements string entry st next token trim try class cl classloader load class entry critic critic critic cl new instance ret add critic catch class not found exception e log error error loading class entry e catch instantiation exception e log error error instantianting class entry e catch illegal access exception e log error exception e return ret loadjavacriticsforprofile classloader hashset getvalue stringtokenizer stringtokenizer hasmoreelements nexttoken loadclass newinstance classnotfoundexception instantiationexception illegalaccessexception public boolean accept file pathname return pathname can read pathname is file pathname get path to lower case ends with jar canread isfile getpath tolowercase endswith default constructor for a link fig signal deprecated for 0 27 3 by tfmorris use link fig signal object rectangle diagram settings suppress warnings deprecation deprecated public fig signal super construct figs figsignal figsignal diagramsettings suppresswarnings figsignal constructfigs private void construct figs get stereotype fig set keyword signal add fig get big port add fig get stereotype fig add fig get name fig add fig get operations fig add fig get attributes fig add fig border fig by default do not show operations nor attributes set operations visible false set attributes visible false constructfigs getstereotypefig setkeyword addfig getbigport addfig getstereotypefig addfig getnamefig addfig getoperationsfig addfig getattributesfig addfig borderfig setoperationsvisible setattributesvisible constructor for use if this figure is created for an existing interface node in the metamodel param gm not actually used in the current implementation param node the uml object being placed deprecated for 0 27 3 by tfmorris use link fig signal object rectangle diagram settings suppress warnings deprecation deprecated public fig signal suppress warnings unused graph model gm object node this set owner node figsignal diagramsettings suppresswarnings figsignal suppresswarnings graphmodel setowner construct a fig representing a signal param owner owning signal param bounds position and size param settings render settings public fig signal object owner rectangle bounds diagram settings settings super owner bounds settings construct figs figsignal diagramsettings constructfigs see org argouml uml diagram static structure ui fig data type make selection override public selection make selection return new selection signal this static_structure figdatatype makeselection makeselection selectionsignal override public vector get pop up actions mouse event me vector pop up actions super get pop up actions me todo do we have anything to add here return pop up actions getpopupactions mouseevent popupactions getpopupactions popupactions override protected void model changed property change event mee super model changed mee if mee instanceof association change event mee instanceof attribute change event rendering changed update listeners get owner get owner modelchanged propertychangeevent modelchanged associationchangeevent attributechangeevent renderingchanged updatelisteners getowner getowner constructor for uml model element client dependency list model public uml model element client dependency list model super client dependency model get meta types get dependency umlmodelelementclientdependencylistmodel umlmodelelementclientdependencylistmodel clientdependency getmetatypes getdependency protected void build model list if get target null set all elements model get facade get client dependencies get target buildmodellist gettarget setallelements getfacade getclientdependencies gettarget see org argouml uml ui uml model element list model2 is valid element object protected boolean is valid element object o return model get facade isa dependency o model get facade get client dependencies get target contains o umlmodelelementlistmodel2 isvalidelement isvalidelement getfacade isadependency getfacade getclientdependencies gettarget construct a property panel for an instance with the given name icon and orientation param name the name for the properties panel param icon the icon shown next to the name public prop panel instance string name image icon icon super name icon proppanelinstance imageicon return the scrollpane for stimuli sender protected j panel get stimuli sender scroll if stimuli sender scroll null stimuli sender scroll get single row scroll stimuli sender list model return stimuli sender scroll jpanel getstimulisenderscroll stimulisenderscroll stimulisenderscroll getsinglerowscroll stimulisenderlistmodel stimulisenderscroll return the scrollpane for stimuli receiver protected j panel get stimuli receiver scroll if stimuli receiver scroll null stimuli receiver scroll get single row scroll stimuli receiver list model return stimuli receiver scroll jpanel getstimulireceiverscroll stimulireceiverscroll stimulireceiverscroll getsinglerowscroll stimulireceiverlistmodel stimulireceiverscroll return the meta type of the element that this mode is designed to create in the case the dependency metatype return the dependency meta type protected object get meta type return model get meta types get dependency getmetatype getmetatypes getdependency determine if the java runtime found is supported by the current version of argouml return true if the version of java is supported public static boolean is jre supported string java version system get property java version return java version starts with 1 4 java version starts with 1 3 java version starts with 1 2 java version starts with 1 1 isjresupported javaversion getproperty javaversion startswith javaversion startswith javaversion startswith javaversion startswith determine if the java runtime found is jre 5 p note that plugins should not rely on this method existing in it is likely to be removed without deprecation as soon as jre 5 is no longer supported return true if we re running on jre 5 public static boolean is jre5 string java version system get property java version return java version starts with 1 5 isjre5 javaversion getproperty javaversion startswith get the jre version described in system properties return the jre version public static string get jre version return system get property java version getjreversion getproperty see org argouml ui explorer rules perspective rule get rule name public string get rule name return translator localize misc state machine transition perspectiverule getrulename getrulename public collection get children object parent if model get facade isa state machine parent return model get facade get transitions parent return collections empty set getchildren getfacade isastatemachine getfacade gettransitions empty_set public set get dependencies object parent if model get facade isa state machine parent set set new hash set set add parent return set return collections empty set getdependencies getfacade isastatemachine hashset empty_set see org argouml ui explorer rules perspective rule get rule name public abstract string get rule name perspectiverule getrulename getrulename see org argouml ui explorer rules perspective rule get children java lang object public abstract collection get children object parent perspectiverule getchildren getchildren see java lang object to string public string to string return get rule name tostring tostring getrulename private date now new date private date get now now set time system current time millis return now getnow settime currenttimemillis the constructor public snooze order in the past 0 milliseconds after january 1 1970 00 00 00 gmt snooze until new date 0 snooze again new date 0 snoozeorder snoozeuntil snoozeagain return true if snoozed public boolean get snoozed return snooze until after get now getsnoozed snoozeuntil getnow param h if true then snooze else unsnooze public void set snoozed boolean h if h snooze else unsnooze setsnoozed snooze the critic public void snooze if snooze again after get now interval next interval interval else interval initial interval ms long n get now get time snooze until set time n interval snooze again set time n interval initial interval ms log info setting snooze order to snooze until to string snoozeagain getnow nextinterval initial_interval_ms getnow gettime snoozeuntil settime snoozeagain settime initial_interval_ms snoozeuntil tostring unsnooze the critic public void unsnooze in the past 0 milliseconds after january 1 1970 00 00 00 gmt snooze until new date 0 snoozeuntil param last the previous interval return the next longer interval protected long next interval long last by default double the snooze interval each time return last 2 nextinterval param f the fig that is selected public selection call state fig f super f selectioncallstate see org argouml uml diagram activity ui selection action state get new node type int protected object get new node type int button code return model get meta types get call state selectionactionstate getnewnodetype getnewnodetype buttoncode getmetatypes getcallstate see org tigris gef base selection buttons get new node int protected object get new node int button code return model get activity graphs factory create call state selectionbuttons getnewnode getnewnode buttoncode getactivitygraphsfactory createcallstate see org argouml ui explorer rules perspective rule get rule name public string get rule name return translator localize misc package base class perspectiverule getrulename getrulename public collection get children object parent if model get facade isa package parent collection result new array list collection generalizable elements model get model management helper get all model elements of kind parent model get meta types get generalizable element for object element generalizable elements if model get facade get generalizations element is empty result add element return result return collections empty list getchildren getfacade isapackage arraylist generalizableelements getmodelmanagementhelper getallmodelelementsofkind getmetatypes getgeneralizableelement generalizableelements getfacade getgeneralizations isempty empty_list public set get dependencies object parent if model get facade isa package parent set set new hash set set add parent return set return collections empty set getdependencies getfacade isapackage hashset empty_set creates a new instance of perspective combobox public perspective combo box the default nr of rows is 8 but since we have 9 perspectives by default now setting to 9 is nicer this set maximum row count 9 perspective manager get instance add listener this perspectivecombobox perspectivecombobox setmaximumrowcount perspectivemanager getinstance addlistener see org argouml ui explorer perspective manager listener add perspective java lang object public void add perspective object perspective add item perspective perspectivemanagerlistener addperspective addperspective additem see org argouml ui explorer perspective manager listener remove perspective java lang object public void remove perspective object perspective remove item perspective perspectivemanagerlistener removeperspective removeperspective removeitem checks if the current thread throws interrupted exception if the current thread was interrupted public static void check if interrupted throws interrupted exception make this thread interruptible if called from swing worker if thread interrupted throw new interrupted exception interruptedexception checkifinterrupted interruptedexception swingworker interruptedexception return the instance singleton public static explorer event adaptor get instance if instance null instance new explorer event adaptor return instance explorereventadaptor getinstance explorereventadaptor creates a new instance of exploreruml event adaptor private explorer event adaptor configuration add listener notation key use guillemots this configuration add listener notation key show stereotypes this project manager get manager add property change listener this todo we really only care about events which affect things that are visible in the current perspective view this could be tailored to cut down on event traffic tfm 20060410 model get pump add class model event listener this model get meta types get model element string null argo event pump add listener argo event types any profile event new profile change listener explorerumleventadaptor explorereventadaptor addlistener key_use_guillemots addlistener key_show_stereotypes projectmanager getmanager addpropertychangelistener getpump addclassmodeleventlistener getmetatypes getmodelelement argoeventpump addlistener argoeventtypes any_profile_event profilechangelistener the tree structure has changed significantly inform the associated tree model todo this shouldn t be public components desiring to inform the explorer of changes should send events deprecated by mvw in v0 25 4 use events instead deprecated public void structure changed if tree model null return tree model structure changed structurechanged treemodel treemodel structurechanged forwards this event to the tree model param element the modelelement to be added todo this shouldn t be public components desiring to inform the explorer of changes should send events public void model element added object element if tree model null return tree model model element added element modelelementadded treemodel treemodel modelelementadded forwards this event to the tree model param element the modelelement to be changed todo this shouldn t be public components desiring to inform the explorer of changes should send events public void model element changed object element if tree model null return tree model model element changed element modelelementchanged treemodel treemodel modelelementchanged sets the tree model that will receive events param new tree model the tree model to be used public void set tree modeluml event listener tree modeluml event listener new tree model tree model new tree model newtreemodel settreemodelumleventlistener treemodelumleventlistener newtreemodel treemodel newtreemodel listens to events coming from the project manager config manager and uml model passes those events on to the explorer model since argo0 11 2 see property change listener property change java beans property change event public void property change final property change event pce if tree model null return uml model events if pce instanceof uml change event runnable do work runnable new runnable public void run try model changed uml change event pce catch invalid element exception e if log is debug enabled log debug update layout method accessed deleted element e swing utilities invoke later do work runnable else if pce get property name equals todo no one should be sending the deprecated event from outside argouml but keep responding to it for now just in case project manager current project property name pce get property name equals project manager open projects property project events if pce get new value null tree model structure changed return else if notation key use guillemots is changed property pce notation key show stereotypes is changed property pce notation events tree model structure changed else if pce get source instanceof project manager handle remove for non uml elements e g diagrams if remove equals pce get property name tree model model element removed pce get old value propertychangelistener propertychange propertychangeevent propertychange propertychangeevent treemodel umlchangeevent doworkrunnable modelchanged umlchangeevent invalidelementexception isdebugenabled updatelayout swingutilities invokelater doworkrunnable getpropertyname projectmanager current_project_property_name getpropertyname projectmanager open_projects_property getnewvalue treemodel structurechanged key_use_guillemots ischangedproperty key_show_stereotypes ischangedproperty treemodel structurechanged getsource projectmanager getpropertyname treemodel modelelementremoved getoldvalue runnable do work runnable new runnable public void run try model changed uml change event pce catch invalid element exception e if log is debug enabled log debug update layout method accessed deleted element e doworkrunnable modelchanged umlchangeevent invalidelementexception isdebugenabled updatelayout private void model changed uml change event event if event instanceof attribute change event todo can this be made more restrictive do we care about any attributes other than name tfm tree model model element changed event get source else if event instanceof remove association event todo this should really be coded the other way round to only act on associations which are important for representing the current perspective and to only act on a single end of the association tfm if namespace equals event get property name tree model model element changed remove association event event get changed value else if event instanceof add association event if namespace equals event get property name tree model model element added add association event event get source else if event instanceof delete instance event tree model model element removed delete instance event event get source modelchanged umlchangeevent attributechangeevent treemodel modelelementchanged getsource removeassociationevent getpropertyname treemodel modelelementchanged removeassociationevent getchangedvalue addassociationevent getpropertyname treemodel modelelementadded addassociationevent getsource deleteinstanceevent treemodel modelelementremoved deleteinstanceevent getsource class profile change listener implements argo profile event listener public void profile added argo profile event e structure changed profilechangelistener argoprofileeventlistener profileadded argoprofileevent structurechanged public void profile removed argo profile event e structure changed profileremoved argoprofileevent structurechanged the constructor settings tab modules the creation of the actual gui elements is deferred until they are actually needed otherwize we have problems with the initialization settingstabmodules class module table model extends abstract table model constructor public module table model object arr module loader2 all modules to array elements new object arr length 2 for int i 0 i elements length i elements i 0 arr i elements i 1 boolean value of module loader2 is selected string arr i moduletablemodel abstracttablemodel moduletablemodel moduleloader2 allmodules toarray valueof moduleloader2 isselected see javax swing table table model get column count public int get column count return column names length tablemodel getcolumncount getcolumncount columnnames see javax swing table table model get column name int public string get column name int col return column names col tablemodel getcolumnname getcolumnname columnnames see javax swing table table model get row count public int get row count return elements length tablemodel getrowcount getrowcount public object get value at int row int col if row elements length return elements row col else return null getvalueat java lang object int int public void set value at object ob int row int col elements row col ob setvalueat public class get column class int col switch col case 0 return string class case 1 return boolean class default return null getcolumnclass see javax swing table table model is cell editable int int public boolean is cell editable int row int col return col 1 row elements length tablemodel iscelleditable iscelleditable public void handle settings tab refresh table set model new module table model string buffer sb new string buffer list locations module loader2 get instance get extension locations for iterator it locations iterator it has next sb append string it next sb append n field all ext dirs set text sb substring 0 sb length 1 to string handlesettingstabrefresh setmodel moduletablemodel stringbuffer stringbuffer moduleloader2 getinstance getextensionlocations hasnext fieldallextdirs settext tostring public void handle settings tab save if elements null for int i 0 i elements length i module loader2 set selected string elements i 0 boolean elements i 1 boolean value module loader2 do load false handlesettingstabsave moduleloader2 setselected booleanvalue moduleloader2 doload see gui settings tab interface handle settings tab cancel public void handle settings tab cancel do nothing the next time we refresh we will fetch the values again guisettingstabinterface handlesettingstabcancel handlesettingstabcancel see gui settings tab interface get tab key public string get tab key return tab modules guisettingstabinterface gettabkey gettabkey public j panel get tab panel if table null set layout new border layout table new j table new module table model table set auto resize mode j table auto resize last column table set show vertical lines true add new j scroll pane table border layout center int label gap 10 int component gap 5 j panel top new j panel new labelled layout label gap component gap j label label new j label translator localize label extension directories j text field j new j text field field all ext dirs j field all ext dirs set enabled false label set label for field all ext dirs top add label top add field all ext dirs add top border layout north return this jpanel gettabpanel setlayout borderlayout jtable moduletablemodel setautoresizemode jtable auto_resize_last_column setshowverticallines jscrollpane borderlayout labelgap componentgap jpanel jpanel labelledlayout labelgap componentgap jlabel jlabel jtextfield jtextfield fieldallextdirs fieldallextdirs setenabled setlabelfor fieldallextdirs fieldallextdirs borderlayout see org argouml ui gui settings tab interface handle reset to default public void handle reset to default do nothing these buttons are not shown guisettingstabinterface handleresettodefault handleresettodefault constructor for prop paneluml sequence diagram public prop paneluml sequence diagram super translator localize label sequence diagram lookup icon sequence diagram proppanelumlsequencediagram proppanelumlsequencediagram lookupicon sequencediagram the constructor param n the not yet localized name param p the priority public decision string n int p name translator localize n priority p override public int hash code if name null return 0 return name hash code hashcode hashcode two decisions are considered to be equal if their names are equal the priority is not considered inherit doc override public boolean equals object d2 if d2 instanceof decision return false return decision d2 get name equals get name inheritdoc getname getname return the localized name public string get name return name getname param n the localized name public void set name string n name n setname return the priority public int get priority return priority getpriority param p the priority public void set priority int p priority p setpriority see java lang object to string override public string to string return get name tostring tostring getname the constructor param poster the poster param h the headline param p the priority param d the description param m the more info url param offs the offenders public to do item poster poster string h int p string d string m list set offs check offs offs the poster poster the headline h the offenders offs the priority p the description d the more infourl m the wizard null todoitem listset checkoffs theposter theheadline theoffenders thepriority thedescription themoreinfourl thewizard the constructor param poster the poster param h the headline param p the priority param d the description param m the more info url public to do item poster poster string h int p string d string m the poster poster the headline h the offenders new list set the priority p the description d the more infourl m the wizard null todoitem theposter theheadline theoffenders listset thepriority thedescription themoreinfourl thewizard the constructor param c the poster critic param dm a single offender param dsgr the designer public to do item critic c object dm designer dsgr check argument dm the poster c the headline c get headline dm dsgr the offenders new list set dm the priority c get priority the offenders dsgr the description c get description the offenders dsgr the more infourl c get more infourl the offenders dsgr the wizard c make wizard this todoitem checkargument theposter theheadline getheadline theoffenders listset thepriority getpriority theoffenders thedescription getdescription theoffenders themoreinfourl getmoreinfourl theoffenders thewizard makewizard the constructor param c the poster critic param offs the offenders param dsgr the designer public to do item critic c list set offs designer dsgr check offs offs the poster c the headline c get headline offs dsgr the offenders offs the priority c get priority the offenders dsgr the description c get description the offenders dsgr the more infourl c get more infourl the offenders dsgr the wizard c make wizard this todoitem listset checkoffs theposter theheadline getheadline theoffenders thepriority getpriority theoffenders thedescription getdescription theoffenders themoreinfourl getmoreinfourl theoffenders thewizard makewizard the constructor param c the poster critic public to do item critic c the poster c the headline c get headline the offenders new list set the priority c get priority null null the description c get description null null the more infourl c get more infourl null null the wizard c make wizard this todoitem theposter theheadline getheadline theoffenders listset thepriority getpriority thedescription getdescription themoreinfourl getmoreinfourl thewizard makewizard override in subclass to validate the offender is an expected type param dm the offender aka design material protected void check argument object dm checkargument check the offenders p this is called from the constructors where the offenders are given todo why do we only care about checking the first 2 offenders above param offs the offenders private void check offs list set offs if offs null throw new illegal argument exception a list set of offenders must be supplied object offender collection util get first item or null offs if offender null check argument offender if offs size 2 offender offs get 1 check argument offender checkoffs listset illegalargumentexception listset collectionutil getfirstitemornull checkargument checkargument return the headline public string get headline if cached expanded headline null cached expanded headline the poster expand the headline the offenders return cached expanded headline getheadline cachedexpandedheadline cachedexpandedheadline theposter theheadline theoffenders cachedexpandedheadline deprecated in 0 27 2 byb bob tarling a to do item should be immutable to guarantee it can be passed safely between threads only use the constructor to set this value param h the headline deprecated public void set headline string h the headline h cached expanded headline null todoitem setheadline theheadline cachedexpandedheadline return the description public string get description if cached expanded description null cached expanded description the poster expand the description the offenders return cached expanded description getdescription cachedexpandeddescription cachedexpandeddescription theposter thedescription theoffenders cachedexpandeddescription deprecated in 0 27 2 byb bob tarling a to do item should be immutable to guarantee it can be passed safely between threads only use the constructor to set this value param d the description deprecated public void set description string d the description d cached expanded description null todoitem setdescription thedescription cachedexpandeddescription return the more info url public string get more infourl return the more infourl getmoreinfourl themoreinfourl deprecated in 0 27 2 byb bob tarling a to do item should be immutable to guarantee it can be passed safely between threads only use the constructor to set this value param m the more info url deprecated public void set more infourl string m the more infourl m todoitem setmoreinfourl themoreinfourl return the priority public int get priority return the priority getpriority thepriority deprecated in 0 27 2 by bob tarling a to do item should be immutable to guarantee it can be passed safely between threads only use the constructor to set this value param p the priority deprecated public void set priority int p the priority p todoitem setpriority thepriority return the wizard progress an integer between 0 and 100 shows percent done public int get progress if the wizard null return the wizard get progress return 0 getprogress thewizard thewizard getprogress reply a set of design material s that are the subject of this to do item return the offenders todo offenders need to be more strongly typed tfm 20070630 public list set get offenders todo should not be using assert here but i don t want to change to illegal state exception at lead up to a release as i don t know how much testing is done with assert on assert the offenders null return the offenders todoitem listset getoffenders illegalstateexception theoffenders theoffenders set the design material that is subject of this to do item param offenders the offenders todo offenders need to be more strongly typed tfm 20070630 todo provide a constructor argument for this so that the class can become immutable deprecated in 0 27 2 by bob tarling a to do item should be immutable to guarantee it can be passed safely between threads only use the constructor to set this value deprecated public void set offenders list set offenders the offenders offenders todoitem todoitem setoffenders listset theoffenders reply the critic or designer that posted this to do item return the poster public poster get poster return the poster todoitem getposter theposter return a clarifier object that can graphical highlight this error in a design diagram return a clarifier for this todoitem if not found by the poster or null return an icon or null if none found public icon get clarifier return the poster get clarifier getclarifier theposter getclarifier return the wizard public wizard get wizard return the wizard getwizard thewizard param type the knowledgetype return true if the poster contains the given knowledgetype public boolean contains knowledge type string type return get poster contains knowledge type type containsknowledgetype getposter containsknowledgetype param d the decision return true if the decision is supported by the poster public boolean supports decision d return get poster supports d getposter param g the given goal return true if the poster supports the given goal public boolean supports goal g return get poster supports g getposter override public int hash code int code 0 code get headline hash code if get poster null code get poster hash code return code hashcode getheadline hashcode getposter getposter hashcode override public boolean equals object o if o instanceof to do item return false to do item i to do item o if get headline equals i get headline return false if get poster i get poster return false for some reason list set equals allocates a lot of memory well some memory at least lets try to avoid that when not needed by invoking this test only when the two previous tests are not decisive if get offenders equals i get offenders return false return true todoitem todoitem todoitem getheadline getheadline getposter getposter listset getoffenders getoffenders when a to do item is selected in the ui to do list window highlight the offending design material s public void select for object dm get offenders if dm instanceof highlightable highlightable dm set highlight true todoitem uitodolist getoffenders sethighlight when a to do item is deselected in the ui to do list window unhighlight the offending design material s public void deselect for object dm get offenders if dm instanceof highlightable highlightable dm set highlight false todoitem uitodolist getoffenders sethighlight the user has double clicked or otherwise indicated that they want to do something active with this item by default just re select it subclasses may choose to do more e g navigate to the offending item if it is not visible public void action deselect select notify the user interface that this to do item has changed currently this is used to update the progress bar public void changed to do list list designer the designer get to do list list fire to do item changed this todoitem todolist thedesigner gettodolist firetodoitemchanged some problems can be automatically fixed ask the critic to do it if it can p public void fix it the poster fix it this null fixit theposter fixit some problems can be automatically fixed ask the critic to do it if it can return true if the critic can automatically fix the problem public boolean can fix it return the poster can fix it this canfixit theposter canfixit reply true iff this to do item should be kept on the designer s to do list this should return false if the poster has been deactivated or if it can be determined that the problem that raised this issue is no longer present param d the given designer return true if the todoitem is still valid public boolean still valid designer d if the poster null return true if the wizard null the wizard is started the wizard is finished return true return the poster still valid this d todoitem todolist stillvalid theposter thewizard thewizard isstarted thewizard isfinished theposter stillvalid override public string to string return this get class get name get headline on get offenders to string tostring getclass getname getheadline getoffenders tostring constructor param stereotype param name fig head fig stereotype fig text name this stereotype fig stereotype this name fig name rect fig new fig rect 0 0 fig classifier role min head width fig classifier role min head height line color fill color add fig rect fig add fig name add fig stereotype fighead figtext stereotypefig namefig rectfig figrect figclassifierrole min_head_width figclassifierrole min_head_height line_color fill_color addfig rectfig addfig addfig override public dimension get minimum size int h fig classifier role min head height layer layer this get group get layer if layer null return new dimension fig classifier role min head width fig classifier role min head height list fig figs layer get contents for fig f figs if f instanceof fig classifier role fig classifier role other fig classifier role f int other height other get head fig get minimum height if other height h h other height int w name fig get minimum size width if stereotype fig is visible if stereotype fig get minimum size width w w stereotype fig get minimum size width if w fig classifier role min head width w fig classifier role min head width return new dimension w h getminimumsize figclassifierrole min_head_height getgroup getlayer figclassifierrole min_head_width figclassifierrole min_head_height getcontents figclassifierrole figclassifierrole figclassifierrole otherheight getheadfig getminimumheight otherheight otherheight namefig getminimumsize stereotypefig isvisible stereotypefig getminimumsize stereotypefig getminimumsize figclassifierrole min_head_width figclassifierrole min_head_width public int get minimum height int h name fig get minimum height if stereotype fig is visible h stereotype fig get minimum size height h 4 if h fig classifier role min head height h fig classifier role min head height return h getminimumheight namefig getminimumheight stereotypefig isvisible stereotypefig getminimumsize figclassifierrole min_head_height figclassifierrole min_head_height public void set bounds impl int x int y int w int h rect fig set bounds x y w h int yy y if stereotype fig is visible stereotype fig set bounds x yy w stereotype fig get minimum size height yy stereotype fig get minimum size height name fig set filled false name fig set line width 0 name fig set text color text color name fig set bounds x yy w name fig get height x x y y w w h h setboundsimpl rectfig setbounds stereotypefig isvisible stereotypefig setbounds stereotypefig getminimumsize stereotypefig getminimumsize namefig setfilled namefig setlinewidth namefig settextcolor text_color namefig setbounds namefig getheight _x _y _w _h see org tigris gef presentation fig set filled boolean public void set filled boolean b setfilled setfilled see org tigris gef presentation fig set line width int public void set line width int i setlinewidth setlinewidth constructor public uml behavioral feature query check box super translator localize checkbox query lc action set behavioral feature query get instance is query umlbehavioralfeaturequerycheckbox actionsetbehavioralfeaturequery getinstance isquery public void build model if get target null set selected model get facade is query get target buildmodel gettarget setselected getfacade isquery gettarget constructor public cr no outgoing transitions setup head and desc add supported decision uml decision state machines add trigger outgoing crnooutgoingtransitions setupheadanddesc addsupporteddecision umldecision state_machines addtrigger public boolean predicate2 object dm designer dsgr if model get facade isa state vertex dm return no problem object sv m state vertex dm if model get facade isa state sv object sm model get facade get state machine sv if sm null model get facade get top sm sv return no problem if model get facade isa pseudostate sv object k model get facade get kind sv if k equals model get pseudostate kind get choice return no problem if k equals model get pseudostate kind get junction return no problem collection outgoing model get facade get outgoings sv boolean needs outgoing outgoing null outgoing size 0 if model get facade isa final state sv needs outgoing false if needs outgoing return problem found return no problem getfacade isastatevertex no_problem mstatevertex getfacade isastate getfacade getstatemachine getfacade gettop no_problem getfacade isapseudostate getfacade getkind getpseudostatekind getchoice no_problem getpseudostatekind getjunction no_problem getfacade getoutgoings needsoutgoing getfacade isafinalstate needsoutgoing needsoutgoing problem_found no_problem public set object get criticized design materials set object ret new hash set object ret add model get meta types get state vertex return ret getcriticizeddesignmaterials hashset getmetatypes getstatevertex the constructor param ep the represented extension point public extension point notation uml object ep super ep extensionpointnotationuml public void parse object model element string text todo this try catch will be needed once the code below is improved try parse extension point fig model element text catch parse exception pe string msg statusmsg bar error parsing extensionpoint object args pe get localized message integer value of pe get error offset project browser get instance get status bar show status translator message format msg args modelelement parseextensionpointfig modelelement parseexception getlocalizedmessage valueof geterroroffset projectbrowser getinstance getstatusbar showstatus messageformat parse an extension point p the syntax is name location name location or the fields of the extension point are updated appropriately param ep the extension point concerned param text the text to parse public void parse extension point fig object ep string text we can do nothing if we don t have both the use case and extension point if ep null return object use case model get facade get use case ep if use case null return parse the string to creat a new extension point object new ep parse extension point text if we got back null we interpret this as meaning delete the reference to the extension point from the use case otherwise we set the fields of the extension point to the values in new ep if new ep null project manager get manager get current project move to trash ep else model get core helper set name ep model get facade get name new ep model get use cases helper set location ep model get facade get location new ep todo this needs more work we simply throw the new extension point away parseextensionpointfig usecase getfacade getusecase usecase newep parseextensionpoint newep newep projectmanager getmanager getcurrentproject movetotrash getcorehelper setname getfacade getname newep getusecaseshelper setlocation getfacade getlocation newep parse a string representing an extension point and return a new extension point p the syntax is name location name location or em note em if either field is blank it will be set to null in the extension point we break up the string into tokens at the we must keep the as a token so we can distinguish between name and location the number of tokens will distinguish our four cases p param text the string to parse return a new extension point with fields set appropriately or code null code if we are given code null code or a blank string em note em the string can be used to set both name and location to null private object parse extension point string text if we are given the null string return immediately so that the extensionpoint is removed if text null return null build a new extension point this method has insufficient information to call build extension point thus we ll need to create one and pray that whomever called us knows what kind of mess they got object ep model get use cases factory create extension point string tokenizer st new string tokenizer text trim true int num tokens st count tokens string ep location string ep name switch num tokens case 0 the empty string return null ep null break case 1 a string of the form location this will be confused by the string so we pick this out as an instruction to clear both name and location ep location st next token trim if ep location equals model get core helper set name ep null model get use cases helper set location ep null else model get core helper set name ep null model get use cases helper set location ep ep location break case 2 a string of the form name ep name st next token trim model get core helper set name ep ep name model get use cases helper set location ep null break case 3 a string of the form name location discard the middle token ep name st next token trim st next token read past the colon ep location st next token trim model get core helper set name ep ep name model get use cases helper set location ep ep location break return ep parseextensionpoint buildextensionpoint getusecasesfactory createextensionpoint stringtokenizer stringtokenizer numtokens counttokens eplocation epname numtokens eplocation nexttoken eplocation getcorehelper setname getusecaseshelper setlocation getcorehelper setname getusecaseshelper setlocation eplocation epname nexttoken getcorehelper setname epname getusecaseshelper setlocation epname nexttoken nexttoken eplocation nexttoken getcorehelper setname epname getusecaseshelper setlocation eplocation see org argouml notation providers notation provider get parsing help public string get parsing help return parsing help fig extensionpoint notationprovider getparsinghelp getparsinghelp generate the display for an extension point p the representation is name location the name is omitted if there is no name given inherit doc deprecated suppress warnings deprecation deprecated public string to string object model element map args return to string model element inheritdoc suppresswarnings tostring modelelement tostring modelelement private string to string final object model element if model element null return the string to build string s get the fields we want string ep name model get facade get name model element string ep location model get facade get location model element put in the name field if it s there if ep name null ep name length 0 s ep name put in the location field if it s there if ep location null ep location length 0 s ep location return s tostring modelelement modelelement epname getfacade getname modelelement eplocation getfacade getlocation modelelement epname epname epname eplocation eplocation eplocation generate the text for an extension point p the representation is name location the name is omitted if there is no name given override public string to string object model element notation settings settings return to string model element tostring modelelement notationsettings tostring modelelement constructor for uml extend extension point list model public uml extend extension point list model super extension point umlextendextensionpointlistmodel umlextendextensionpointlistmodel extensionpoint see org argouml uml ui uml model element list model2 build model list protected void build model list set all elements model get facade get extension points get target umlmodelelementlistmodel2 buildmodellist buildmodellist setallelements getfacade getextensionpoints gettarget see org argouml uml ui uml model element list model2 is valid element object protected boolean is valid element object o return model get facade isa extension point o model get facade get extension points get target contains o umlmodelelementlistmodel2 isvalidelement isvalidelement getfacade isaextensionpoint getfacade getextensionpoints gettarget protected void move down int index1 int index2 index1 1 object extend get target in case of an extend we are sure an ordered list is returned list c list model get facade get extension points extend object mem1 c get index1 model get use cases helper remove extension point extend mem1 model get use cases helper add extension point extend index2 mem1 movedown gettarget getfacade getextensionpoints getusecaseshelper removeextensionpoint getusecaseshelper addextensionpoint see org argouml uml ui uml model element ordered list model2 move to bottom int override protected void move to bottom int index object extend get target in case of an extend we are sure an ordered list is returned list c list model get facade get extension points extend if index c size 1 object mem1 c get index model get use cases helper remove extension point extend mem1 model get use cases helper add extension point extend c size mem1 umlmodelelementorderedlistmodel2 movetobottom movetobottom gettarget getfacade getextensionpoints getusecaseshelper removeextensionpoint getusecaseshelper addextensionpoint see org argouml uml ui uml model element ordered list model2 move to top int override protected void move to top int index object extend get target in case of an extend we are sure an ordered list is returned list c list model get facade get extension points extend if index 0 object mem1 c get index model get use cases helper remove extension point extend mem1 model get use cases helper add extension point extend 0 mem1 umlmodelelementorderedlistmodel2 movetotop movetotop gettarget getfacade getextensionpoints getusecaseshelper removeextensionpoint getusecaseshelper addextensionpoint the constructor param name the name that will be localized public tree model support string name super name treemodelsupport add a tree model listener to the list of listeners param l the listener to be added public void add tree model listener tree model listener l listener list add tree model listener class l treemodellistener addtreemodellistener treemodellistener listenerlist treemodellistener remove a tree model listener from the list of listeners param l the listener to be removed public void remove tree model listener tree model listener l listener list remove tree model listener class l treemodellistener removetreemodellistener treemodellistener listenerlist treemodellistener notify all listeners that a node or a set of siblings has changed in some way the node s have not changed locations in the tree or altered their children arrays but other attributes have changed and may affect presentation p to indicate the root has changed child indices and children will be null p em note em this is a swing method which must be invoked on the swing awt event thread param source the object responsible for generating the event typically the creator of the event object passes this for its value param path an array of object identifying the path to the parent of the modified item s where the first element of the array is the object stored at the root node and the last element is the object stored at the parent node param child indices an array of int that specifies the index values of the removed items the indices must be in sorted order from lowest to highest param children an array of object containing the inserted removed or changed objects see tree model listener tree nodes changed tree model event protected void fire tree nodes changed final object source final object path final int child indices final object children guaranteed to return a non null array object listeners listener list get listener list tree model event e null process the listeners last to first notifying those that are interested in this event for int i listeners length 2 i 0 i 2 if listeners i tree model listener class lazily create the event if e null e new tree model event source path child indices children tree model listener listeners i 1 tree nodes changed e childindices childindices treemodellistener treenodeschanged treemodelevent firetreenodeschanged childindices listenerlist getlistenerlist treemodelevent treemodellistener treemodelevent childindices treemodellistener treenodeschanged notify all listeners a node has been inserted the event instance is lazily created using the parameters passed into the fire method p em note em this is a swing method which must be invoked on the swing awt event thread param source the object responsible for generating the event typically the creator of the event object passes this for its value param path an array of object identifying the path to the parent of the modified item s where the first element of the array is the object stored at the root node and the last element is the object stored at the parent node param child indices an array of int that specifies the index values of the removed items the indices must be in sorted order from lowest to highest param children an array of object containing the inserted removed or changed objects see tree model listener tree nodes changed tree model event protected void fire tree nodes inserted object source object path int child indices object children guaranteed to return a non null array object listeners listener list get listener list tree model event e null process the listeners last to first notifying those that are interested in this event for int i listeners length 2 i 0 i 2 if listeners i tree model listener class lazily create the event if e null e new tree model event source path child indices children tree model listener listeners i 1 tree nodes inserted e childindices treemodellistener treenodeschanged treemodelevent firetreenodesinserted childindices listenerlist getlistenerlist treemodelevent treemodellistener treemodelevent childindices treemodellistener treenodesinserted notify all listeners that nodes have been removed from the tree note that if a subtree is removed from the tree this method may only be invoked once for the root of the removed subtree not once for each individual set of siblings removed p em note em this is a swing method which must be invoked on the swing awt event thread param source the object responsible for generating the event typically the creator of the event object passes this for its value param path an array of object identifying the path to the parent of the modified item s where the first element of the array is the object stored at the root node and the last element is the object stored at the parent node param child indices an array of int that specifies the index values of the removed items the indices must be in sorted order from lowest to highest param children an array of object containing the inserted removed or changed objects see tree model listener tree nodes changed tree model event see event listener list protected void fire tree nodes removed object source object path int child indices object children guaranteed to return a non null array object listeners listener list get listener list tree model event e null process the listeners last to first notifying those that are interested in this event for int i listeners length 2 i 0 i 2 if listeners i tree model listener class lazily create the event if e null e new tree model event source path child indices children tree model listener listeners i 1 tree nodes removed e childindices treemodellistener treenodeschanged treemodelevent eventlistenerlist firetreenodesremoved childindices listenerlist getlistenerlist treemodelevent treemodellistener treemodelevent childindices treemodellistener treenodesremoved notify all listeners that the tree has drastically changed structure from a given node down if the path returned by e get path is of length one and the first element does not identify the current root node the first element should become the new root of the tree p em note em this is a swing method which must be invoked on the swing awt event thread param path an array of object identifying the path to the parent of the modified item s where the first element of the array is the object stored at the root node and the last element is the object stored at the parent node see tree model listener tree structure changed tree model event protected void fire tree structure changed object path fire tree structure changed this path getpath treemodellistener treestructurechanged treemodelevent firetreestructurechanged firetreestructurechanged notify all listeners that the tree has drastically changed structure from a given node down if the path returned by e get path is of length one and the first element does not identify the current root node the first element should become the new root of the tree p em note em this is a swing method which must be invoked on the swing awt event thread param source the object responsible for generating the event typically the creator of the event object passes this for its value param path an array of object identifying the path to the parent of the modified item s where the first element of the array is the object stored at the root node and the last element is the object stored at the parent node see tree model listener tree structure changed tree model event protected void fire tree structure changed object source object path fire tree structure changed source path null null getpath treemodellistener treestructurechanged treemodelevent firetreestructurechanged firetreestructurechanged notify all listeners that the tree has drastically changed structure from a given node down if the path returned by e get path is of length one and the first element does not identify the current root node the first element should become the new root of the tree p em note em this is a swing method which must be invoked on the swing awt event thread param source the object responsible for generating the event typically the creator of the event object passes this for its value param path an array of object identifying the path to the parent of the modified item s where the first element of the array is the object stored at the root node and the last element is the object stored at the parent node param child indices an array of int that specifies the index values of the removed items the indices must be in sorted order from lowest to highest param children an array of object containing the inserted removed or changed objects see tree model listener tree structure changed tree model event public void fire tree structure changed object source object path int child indices object children guaranteed to return a non null array object listeners listener list get listener list tree model event e null process the listeners last to first notifying those that are interested in this event for int i listeners length 2 i 0 i 2 if listeners i tree model listener class lazily create the event if e null e new tree model event source path child indices children tree model listener listeners i 1 tree structure changed e getpath childindices treemodellistener treestructurechanged treemodelevent firetreestructurechanged childindices listenerlist getlistenerlist treemodelevent treemodellistener treemodelevent childindices treemodellistener treestructurechanged class constructor public about box this frame null false aboutbox class constructor param owner the frame from which the dialog is displayed public about box frame owner this owner false aboutbox see translator localize string param str the key to localize return the localized string private static string localize string str return translator localize str creates a j scroll pane from the text return the j scroll pane param text the text to represent private j scroll pane create pane string text j text area a new j text area a set editable false a set line wrap true a set wrap style word true a set margin new insets inset px inset px inset px inset px a set text text a set caret position 0 return new j scroll pane a jscrollpane jscrollpane jscrollpane createpane jtextarea jtextarea seteditable setlinewrap setwrapstyleword setmargin inset_px inset_px inset_px inset_px settext setcaretposition jscrollpane class constructor param owner the frame from which the dialog is displayed param modal true for a modal dialog false for one that allows other windows to be active at the same time public about box frame owner boolean modal super localize aboutbox aboutbox title modal splash panel new splash panel splash int img width splash panel get image get icon width int img height splash panel get image get icon height dimension scr size toolkit get default toolkit get screen size set location scr size width 2 img width 2 scr size height 2 img height 2 get content pane set layout new border layout 0 0 j panel my inset panel new j panel top left bottom right my inset panel set border new empty border 30 40 40 40 this gives some more space to the row of tabs so that there will not be 2 rows of tabs see issue 2365 remark 3 from jeremy img width 40 40 it looks better if the height increases too img height 40 40 my inset panel add splash panel tabs add tab localize aboutbox tab splash my inset panel tabs add tab localize aboutbox tab version create pane get version tabs add tab localize aboutbox tab credits create pane get credits tabs add tab localize aboutbox tab contacts create pane localize aboutbox contacts tabs add tab localize aboutbox tab bugreport create pane localize aboutbox bugreport tabs add tab localize aboutbox tab legal create pane localize aboutbox legal for string key extra tabs key set tabs add tab key extra tabs get key get content pane set layout new border layout 0 0 get content pane add tabs border layout center todo 10 and 120 were found by trial and error calculate them set size img width 10 img height 120 pack aboutbox splashpanel splashpanel imgwidth splashpanel getimage geticonwidth imgheight splashpanel getimage geticonheight scrsize getdefaulttoolkit getscreensize setlocation scrsize imgwidth scrsize imgheight getcontentpane setlayout borderlayout jpanel myinsetpanel jpanel myinsetpanel setborder emptyborder imgwidth imgheight myinsetpanel splashpanel addtab myinsetpanel addtab createpane getversion addtab createpane getcredits addtab createpane addtab createpane addtab createpane extratabs keyset addtab extratabs getcontentpane setlayout borderlayout getcontentpane borderlayout setsize imgwidth imgheight add an extra tab to the about box param name the name of the tab as shown on screen param tab the tab public static void add about tab string name component tab extra tabs put name tab addabouttab extratabs remove a previously added tab from the about box param name the name of the tab as shown on screen public static void remove about tab string name extra tabs remove name removeabouttab extratabs get the contents of the version tab p this should include all libraries used by argouml p em library maintainers add and update information here em return the contents private string get version string buffer buf new string buffer buf append localize aboutbox generated version header buf append tools get version info buf append localize aboutbox used tools header not localized buf append gef gef tigris org n buf append xerces j 2 6 2 n buf append net beans mdr mdr netbeans org n buf append tu dresden ocl compiler dresden ocl sourceforge net n buf append antlr 2 7 7 www antlr org deprecated n buf append n buf append localize aboutbox loaded modules header iterator string iter module loader2 all modules iterator while iter has next string module name iter next buf append n module buf append module name buf append n description string desc module loader2 get description module name buf append desc replace all n n n buf append n n buf append localize aboutbox thanks buf append n return buf to string getversion stringbuffer stringbuffer getversioninfo netbeans moduleloader2 allmodules hasnext modulename nmodule modulename ndescription moduleloader2 getdescription modulename replaceall tostring get the contents of the credits tab p this should include a list of all persons that have ever contributed to argouml p em commiters add your contributor here em return the contents private string get credits string buffer buf new string buffer buf append localize aboutbox developed by buf append n n buf append localize aboutbox project leader buf append linus tolke linus tigris org buf append n n buf append localize aboutbox module owners buf append n buf append uml model diagrams gui persistence bob tarling n buf append mdr implementation tom morris n buf append sequence diagrams christian l pez esp nola n buf append c luis sergio oliveira n buf append csharp jan magne andersen n buf append php 4 5 kai schroeder n buf append sql kai drahmann n buf append code generation reverse engineering thomas neustupny n buf append cognitive support markus klink n buf append notation user manual michiel van der wulp n buf append localization french jean hugues de raigniac n buf append localization russian alexey aphanasyev n buf append localization german harald braun n buf append localization spanish stewart munoz n buf append localization british english alex bagehot n buf append localization norwegian bokm u00e5l hans fredrik nordhaug n buf append localization chinese jeff liu n buf append localization portuguese sergio agostinho n buf append n buf append translator message format aboutbox contrib developers for release new object 0 28 buf append n buf append bob tarling n buf append bogdan szanto n buf append bogdan pistol n buf append brian hudson n buf append christian l pez esp nola n buf append dave thompson n buf append harald braun n buf append jan magne andersen n buf append luis sergio oliveira n buf append linus tolke n buf append lukasz gromanowski n buf append marcos aurelio n buf append michiel van der wulp n buf append thilina hasantha n buf append thomas neustupny n buf append tom morris n buf append n buf append translator message format aboutbox contrib developers for release new object 0 26 buf append n buf append aleksandar n buf append alexandre da silva n buf append scott roberts n buf append s rgio adriano fernandes lopes n buf append n buf append translator message format aboutbox contrib developers for release new object 0 24 buf append n buf append andrea nironi n buf append hans fredrik nordhaug n buf append markus klink n buf append sergio agostinho n buf append stewart munoz n buf append n buf append translator message format aboutbox contrib developers for release new object 0 22 buf append n buf append jeff liu n buf append ludovic maitre n buf append n buf append translator message format aboutbox contrib developers for release new object 0 20 buf append n final string cpbi polytechnic of bandung indonesia computer engineering departement alphabetic order buf append decki cpbi n buf append endi cpbi n buf append kai schroeder n buf append michael a mac donald n buf append yayan cpbi n buf append n buf append localize aboutbox past developers buf append n alphabetic order buf append adam gauthier n buf append adam bonner n buf append alex bagehot n buf append alexander lepekhine n buf append alexey aphanasyev n buf append andreas rueckert a rueckert gmx net java re n buf append clemens eichler n buf append curt arnold n buf append david glaser n buf append david hilbert n buf append david redmiles n buf append dennis daniels denny d hotmail com n buf append donat wullschleger n buf append edwin park n buf append eric lefevre n buf append eugenio alvarez n buf append frank finger n buf append frank wienberg n buf append grzegorz prokopski n buf append jaap branderhorst n buf append jason robbins project founder researcher n buf append jean hugues de raigniac n buf append jeremy jones n buf append jim holt n buf append luc maisonobe n buf append marcus andersson n buf append marko boger gentle ware uml diagrams n buf append michael stockman n buf append nick santucci n buf append phil sager n buf append philippe vanpeperstraete user manual n buf append piotr kaminski n buf append scott guyer n buf append sean chen n buf append steffen zschaler n buf append steve poole n buf append stuart zakon n buf append thierry lach n buf append thomas schaumburg n buf append thorsten sturm thorsten sturm gentleware de gef n buf append toby baier uml metamodel xmi project leader n buf append will howery n buf append ics 125 team spring 1996 n buf append ics 125 teams spring 1998 n return buf to string getcredits stringbuffer stringbuffer messageformat messageformat messageformat messageformat messageformat macdonald a_rueckert denny_d gentleware tostring constructor for uml linked list param data model the data model param show icon true if an icon should be shown param show path true if containment path should be shown public uml linked list list model data model boolean show icon boolean show path super data model new uml linked list cell renderer show icon show path set selection mode list selection model single selection todo can we find a better way to do this than hard coding colour set foreground color blue set selection foreground color blue darker uml link mouse listener mouse listener new uml link mouse listener this add mouse listener mouse listener umllinkedlist datamodel showicon showpath umllinkedlist listmodel datamodel showicon showpath datamodel umllinkedlistcellrenderer showicon showpath setselectionmode listselectionmodel single_selection setforeground setselectionforeground umllinkmouselistener mouselistener umllinkmouselistener addmouselistener mouselistener the constructor param data model the data model public uml linked list list model data model this data model true datamodel umllinkedlist listmodel datamodel datamodel constructor for uml linked list param data model the data model param show icon true if an icon should be shown public uml linked list list model data model boolean show icon this data model show icon true umllinkedlist datamodel showicon umllinkedlist listmodel datamodel showicon datamodel showicon constructor for uml message interaction list model public uml message interaction list model super interaction umlmessageinteractionlistmodel umlmessageinteractionlistmodel protected void build model list if model get facade isa message get target remove all elements add element model get facade get interaction get target buildmodellist getfacade isamessage gettarget removeallelements addelement getfacade getinteraction gettarget see org argouml uml ui uml model element list model2 is valid element object protected boolean is valid element object element return model get facade isa interaction element model get facade get interaction get target element umlmodelelementlistmodel2 isvalidelement isvalidelement getfacade isainteraction getfacade getinteraction gettarget creates a new shortcut changed event object param source the source that generated this event param new stroke the new key stroke for the corresponding shortcut public shortcut changed event object source key stroke new stroke super source this key stroke new stroke shortcutchangedevent newstroke keystroke shortcutchangedevent keystroke newstroke keystroke newstroke getter for key stroke return the key stroke for this event public key stroke get key stroke return key stroke keystroke keystroke keystroke getkeystroke keystroke constructor for uml state vertex incoming list model public uml transition statemachine list model super statemachine umlstatevertexincominglistmodel umltransitionstatemachinelistmodel see org argouml uml ui uml model element list model2 build model list protected void build model list remove all elements add element model get facade get state machine get target umlmodelelementlistmodel2 buildmodellist buildmodellist removeallelements addelement getfacade getstatemachine gettarget see org argouml uml ui uml model element list model2 is valid element object protected boolean is valid element object element return model get facade get state machine get target element umlmodelelementlistmodel2 isvalidelement isvalidelement getfacade getstatemachine gettarget the constructor param name the localized decision name key param prio the priority public uml decision string name int prio super name prio umldecision returns the singleton instance return resource loader wrapper public static resource loader wrapper get instance return instance resourceloaderwrapper resourceloaderwrapper getinstance constructor for resource loader wrapper private resource loader wrapper init resource loader resourceloaderwrapper resourceloaderwrapper initresourceloader calculate the path to a look and feel object param classname the look and feel classname param element the en part of the path return the complete path private static string look and feel path string classname string element return org argouml images plaf classname replace toolbar button graphics element lookandfeelpath toolbarbuttongraphics initializes the resourceloader lookup icon resource checks if there are locations and extensions known if there are none this method is called to initialize the resource loader originally this method was placed within main but this coupled main and the resource loader too much private static void init resource loader string look and feel class name if true equals system get property force nativelaf false look and feel class name ui manager get system look and feel class name else look and feel class name javax swing plaf metal metal look and feel string look and feel general image path look and feel path look and feel class name general string look and feel navigation image path look and feel path look and feel class name navigation string look and feel diagram image path look and feel path look and feel class name argouml diagrams string look and feel element image path look and feel path look and feel class name argouml elements string look and feel argo uml image path look and feel path look and feel class name argouml resource loader add resource extension gif resource loader add resource extension png resource loader add resource location look and feel general image path resource loader add resource location look and feel navigation image path resource loader add resource location look and feel diagram image path resource loader add resource location look and feel element image path resource loader add resource location look and feel argo uml image path resource loader add resource location org argouml images resource loader add resource location org tigris gef images initialze gef s version of the loader too todo we should probably be passing icons that we loaded ourselves but there doesn t seem to be a way to do that with gef tfm org tigris gef util resource loader add resource extension gif org tigris gef util resource loader add resource extension png org tigris gef util resource loader add resource location look and feel general image path org tigris gef util resource loader add resource location look and feel navigation image path org tigris gef util resource loader add resource location look and feel diagram image path org tigris gef util resource loader add resource location look and feel element image path org tigris gef util resource loader add resource location look and feel argo uml image path org tigris gef util resource loader add resource location org argouml images org tigris gef util resource loader add resource location org tigris gef images initial state icon resource loader lookup icon resource initial deep icon resource loader lookup icon resource deep history shallow icon resource loader lookup icon resource shallow history fork icon resource loader lookup icon resource fork join icon resource loader lookup icon resource join branch icon resource loader lookup icon resource choice junction icon resource loader lookup icon resource junction realize icon resource loader lookup icon resource realization signal icon resource loader lookup icon resource signal sending exception icon resource loader lookup icon resource exception comment icon resource loader lookup icon resource note lookupiconresource resourceloader initresourceloader lookandfeelclassname getproperty lookandfeelclassname uimanager getsystemlookandfeelclassname lookandfeelclassname metallookandfeel lookandfeelgeneralimagepath lookandfeelpath lookandfeelclassname lookandfeelnavigationimagepath lookandfeelpath lookandfeelclassname lookandfeeldiagramimagepath lookandfeelpath lookandfeelclassname lookandfeelelementimagepath lookandfeelpath lookandfeelclassname lookandfeelargoumlimagepath lookandfeelpath lookandfeelclassname resourceloader addresourceextension resourceloader addresourceextension resourceloader addresourcelocation lookandfeelgeneralimagepath resourceloader addresourcelocation lookandfeelnavigationimagepath resourceloader addresourcelocation lookandfeeldiagramimagepath resourceloader addresourcelocation lookandfeelelementimagepath resourceloader addresourcelocation lookandfeelargoumlimagepath resourceloader addresourcelocation resourceloader addresourcelocation resourceloader addresourceextension resourceloader addresourceextension resourceloader addresourcelocation lookandfeelgeneralimagepath resourceloader addresourcelocation lookandfeelnavigationimagepath resourceloader addresourcelocation lookandfeeldiagramimagepath resourceloader addresourcelocation lookandfeelelementimagepath resourceloader addresourcelocation lookandfeelargoumlimagepath resourceloader addresourcelocation resourceloader addresourcelocation initialstateicon resourceloader lookupiconresource deepicon resourceloader lookupiconresource deephistory shallowicon resourceloader lookupiconresource shallowhistory forkicon resourceloader lookupiconresource joinicon resourceloader lookupiconresource branchicon resourceloader lookupiconresource junctionicon resourceloader lookupiconresource realizeicon resourceloader lookupiconresource signalicon resourceloader lookupiconresource signalsending exceptionicon resourceloader lookupiconresource commenticon resourceloader lookupiconresource this public operation is needed to allow modules to add their own images param location the path were the images are public static void add resource location string location resource loader add resource location location addresourcelocation resourceloader addresourcelocation find the correct icon for a key param resource the name of the resource to look up return the image icon public static image icon lookup icon resource string resource return resource loader lookup icon resource resource imageicon imageicon lookupiconresource resourceloader lookupiconresource find the correct icon for a key param resource the name of the resource to look up param desc the description for the icon return the image icon public static image icon lookup icon resource string resource string desc return resource loader lookup icon resource resource desc imageicon imageicon lookupiconresource resourceloader lookupiconresource look up the icon for a key param key the key to find return the found icon public static image icon lookup icon string key return lookup icon resource get image binding key translator localize key imageicon lookupicon lookupiconresource getimagebinding find the icon for a given model element return the icon or code null code if there is no icon param value the model element todo this should not use string matching on classnames to do this since this means that we have knowledge about how the model elements are implemented outside of the model component public icon lookup icon object value if value null throw new illegal argument exception attempted to get an icon given a null key if value instanceof string return null icon icon icon cache get value get class try if model get facade isa pseudostate value object kind model get facade get kind value data types helper helper model get data types helper if helper equalsinitial kind kind icon initial state icon if helper equals deep history kind kind icon deep icon if helper equals shallow history kind kind icon shallow icon if helper equalsfork kind kind icon fork icon if helper equalsjoin kind kind icon join icon if helper equalschoice kind kind icon branch icon if helper equalsjunction kind kind icon junction icon if m pseudostate kind final equals kind icon finalstateicon if model get facade isa abstraction value icon realize icon if model get facade isa exception value icon exception icon else needs more work sending and receiving icons if model get facade isa signal value icon signal icon if model get facade isa comment value icon comment icon if icon null string c name model get meta types get name value icon lookup icon resource c name if icon null log debug can t find icon for c name else synchronized icon cache icon cache put value get class icon catch invalid element exception e log debug attempted to get icon for deleted element return null return icon lookupicon illegalargumentexception iconcache getclass getfacade isapseudostate getfacade getkind datatypeshelper getdatatypeshelper equalsinitialkind initialstateicon equalsdeephistorykind deepicon equalsshallowhistorykind shallowicon equalsforkkind forkicon equalsjoinkind joinicon equalschoicekind branchicon equalsjunctionkind junctionicon mpseudostatekind _finalstateicon getfacade isaabstraction realizeicon getfacade isaexception exceptionicon getfacade isasignal signalicon getfacade isacomment commenticon cname getmetatypes getname lookupiconresource cname cname iconcache iconcache getclass invalidelementexception convert the key to the image file name param name the new i18n key return the file name base part only public static string get image binding string name string found images get name if found null return name return found getimagebinding find the path to a given icon and return it as a url param name base name of the icon to search for param loader class loader to use or null to use the default class loader return the url where the icon was found public static url lookup icon url string name class loader loader return resource loader lookup icon url name loader lookupiconurl classloader resourceloader lookupiconurl find the path to a given icon and return it as a url param name base name of the icon to search for return the url where the icon was found public static url lookup icon url string name return lookup icon url name null lookupiconurl lookupiconurl the constructor public wiz description super log info making wiz description description set line wrap true description set wrap style word true get main panel set layout new border layout get main panel add new j scroll pane description border layout center wizdescription wizdescription setlinewrap setwrapstyleword getmainpanel setlayout borderlayout getmainpanel jscrollpane borderlayout public void set target object item string message super set target item object target item if target null description set editable false description set text translator localize message item no item selected else if target instanceof to do item to do item tdi to do item target description set editable false description set enabled true description set text tdi get description description set caret position 0 else if target instanceof priority node message message format format translator localize message item branch priority new object target to string description set editable false description set text message return else if target instanceof critic message message format format translator localize message item branch critic new object target to string description set editable false description set text message return else if model get facade isauml element target message message format format translator localize message item branch model new object model get facade to string target description set editable false description set text message return else if target instanceof decision message message format format translator localize message item branch decision new object model get facade to string target description set text message return else if target instanceof goal message message format format translator localize message item branch goal new object model get facade to string target description set text message return else if target instanceof knowledge type node message message format format translator localize message item branch knowledge new object model get facade to string target description set text message return else description set text return settarget settarget seteditable settext todoitem todoitem todoitem seteditable setenabled settext getdescription setcaretposition prioritynode messageformat tostring seteditable settext messageformat tostring seteditable settext getfacade isaumlelement messageformat getfacade tostring seteditable settext messageformat getfacade tostring settext messageformat getfacade tostring settext knowledgetypenode messageformat getfacade tostring settext settext the constructor public cr too many assoc setup head and desc add supported decision uml decision relationships set threshold associations threshold add trigger association end crtoomanyassoc setupheadanddesc addsupporteddecision umldecision setthreshold associations_threshold addtrigger associationend public boolean predicate2 object dm designer dsgr if model get facade isa classifier dm return no problem todo consider inherited associations todo self loops are double counted int threshold get threshold collection aes model get facade get association ends dm if aes null aes size threshold return no problem return problem found getfacade isaclassifier no_problem getthreshold getfacade getassociationends no_problem problem_found public set object get criticized design materials set object ret new hash set object ret add model get meta types getuml class return ret getcriticizeddesignmaterials hashset getmetatypes getumlclass the constructor param model element the modelelement public association name notation java object model element super model element modelelement associationnamenotationjava modelelement modelelement override public void initialise listener final property change listener listener final object model element add element listener listener model element new string is leaf super initialise listener listener model element initialiselistener propertychangelistener modelelement addelementlistener modelelement isleaf initialiselistener modelelement see org argouml notation providers notation provider get parsing help public string get parsing help return parsing help java fig nodemodelelement notationprovider getparsinghelp getparsinghelp public void parse final object model element final string text try model element name notation java parse model element model element text catch parse exception pe final string msg statusmsg bar error parsing node modelelement final object args pe get localized message integer value of pe get error offset argo event pump fire event new argo help event argo event types help changed this translator message format msg args modelelement modelelementnamenotationjava parsemodelelement modelelement parseexception getlocalizedmessage valueof geterroroffset argoeventpump fireevent argohelpevent argoeventtypes help_changed messageformat suppress warnings deprecation deprecated override public string to string final object model element final map args string name name model get facade get name model element if name null return return notation utility java generate leaf model element args notation utility java generate abstract model element args notation utility java generate visibility model element args notation utility java generate path model element args name suppresswarnings tostring modelelement getfacade getname modelelement notationutilityjava generateleaf modelelement notationutilityjava generateabstract modelelement notationutilityjava generatevisibility modelelement notationutilityjava generatepath modelelement override public string to string final object model element final notation settings settings string name name model get facade get name model element if name null return string visibility if settings is show visibilities visibility notation utility java generate visibility model element string path if settings is show paths path notation utility java generate path model element return notation utility java generate leaf model element notation utility java generate abstract model element visibility path name tostring modelelement notationsettings getfacade getname modelelement isshowvisibilities notationutilityjava generatevisibility modelelement isshowpaths notationutilityjava generatepath modelelement notationutilityjava generateleaf modelelement notationutilityjava generateabstract modelelement see org argouml uml ui abstract action navigate navigate to java lang object protected object navigate to object source return model get facade get model element container source abstractactionnavigate navigateto navigateto getfacade getmodelelementcontainer constructor param the item the item that we go to public action go to critique to do item the item super translator localize the item get headline null set the tooltip string put value action short description translator localize the item get headline item the item theitem actiongotocritique todoitem theitem theitem getheadline putvalue short_description theitem getheadline theitem public void action performed action event ae super action performed ae todo project browser doesn t need to mediate this conversation use an event listener in the to do pane to communicate instead tfm to do pane project browser get instance get todo pane select item item actionperformed actionevent actionperformed projectbrowser todopane todopane projectbrowser getinstance gettodopane selectitem see org argouml ui explorer rules perspective rule get rule name public string get rule name return translator localize misc model node perspectiverule getrulename getrulename public collection get children object parent if model get facade isa model parent return model get model management helper get all model elements of kind parent model get meta types get node return collections empty set getchildren getfacade isamodel getmodelmanagementhelper getallmodelelementsofkind getmetatypes getnode empty_set see org argouml ui explorer rules perspective rule get dependencies java lang object public set get dependencies object parent return collections empty set perspectiverule getdependencies getdependencies empty_set construct a new fig stub state param owner owning uml element param bounds position and size param settings rendering settings public fig composite state object owner rectangle bounds diagram settings settings super owner bounds settings init figs update name text figstubstate figcompositestate diagramsettings initfigs updatenametext the main constructor deprecated for 0 27 4 by tfmorris use link fig composite state object rectangle diagram settings suppress warnings deprecation deprecated public fig composite state super init figs figcompositestate diagramsettings suppresswarnings figcompositestate initfigs private void init figs cover new figr rect get initialx get initialy get initial width get initial height line color fill color get big port set line width 0 divider new fig line get initialx get initialy 2 get name fig get bounds height 1 get initial width 1 get initialy 2 get name fig get bounds height 1 line color add figs to the fig node in back to front order add fig get big port add fig cover add fig get name fig add fig divider add fig get internal set bounds get bounds initfigs figrrect getinitialx getinitialy getinitialwidth getinitialheight line_color fill_color getbigport setlinewidth figline getinitialx getinitialy getnamefig getbounds getinitialwidth getinitialy getnamefig getbounds line_color fignode addfig getbigport addfig addfig getnamefig addfig addfig getinternal setbounds getbounds the constructor for when a new fig is created for an existing uml elm param gm ignored param node the uml element deprecated for 0 27 4 by tfmorris use link fig composite state object rectangle diagram settings suppress warnings deprecation deprecated public fig composite state suppress warnings unused graph model gm object node this set owner node figcompositestate diagramsettings suppresswarnings figcompositestate suppresswarnings graphmodel setowner public object clone fig composite state fig clone fig composite state super clone iterator it fig clone get figs iterator fig clone set big port figr rect it next fig clone cover fig rect it next fig clone set name fig fig text it next fig clone divider fig line it next fig clone set internal fig text it next return fig clone figcompositestate figclone figcompositestate figclone getfigs figclone setbigport figrrect figclone figrect figclone setnamefig figtext figclone figline figclone setinternal figtext figclone public dimension get minimum size dimension name dim get name fig get minimum size dimension internal dim get internal get minimum size int h space top name dim height space middle internal dim height space bottom int w math max name dim width 2 margin internal dim width 2 margin return new dimension w h getminimumsize namedim getnamefig getminimumsize internaldim getinternal getminimumsize space_top namedim space_middle internaldim space_bottom namedim internaldim see org tigris gef presentation fig get use trap rect public boolean get use trap rect return true getusetraprect getusetraprect protected void set standard bounds int x int y int w int h if get name fig null return rectangle old bounds get bounds dimension name dim get name fig get minimum size list regions list get enclosed figs if it is concurrent and contains concurrent regions the bottom region has a minimum height if get owner null if is concurrent regions list is empty regions list get regions list size 1 instanceof fig concurrent region fig concurrent region f fig concurrent region regions list get regions list size 1 rectangle region bounds f get bounds if h old bounds height region bounds height f get minimum size height h old bounds height y old bounds y get name fig set bounds x margin y space top w 2 margin name dim height divider set shape x y divider y name dim height x w 1 y divider y name dim height get internal set bounds x margin y name dim height space top space middle w 2 margin h name dim height space top space middle space bottom get big port set bounds x y w h cover set bounds x y w h calc bounds x x y y w w h h update edges fire prop change bounds old bounds get bounds if it is concurrent and contains concurrent regions the regions are resized if get owner null if is concurrent regions list is empty regions list get regions list size 1 instanceof fig concurrent region fig concurrent region f fig concurrent region regions list get regions list size 1 for int i 0 i regions list size 1 i fig concurrent region regions list get i set bounds x old bounds x y old bounds y w 2 fig concurrent region inset horz true f set bounds x old bounds x y old bounds y w 2 fig concurrent region inset horz h old bounds height true setstandardbounds getnamefig oldbounds getbounds namedim getnamefig getminimumsize regionslist getenclosedfigs getowner isconcurrent regionslist isempty regionslist regionslist figconcurrentregion figconcurrentregion figconcurrentregion regionslist regionslist regionbounds getbounds oldbounds regionbounds getminimumsize oldbounds oldbounds getnamefig setbounds space_top namedim setshape divider_y namedim divider_y namedim getinternal setbounds namedim space_top space_middle namedim space_top space_middle space_bottom getbigport setbounds setbounds calcbounds _x _y _w _h updateedges firepropchange oldbounds getbounds getowner isconcurrent regionslist isempty regionslist regionslist figconcurrentregion figconcurrentregion figconcurrentregion regionslist regionslist regionslist figconcurrentregion regionslist setbounds oldbounds oldbounds figconcurrentregion inset_horz setbounds oldbounds oldbounds figconcurrentregion inset_horz oldbounds override public vector fig get enclosed figs vector fig enclosed figs super get enclosed figs if is concurrent tree map integer fig figs byy new tree map integer fig for fig fig enclosed figs if fig instanceof fig concurrent region figs byy put fig gety fig return new vector fig figs byy values return enclosed figs getenclosedfigs enclosedfigs getenclosedfigs isconcurrent treemap figsbyy treemap enclosedfigs figconcurrentregion figsbyy figsbyy enclosedfigs return true if this is a concurrent state false otherwise or if the owner is not known public boolean is concurrent object owner get owner if owner null return false return model get facade is concurrent owner isconcurrent getowner getfacade isconcurrent to resize only when a new concurrent region is added changing the height todo badly named method it actually sets height deprecated by mvw in v0 28alpha replaced by better named method param h the new height deprecated public void set bounds int h set composite state height h setbounds setcompositestateheight to resize only when a new concurrent region is added changing the height todo probably shouldn t exist as this class should be listening for added concurrent regions and call this internally itself param h the new height public void set composite state height int h if get name fig null return rectangle old bounds get bounds dimension name dim get name fig get minimum size int x old bounds x int y old bounds y int w old bounds width get internal set bounds x margin y name dim height 4 w 2 margin h name dim height 6 get big port set bounds x y w h cover set bounds x y w h calc bounds x x y y w w h h update edges fire prop change bounds old bounds get bounds setcompositestateheight getnamefig oldbounds getbounds namedim getnamefig getminimumsize oldbounds oldbounds oldbounds getinternal setbounds namedim namedim getbigport setbounds setbounds calcbounds _x _y _w _h updateedges firepropchange oldbounds getbounds public vector get pop up actions mouse event me vector pop up actions super get pop up actions me check if multiple items are selected boolean ms target manager get instance get targets size 1 if ms pop up actions add pop up actions size get popup add offset new action add concurrent region return pop up actions getpopupactions mouseevent popupactions getpopupactions targetmanager getinstance gettargets popupactions popupactions getpopupaddoffset actionaddconcurrentregion popupactions see org tigris gef presentation fig set line color java awt color public void set line color color col cover set line color col divider set line color col setlinecolor setlinecolor setlinecolor setlinecolor see org tigris gef presentation fig get line color public color get line color return cover get line color getlinecolor getlinecolor getlinecolor see org tigris gef presentation fig set fill color java awt color public void set fill color color col cover set fill color col setfillcolor setfillcolor setfillcolor see org tigris gef presentation fig get fill color public color get fill color return cover get fill color getfillcolor getfillcolor getfillcolor see org tigris gef presentation fig set filled boolean public void set filled boolean f cover set filled f get big port set filled f setfilled setfilled setfilled getbigport setfilled override public boolean is filled return cover is filled isfilled isfilled see org tigris gef presentation fig set line width int public void set line width int w cover set line width w divider set line width w setlinewidth setlinewidth setlinewidth setlinewidth see org tigris gef presentation fig get line width public int get line width return cover get line width getlinewidth getlinewidth getlinewidth override protected void update layout uml change event event we only handle the case where a region has been removed if event instanceof remove association event subvertex equals event get property name return final object removed region event get old value list fig concurrent region region figs list fig concurrent region get enclosed figs clone int tot height get initial height if region figs is empty fig removed fig null for fig concurrent region fig region region figs if fig region get owner removed region removed fig fig region remove enclosed fig fig region break if removed fig null region figs remove removed fig if region figs is empty for fig concurrent region fig region region figs if fig region gety removed fig gety fig region displace 0 removed fig get height tot height get height removed fig get height set bounds getx gety get width tot height do we need to rendering changed updatelayout umlchangeevent removeassociationevent getpropertyname removedregion getoldvalue figconcurrentregion regionfigs figconcurrentregion getenclosedfigs totheight getinitialheight regionfigs isempty removedfig figconcurrentregion figregion regionfigs figregion getowner removedregion removedfig figregion removeenclosedfig figregion removedfig regionfigs removedfig regionfigs isempty figconcurrentregion figregion regionfigs figregion removedfig figregion removedfig getheight totheight getheight removedfig getheight setbounds getwidth totheight renderingchanged see org argouml uml diagram state ui fig state get initial height protected int get initial height return 150 figstate getinitialheight getinitialheight see org argouml uml diagram state ui fig state get initial width protected int get initial width return 180 figstate getinitialwidth getinitialwidth see org argouml uml diagram state ui fig state get initialx protected int get initialx return 0 figstate getinitialx getinitialx see org argouml uml diagram state ui fig state get initialy protected int get initialy return 0 figstate getinitialy getinitialy see org argouml ui explorer rules perspective rule get rule name public string get rule name return translator localize misc model diagram perspectiverule getrulename getrulename public collection get children object model if model get facade isa model model list return list new array list project proj project manager get manager get current project for argo diagram diagram proj get diagram list if is in path diagram get namespace model return list add diagram return return list return collections empty set getchildren getfacade isamodel returnlist arraylist projectmanager getmanager getcurrentproject argodiagram getdiagramlist isinpath getnamespace returnlist returnlist empty_set private boolean is in path object namespace object model if namespace model return true object ns model get facade get namespace namespace while ns null if model ns return true ns model get facade get namespace ns return false isinpath getfacade getnamespace getfacade getnamespace public set get dependencies object parent if model get facade isa model parent set set new hash set set add parent return set return collections empty set getdependencies getfacade isamodel hashset empty_set the constructor public tab results this true tabresults the constructor param show related true if related results should be shown public tab results boolean show related super results true related shown show related set layout new border layout results table new j table 10 show related 4 3 results model new tm results show related j panel resultsw new j panel j scroll pane resultssp new j scroll pane results table resultsw set layout new border layout results label set border border factory create empty border inset px inset px inset px inset px resultsw add results label border layout north resultsw add resultssp border layout center results table set model results model results table add mouse listener this results table add key listener this results table get selection model add list selection listener this results table set selection mode list selection model single selection resultsw set minimum size new dimension 100 100 j panel relatedw new j panel if related shown j scroll pane relatedsp new j scroll pane related table relatedw set layout new border layout related label set border border factory create empty border inset px inset px inset px inset px relatedw add related label border layout north relatedw add relatedsp border layout center related table set model related model related table add mouse listener this related table add key listener this relatedw set minimum size new dimension 100 100 if related shown main pane new j split pane j split pane vertical split resultsw relatedw add main pane border layout center else add resultsw border layout center showrelated tabresults showrelated relatedshown showrelated setlayout borderlayout resultstable jtable showrelated resultsmodel tmresults showrelated jpanel jpanel jscrollpane jscrollpane resultstable setlayout borderlayout resultslabel setborder borderfactory createemptyborder inset_px inset_px inset_px inset_px resultslabel borderlayout borderlayout resultstable setmodel resultsmodel resultstable addmouselistener resultstable addkeylistener resultstable getselectionmodel addlistselectionlistener resultstable setselectionmode listselectionmodel single_selection setminimumsize jpanel jpanel relatedshown jscrollpane jscrollpane relatedtable setlayout borderlayout relatedlabel setborder borderfactory createemptyborder inset_px inset_px inset_px inset_px relatedlabel borderlayout borderlayout relatedtable setmodel relatedmodel relatedtable addmouselistener relatedtable addkeylistener setminimumsize relatedshown mainpane jsplitpane jsplitpane vertical_split mainpane borderlayout borderlayout param p the predicate for the search p note the type of this parameter was changed incompatibly before 0 26 from org argouml uml predicate find to org argouml uml predicate search public void set predicate predicate search p pred p predicatefind predicatesearch setpredicate predicatesearch param r the root object for the search public void set root object r root r setroot param gen the generator p note the type of this parameter was changed incompatibly before 0 26 from org tigris gef util child generator to org argouml util child generator public void set generator child generator gen cg gen childgenerator childgenerator setgenerator childgenerator param res the results param dia the diagrams public void set results list res list dia results res diagrams dia object msg args integer value of results size results label set text translator message format dialog tabresults results items msg args results model set target results diagrams related model set target list null list null related label set text translator localize dialog tabresults related items setresults msgargs valueof resultslabel settext messageformat msgargs resultsmodel settarget relatedmodel settarget relatedlabel settext public abstract argoj panel spawn tab results new panel tab results super spawn if new panel null new panel set results results diagrams return new panel abstractargojpanel tabresults newpanel tabresults newpanel newpanel setresults newpanel handle a doubleclick on the results tab public void do double click my double click results table dodoubleclick mydoubleclick resultstable select the result at the given index param index the given index public void select result int index if index results table get row count results table get selection model set selection interval index index selectresult resultstable getrowcount resultstable getselectionmodel setselectioninterval see java awt event action listener action performed java awt event action event public void action performed action event ae ignored actionlistener actionperformed actionevent actionperformed actionevent see java awt event mouse listener mouse pressed java awt event mouse event public void mouse pressed mouse event me ignored mouselistener mousepressed mouseevent mousepressed mouseevent see java awt event mouse listener mouse released java awt event mouse event public void mouse released mouse event me ignored mouselistener mousereleased mouseevent mousereleased mouseevent public void mouse clicked mouse event me if me get click count 2 my double click me get source mouseclicked mouseevent getclickcount mydoubleclick getsource see java awt event mouse listener mouse entered java awt event mouse event public void mouse entered mouse event me ignored mouselistener mouseentered mouseevent mouseentered mouseevent see java awt event mouse listener mouse exited java awt event mouse event public void mouse exited mouse event me ignored mouselistener mouseexited mouseevent mouseexited mouseevent private void my double click object src object sel null argo diagram d null if src results table int row results table get selection model get min selection index if row 0 return sel results get row d diagrams get row else if src related table int row related table get selection model get min selection index if row 0 return num jump to related sel related get row if d null log debug go sel in d get name target manager get instance set target d target manager get instance set target sel mydoubleclick argodiagram resultstable resultstable getselectionmodel getminselectionindex relatedtable relatedtable getselectionmodel getminselectionindex numjumptorelated getname targetmanager getinstance settarget targetmanager getinstance settarget public void key pressed key event e if e is consumed e get key char key event vk enter e consume my double click e get source keypressed keyevent isconsumed getkeychar keyevent vk_enter mydoubleclick getsource see java awt event key listener key released java awt event key event public void key released key event e ignored keylistener keyreleased keyevent keyreleased keyevent see java awt event key listener key typed java awt event key event public void key typed key event e ignored keylistener keytyped keyevent keytyped keyevent public void value changed list selection event lse if lse get value is adjusting return if related shown int row lse get first index object sel results get row log debug selected sel related clear enumeration elems child gen related get singleton gen sel if elems null while elems has more elements related add elems next element related model set target related null object msg args integer value of related size related label set text translator message format dialog find related elements msg args valuechanged listselectionevent getvalueisadjusting relatedshown getfirstindex childgenrelated getsingleton hasmoreelements nextelement relatedmodel settarget msgargs valueof relatedlabel settext messageformat msgargs public void run results label set text translator localize dialog find searching results clear depth first root null set results results diagrams resultslabel settext depthfirst setresults do a recursive depth first search of the project the children of the root are all user models and all the diagrams searches of the diagrams will terminate immediately if they fail to match but the models are searched to their leaves even if the diagram predicate doesn t match an empty diagram name this is inefficient but shouldn t be a common case p another effect of the current algorithm is that model elements will appear once for each diagram that they are included in plus an additional time with no diagram name given it would be slightly more friendly have the non diagram list only includes those elements which didn t appear in any other diagram but we re not going to do the bookkeeping for now tfm 20060214 private void depth first object node argo diagram last diagram if node instanceof argo diagram last diagram argo diagram node if pred match diagram last diagram return diagrams are not placed in search results iterator iterator cg child iterator node while iterator has next object child iterator next if pred evaluate child last diagram null pred match diagram results add child diagrams add last diagram depth first child last diagram depthfirst argodiagram lastdiagram argodiagram lastdiagram argodiagram matchdiagram lastdiagram childiterator hasnext lastdiagram matchdiagram lastdiagram depthfirst lastdiagram the constructor param m the model param p the project public project member model object m project p super persistence manager get instance get project base name p file ext p if model get facade isa model m throw new illegal argument exception set model m projectmembermodel persistencemanager getinstance getprojectbasename file_ext getfacade isamodel illegalargumentexception setmodel return the model public object get model return model getmodel param m the model protected void set model object m model m setmodel see org argouml kernel abstract project member get type public string get type return member type abstractprojectmember gettype gettype member_type see org argouml kernel abstract project member get zip file extension public string get zip file extension return file ext abstractprojectmember getzipfileextension getzipfileextension file_ext there is not yet any repair task for the uml model but this is open to implement as and when any problems areas are discovered inherit doc public string repair return inheritdoc constructor private gui add gui internal stuff gui internal stuff is panes tabs menu items that are part of the gui subsystem i e a class in the org argouml ui package things that are not part of the gui like everything that has any knowledge about uml diagrams code generation reverse engineering creates and registers itself when that subsystem or module is loaded add settings tab new settings tab preferences add settings tab new settings tab environment add settings tab new settings tab user add settings tab new settings tab appearance add settings tab new settings tab profile add project settings tab new project settings tab properties add project settings tab new project settings tab profile addsettingstab settingstabpreferences addsettingstab settingstabenvironment addsettingstab settingstabuser addsettingstab settingstabappearance addsettingstab settingstabprofile addprojectsettingstab projectsettingstabproperties addprojectsettingstab projectsettingstabprofile return the instance public static gui get instance return instance getinstance register a new settings tab param panel the gui settings tab interface to add public void add settings tab final gui settings tab interface panel settings tabs add panel settingstab guisettingstabinterface addsettingstab guisettingstabinterface settingstabs get the components for the settings tab return a list of link gui settings tab interface public final list gui settings tab interface get settings tabs return collections unmodifiable list settings tabs guisettingstabinterface guisettingstabinterface getsettingstabs unmodifiablelist settingstabs register a new project settings tab param panel the gui settings tab interface to add public void add project settings tab final gui settings tab interface panel project settings tabs add panel projectsettingstab guisettingstabinterface addprojectsettingstab guisettingstabinterface projectsettingstabs get the components for the project settings tab return a list of link gui settings tab interface public final list gui settings tab interface get project settings tabs return collections unmodifiable list project settings tabs guisettingstabinterface guisettingstabinterface getprojectsettingstabs unmodifiablelist projectsettingstabs construct a new property panel for an actor public prop panel actor super label actor lookup icon actor add field label name get name text field add field label namespace get namespace selector add get modifiers panel add separator add field label generalizations get generalization scroll add field label specializations get specialization scroll add separator add field label association ends get association end scroll the toolbar buttons that go at the top add action new action navigate container element add action new action new actor add action get action new reception add action new action new stereotype add action get delete action proppanelactor lookupicon addfield getnametextfield addfield getnamespaceselector getmodifierspanel addseparator addfield getgeneralizationscroll addfield getspecializationscroll addseparator addfield getassociationendscroll addaction actionnavigatecontainerelement addaction actionnewactor addaction getactionnewreception addaction actionnewstereotype addaction getdeleteaction construct a new layout engine for an activity diagram param d the activity diagram to be laid out public activity diagram layouter argo diagram d this diagram d activitydiagram activitydiagram activitydiagramlayouter argodiagram see org argouml uml diagram layout layouter add org argouml uml diagram layout layouted object public void add layouted object object objects add object layoutedobject layoutedobject see org argouml uml diagram layout layouter remove org argouml uml diagram layout layouted object public void remove layouted object object objects remove object layoutedobject layoutedobject see org argouml uml diagram layout layouter get objects public layouted object get objects return layouted object objects to array getobjects layoutedobject getobjects layoutedobject toarray see org argouml uml diagram layout layouter get object int public layouted object get object int index return layouted object objects get index getobject layoutedobject getobject layoutedobject public void layout object first null find our initial state for iterator it diagram get nodes iterator it has next object node it next if model get facade isa pseudostate node model get data types helper equalsinitial kind model get facade get kind node first node break assert first null assert model get facade get incomings first is empty place all the nodes int last index place nodes new array list first 0 place the final state last with a little separation point location new point starting point location y offset y last index 2 diagram get containing fig final state set location location getnodes hasnext getfacade isapseudostate getdatatypeshelper equalsinitialkind getfacade getkind getfacade getincomings isempty lastindex placenodes arraylist starting_point offset_y lastindex getcontainingfig finalstate setlocation private int place nodes list seen object node int index if seen contains node seen add node if model get facade isa final state node final state node fig fig diagram get containing fig node point location new point starting point x fig get width 2 starting point y offset y index system out println setting location to location fig set location location for iterator it model get facade get outgoings node iterator it has next index place nodes seen model get facade get target it next index return index placenodes getfacade isafinalstate finalstate getcontainingfig starting_point getwidth starting_point offset_y setlocation getfacade getoutgoings hasnext placenodes getfacade gettarget public dimension get minimum diagram size return new dimension starting point x 300 starting point y offset y objects size getminimumdiagramsize starting_point starting_point offset_y constructor for uml classifier structural feature list model public uml enumeration literals list model super literal umlclassifierstructuralfeaturelistmodel umlenumerationliteralslistmodel protected void build model list if model get facade isa enumeration get target set all elements model get facade get enumeration literals get target buildmodellist getfacade isaenumeration gettarget setallelements getfacade getenumerationliterals gettarget protected boolean is valid element object element if model get facade isa enumeration get target list literals model get facade get enumeration literals get target return literals contains element return false isvalidelement getfacade isaenumeration gettarget getfacade getenumerationliterals gettarget protected void move down int index object clss get target list c model get facade get enumeration literals clss if index c size 1 object mem c get index model get core helper remove literal clss mem model get core helper add literal clss index 1 mem movedown gettarget getfacade getenumerationliterals getcorehelper removeliteral getcorehelper addliteral see org argouml uml ui uml model element ordered list model2 move to bottom int override protected void move to bottom int index object clss get target list c model get facade get enumeration literals clss if index c size 1 object mem c get index model get core helper remove literal clss mem model get core helper add literal clss c size mem umlmodelelementorderedlistmodel2 movetobottom movetobottom gettarget getfacade getenumerationliterals getcorehelper removeliteral getcorehelper addliteral see org argouml uml ui uml model element ordered list model2 move to top int override protected void move to top int index object clss get target list c model get facade get enumeration literals clss if index 0 object mem c get index model get core helper remove literal clss mem model get core helper add literal clss 0 mem umlmodelelementorderedlistmodel2 movetotop movetotop gettarget getfacade getenumerationliterals getcorehelper removeliteral getcorehelper addliteral construct a new selection class for the given fig param f the given fig public selection data type fig f super f selectionclass selectiondatatype protected object get new node int button code object ns model get facade get namespace get content get owner return model get core factory build data type ns getnewnode buttoncode getfacade getnamespace getcontent getowner getcorefactory builddatatype protected object get new node type int button code return model get meta types get data type getnewnodetype buttoncode getmetatypes getdatatype set the threshold todo should this be protected param threshold the threshold to compare to public void set threshold int threshold critic threshold threshold setthreshold criticthreshold gets the current threshold todo should this be protected return the current threshold public int get threshold return critic threshold getthreshold criticthreshold provide a default wizard to adjust the threshold inherit doc public class get wizard class to do item item return wiz too many class inheritdoc getwizardclass todoitem wiztoomany see org argouml ui explorer rules perspective rule get rule name public string get rule name return translator localize misc summary association perspectiverule getrulename getrulename public collection get children object parent if parent instanceof associations node return model get core helper get associations associations node parent get parent return collections empty set getchildren associationsnode getcorehelper getassociations associationsnode getparent empty_set public set get dependencies object parent if parent instanceof associations node set set new hash set set add associations node parent get parent return set return collections empty set getdependencies associationsnode hashset associationsnode getparent empty_set this can be made public to allow others to extend their own persisters private static boolean register persister class target string tag class extends member file persister persister persisters by class put target persister persisters by tag put tag persister return true registerpersister memberfilepersister persistersbyclass persistersbytag create a temporary copy of the existing file param file the file to copy return the temp file or null if none copied throws file not found exception if file not found throws io exception if error reading or writing protected file create temp file file file throws file not found exception io exception file temp file new file file get absolute path if temp file exists temp file delete if file exists copy file file temp file return temp file filenotfoundexception ioexception createtempfile filenotfoundexception ioexception tempfile getabsolutepath tempfile tempfile copyfile tempfile tempfile copies one file src to another raising file exceptions if there are some problems param dest the destination file param src the source file return the destination file after successful copying throws io exception if there is some problems with the files throws file not found exception if any of the files cannot be found protected file copy file file src file dest throws file not found exception io exception file input stream fis new file input stream src file output stream fos new file output stream dest byte buf new byte 1024 int i 0 while i fis read buf 1 fos write buf 0 i fis close fos close dest set last modified src last modified return dest ioexception filenotfoundexception copyfile filenotfoundexception ioexception fileinputstream fileinputstream fileoutputstream fileoutputstream setlastmodified lastmodified public boolean accept file f if f null return false if f is directory return true string s get extension f if s null this check for files without extension if s equals ignore case get extension return true return false isdirectory getextension equalsignorecase getextension the extension valid for this type of file just the chars not the dot e g zargo return the extension valid for this type of file just the description not the extension between return the description valid for this type of file private static string get extension file f if f null return null return get extension f get name getextension getextension getname private static string get extension string filename int i filename last index of if i 0 i filename length 1 return filename substring i 1 to lower case return null getextension lastindexof tolowercase given the full filename this returns true if that filename contains the expected extension for the is persister param filename the filename to test return true if the filename is valid for this persister public boolean is file extension applicable string filename return filename to lower case ends with get extension isfileextensionapplicable tolowercase endswith getextension see javax swing filechooser file filter get description public string get description return get desc get extension filefilter getdescription getdescription getdesc getextension save a project to file p this first archives the existing file then calls do save to do the actual saving p should do save throw an exception then it is caught here and any rollback handled before rethrowing the exception param project the project being saved param file the file to which the save is taking place throws save exception when anything goes wrong throws interrupted exception if the thread is interrupted see org argouml persistence project file persister save org argouml kernel project java io file public final void save project project file file throws save exception interrupted exception pre save project file do save project file post save project file dosave dosave saveexception interruptedexception projectfilepersister saveexception interruptedexception presave dosave postsave handle archiving of previous file or any other common requirements before saving a model to a file param project the project being saved param file the file to which the save is taking place throws save exception when anything goes wrong private void pre save project project file file throws save exception if project null file null throw new save exception no project nor file given saveexception presave saveexception saveexception handle archiving on completion of a save such as renaming the temporary save file to the real filename param project the project being saved param file the file to which the save is taking place throws save exception when anything goes wrong private void post save project project file file throws save exception if project null file null throw new save exception no project nor file given saveexception postsave saveexception saveexception implement in your concrete class to save a project to a file p there is no need to worry about archiving or restoring archive on failure that is handled by the rest of the framework p param project the project to save param file the file to write throws save exception when anything goes wrong throws interrupted exception if the thread is interrupted see org argouml persistence abstract file persister save org argouml kernel project java io file protected abstract void do save project project file file saveexception interruptedexception abstractfilepersister dosave some persisters only provide load functionality for discontinued formats but no save this method returns true by default those peristers that do not provide save must override this return true if this persister is able to save public boolean is save enabled return true issaveenabled some persisters only provide save functionality for deprecated formats other persisters with the same extension will manage loading this method returns true by default those peristers that do not provide load must override this return true if this persister is able to load public boolean is load enabled return true isloadenabled see org argouml persistence project file persister do load java io file public abstract project do load file file throws open exception interrupted exception projectfilepersister doload doload openexception interruptedexception add any object interested in listening to persistence progress param listener the interested listener public void add progress listener progress listener listener listener list add progress listener class listener addprogresslistener progresslistener listenerlist progresslistener remove any object no longer interested in listening to persistence progress param listener the listener to remove public void remove progress listener progress listener listener listener list remove progress listener class listener removeprogresslistener progresslistener listenerlist progresslistener returns true if a file chooser should visualize an icon for the persister return true if the persister is associated to an icon filechooser get a member file persister based on a given project member param pm the project member return the persister protected member file persister get member file persister project member pm class extends member file persister persister null if persisters by class contains key pm persister persisters by class get pm else todo not sure we need to do this but just to be safe for now for class clazz persisters by class key set if clazz is assignable from pm get class persister persisters by class get clazz break if persister null return new persister persister return null memberfilepersister projectmember memberfilepersister getmemberfilepersister projectmember memberfilepersister persistersbyclass containskey persistersbyclass persistersbyclass keyset isassignablefrom getclass persistersbyclass newpersister get a member file persister based on a given tag param tag the tag return the persister protected member file persister get member file persister string tag class extends member file persister persister persisters by tag get tag if persister null return new persister persister return null memberfilepersister memberfilepersister getmemberfilepersister memberfilepersister persistersbytag newpersister private static member file persister new persister class extends member file persister clazz try return clazz new instance catch instantiation exception e log error exception instantiating file persister clazz e return null catch illegal access exception e log error exception instantiating file persister clazz e return null memberfilepersister newpersister memberfilepersister newinstance instantiationexception illegalaccessexception private int number of phases public void set percent phases complete int a percent phases complete this percent phases complete a percent phases complete numberofphases setpercentphasescomplete apercentphasescomplete percentphasescomplete apercentphasescomplete public void set phases completed int a phases completed this phases completed a phases completed setphasescompleted aphasescompleted phasescompleted aphasescompleted public void set number of phases int a number of phases this number of phases a number of phases setnumberofphases anumberofphases numberofphases anumberofphases public int get number of phases return this number of phases getnumberofphases numberofphases protected void next phase throws interrupted exception thread utils check if interrupted phases completed percent phases complete phases completed 100 number of phases fire progress event percent phases complete nextphase interruptedexception threadutils checkifinterrupted phasescompleted percentphasescomplete phasescompleted numberofphases fireprogressevent percentphasescomplete called when a progress event is fired see org argouml taskmgmt progress listener progress org argouml taskmgmt progress event throws interrupted exception if thread is interrupted public void progress progress event event throws interrupted exception thread utils check if interrupted int percent phases left 100 percent phases complete long position event get position long length event get length long proportion position percent phases left length fire progress event percent phases complete proportion progressevent progresslistener progressevent interruptedexception progressevent interruptedexception threadutils checkifinterrupted percentphasesleft percentphasescomplete getposition getlength percentphasesleft fireprogressevent percentphasescomplete inform listeners of any progress notifications param percent the current percentage progress throws interrupted exception if thread is interrupted protected void fire progress event long percent throws interrupted exception progress event event null guaranteed to return a non null array object listeners listener list get listener list process the listeners last to first notifying those that are interested in this event for int i listeners length 2 i 0 i 2 if listeners i progress listener class lazily create the event if event null event new progress event this percent 100 progress listener listeners i 1 progress event interruptedexception fireprogressevent interruptedexception progressevent listenerlist getlistenerlist progresslistener progressevent progresslistener constructor for fig attribute build a new compartment fig text of the given dimensions within the compartment described by code a fig code param x x param y x param w w param h h param a fig the figure describing the whole compartment param np the notation provider for the text deprecated for 0 27 3 by tfmorris use link fig attribute object rectangle diagram settings suppress warnings deprecation deprecated public fig attribute int x int y int w int h fig a fig notation provider np super x y w h a fig np figattribute figtext afig afig figattribute diagramsettings suppresswarnings figattribute afig notationprovider afig construct an attribute fig deprecated by mvw in v0 27 3 use the constructor without np parameter param owner owning uml element param bounds position and size param settings render settings param np notation provider deprecated suppress warnings deprecation public fig attribute object owner rectangle bounds diagram settings settings notation provider np super owner bounds settings np suppresswarnings figattribute diagramsettings notationprovider construct an attribute fig param owner owning uml element param bounds position and size param settings render settings public fig attribute object owner rectangle bounds diagram settings settings super owner bounds settings figattribute diagramsettings override protected int get notation provider type return notation provider factory2 type attribute getnotationprovidertype notationproviderfactory2 type_attribute private status bar my status bar public help listener status bar bar my status bar bar statusbar mystatusbar helplistener statusbar mystatusbar public void help changed argo help event e my status bar show status e get help text helpchanged argohelpevent mystatusbar showstatus gethelptext public void help removed argo help event e my status bar show status helpremoved argohelpevent mystatusbar showstatus the constructor public cr no guard setup head and desc add supported decision uml decision state machines set knowledge types critic kt completeness add trigger guard crnoguard setupheadanddesc addsupporteddecision umldecision state_machines setknowledgetypes kt_completeness addtrigger public boolean predicate2 object dm designer dsgr if model get facade isa transition dm return no problem dm is a transition object source vertex model get facade get source dm if model get facade isa pseudostate source vertex return no problem the source of the transition is a pseudostate if model get facade equals pseudostate kind model get facade get kind source vertex model get pseudostate kind get choice return no problem the source of the transition is a choice object guard model get facade get guard dm boolean no guard guard null model get facade get expression guard null model get facade get body model get facade get expression guard null string model get facade get body model get facade get expression guard length 0 if no guard return problem found return no problem getfacade isatransition no_problem sourcevertex getfacade getsource getfacade isapseudostate sourcevertex no_problem getfacade equalspseudostatekind getfacade getkind sourcevertex getpseudostatekind getchoice no_problem getfacade getguard noguard getfacade getexpression getfacade getbody getfacade getexpression getfacade getbody getfacade getexpression noguard problem_found no_problem public set object get criticized design materials set object ret new hash set object ret add model get meta types get transition return ret getcriticizeddesignmaterials hashset getmetatypes gettransition constructor for prop paneluml class diagram public prop paneluml class diagram super translator localize label class diagram lookup icon class diagram proppanelumlclassdiagram proppanelumlclassdiagram lookupicon classdiagram the constructor public source path dialog super translator localize action generate code for project argo dialog ok cancel option true src path table new j table src path table set model src path table model src path table set auto resize mode j table auto resize last column hack don t show first column where the model element object is placed table column elem col src path table get column model get column 0 elem col set min width 0 elem col set max width 0 del button new j button translator localize button delete del button set enabled false add button del button 0 rowsm src path table get selection model rowsm add list selection listener new selection listener del button add action listener this set content new j scroll pane src path table sourcepathdialog argodialog ok_cancel_option srcpathtable jtable srcpathtable setmodel srcpathtablemodel srcpathtable setautoresizemode jtable auto_resize_last_column tablecolumn elemcol srcpathtable getcolumnmodel getcolumn elemcol setminwidth elemcol setmaxwidth delbutton jbutton delbutton setenabled addbutton delbutton srcpathtable getselectionmodel addlistselectionlistener selectionlistener delbutton addactionlistener setcontent jscrollpane srcpathtable public void action performed action event e super action performed e ok button if e get source get ok button button ok action performed delete button if e get source del button delete selected settings actionperformed actionevent actionperformed getsource getokbutton buttonokactionperformed getsource delbutton deleteselectedsettings the ok button is pressed private void button ok action performed src path ctrl set source path src path table model buttonokactionperformed srcpathctrl setsourcepath srcpathtablemodel retrieve the selected rows indexes private int get selected indexes int first selected row rowsm get min selection index int last selected row rowsm get max selection index linked list selected indexes list new linked list int num selected rows 0 for int i first selected row i last selected row i if rowsm is selected index i num selected rows selected indexes list add integer value of i int indexes new int selected indexes list size java util iterator it selected indexes list iterator for int i 0 i indexes length it has next i indexes i integer it next int value return indexes getselectedindexes firstselectedrow getminselectionindex lastselectedrow getmaxselectionindex linkedlist selectedindexeslist linkedlist numselectedrows firstselectedrow lastselectedrow isselectedindex numselectedrows selectedindexeslist valueof selectedindexeslist selectedindexeslist hasnext intvalue delete the source path settings of the selected table rows private void delete selected settings find selected rows and make a list of the model elements that are selected int selected indexes get selected indexes confirm with the user that he wants to delete presenting the list of settings to delete string buffer msg new string buffer msg append translator localize dialog source path del question for int i 0 i selected indexes length i msg append n msg append src path table model getme name selected indexes i msg append msg append src path table model getme type selected indexes i msg append int res j option pane show confirm dialog this msg to string translator localize dialog title source path del j option pane ok cancel option if res j option pane ok option procede with the deletion in the model int first sel rowsm get min selection index for int i 0 i selected indexes length first sel 1 i src path ctrl delete source path src path table model get model element first sel src path table model remove row first sel first sel rowsm get min selection index disable the button since no row will be selected now del button set enabled false deleteselectedsettings selectedindexes getselectedindexes stringbuffer stringbuffer selectedindexes srcpathtablemodel getmename selectedindexes srcpathtablemodel getmetype selectedindexes joptionpane showconfirmdialog tostring joptionpane ok_cancel_option joptionpane ok_option firstsel getminselectionindex selectedindexes firstsel srcpathctrl deletesourcepath srcpathtablemodel getmodelelement firstsel srcpathtablemodel removerow firstsel firstsel getminselectionindex delbutton setenabled class selection listener implements list selection listener public void value changed javax swing event list selection event e if del button is enabled del button set enabled true selectionlistener listselectionlistener valuechanged listselectionevent delbutton isenabled delbutton setenabled constructor for uml association end navigable check box public uml action synch check box super translator localize checkbox synch lc action set synch get instance is synch umlassociationendnavigablecheckbox umlactionsynchcheckbox actionsetsynch getinstance issynch public void build model if get target null set selected model get facade is synch get target buildmodel gettarget setselected getfacade issynch gettarget the default constructor but should never be called directly use link fig extend object diagram settings since that sets the owner p deprecated for 0 27 3 by tfmorris use link fig extend object diagram settings suppress warnings deprecation deprecated public fig extend initialize null figextend diagramsettings figextend diagramsettings suppresswarnings figextend private void initialize object owner the extend label it s not a true stereotype so don t use the stereotype support int y get name fig get bounds height int y y0 stereoheight label new argo fig text owner new rectangle x0 y default width stereoheight get settings false y y stereoheight label set filled false label set line width 0 label set editable false label set text get label label calc bounds set up fig text to hold the condition condition new argo fig text owner new rectangle x0 y default width stereoheight get settings false y y stereoheight condition set filled false condition set line width 0 join all into a group fg new fig text group owner get settings uml spec for extend doesn t call for name nor stereotype fg add fig label fg add fig condition fg calc bounds place in the middle of the line and ensure the line is dashed add an arrow with an open arrow head remember that for an extends relationship the arrow points to the base use case but because of the way we draw it that is still the destination end add path item fg new path item placement this fg 50 10 set dashed true set dest arrow head end arrow make the edge go between nearest points set between nearest points true getnamefig getbounds argofigtext default_width getsettings setfilled setlinewidth seteditable settext getlabel calcbounds figtext argofigtext default_width getsettings setfilled setlinewidth figtextgroup getsettings addfig addfig calcbounds addpathitem pathitemplacement setdashed setdestarrowhead endarrow setbetweennearestpoints the main constructor builds the fig edge required and makes the given edge object its owner p param edge the edge that will own the fig deprecated for 0 27 3 by tfmorris use link fig extend object diagram settings suppress warnings deprecation deprecated public fig extend object edge this set owner edge figedge figextend diagramsettings suppresswarnings figextend setowner construct an extend fig param owner uml element param settings rendering settings public fig extend object owner diagram settings settings super owner settings initialize owner figextend diagramsettings set a new fig to represent this edge p we invoke the superclass accessor then change aspects of the new fig that are not as we want in this case to use dashed lines p param f the fig to use override public void set fig fig f super set fig f make sure the line is dashed set dashed true setfig setfig setdashed define whether the given fig can be edited it can t p param f the fig about which the enquiry is being made ignored in this implementation return code false code under all circumstances override protected boolean can edit fig f return false canedit override public void paint graphics g end arrow set line color get line color super paint g endarrow setlinecolor getlinecolor override protected void update listeners object old owner object new owner set object listeners new hash set object if new owner null listeners add new object new owner new string condition remove update element listeners listeners updatelisteners oldowner newowner hashset newowner newowner updateelementlisteners override protected void model changed property change event e object extend get owner if extend null return super model changed e if condition equals e get property name rendering changed modelchanged propertychangeevent getowner modelchanged getpropertyname renderingchanged override public void rendering changed super rendering changed update condition text update label renderingchanged renderingchanged updateconditiontext updatelabel now sort out the condition text use the null string if there is no condition set the condition is a boolean expression so we show the body of it and ignore the language protected void update condition text if get owner null return object c model get facade get condition get owner if c null condition set text else object expr model get facade get body c if expr null condition set text else condition set text string expr let the group recalculate its bounds and then tell gef we ve finished fg calc bounds end trans booleanexpression updateconditiontext getowner getfacade getcondition getowner settext getfacade getbody settext settext calcbounds endtrans protected void update label label set text get label updatelabel settext getlabel private string get label return notation utility uml format stereotype extend get notation settings is use guillemets getlabel notationutilityuml formatstereotype getnotationsettings isuseguillemets the constructor public uml deprecated check box super argo deprecated tag umldeprecatedcheckbox deprecated_tag see org argouml uml ui abstract action navigate navigate to java lang object protected object navigate to object source return model get facade get association source abstractactionnavigate navigateto navigateto getfacade getassociation the constructor public cr object without component setup head and desc add supported decision uml decision patterns crobjectwithoutcomponent setupheadanddesc addsupporteddecision umldecision override public boolean predicate2 object dm designer dsgr if dm instanceof uml deployment diagram return no problem uml deployment diagram dd uml deployment diagram dm list set offs compute offenders dd if offs null return no problem return problem found umldeploymentdiagram no_problem umldeploymentdiagram umldeploymentdiagram listset computeoffenders no_problem problem_found override public to do item to do item object dm designer dsgr uml deployment diagram dd uml deployment diagram dm list set offs compute offenders dd return new uml to do item this offs dsgr todoitem todoitem umldeploymentdiagram umldeploymentdiagram listset computeoffenders umltodoitem override public boolean still valid to do item i designer dsgr if is active return false list set offs i get offenders uml deployment diagram dd uml deployment diagram offs get 0 if predicate dm dsgr return false list set new offs compute offenders dd boolean res offs equals new offs return res stillvalid todoitem isactive listset getoffenders umldeploymentdiagram umldeploymentdiagram listset newoffs computeoffenders newoffs if there are objects that are not inside a component or a component instance the returned vector set is not null then in the vector set are the uml deployment diagram and all fig objects with no enclosing fig component or fig component instance param dd the diagram to check return the set of offenders public list set compute offenders uml deployment diagram dd collection figs dd get layer get contents list set offs null for object obj figs if obj instanceof fig object continue fig object fo fig object obj fig enclosing fo get enclosing fig if enclosing null model get facade isa component enclosing get owner model get facade isa component instance enclosing get owner if offs null offs new list set offs add dd offs add fo return offs umldeploymentdiagram figobjects figcomponent figcomponentinstance listset computeoffenders umldeploymentdiagram getlayer getcontents listset figobject figobject figobject getenclosingfig getfacade isacomponent getowner getfacade isacomponentinstance getowner listset constructor for action new call action protected action new call action super put value action name translator localize button new callaction actionnewcallaction actionnewcallaction putvalue see org argouml uml ui behavior common behavior action new action create action protected object create action return model get common behavior factory create call action common_behavior actionnewaction createaction createaction getcommonbehaviorfactory createcallaction return returns the singleton public static action new call action get instance return singleton actionnewcallaction getinstance return an instanceof this class usable for a button public static action new action get button instance action new action a new action new call action public void action performed action event e object target target manager get instance get model target if model get facade isa transition target return set target target super action performed e a put value short description a get value action name object icon resource loader wrapper lookup icon resource call action a put value small icon icon a put value role roles effect return a actionnewaction getbuttoninstance actionnewaction actionnewcallaction actionperformed actionevent targetmanager getinstance getmodeltarget getfacade isatransition settarget actionperformed putvalue short_description getvalue resourceloaderwrapper lookupiconresource callaction putvalue small_icon putvalue public void action performed action event e object target target manager get instance get model target if model get facade isa transition target return set target target super action performed e actionperformed actionevent targetmanager getinstance getmodeltarget getfacade isatransition settarget actionperformed the constructor param objectflowstate the uml object public object flow state state notation object objectflowstate if model get facade isa object flow state objectflowstate throw new illegal argument exception this is not a object flow state objectflowstatestatenotation getfacade isaobjectflowstate illegalargumentexception objectflowstate construct a new predicate which will test equality against the given pattern object using the java equals method param pattern object the object to test for equality with public predicate equals object pattern object pattern pattern object patternobject predicateequals patternobject patternobject public boolean evaluate object object if pattern null return object null return pattern equals object creates a new instance of wiz add operation public wiz add operation super wizaddoperation wizaddoperation public void do action int old step switch old step case 1 string new name get suggestion if step1 null new name step1 get text object me get model element object return type project manager get manager get current project get default return type model get core factory build operation2 me return type new name break doaction oldstep oldstep newname getsuggestion newname gettext getmodelelement returntype projectmanager getmanager getcurrentproject getdefaultreturntype getcorefactory buildoperation2 returntype newname param s the new instructions public void set instructions string s instructions s setinstructions public j panel make panel int new step switch new step case 1 if step1 null step1 new wiz step text field this instructions label offer suggestion return step1 return null jpanel makepanel newstep newstep wizsteptextfield offersuggestion main constructor for a link fig interface parent link org argouml uml diagram ui fig node model element will have created the main box link get big port and its name link get name fig and stereotype link get stereotype fig this constructor creates a box for the operations p the properties of all these graphic elements are adjusted appropriately the main boxes are all filled and have outlines p for reasons i don t understand the stereotype is created in a box with lines so we have to created a blanking rectangle to overlay the bottom line and avoid three compartments showing p em warning em much of the graphics positioning is hard coded the overall figure is placed at location 10 10 the stereotype compartment is created 15 pixels high in the parent but we change it to 19 pixels 1 more than link stereoheight here the operations box is created at 19 pixels 2 more than link rowheight p caution this constructor with no arguments is the only one that does enable size checking false all others must set it true this is because this constructor is the only one called when loading a project in this case the parsed size must be maintained p deprecated for 0 27 3 by tfmorris use link fig interface object rectangle diagram settings suppress warnings deprecation deprecated public fig interface initialize figinterface fignodemodelelement getbigport getnamefig getstereotypefig enablesizechecking figinterface diagramsettings suppresswarnings figinterface initialization common to multiple constructors this can be merged back into the last constructor when the deprecated ones have been removed private void initialize get stereotype fig set keyword interface put all the bits together suppressing bounds calculations until we re all done for efficiency enable size checking false set suppress calc bounds true dimension size new dimension 0 0 add fig get big port add fig get stereotype fig add child dimensions size get stereotype fig add fig get name fig add child dimensions size get name fig add fig get operations fig add child dimensions size get operations fig add fig border fig set suppress calc bounds false set the bounds of the figure to the total of the above enable size checking true set bounds x0 y0 size width size height getstereotypefig setkeyword enablesizechecking setsuppresscalcbounds addfig getbigport addfig getstereotypefig addchilddimensions getstereotypefig addfig getnamefig addchilddimensions getnamefig addfig getoperationsfig addchilddimensions getoperationsfig addfig borderfig setsuppresscalcbounds enablesizechecking setbounds constructor for use if this figure is created for an existing interface node in the metamodel param gm not actually used in the current implementation param node the uml object being placed deprecated for 0 27 3 by tfmorris use link fig interface object rectangle diagram settings suppress warnings deprecation deprecated public fig interface suppress warnings unused graph model gm object node this set owner node enable size checking true figinterface diagramsettings suppresswarnings figinterface suppresswarnings graphmodel setowner enablesizechecking construct an interface fig param owner owning uml element param bounds position and size param settings rendering settings public fig interface object owner rectangle bounds diagram settings settings super owner bounds settings initialize figinterface diagramsettings see org tigris gef presentation fig make selection override public selection make selection return new selection interface this makeselection makeselection selectioninterface gets the minimum size permitted for an interface on the diagram p parts of this are hardcoded p return the size of the minimum bounding box override public dimension get minimum size use a size to build up the minimum size start with the size of the name compartment and build up dimension a size get name fig get minimum size a size height name v padding 2 a size height math max name fig height a size height if we have a stereotype displayed then allow some space for that width and height a size add child dimensions a size get stereotype fig a size add child dimensions a size get operations fig we want to maintain a minimum width for interfaces a size width math max width a size width return a size getminimumsize asize asize getnamefig getminimumsize asize name_v_padding asize name_fig_height asize asize addchilddimensions asize getstereotypefig asize addchilddimensions asize getoperationsfig asize asize asize override public void translate int dx int dy super translate dx dy editor ce globals cur editor if ce null selection sel ce get selection manager find selection for this if sel instanceof selection class selection class sel hide buttons cureditor getselectionmanager findselectionfor selectionclass selectionclass hidebuttons override public void set enclosing fig fig encloser fig old encloser get enclosing fig if encloser null encloser null model get facade isa instance encloser get owner super set enclosing fig encloser if model get facade isa model element get owner return if this fig is not visible do not adapt the uml model this is used for deleting see issue 3042 if is visible return object me get owner object m null try if moved into an package if encloser null old encloser encloser model get facade isa package encloser get owner model get core helper set namespace me encloser get owner if default namespace is not already set if model get facade get namespace me null target manager get instance get target instanceof argo diagram m argo diagram target manager get instance get target get namespace model get core helper set namespace me m catch exception e log error could not set package due to e at encloser e the next if clause is important for the deployment diagram it detects if the enclosing fig is a component in this case the container will be set for the owning interface if encloser null model get facade isa component encloser get owner move into component encloser super set enclosing fig encloser setenclosingfig oldencloser getenclosingfig getfacade isainstance getowner setenclosingfig getfacade isamodelelement getowner isvisible getowner oldencloser getfacade isapackage getowner getcorehelper setnamespace getowner getfacade getnamespace targetmanager getinstance gettarget argodiagram argodiagram targetmanager getinstance gettarget getnamespace getcorehelper setnamespace getfacade isacomponent getowner moveintocomponent setenclosingfig used by pgml tee return the class name and bounds together with compartment visibility override public string class name and bounds return super class name and bounds operations visible is operations visible classnameandbounds classnameandbounds operationsvisible isoperationsvisible sets the bounds but the size will be at least the one returned by link get minimum size unless checking of size is disabled p if the required height is bigger then the additional height is equally distributed among all figs i e compartments such that the cumulated height of all visible figs equals the demanded height p some of this has magic numbers hardcoded in p param x desired x coordinate of upper left corner param y desired y coordinate of upper left corner param w desired width of the fig interface param h desired height of the fig interface override protected void set standard bounds final int x final int y final int w final int h save our old boundaries needed later and get minimum size info rectangle old bounds get bounds set bounds of big box get big port set bounds x y w h border fig set bounds x y w h int current height 0 if get stereotype fig is visible int stereotype height get stereotype fig get minimum size height get stereotype fig set bounds x y w stereotype height current height stereotype height int name height get name fig get minimum size height get name fig set bounds x y current height w name height current height name height if get operations fig is visible int operationsy y current height int operations height h y operationsy 1 get operations fig set bounds x operationsy w operations height now force calculation of the bounds of the figure update the edges and trigger anyone who s listening to see if the bounds property has changed calc bounds update edges fire prop change bounds old bounds get bounds getminimumsize figinterface figinterface setstandardbounds oldbounds getbounds getbigport setbounds borderfig setbounds currentheight getstereotypefig isvisible stereotypeheight getstereotypefig getminimumsize getstereotypefig setbounds stereotypeheight currentheight stereotypeheight nameheight getnamefig getminimumsize getnamefig setbounds currentheight nameheight currentheight nameheight getoperationsfig isvisible currentheight operationsheight getoperationsfig setbounds operationsheight calcbounds updateedges firepropchange oldbounds getbounds constructor for uml state machine top list model public uml transition source list model super source umlstatemachinetoplistmodel umltransitionsourcelistmodel see org argouml uml ui uml model element list model2 build model list protected void build model list remove all elements add element model get facade get source get target umlmodelelementlistmodel2 buildmodellist buildmodellist removeallelements addelement getfacade getsource gettarget see org argouml uml ui uml model element list model2 is valid element object protected boolean is valid element object element return element model get facade get source get target umlmodelelementlistmodel2 isvalidelement isvalidelement getfacade getsource gettarget param owner the code frame code from which the dialog is displayed param parent determines the position of the chooser param name the initial font name value param size the initial font size value public argoj font chooser frame owner j component parent string name int size super owner true set location relative to parent this result name name this result size size initialize argojfontchooser jcomponent setlocationrelativeto resultname resultsize this method initializes this private void initialize this set size 299 400 this set title translator localize dialog fontchooser this set content pane getj content pane update preview setsize settitle setcontentpane getjcontentpane updatepreview this method initializes j content pane return javax swing j panel private j panel getj content pane if j content pane null grid bag constraints grid bag constraints8 new grid bag constraints grid bag constraints8 gridx 4 grid bag constraints8 anchor grid bag constraints northeast grid bag constraints8 insets new insets 0 0 5 5 grid bag constraints8 weightx 0 0 grid bag constraints8 ipadx 0 grid bag constraints8 gridy 5 grid bag constraints grid bag constraints7 new grid bag constraints grid bag constraints7 gridx 3 grid bag constraints7 fill grid bag constraints none grid bag constraints7 weightx 1 0 grid bag constraints7 anchor grid bag constraints northeast grid bag constraints7 insets new insets 0 0 5 5 grid bag constraints7 weighty 0 0 grid bag constraints7 gridwidth 1 grid bag constraints7 ipadx 0 grid bag constraints7 gridy 5 grid bag constraints grid bag constraints6 new grid bag constraints grid bag constraints6 gridx 0 grid bag constraints6 gridwidth 5 grid bag constraints6 fill grid bag constraints horizontal grid bag constraints6 weightx 1 0 grid bag constraints6 insets new insets 5 5 5 5 grid bag constraints6 anchor grid bag constraints northwest grid bag constraints6 gridy 4 jlbl preview new j label jlbl preview set text translator localize label diagramappearance preview jlbl preview set preferred size new dimension 52 50 grid bag constraints grid bag constraints5 new grid bag constraints grid bag constraints5 gridx 4 grid bag constraints5 anchor grid bag constraints northwest grid bag constraints5 insets new insets 5 5 0 0 grid bag constraints5 gridy 0 jlbl size new j label jlbl size set text translator localize label diagramappearance fontsize grid bag constraints grid bag constraints4 new grid bag constraints grid bag constraints4 gridx 0 grid bag constraints4 anchor grid bag constraints northwest grid bag constraints4 insets new insets 5 5 0 0 grid bag constraints4 gridy 0 jlbl families new j label jlbl families set text translator localize label diagramappearance fontlist grid bag constraints grid bag constraints3 new grid bag constraints grid bag constraints3 gridx 2 grid bag constraints3 anchor grid bag constraints northwest grid bag constraints3 insets new insets 5 5 0 0 grid bag constraints3 gridy 3 grid bag constraints grid bag constraints2 new grid bag constraints grid bag constraints2 gridx 0 grid bag constraints2 anchor grid bag constraints northwest grid bag constraints2 insets new insets 5 5 0 0 grid bag constraints2 gridy 3 grid bag constraints grid bag constraints1 new grid bag constraints grid bag constraints1 fill grid bag constraints both grid bag constraints1 gridy 2 grid bag constraints1 weightx 0 0 grid bag constraints1 weighty 1 0 grid bag constraints1 insets new insets 5 0 0 5 grid bag constraints1 anchor grid bag constraints northwest grid bag constraints1 gridwidth 2 grid bag constraints1 gridx 4 grid bag constraints grid bag constraints new grid bag constraints grid bag constraints fill grid bag constraints both grid bag constraints gridy 2 grid bag constraints weightx 1 0 grid bag constraints weighty 1 0 grid bag constraints insets new insets 5 5 0 5 grid bag constraints gridwidth 4 grid bag constraints gridheight 1 grid bag constraints anchor grid bag constraints northwest grid bag constraints gridx 0 j content pane new j panel j content pane set layout new grid bag layout j scroll pane jscp families new j scroll pane jscp families set viewport view get jlst families j scroll pane jscp sizes new j scroll pane jscp sizes set viewport view get jlst sizes j content pane add jscp families grid bag constraints j content pane add jscp sizes grid bag constraints1 j content pane add get jchb bold grid bag constraints2 j content pane add get jchb italic grid bag constraints3 j content pane add jlbl families grid bag constraints4 j content pane add jlbl size grid bag constraints5 j content pane add jlbl preview grid bag constraints6 j content pane add get jbtn ok grid bag constraints7 j content pane add get jbtn cancel grid bag constraints8 return j content pane jcontentpane jpanel jpanel getjcontentpane jcontentpane gridbagconstraints gridbagconstraints8 gridbagconstraints gridbagconstraints8 gridbagconstraints8 gridbagconstraints gridbagconstraints8 gridbagconstraints8 gridbagconstraints8 gridbagconstraints8 gridbagconstraints gridbagconstraints7 gridbagconstraints gridbagconstraints7 gridbagconstraints7 gridbagconstraints gridbagconstraints7 gridbagconstraints7 gridbagconstraints gridbagconstraints7 gridbagconstraints7 gridbagconstraints7 gridbagconstraints7 gridbagconstraints7 gridbagconstraints gridbagconstraints6 gridbagconstraints gridbagconstraints6 gridbagconstraints6 gridbagconstraints6 gridbagconstraints gridbagconstraints6 gridbagconstraints6 gridbagconstraints6 gridbagconstraints gridbagconstraints6 jlblpreview jlabel jlblpreview settext jlblpreview setpreferredsize gridbagconstraints gridbagconstraints5 gridbagconstraints gridbagconstraints5 gridbagconstraints5 gridbagconstraints gridbagconstraints5 gridbagconstraints5 jlblsize jlabel jlblsize settext gridbagconstraints gridbagconstraints4 gridbagconstraints gridbagconstraints4 gridbagconstraints4 gridbagconstraints gridbagconstraints4 gridbagconstraints4 jlblfamilies jlabel jlblfamilies settext gridbagconstraints gridbagconstraints3 gridbagconstraints gridbagconstraints3 gridbagconstraints3 gridbagconstraints gridbagconstraints3 gridbagconstraints3 gridbagconstraints gridbagconstraints2 gridbagconstraints gridbagconstraints2 gridbagconstraints2 gridbagconstraints gridbagconstraints2 gridbagconstraints2 gridbagconstraints gridbagconstraints1 gridbagconstraints gridbagconstraints1 gridbagconstraints gridbagconstraints1 gridbagconstraints1 gridbagconstraints1 gridbagconstraints1 gridbagconstraints1 gridbagconstraints gridbagconstraints1 gridbagconstraints1 gridbagconstraints gridbagconstraints gridbagconstraints gridbagconstraints gridbagconstraints gridbagconstraints gridbagconstraints gridbagconstraints gridbagconstraints gridbagconstraints gridbagconstraints gridbagconstraints gridbagconstraints gridbagconstraints jcontentpane jpanel jcontentpane setlayout gridbaglayout jscrollpane jscpfamilies jscrollpane jscpfamilies setviewportview getjlstfamilies jscrollpane jscpsizes jscrollpane jscpsizes setviewportview getjlstsizes jcontentpane jscpfamilies gridbagconstraints jcontentpane jscpsizes gridbagconstraints1 jcontentpane getjchbbold gridbagconstraints2 jcontentpane getjchbitalic gridbagconstraints3 jcontentpane jlblfamilies gridbagconstraints4 jcontentpane jlblsize gridbagconstraints5 jcontentpane jlblpreview gridbagconstraints6 jcontentpane getjbtnok gridbagconstraints7 jcontentpane getjbtncancel gridbagconstraints8 jcontentpane this method initializes jlst families return javax swing j list private j list get jlst families if jlst families null jlst families new j list jlst families set model new default list model string font names graphics environment get local graphics environment get available font family names for string font name font names default list model jlst families get model add element font name jlst families set selected value result name true jlst families get selection model add list selection listener new list selection listener public void value changed list selection event e if jlst families get selected value null result name string jlst families get selected value update preview return jlst families jlstfamilies jlist jlist getjlstfamilies jlstfamilies jlstfamilies jlist jlstfamilies setmodel defaultlistmodel fontnames graphicsenvironment getlocalgraphicsenvironment getavailablefontfamilynames fontname fontnames defaultlistmodel jlstfamilies getmodel addelement fontname jlstfamilies setselectedvalue resultname jlstfamilies getselectionmodel addlistselectionlistener listselectionlistener valuechanged listselectionevent jlstfamilies getselectedvalue resultname jlstfamilies getselectedvalue updatepreview jlstfamilies new list selection listener public void value changed list selection event e if jlst families get selected value null result name string jlst families get selected value update preview listselectionlistener valuechanged listselectionevent jlstfamilies getselectedvalue resultname jlstfamilies getselectedvalue updatepreview this method initializes jlst sizes return javax swing j list private j list get jlst sizes if jlst sizes null jlst sizes new j list new integer integer value of 8 integer value of 9 integer value of 10 integer value of 11 integer value of 12 integer value of 14 integer value of 16 integer value of 18 integer value of 20 integer value of 22 integer value of 24 integer value of 26 integer value of 28 integer value of 36 integer value of 48 integer value of 72 jlst sizes set selected value result size true jlst sizes get selection model add list selection listener new list selection listener public void value changed list selection event e if jlst sizes get selected value null result size integer jlst sizes get selected value update preview return jlst sizes jlstsizes jlist jlist getjlstsizes jlstsizes jlstsizes jlist valueof valueof valueof valueof valueof valueof valueof valueof valueof valueof valueof valueof valueof valueof valueof valueof jlstsizes setselectedvalue resultsize jlstsizes getselectionmodel addlistselectionlistener listselectionlistener valuechanged listselectionevent jlstsizes getselectedvalue resultsize jlstsizes getselectedvalue updatepreview jlstsizes new list selection listener public void value changed list selection event e if jlst sizes get selected value null result size integer jlst sizes get selected value update preview listselectionlistener valuechanged listselectionevent jlstsizes getselectedvalue resultsize jlstsizes getselectedvalue updatepreview updates preview label private void update preview int style 0 font preview font new font result name style result size jlbl preview set font preview font updatepreview previewfont resultname resultsize jlblpreview setfont previewfont this method initializes jbtn ok return javax swing j button private j button get jbtn ok if jbtn ok null jbtn ok new j button jbtn ok set text translator localize button ok jbtn ok add action listener new action listener public void action performed action event e is ok true dispose set visible false return jbtn ok jbtnok jbutton jbutton getjbtnok jbtnok jbtnok jbutton jbtnok settext jbtnok addactionlistener actionlistener actionperformed actionevent isok setvisible jbtnok jbtn ok add action listener new action listener public void action performed action event e is ok true dispose set visible false jbtnok addactionlistener actionlistener actionperformed actionevent isok setvisible this method initializes jbtn cancel return javax swing j button private j button get jbtn cancel if jbtn cancel null jbtn cancel new j button jbtn cancel set text translator localize button cancel jbtn cancel add action listener new action listener public void action performed action event e is ok false dispose set visible false return jbtn cancel jbtncancel jbutton jbutton getjbtncancel jbtncancel jbtncancel jbutton jbtncancel settext jbtncancel addactionlistener actionlistener actionperformed actionevent isok setvisible jbtncancel jbtn cancel add action listener new action listener public void action performed action event e is ok false dispose set visible false jbtncancel addactionlistener actionlistener actionperformed actionevent isok setvisible returns true if dilaog result is ok return dialog result public boolean is ok return is ok isok isok result return result public string get result name return result name getresultname resultname result return result public int get result size return result size getresultsize resultsize param new predicate the new list predicate public void set list predicate predicate new predicate list predicate new predicate newpredicate setlistpredicate newpredicate listpredicate newpredicate return the list predicate deprecated for 0 27 3 by tfmorris use link abstract go list2 get predicate public predicate get list predicate return list predicate abstractgolist2 getpredicate getlistpredicate listpredicate see javax swing tree tree model get root public object get root throw new unsupported operation exception treemodel getroot getroot unsupportedoperationexception param r ignored public void set root object r does nothing setroot constructor for uml synch state bound document public uml synch state bound document super bound umlsynchstatebounddocument umlsynchstatebounddocument protected void set property string text if text equals model get state machines helper set bound get target 0 else model get state machines helper set bound get target integer value of text int value setproperty getstatemachineshelper setbound gettarget getstatemachineshelper setbound gettarget valueof intvalue protected string get property int bound model get facade get bound get target if bound 0 return else return string value of bound getproperty getfacade getbound gettarget valueof public void insert string int offset string str attribute set a throws bad location exception try make sure it s parseable as an number integer parse int str super insert string offset str a catch number format exception e ignored we just skipped inserting it in our document insertstring attributeset badlocationexception parseint insertstring numberformatexception the constructor param enum literal the uml element public enumeration literal notation uml object enum literal super enum literal enumliteral enumerationliteralnotationuml enumliteral enumliteral override public string get parsing help return parsing help fig enumeration literal getparsinghelp override public void parse object model element string text try parse enumeration literal fig model get facade get enumeration model element model element text catch parse exception pe string msg statusmsg bar error parsing enumeration literal object args pe get localized message integer value of pe get error offset argo event pump fire event new argo help event argo event types help changed this translator message format msg args modelelement parseenumerationliteralfig getfacade getenumeration modelelement modelelement parseexception getlocalizedmessage valueof geterroroffset argoeventpump fireevent argohelpevent argoeventtypes help_changed messageformat parse a string representing one or more separated enumeration literals param enumeration the enumeration that the literal belongs to param literal the literal on which the editing will happen param text the string to parse throws parse exception for invalid input so that the right message may be shown to the user protected void parse enumeration literal fig object enumeration object literal string text throws parse exception if enumeration null literal null return project project project manager get manager get current project parse exception pex null int start 0 int end notation utility uml index of next checked semicolon text start if end 1 no text we may remove the literal project move to trash literal return string s text substring start end trim if s length 0 no non white chars in text remove literal project move to trash literal return parse enumeration literal s literal int i model get facade get enumeration literals enumeration index of literal check for more literals separated start end 1 end notation utility uml index of next checked semicolon text start while end start end text length s text substring start end trim if s length 0 yes there are more object new literal model get core factory create enumeration literal if new literal null try if i 1 model get core helper add literal enumeration i new literal else model get core helper add literal enumeration 0 new literal parse enumeration literal s new literal catch parse exception ex if pex null pex ex start end 1 end notation utility uml index of next checked semicolon text start if pex null throw pex parseexception parseenumerationliteralfig parseexception projectmanager getmanager getcurrentproject parseexception notationutilityuml indexofnextcheckedsemicolon movetotrash movetotrash parseenumerationliteral getfacade getenumerationliterals indexof notationutilityuml indexofnextcheckedsemicolon newliteral getcorefactory createenumerationliteral newliteral getcorehelper addliteral newliteral getcorehelper addliteral newliteral parseenumerationliteral newliteral parseexception notationutilityuml indexofnextcheckedsemicolon protected void parse enumeration literal string text object literal throws parse exception text text trim if text length 0 return strip any trailing semi colons if text char at text length 1 text text substring 0 text length 2 my tokenizer st string name null string builder stereotype null string token try st new my tokenizer text u00ab u00bb while st has more tokens token st next token if equals token u00ab equals token if stereotype null string msg parsing error model element name twin stereotypes throw new parse exception translator localize msg st get token index stereotype new string builder while true token st next token if equals token u00bb equals token break stereotype append token else if name null string msg parsing error model element name twin names throw new parse exception translator localize msg st get token index name token catch no such element exception nsee string msg parsing error model element name unexpected name element throw new parse exception translator localize msg text length catch parse exception pre throw pre if name null name name trim if name null model get core helper set name literal name stereotype utility deal with stereotypes literal stereotype false return parseenumerationliteral parseexception charat mytokenizer stringbuilder mytokenizer hasmoretokens nexttoken parseexception gettokenindex stringbuilder nexttoken parseexception gettokenindex nosuchelementexception parseexception parseexception getcorehelper setname stereotypeutility dealwithstereotypes suppress warnings deprecation deprecated override public string to string object model element map args return to string model element notation utility uml is value use guillemets args suppresswarnings tostring modelelement tostring modelelement notationutilityuml isvalue useguillemets private string to string object model element boolean use guillemets string name str heuristic algorithm do not show stereotypes if there is no name if model get facade get name model element null name str notation utility uml generate stereotype model element use guillemets if name str length 0 name str name str model get facade get name model element trim return name str tostring modelelement useguillemets namestr getfacade getname modelelement namestr notationutilityuml generatestereotype modelelement useguillemets namestr namestr namestr getfacade getname modelelement namestr override public string to string object model element notation settings settings return to string model element settings is use guillemets tostring modelelement notationsettings tostring modelelement isuseguillemets constructor which builds a profile reference for argouml core profiles by li prefixing the file name with link profiles resource path and using this as the path li li and prefixing the file name with link profiles base url and using this as the public reference li param file name the profile file name throws malformedurl exception if the built url is incorrect public core profile reference string file name throws malformedurl exception super profiles resource path file name new url profiles base url file name assert file name null null isn t acceptable as the profile file name assert equals file name the empty string isn t acceptable as the profile file name profilereference filename profiles_resource_path filename profiles_base_url publicreference filename malformedurlexception coreprofilereference filename malformedurlexception profiles_resource_path filename profiles_base_url filename filename filename main constructor for the creation of a new actor deprecated for 0 27 3 by tfmorris use link fig actor object rectangle diagram settings suppress warnings deprecation deprecated public fig actor construct figs figactor diagramsettings suppresswarnings figactor constructfigs private void construct figs color fg get line color color fill get fill color put this rectangle behind the rest so it goes first fig rect big port new actor port fig rect x0 y0 0 0 this fig circle head new fig circle x0 2 y0 16 15 fg fill fig line body new fig line x0 10 y0 15 20 40 fg fig line arms new fig line x0 y0 20 30 30 fg fig line left leg new fig line x0 10 y0 30 15 55 fg fig line right leg new fig line x0 10 y0 30 25 55 fg body set line width line width arms set line width line width left leg set line width line width right leg set line width line width get name fig set bounds x0 y0 45 20 20 get name fig set text filled false get name fig set filled false get name fig set line width 0 initialize any other figs here get stereotype fig set bounds get big port get center x get big port get center y 0 0 set suppress calc bounds true add figs to the fig node in back to front order add fig big port add fig get name fig add fig head add fig body add fig arms add fig left leg add fig right leg add fig get stereotype fig set big port big port set suppress calc bounds false constructfigs getlinecolor getfillcolor figrect bigport actorportfigrect figcircle figcircle figline figline figline figline figline leftleg figline figline rightleg figline setlinewidth line_width setlinewidth line_width leftleg setlinewidth line_width rightleg setlinewidth line_width getnamefig setbounds getnamefig settextfilled getnamefig setfilled getnamefig setlinewidth getstereotypefig setbounds getbigport getcenter getbigport getcenter setsuppresscalcbounds fignode addfig bigport addfig getnamefig addfig addfig addfig addfig leftleg addfig rightleg addfig getstereotypefig setbigport bigport setsuppresscalcbounds constructor for use if this figure is created for an existing actor node in the metamodel p param gm ignored param node the uml object being placed deprecated for 0 27 3 by tfmorris use link fig actor object rectangle diagram settings suppress warnings deprecation deprecated public fig actor suppress warnings unused graph model gm object node this set owner node figactor diagramsettings suppresswarnings figactor suppresswarnings graphmodel setowner construct a new actor with the given owner bounds and settings this constructor is used by the pgml parser param owner model element that owns this fig param bounds position and size param settings rendering settings public fig actor object owner rectangle bounds diagram settings settings super owner bounds settings construct figs if bounds null set location bounds x bounds y figactor diagramsettings constructfigs setlocation override public void set line width int width miss out the text fix this should have no line for int i head posn i right leg posn i fig f get fig at i if f null f set line width width get fig at head posn set line width width get fig at body posn set line width width get fig at arms posn set line width width get fig at left leg posn set line width width get fig at right leg posn set line width width setlinewidth head_posn right_leg_posn getfigat setlinewidth getfigat head_posn setlinewidth getfigat body_posn setlinewidth getfigat arms_posn setlinewidth getfigat left_leg_posn setlinewidth getfigat right_leg_posn setlinewidth override public void set filled boolean filled only the head should be filled not the text get fig at head posn set filled filled setfilled getfigat head_posn setfilled see org tigris gef presentation fig make selection override public selection make selection return new selection actor this makeselection makeselection selectionactor override public vector get pop up actions mouse event me vector pop up actions super get pop up actions me modifiers pop up actions add pop up actions size get popup add offset build modifier pop up abstract leaf root return pop up actions getpopupactions mouseevent popupactions getpopupactions popupactions popupactions getpopupaddoffset buildmodifierpopup popupactions see org tigris gef presentation fig is resizable override public boolean is resizable return false isresizable isresizable override public dimension get minimum size dimension name dim get name fig get minimum size int w math max name dim width 40 int h name dim height 55 if get stereotype fig is visible dimension stereo dim get stereotype fig get minimum size w math max stereo dim width w h h stereo dim height return new dimension w h getminimumsize namedim getnamefig getminimumsize namedim namedim getstereotypefig isvisible stereodim getstereotypefig getminimumsize stereodim stereodim override protected void set bounds impl final int x final int y final int w final int h int middle x w 2 rectangle old bounds get bounds get big port set bounds x y w h get fig at head posn set location middle get fig at head posn get width 2 y 10 get fig at body posn set location middle y 25 get fig at arms posn set location middle get fig at arms posn get width 2 y 30 get fig at left leg posn set location middle get fig at left leg posn get width y 40 get fig at right leg posn set location middle y 40 dimension min text size get name fig get minimum size get name fig set bounds middle min text size width 2 y 55 min text size width min text size height if get stereotype fig is visible dimension min stereo size get stereotype fig get minimum size assert min stereo size width w get stereotype fig set bounds middle min stereo size width 2 y 55 get name fig get height min stereo size width min stereo size height calc bounds accumulate a bounding box for all the figs in the group fire prop change bounds old bounds get bounds update edges setboundsimpl oldbounds getbounds getbigport setbounds getfigat head_posn setlocation getfigat head_posn getwidth getfigat body_posn setlocation getfigat arms_posn setlocation getfigat arms_posn getwidth getfigat left_leg_posn setlocation getfigat left_leg_posn getwidth getfigat right_leg_posn setlocation mintextsize getnamefig getminimumsize getnamefig setbounds mintextsize mintextsize mintextsize getstereotypefig isvisible minstereosize getstereotypefig getminimumsize minstereosize getstereotypefig setbounds minstereosize getnamefig getheight minstereosize minstereosize calcbounds firepropchange oldbounds getbounds updateedges overruled the parent implementation to always use the minimum size see org argouml uml diagram ui fig node model element update bounds override protected void update bounds if is check size return rectangle bbox get bounds dimension min size get minimum size set bounds bbox x bbox y min size width min size height fignodemodelelement updatebounds updatebounds ischecksize getbounds minsize getminimumsize setbounds minsize minsize override public object deep hit port int x int y object o super deep hit port x y if o null return o if hit new rectangle new dimension x y return get owner return null deephitport deephitport getowner override public list point get gravity points final int max points 20 list point ret new array list point int cx get fig at head posn get center x int cy get fig at head posn get center y int radiusx math round get fig at head posn get width 2 1 int radiusy math round get fig at head posn get height 2 1 point point null for int i 0 i max points i double angle 2 math pi max points i point new point int cx math cos angle radiusx int cy math sin angle radiusy ret add point ret add new point fig line get fig at left leg posn getx2 fig line get fig at left leg posn gety2 ret add new point fig line get fig at right leg posn getx2 fig line get fig at right leg posn gety2 ret add new point fig line get fig at arms posn getx1 fig line get fig at arms posn gety1 ret add new point fig line get fig at arms posn getx2 fig line get fig at arms posn gety2 return ret getgravitypoints maxpoints arraylist getfigat head_posn getcenter getfigat head_posn getcenter getfigat head_posn getwidth getfigat head_posn getheight maxpoints maxpoints figline getfigat left_leg_posn figline getfigat left_leg_posn figline getfigat right_leg_posn figline getfigat right_leg_posn figline getfigat arms_posn figline getfigat arms_posn figline getfigat arms_posn figline getfigat arms_posn override protected void model changed property change event mee name updating super model changed mee boolean damage false if get owner null return if mee null mee get property name equals stereotype model get facade get stereotypes get owner contains mee get source update stereotype text damage true if damage damage modelchanged propertychangeevent modelchanged getowner getpropertyname getfacade getstereotypes getowner getsource updatestereotypetext override protected int get name fig font style object cls get owner return model get facade is abstract cls font italic font plain getnamefigfontstyle getowner getfacade isabstract the constructor param x the x param y the y param w the width param h the height param p the actor fig public actor port fig rect int x int y int w int h fig p super x y w h null null parent p actorportfigrect makes sure that the edges stick to the outline of the fig see org tigris gef presentation fig get gravity points override public list get gravity points return parent get gravity points getgravitypoints getgravitypoints getgravitypoints constructor for uml state entry list param data model the model public uml state exit list uml model element list model2 data model super data model umlstateentrylist datamodel umlstateexitlist umlmodelelementlistmodel2 datamodel datamodel see org argouml uml ui uml mutable linked list get popup menu public j popup menu get popup menu return new popup menu new action action new action roles exit this umlmutablelinkedlist getpopupmenu jpopupmenu getpopupmenu popupmenunewaction actionnewaction see org argouml ui explorer rules perspective rule get rule name public string get rule name return translator localize misc state substates perspectiverule getrulename getrulename public collection get children object parent if model get facade isa composite state parent return model get facade get subvertices parent return collections empty set getchildren getfacade isacompositestate getfacade getsubvertices empty_set public set get dependencies object parent if model get facade isa composite state parent set set new hash set set add parent return set return collections empty set getdependencies getfacade isacompositestate hashset empty_set create a new add to do item dialog param renderer the list cell renderer to use in order to display the offenders public add to do item dialog list cell renderer renderer super translator localize dialog title add todo item dialog ok cancel option true head line text field new j text field text columns priority combo box new j combo box priorities moreinfo text field new j text field text columns description text area new j text area text rows text columns default list model dlm new default list model object off obj target manager get instance get model targets to array for int i 0 i off obj length i if off obj i null dlm add element off obj i offender list new j list dlm offender list set cell renderer renderer j scroll pane offender scroll new j scroll pane offender list offender scroll set opaque true j label headline label new j label translator localize label headline j label priority label new j label translator localize label priority j label more info label new j label translator localize label more info url j label offender label new j label translator localize label offenders priority combo box set selected item priorities 0 j panel panel new j panel new labelled layout get label gap get component gap headline label set label for head line text field panel add headline label panel add head line text field priority label set label for priority combo box panel add priority label panel add priority combo box more info label set label for moreinfo text field panel add more info label panel add moreinfo text field offender label set label for offender scroll panel add offender label panel add offender scroll description text area set line wrap true mvw issue 2422 description text area set wrap style word true mvw issue 2422 description text area set text translator localize label enter todo item n description text area set margin new insets inset px inset px inset px inset px j scroll pane description scroller new j scroll pane description text area description scroller set preferred size description text area get preferred size panel add description scroller set content panel addtodoitemdialog listcellrenderer addtodoitemdialog listcellrenderer ok_cancel_option headlinetextfield jtextfield text_columns prioritycombobox jcombobox moreinfotextfield jtextfield text_columns descriptiontextarea jtextarea text_rows text_columns defaultlistmodel defaultlistmodel offobj targetmanager getinstance getmodeltargets toarray offobj offobj addelement offobj offenderlist jlist offenderlist setcellrenderer jscrollpane offenderscroll jscrollpane offenderlist offenderscroll setopaque jlabel headlinelabel jlabel jlabel prioritylabel jlabel jlabel moreinfolabel jlabel jlabel offenderlabel jlabel prioritycombobox setselecteditem jpanel jpanel labelledlayout getlabelgap getcomponentgap headlinelabel setlabelfor headlinetextfield headlinelabel headlinetextfield prioritylabel setlabelfor prioritycombobox prioritylabel prioritycombobox moreinfolabel setlabelfor moreinfotextfield moreinfolabel moreinfotextfield offenderlabel setlabelfor offenderscroll offenderlabel offenderscroll descriptiontextarea setlinewrap descriptiontextarea setwrapstyleword descriptiontextarea settext descriptiontextarea setmargin inset_px inset_px inset_px inset_px jscrollpane descriptionscroller jscrollpane descriptiontextarea descriptionscroller setpreferredsize descriptiontextarea getpreferredsize descriptionscroller setcontent override public void action performed action event e super action performed e if e get source get ok button do add actionperformed actionevent actionperformed getsource getokbutton doadd private void do add designer designer designer the designer string headline head line text field get text int priority to do item high priority switch priority combo box get selected index case 0 priority to do item high priority break case 1 priority to do item med priority break case 2 priority to do item low priority break string desc description text area get text string more infourl moreinfo text field get text list set new offenders new list set for int i 0 i offender list get model get size i new offenders add offender list get model get element at i to do item item new uml to do item designer headline priority desc more infourl new offenders designer get to do list add element item inform designer fire property change designer model todoitem added null item doadd thedesigner headlinetextfield gettext todoitem high_priority prioritycombobox getselectedindex todoitem high_priority todoitem med_priority todoitem low_priority descriptiontextarea gettext moreinfourl moreinfotextfield gettext listset newoffenders listset offenderlist getmodel getsize newoffenders offenderlist getmodel getelementat todoitem umltodoitem moreinfourl newoffenders gettodolist addelement firepropertychange model_todoitem_added see org argouml ui explorer rules perspective rule get rule name public string get rule name return translator localize misc project diagram perspectiverule getrulename getrulename public collection get children object parent if parent instanceof project return project parent get diagram list return collections empty set getchildren getdiagramlist empty_set see org argouml ui explorer rules perspective rule get dependencies java lang object public set get dependencies object parent todo what return collections empty set perspectiverule getdependencies getdependencies empty_set default constructor public uml14 model interpreter add model interpreter new model access model interpreter add model interpreter new oclapi model interpreter add model interpreter new collections model interpreter uml14modelinterpreter addmodelinterpreter modelaccessmodelinterpreter addmodelinterpreter oclapimodelinterpreter addmodelinterpreter collectionsmodelinterpreter private string to string object obj if model get facade isa model element obj return model get facade get name obj else if obj instanceof collection return col to string collection obj else return obj tostring getfacade isamodelelement getfacade getname coltostring private string col to string collection collection string ret for object object collection ret to string object return ret coltostring tostring public fig node get fig node for graph model gm layer lay object node map style attributes fig node fig node null although not generally true for gef for argo we know that the layer is a layer perspective which knows the associated diagram diagram diag layer perspective lay get diagram if diag instanceof uml diagram uml diagram diag does accept node fig node uml diagram diag drop node null else log debug todo deployment diagram renderer get fig node for return null lay add fig node return fig node fignode getfignodefor graphmodel styleattributes fignode fignode layerperspective layerperspective getdiagram umldiagram umldiagram doesaccept fignode umldiagram deploymentdiagramrenderer getfignodefor fignode fignode public fig edge get fig edge for graph model gm layer lay object edge map style attributes assert lay instanceof layer perspective argo diagram diag argo diagram layer perspective lay get diagram diagram settings settings diag get diagram settings fig edge new edge null if model get facade isa association class edge new edge new fig association class edge settings else if model get facade isa association edge new edge new fig association edge settings else if model get facade isa association end edge fig association end asend new fig association end edge settings model get facade get association edge fig node associationfn fig node lay presentation for model get facade get association edge fig node classifierfn fig node lay presentation for model get facade get type edge asend set source port fig associationfn asend set source fig node associationfn asend set dest port fig classifierfn asend set dest fig node classifierfn new edge asend else if model get facade isa link edge fig link lnk fig new fig link edge settings collection link ends model get facade get connections edge object le array link ends to array object from end le array 0 object from inst model get facade get instance from end object to end le array 1 object to inst model get facade get instance to end fig node fromfn fig node lay presentation for from inst fig node tofn fig node lay presentation for to inst lnk fig set source port fig fromfn lnk fig set source fig node fromfn lnk fig set dest port fig tofn lnk fig set dest fig node tofn new edge lnk fig else if model get facade isa dependency edge fig dependency dep fig new fig dependency edge settings object supplier model get facade get suppliers edge to array 0 object client model get facade get clients edge to array 0 fig node supfn fig node lay presentation for supplier fig node clifn fig node lay presentation for client dep fig set source port fig clifn dep fig set source fig node clifn dep fig set dest port fig supfn dep fig set dest fig node supfn dep fig get fig set dashed true new edge dep fig else if model get facade isa generalization edge new edge new fig generalization edge settings else if edge instanceof comment edge new edge new fig edge note edge settings if new edge null throw new illegal argument exception don t know how to create fig edge for model type edge get class get name set ports lay new edge assert new edge null there has been no fig edge created assert new edge get dest fig node null the fig edge has no dest node assert new edge get dest port fig null the fig edge has no dest port assert new edge get source fig node null the fig edge has no source node assert new edge get source port fig null the fig edge has no source port lay add new edge return new edge figedge getfigedgefor graphmodel styleattributes layerperspective argodiagram argodiagram layerperspective getdiagram diagramsettings getdiagramsettings figedge newedge getfacade isaassociationclass newedge figassociationclass getfacade isaassociation newedge figassociation getfacade isaassociationend figassociationend figassociationend getfacade getassociation fignode fignode presentationfor getfacade getassociation fignode fignode presentationfor getfacade gettype setsourceportfig setsourcefignode setdestportfig setdestfignode newedge getfacade isalink figlink lnkfig figlink linkends getfacade getconnections learray linkends toarray fromend learray frominst getfacade getinstance fromend toend learray toinst getfacade getinstance toend fignode fignode presentationfor frominst fignode fignode presentationfor toinst lnkfig setsourceportfig lnkfig setsourcefignode lnkfig setdestportfig lnkfig setdestfignode newedge lnkfig getfacade isadependency figdependency depfig figdependency getfacade getsuppliers toarray getfacade getclients toarray fignode fignode presentationfor fignode fignode presentationfor depfig setsourceportfig depfig setsourcefignode depfig setdestportfig depfig setdestfignode depfig getfig setdashed newedge depfig getfacade isageneralization newedge figgeneralization commentedge newedge figedgenote newedge illegalargumentexception figedge getclass getname setports newedge newedge figedge newedge getdestfignode figedge newedge getdestportfig figedge newedge getsourcefignode figedge newedge getsourceportfig figedge newedge newedge constructor for uml use case extension point list model public uml use case extension point list model super extension point umlusecaseextensionpointlistmodel umlusecaseextensionpointlistmodel extensionpoint see org argouml uml ui uml model element list model2 build model list protected void build model list set all elements model get facade get extension points get target umlmodelelementlistmodel2 buildmodellist buildmodellist setallelements getfacade getextensionpoints gettarget see org argouml uml ui uml model element list model2 is valid element object protected boolean is valid element object o return model get facade get extension points get target contains o umlmodelelementlistmodel2 isvalidelement isvalidelement getfacade getextensionpoints gettarget protected void move down int index object usecase get target list c new array list model get facade get extension points usecase if index c size 1 collections swap c index index 1 model get use cases helper set extension points usecase c movedown gettarget arraylist getfacade getextensionpoints getusecaseshelper setextensionpoints see org argouml uml ui uml model element ordered list model2 move to bottom int override protected void move to bottom int index object usecase get target list c new array list model get facade get extension points usecase if index c size 1 object mem1 c get index c remove mem1 c add c size mem1 model get use cases helper set extension points usecase c umlmodelelementorderedlistmodel2 movetobottom movetobottom gettarget arraylist getfacade getextensionpoints getusecaseshelper setextensionpoints see org argouml uml ui uml model element ordered list model2 move to top int override protected void move to top int index object usecase get target list c new array list model get facade get extension points usecase if index 0 object mem1 c get index c remove mem1 c add 0 mem1 model get use cases helper set extension points usecase c umlmodelelementorderedlistmodel2 movetotop movetotop gettarget arraylist getfacade getextensionpoints getusecaseshelper setextensionpoints constructor param tooltip tooltip key for button param box associated combo box public uml combo box navigator string tooltip j combo box box super new border layout the button new j button icon the combo box box the button set preferred size new dimension icon get icon width 6 icon get icon height 6 the button set tool tip text tooltip the button add action listener this box add action listener this box add item listener this add the combo box border layout center add the button border layout east object item the combo box get selected item set button enabled item umlcomboboxnavigator jcombobox borderlayout thebutton jbutton thecombobox thebutton setpreferredsize geticonwidth geticonheight thebutton settooltiptext thebutton addactionlistener addactionlistener additemlistener thecombobox borderlayout thebutton borderlayout thecombobox getselecteditem setbuttonenabled enforce that the preferred height is the minimum height this works around a bug in windows laf of jre5 where a change in the preferred min size of a combo has changed and has a knock on effect here if the layout manager for prop panels finds the preferred height is greater than the minimum height then it will allow this component to resize in error see issue 4333 sun has now fixed this bug in jre6 and so this method can be removed once jre5 is no longer supported return the preferred size override public dimension get preferred size return new dimension super get preferred size width get minimum size height getpreferredsize getpreferredsize getminimumsize fired when the button is pushed navigates to the currently selected item in the combo box see java awt event action listener action performed java awt event action event public void action performed final java awt event action event event button action if event get source the button object item the combo box get selected item if item null target manager get instance set target item if event get source the combo box object item the combo box get selected item set button enabled item actionlistener actionperformed actionevent actionperformed actionevent getsource thebutton thecombobox getselecteditem targetmanager getinstance settarget getsource thecombobox thecombobox getselecteditem setbuttonenabled public void item state changed item event event if event get source the combo box object item the combo box get selected item set button enabled item itemstatechanged itemevent getsource thecombobox thecombobox getselecteditem setbuttonenabled private void set button enabled object item if item null the button set enabled true else the button set enabled false setbuttonenabled thebutton setenabled thebutton setenabled public void set enabled boolean enabled the combo box set enabled enabled the combo box set editable enabled setenabled thecombobox setenabled thecombobox seteditable the constructor public uml wizard super umlwizard preset the number of steps to 1 you need to override this method in case your wizard requires a different number of steps this method is a convenience implementation inherit doc public int get num steps return 1 inheritdoc getnumsteps return the offending modelelement public object get model element if get to do item null to do item item to do item get to do item list set offs item get offenders if offs size 1 object me offs get 0 return me return null getmodelelement gettodoitem todoitem todoitem gettodoitem listset getoffenders return the suggestion string public string offer suggestion if suggestion null return suggestion object me get model element if me null string n model get facade get name me return n return offersuggestion getmodelelement getfacade getname param s set a new suggestion string public void set suggestion string s suggestion s setsuggestion return returns the suggestion string public string get suggestion return suggestion getsuggestion creates a new instance of perspective designer dialog public perspective configurator super translator localize dialog title configure perspectives argo dialog ok cancel option true the dialog is modal config panel north new j panel config panel south new j panel make lists make buttons make layout update rule label make listeners load perspectives load library sortj list model rule library list split pane new j split pane j split pane vertical split config panel north config panel south split pane set continuous layout true set content split pane perspectivedesignerdialog perspectiveconfigurator argodialog ok_cancel_option configpanelnorth jpanel configpanelsouth jpanel makelists makebuttons makelayout updaterulelabel makelisteners loadperspectives loadlibrary sortjlistmodel rulelibrarylist splitpane jsplitpane jsplitpane vertical_split configpanelnorth configpanelsouth splitpane setcontinuouslayout setcontent splitpane make the lists on the dialog box and fill them private void make lists rename text field new j text field perspective list model new default list model perspective list new j list perspective list model perspective rules list model new default list model perspective rules list new j list perspective rules list model rule library list model new default list model rule library list new j list rule library list model perspective list set border border factory create empty border inset px inset px inset px inset px perspective rules list set border border factory create empty border inset px inset px inset px inset px rule library list set border border factory create empty border inset px inset px inset px inset px perspective list set selection mode list selection model single selection perspective rules list set selection mode list selection model single selection rule library list set selection mode list selection model single selection makelists renametextfield jtextfield perspectivelistmodel defaultlistmodel perspectivelist jlist perspectivelistmodel perspectiveruleslistmodel defaultlistmodel perspectiveruleslist jlist perspectiveruleslistmodel rulelibrarylistmodel defaultlistmodel rulelibrarylist jlist rulelibrarylistmodel perspectivelist setborder borderfactory createemptyborder inset_px inset_px inset_px inset_px perspectiveruleslist setborder borderfactory createemptyborder inset_px inset_px inset_px inset_px rulelibrarylist setborder borderfactory createemptyborder inset_px inset_px inset_px inset_px perspectivelist setselectionmode listselectionmodel single_selection perspectiveruleslist setselectionmode listselectionmodel single_selection rulelibrarylist setselectionmode listselectionmodel single_selection make the buttons on the dialog box with localized strings and mnemonics private void make buttons new perspective button new j button name button new perspective button button new new perspective button set tool tip text translator localize button new tooltip remove perspective button new j button name button remove perspective button button remove remove perspective button set tool tip text translator localize button remove tooltip duplicate perspective button new j button name button duplicate perspective button button duplicate duplicate perspective button set tool tip text translator localize button duplicate tooltip move up button new j button name button move up button button move up move up button set tool tip text translator localize button move up tooltip move down button new j button name button move down button button move down move down button set tool tip text translator localize button move down tooltip add rule button new j button add rule button set tool tip text translator localize button add rule remove rule button new j button remove rule button set tool tip text translator localize button remove rule reset to default button new j button name button reset to default button button restore defaults reset to default button set tool tip text translator localize button restore defaults tooltip disable the buttons for now since no selection has been made yet remove perspective button set enabled false duplicate perspective button set enabled false move up button set enabled false move down button set enabled false add rule button set enabled false remove rule button set enabled false rename text field set enabled false makebuttons newperspectivebutton jbutton namebutton newperspectivebutton newperspectivebutton settooltiptext removeperspectivebutton jbutton namebutton removeperspectivebutton removeperspectivebutton settooltiptext duplicateperspectivebutton jbutton namebutton duplicateperspectivebutton duplicateperspectivebutton settooltiptext moveupbutton jbutton namebutton moveupbutton moveupbutton settooltiptext movedownbutton jbutton namebutton movedownbutton movedownbutton settooltiptext addrulebutton jbutton addrulebutton settooltiptext removerulebutton jbutton removerulebutton settooltiptext resettodefaultbutton jbutton namebutton resettodefaultbutton resettodefaultbutton settooltiptext removeperspectivebutton setenabled duplicateperspectivebutton setenabled moveupbutton setenabled movedownbutton setenabled addrulebutton setenabled removerulebutton setenabled renametextfield setenabled make the layout for the dialog box private void make layout grid bag layout gb new grid bag layout config panel north set layout gb config panel south set layout gb grid bag constraints c new grid bag constraints c ipadx 3 c ipady 3 pers label new j label the text will be set later pers label set border border factory create empty border inset px inset px inset px inset px c fill grid bag constraints both c gridx 0 c gridy 0 c gridwidth 3 c weightx 1 0 c weighty 0 0 gb set constraints pers label c config panel north add pers label j panel pers panel new j panel new border layout j scroll pane pers scroll new j scroll pane perspective list j scroll pane vertical scrollbar as needed j scroll pane horizontal scrollbar never pers panel add rename text field border layout north pers panel add pers scroll border layout center c gridx 0 c gridy 1 c gridwidth 4 c weightx 1 0 c weighty 1 0 gb set constraints pers panel c config panel north add pers panel j panel pers buttons new j panel new grid layout 6 1 0 5 pers buttons add new perspective button pers buttons add remove perspective button pers buttons add duplicate perspective button pers buttons add move up button pers buttons add move down button pers buttons add reset to default button j panel pers button wrapper new j panel new flow layout flow layout right 0 0 pers button wrapper add pers buttons c gridx 4 c gridy 1 c gridwidth 1 c weightx 0 0 c weighty 0 0 c ipadx 0 c ipady 0 c insets new insets 0 5 0 0 gb set constraints pers button wrapper c config panel north add pers button wrapper rule lib label new j label the text will be set later rule lib label set border border factory create empty border inset px inset px inset px inset px c gridx 0 c gridy 3 c gridwidth 1 c weightx 1 0 c weighty 0 0 c ipadx 3 c ipady 3 c insets new insets 10 0 0 0 gb set constraints rule lib label c config panel south add rule lib label add rule button set margin new insets 2 15 2 15 remove rule button set margin new insets 2 15 2 15 j panel xfer buttons new j panel xfer buttons set layout new box layout xfer buttons box layout y axis xfer buttons add add rule button xfer buttons add new spacer panel xfer buttons add remove rule button c gridx 2 c gridy 4 c weightx 0 0 c weighty 0 0 c insets new insets 0 3 0 5 gb set constraints xfer buttons c config panel south add xfer buttons rules label new j label the text will be set later rules label set border border factory create empty border inset px inset px inset px inset px c gridx 3 c gridy 3 c gridwidth 1 c weightx 1 0 c insets new insets 10 0 0 0 gb set constraints rules label c config panel south add rules label c gridx 0 c gridy 4 c weighty 1 0 c gridwidth 2 c gridheight 2 c insets new insets 0 0 0 0 j scroll pane rule lib scroll new j scroll pane rule library list j scroll pane vertical scrollbar as needed j scroll pane horizontal scrollbar never gb set constraints rule lib scroll c config panel south add rule lib scroll c gridx 3 c gridy 4 c gridwidth 2 c gridheight 2 j scroll pane rules scroll new j scroll pane perspective rules list j scroll pane vertical scrollbar as needed j scroll pane horizontal scrollbar never gb set constraints rules scroll c config panel south add rules scroll makelayout gridbaglayout gridbaglayout configpanelnorth setlayout configpanelsouth setlayout gridbagconstraints gridbagconstraints perslabel jlabel perslabel setborder borderfactory createemptyborder inset_px inset_px inset_px inset_px gridbagconstraints setconstraints perslabel configpanelnorth perslabel jpanel perspanel jpanel borderlayout jscrollpane persscroll jscrollpane perspectivelist jscrollpane vertical_scrollbar_as_needed jscrollpane horizontal_scrollbar_never perspanel renametextfield borderlayout perspanel persscroll borderlayout setconstraints perspanel configpanelnorth perspanel jpanel persbuttons jpanel gridlayout persbuttons newperspectivebutton persbuttons removeperspectivebutton persbuttons duplicateperspectivebutton persbuttons moveupbutton persbuttons movedownbutton persbuttons resettodefaultbutton jpanel persbuttonwrapper jpanel flowlayout flowlayout persbuttonwrapper persbuttons setconstraints persbuttonwrapper configpanelnorth persbuttonwrapper ruleliblabel jlabel ruleliblabel setborder borderfactory createemptyborder inset_px inset_px inset_px inset_px setconstraints ruleliblabel configpanelsouth ruleliblabel addrulebutton setmargin removerulebutton setmargin jpanel xferbuttons jpanel xferbuttons setlayout boxlayout xferbuttons boxlayout y_axis xferbuttons addrulebutton xferbuttons spacerpanel xferbuttons removerulebutton setconstraints xferbuttons configpanelsouth xferbuttons ruleslabel jlabel ruleslabel setborder borderfactory createemptyborder inset_px inset_px inset_px inset_px setconstraints ruleslabel configpanelsouth ruleslabel jscrollpane rulelibscroll jscrollpane rulelibrarylist jscrollpane vertical_scrollbar_as_needed jscrollpane horizontal_scrollbar_never setconstraints rulelibscroll configpanelsouth rulelibscroll jscrollpane rulesscroll jscrollpane perspectiveruleslist jscrollpane vertical_scrollbar_as_needed jscrollpane horizontal_scrollbar_never setconstraints rulesscroll configpanelsouth rulesscroll add action listeners to the buttons and lists private void make listeners rename text field add action listener new rename listener rename text field get document add document listener new rename document listener new perspective button add action listener new new perspective listener remove perspective button add action listener new remove perspective listener duplicate perspective button add action listener new duplicate perspective listener move up button add action listener new move up listener move down button add action listener new move down listener add rule button add action listener new rule listener remove rule button add action listener new rule listener reset to default button add action listener new reset listener perspective list add list selection listener new perspective list selection listener perspective rules list add list selection listener new rules list selection listener perspective rules list add mouse listener new rule list mouse listener rule library list add list selection listener new library list selection listener rule library list add mouse listener new rule list mouse listener get ok button add action listener new ok listener makelisteners renametextfield addactionlistener renamelistener renametextfield getdocument adddocumentlistener renamedocumentlistener newperspectivebutton addactionlistener newperspectivelistener removeperspectivebutton addactionlistener removeperspectivelistener duplicateperspectivebutton addactionlistener duplicateperspectivelistener moveupbutton addactionlistener moveuplistener movedownbutton addactionlistener movedownlistener addrulebutton addactionlistener rulelistener removerulebutton addactionlistener rulelistener resettodefaultbutton addactionlistener resetlistener perspectivelist addlistselectionlistener perspectivelistselectionlistener perspectiveruleslist addlistselectionlistener ruleslistselectionlistener perspectiveruleslist addmouselistener rulelistmouselistener rulelibrarylist addlistselectionlistener librarylistselectionlistener rulelibrarylist addmouselistener rulelistmouselistener getokbutton addactionlistener oklistener load all the existing rules from the perspective manager for presentation these will be presented as the library of rules the user may pick from private void load library list perspective rule rules lib new array list perspective rule rules lib add all perspective manager get instance get rules collections sort rules lib new comparator perspective rule public int compare perspective rule o1 perspective rule o2 return o1 to string compare to o2 to string remove the ones already selected if a perspective is selected explorer perspective sel pers explorer perspective perspective list get selected value if sel pers null for perspective rule pers rule sel pers get list for perspective rule lib rule rules lib if lib rule to string equals pers rule to string rules lib remove lib rule break add them rule library list model clear for perspective rule rule rules lib rule library list model add element rule update lib label loadlibrary perspectiverule ruleslib arraylist perspectiverule ruleslib addall perspectivemanager getinstance getrules ruleslib perspectiverule perspectiverule perspectiverule tostring compareto tostring explorerperspective selpers explorerperspective perspectivelist getselectedvalue selpers perspectiverule persrule selpers getlist perspectiverule librule ruleslib librule tostring persrule tostring ruleslib librule rulelibrarylistmodel perspectiverule ruleslib rulelibrarylistmodel addelement updateliblabel rules lib add all perspective manager get instance get rules collections sort rules lib new comparator perspective rule public int compare perspective rule o1 perspective rule o2 return o1 to string compare to o2 to string ruleslib addall perspectivemanager getinstance getrules ruleslib perspectiverule perspectiverule perspectiverule tostring compareto tostring load the perspectives from the perspective manager for presentation private void load perspectives list explorer perspective perspectives perspective manager get instance get perspectives must add an editable list of new explorer perspective s to the list model so that the original ones are not changed in the case of a cancel action by the user for explorer perspective perspective perspectives list perspective rule rules perspective get list explorer perspective editable perspective new explorer perspective perspective to string for perspective rule rule rules editable perspective add rule rule perspective list model add element editable perspective update pers label loadperspectives explorerperspective perspectivemanager getinstance getperspectives explorerperspective explorerperspective perspectiverule getlist explorerperspective editableperspective explorerperspective tostring perspectiverule editableperspective addrule perspectivelistmodel addelement editableperspective updateperslabel update the label above the list of perspectives with count private void update pers label pers label set text translator localize label perspectives perspective list model size updateperslabel perslabel settext perspectivelistmodel update the label above the library of rules list with count private void update lib label update the label which shows the number of rules rule lib label set text translator localize label rules library rule library list model size updateliblabel ruleliblabel settext rulelibrarylistmodel update the label above the library of rules list with count private void update rule label update the label which shows the number of rules rules label set text translator localize label selected rules perspective rules list model size updaterulelabel ruleslabel settext perspectiveruleslistmodel param list the j list to be sorted private void sortj list model j list list default list model model default list model list get model list all new array list for int i 0 i model get size i all add model get element at i model clear collections sort all new comparator public int compare object o1 object o2 return o1 to string compare to o2 to string for object obj all model add element obj jlist sortjlistmodel jlist defaultlistmodel defaultlistmodel getmodel arraylist getsize getelementat tostring compareto tostring addelement model clear collections sort all new comparator public int compare object o1 object o2 return o1 to string compare to o2 to string tostring compareto tostring class ok listener implements action listener public void action performed action event e perspective manager get instance remove all perspectives for int i 0 i perspective list model size i explorer perspective perspective explorer perspective perspective list model get i perspective manager get instance add perspective perspective perspective manager get instance save user perspectives oklistener actionlistener actionperformed actionevent perspectivemanager getinstance removeallperspectives perspectivelistmodel explorerperspective explorerperspective perspectivelistmodel perspectivemanager getinstance addperspective perspectivemanager getinstance saveuserperspectives class reset listener implements action listener public void action performed action event e collection explorer perspective c perspective manager get instance get default perspectives if c size 0 perspective list model remove all elements for explorer perspective p c perspective list model add element p update pers label resetlistener actionlistener actionperformed actionevent explorerperspective perspectivemanager getinstance getdefaultperspectives perspectivelistmodel removeallelements explorerperspective perspectivelistmodel addelement updateperslabel class new perspective listener implements action listener public void action performed action event e object msg args integer value of perspective list get model get size 1 explorer perspective new pers new explorer perspective translator message format dialog perspective explorer perspective msg args perspective list model insert element at new pers 0 perspective list set selected value new pers true perspective rules list model clear update pers label update rule label newperspectivelistener actionlistener actionperformed actionevent msgargs valueof perspectivelist getmodel getsize explorerperspective newpers explorerperspective messageformat msgargs perspectivelistmodel insertelementat newpers perspectivelist setselectedvalue newpers perspectiveruleslistmodel updateperslabel updaterulelabel class remove perspective listener implements action listener public void action performed action event e object sel perspective list get selected value if perspective list model get size 1 perspective list model remove element sel perspective list set selected index 0 if perspective list model get size 1 remove perspective button set enabled false update pers label removeperspectivelistener actionlistener actionperformed actionevent perspectivelist getselectedvalue perspectivelistmodel getsize perspectivelistmodel removeelement perspectivelist setselectedindex perspectivelistmodel getsize removeperspectivebutton setenabled updateperslabel class duplicate perspective listener implements action listener public void action performed action event e object sel perspective list get selected value if sel null object msg args sel to string explorer perspective new pers explorer perspective sel make named clone translator message format dialog perspective copy of msg args perspective list model insert element at new pers 0 perspective list set selected value new pers true update pers label duplicateperspectivelistener actionlistener actionperformed actionevent perspectivelist getselectedvalue msgargs tostring explorerperspective newpers explorerperspective makenamedclone messageformat msgargs perspectivelistmodel insertelementat newpers perspectivelist setselectedvalue newpers updateperslabel class rule listener implements action listener public void action performed action event e object src e get source if perspective list get selected value null return if src add rule button do add rule else if src remove rule button do remove rule rulelistener actionlistener actionperformed actionevent getsource perspectivelist getselectedvalue addrulebutton doaddrule removerulebutton doremoverule class rule list mouse listener extends mouse adapter public void mouse clicked mouse event me object src me get source if me get click count 2 perspective list get selected value null return if src rule library list add rule button is enabled do add rule if src perspective rules list remove rule button is enabled do remove rule rulelistmouselistener mouseadapter mouseclicked mouseevent getsource getclickcount perspectivelist getselectedvalue rulelibrarylist addrulebutton isenabled doaddrule perspectiveruleslist removerulebutton isenabled doremoverule add the currently selected rule from the library to the rules list for the current perspective private void do add rule object sel rule library list get selected value int sel lib nr rule library list get selected index try perspective rule new rule perspective rule sel get class new instance perspective rules list model insert element at new rule 0 explorer perspective perspective list get selected value add rule new rule sortj list model perspective rules list perspective rules list set selected value new rule true remove the rule from the library list load library set the newly selected item in the library list if rule library list model size sel lib nr sel lib nr rule library list model size 1 rule library list set selected index sel lib nr update rule label catch exception e log error problem adding rule e doaddrule rulelibrarylist getselectedvalue sellibnr rulelibrarylist getselectedindex perspectiverule newrule perspectiverule getclass newinstance perspectiveruleslistmodel insertelementat newrule explorerperspective perspectivelist getselectedvalue addrule newrule sortjlistmodel perspectiveruleslist perspectiveruleslist setselectedvalue newrule loadlibrary rulelibrarylistmodel sellibnr sellibnr rulelibrarylistmodel rulelibrarylist setselectedindex sellibnr updaterulelabel remove the currently selected rule from the rules list for the current perspective private void do remove rule int sel lib nr rule library list get selected index perspective rule sel perspective rule perspective rules list get selected value int selected item perspective rules list get selected index object sel pers perspective list get selected value perspective rules list model remove element sel explorer perspective sel pers remove rule sel if perspective rules list model get size selected item perspective rules list set selected index selected item else if perspective rules list model get size 0 perspective rules list set selected index perspective rules list model get size 1 load library set the newly selected item in the library list rule library list set selected index sel lib nr update rule label doremoverule sellibnr rulelibrarylist getselectedindex perspectiverule perspectiverule perspectiveruleslist getselectedvalue selecteditem perspectiveruleslist getselectedindex selpers perspectivelist getselectedvalue perspectiveruleslistmodel removeelement explorerperspective selpers removerule perspectiveruleslistmodel getsize selecteditem perspectiveruleslist setselectedindex selecteditem perspectiveruleslistmodel getsize perspectiveruleslist setselectedindex perspectiveruleslistmodel getsize loadlibrary rulelibrarylist setselectedindex sellibnr updaterulelabel public void action performed action event e int sel perspective list get selected index if sel 0 object sel obj perspective list model get sel object prev obj perspective list model get sel 1 perspective list model set sel prev obj perspective list model set sel 1 sel obj perspective list set selected index sel 1 perspective list ensure index is visible sel 1 actionperformed actionevent perspectivelist getselectedindex selobj perspectivelistmodel prevobj perspectivelistmodel perspectivelistmodel prevobj perspectivelistmodel selobj perspectivelist setselectedindex perspectivelist ensureindexisvisible class move down listener implements action listener public void action performed action event e int sel perspective list get selected index if sel perspective list model get size 1 object sel obj perspective list model get sel object next obj perspective list model get sel 1 perspective list model set sel next obj perspective list model set sel 1 sel obj perspective list set selected index sel 1 perspective list ensure index is visible sel 1 movedownlistener actionlistener actionperformed actionevent perspectivelist getselectedindex perspectivelistmodel getsize selobj perspectivelistmodel nextobj perspectivelistmodel perspectivelistmodel nextobj perspectivelistmodel selobj perspectivelist setselectedindex perspectivelist ensureindexisvisible class rename listener implements action listener public void action performed action event e int sel perspective list get selected index object sel pers perspective list get selected value string new name rename text field get text if sel 0 new name length 0 explorer perspective sel pers set name new name perspective list model set sel sel pers todo replace the functioncall in the next line by request focus in window once we do not support java 1 3 any more perspective list request focus renamelistener actionlistener actionperformed actionevent perspectivelist getselectedindex selpers perspectivelist getselectedvalue newname renametextfield gettext newname explorerperspective selpers setname newname perspectivelistmodel selpers requestfocusinwindow perspectivelist requestfocus class rename document listener implements document listener public void insert update document event e update renamedocumentlistener documentlistener insertupdate documentevent update public void remove update document event e update removeupdate documentevent update public void changed update document event e update changedupdate documentevent private void update int sel perspective list get selected index object sel pers perspective list get selected value string new name rename text field get text if sel 0 new name length 0 explorer perspective sel pers set name new name perspective list model set sel sel pers perspectivelist getselectedindex selpers perspectivelist getselectedvalue newname renametextfield gettext newname explorerperspective selpers setname newname perspectivelistmodel selpers public void value changed list selection event lse if lse get value is adjusting return object sel pers perspective list get selected value load library object sel rule rule library list get selected value rename text field set enabled sel pers null remove perspective button set enabled sel pers null duplicate perspective button set enabled sel pers null move up button set enabled perspective list get selected index 0 move down button set enabled sel pers null perspective list get selected index perspective list get model get size 1 if sel pers null return rename text field set text sel pers to string explorer perspective pers explorer perspective sel pers perspective rules list model clear for perspective rule rule pers get list perspective rules list model insert element at rule 0 sortj list model perspective rules list add rule button set enabled sel pers null sel rule null update rule label valuechanged listselectionevent getvalueisadjusting selpers perspectivelist getselectedvalue loadlibrary selrule rulelibrarylist getselectedvalue renametextfield setenabled selpers removeperspectivebutton setenabled selpers duplicateperspectivebutton setenabled selpers moveupbutton setenabled perspectivelist getselectedindex movedownbutton setenabled selpers perspectivelist getselectedindex perspectivelist getmodel getsize selpers renametextfield settext selpers tostring explorerperspective explorerperspective selpers perspectiveruleslistmodel perspectiverule getlist perspectiveruleslistmodel insertelementat sortjlistmodel perspectiveruleslist addrulebutton setenabled selpers selrule updaterulelabel public void value changed list selection event lse if lse get value is adjusting return object sel pers null if perspective list model size 0 sel pers perspective list get selected value object sel rule null if perspective rules list model size 0 sel rule perspective rules list get selected value remove rule button set enabled sel pers null sel rule null valuechanged listselectionevent getvalueisadjusting selpers perspectivelistmodel selpers perspectivelist getselectedvalue selrule perspectiveruleslistmodel selrule perspectiveruleslist getselectedvalue removerulebutton setenabled selpers selrule public void value changed list selection event lse if lse get value is adjusting return object sel pers perspective list get selected value object sel rule rule library list get selected value add rule button set enabled sel pers null sel rule null valuechanged listselectionevent getvalueisadjusting selpers perspectivelist getselectedvalue selrule rulelibrarylist getselectedvalue addrulebutton setenabled selpers selrule constructor for uml association end changeability radio button panel param title the title for the panel param horizontal determines the orientation public uml association end changeability radio button panel string title boolean horizontal super title label texts and action commands changeability action set changeability get instance horizontal umlassociationendchangeabilityradiobuttonpanel umlassociationendchangeabilityradiobuttonpanel labeltextsandactioncommands actionsetchangeability getinstance public void build model if get target null object target get target object kind model get facade get changeability target if kind null set selected null else if kind equals model get changeable kind get changeable set selected action set changeability changeable command else if kind equals model get changeable kind get add only set selected action set changeability addonly command else if kind equals model get changeable kind get frozen set selected action set changeability frozen command else set selected action set changeability changeable command buildmodel gettarget gettarget getfacade getchangeability setselected getchangeablekind getchangeable setselected actionsetchangeability changeable_command getchangeablekind getaddonly setselected actionsetchangeability addonly_command getchangeablekind getfrozen setselected actionsetchangeability frozen_command setselected actionsetchangeability changeable_command return the orientation public orientation get orientation return orientation getorientation the constructor public abstract argoj panel this translator localize tab untitled false abstractargojpanel the constructor param title the name as a localized string todo review all callers to make sure that they localize the title public abstract argoj panel string title this title false abstractargojpanel the constructor param title the name a localized string param t if true remove tab from parent j tabbed pane todo review all callers to make sure that they localize the title in process by harold braun 20070912 public abstract argoj panel string title boolean t set title title tear t jtabbedpane abstractargojpanel settitle this is not a real clone since it doesn t copy anything from the object it is cloning the link spawn method copies the title and in some cases also the target return the new object or null if not possible public object clone try return this get class new instance catch exception ex log error exception in clone ex return null getclass newinstance see org tigris swidgets orientable set orientation orientation public void set orientation orientation o this orientation o setorientation setorientation return the title of the panel a localized string public string get title return title gettitle param t the title a localized string public void set title string t title t settitle return the icon to be shown for this panel public icon get icon return icon geticon param the icon this icon will be shown in front of the title public void set icon icon the icon this icon the icon theicon seticon theicon theicon this should take its inspiration from link org tigris gef base cmd spawn p the spawned cloned tab will be a j frame currently this feature is disabled for argouml except for the find dialog code should behave though as if spawning might work at a later stage return a copy of the frame or null if not clone able public abstract argoj panel spawn j dialog f new j dialog argo frame get instance f get content pane set layout new border layout todo once we have fixed all subclasses the title will always be localized so this localization can be removed f set title translator localize title abstract argoj panel new panel abstract argoj panel clone if new panel null return null failed to clone if new panel instanceof tab to do tab to do me tab to do this tab to do it tab to do new panel it set target me get target else if new panel instanceof tab model target tab model target me tab model target this tab model target it tab model target new panel it set target me get target else if new panel instanceof tab diagram tab diagram me tab diagram this tab diagram it tab diagram new panel it set target me get target todo once we have fixed all subclasses the title will always be localized so this localization can be removed new panel set title translator localize title f get content pane add new panel border layout center rectangle bounds get bounds bounds height overlapp 2 f set bounds bounds point loc new point 0 0 swing utilities convert point to screen loc this loc y overlapp f set location loc f set visible true if tear get parent instanceof j tabbed pane j tabbed pane get parent remove this return new panel cmdspawn jframe abstractargojpanel jdialog jdialog argoframe getinstance getcontentpane setlayout borderlayout settitle abstractargojpanel newpanel abstractargojpanel newpanel newpanel tabtodo tabtodo tabtodo tabtodo tabtodo newpanel settarget gettarget newpanel tabmodeltarget tabmodeltarget tabmodeltarget tabmodeltarget tabmodeltarget newpanel settarget gettarget newpanel tabdiagram tabdiagram tabdiagram tabdiagram tabdiagram newpanel settarget gettarget newpanel settitle getcontentpane newpanel borderlayout getbounds setbounds swingutilities convertpointtoscreen setlocation setvisible getparent jtabbedpane jtabbedpane getparent newpanel construct the redo action with a display name param name the name to display for this action public action redo string name super name actionredo construct the redo action with a display name and icon param name the name to display for this action param icon the icon to display for this action public action redo string name icon icon super name icon actionredo public void action performed action event e final project p project manager get manager get current project p get undo manager redo actionperformed actionevent projectmanager getmanager getcurrentproject getundomanager constructor for action set structural feature multiplicity protected action set structural feature multiplicity super actionsetstructuralfeaturemultiplicity actionsetstructuralfeaturemultiplicity public void set selected item object item object target if target null model get facade isa structural feature target if model get facade isa multiplicity item if item equals model get facade get multiplicity target model get core helper set multiplicity target item else if item instanceof string if item equals model get facade to string model get facade get multiplicity target model get core helper set multiplicity target model get data types factory create multiplicity string item else model get core helper set multiplicity target null setselecteditem getfacade isastructuralfeature getfacade isamultiplicity getfacade getmultiplicity getcorehelper setmultiplicity getfacade tostring getfacade getmultiplicity getcorehelper setmultiplicity getdatatypesfactory createmultiplicity getcorehelper setmultiplicity return returns the singleton public static action set structural feature multiplicity get instance return singleton actionsetstructuralfeaturemultiplicity getinstance construct a new fig subactivity state param owner owning uml element param bounds position and size param settings rendering settings public fig subactivity state object owner rectangle bounds diagram settings settings super owner bounds settings init figs figsubactivitystate figsubactivitystate diagramsettings initfigs main constructor called from file loading deprecated for 0 27 4 by tfmorris use link fig subactivity state object rectangle diagram settings suppress warnings deprecation deprecated public fig subactivity state init figs figsubactivitystate diagramsettings suppresswarnings figsubactivitystate initfigs private void init figs figr rect big port new figr rect x y w h debug color debug color big port set corner radius big port get height 2 cover new figr rect x y w h line color fill color cover set corner radius get height 2 big port set line width 0 icon make sub states icon x w y the substate icon in the corner get name fig set line width 0 get name fig set bounds 10 padding 10 90 padding 2 25 get name fig set filled false get name fig set return action fig text insert get name fig set editable false add figs to the fig node in back to front order add fig big port add fig cover add fig get name fig add fig icon make sub states icon x w y set big port big port set bounds get bounds initfigs figrrect bigport figrrect debug_color debug_color bigport setcornerradius bigport getheight figrrect line_color fill_color setcornerradius getheight bigport setlinewidth makesubstatesicon getnamefig setlinewidth getnamefig setbounds getnamefig setfilled getnamefig setreturnaction figtext getnamefig seteditable fignode addfig bigport addfig addfig getnamefig addfig makesubstatesicon setbigport bigport setbounds getbounds param x the x coordinate of the right corner param y the y coordinate of the bottom corner private void make sub states icon int x int y s1 new figr rect x 22 y 3 8 6 line color fill color s2 new figr rect x 11 y 9 8 6 line color fill color s1 set filled true s2 set filled true s1 set line width line width s2 set line width line width s1 set corner radius sh s2 set corner radius sh s3 new fig line x 18 y 6 x 7 y 12 line color add fig s3 add them back to front add fig s1 add fig s2 makesubstatesicon figrrect line_color fill_color figrrect line_color fill_color setfilled setfilled setlinewidth line_width setlinewidth line_width setcornerradius setcornerradius figline line_color addfig addfig addfig constructor that hooks the fig into an existing uml model element param gm ignored param node owner i e the uml element deprecated for 0 27 4 by tfmorris use link fig subactivity state object rectangle diagram settings suppress warnings deprecation deprecated public fig subactivity state suppress warnings unused graph model gm object node this set owner node figsubactivitystate diagramsettings suppresswarnings figsubactivitystate suppresswarnings graphmodel setowner override public object clone fig subactivity state fig clone fig subactivity state super clone iterator it fig clone get figs iterator fig clone set big port figr rect it next fig clone cover figr rect it next fig clone set name fig fig text it next return fig clone figsubactivitystate figclone figsubactivitystate figclone getfigs figclone setbigport figrrect figclone figrrect figclone setnamefig figtext figclone override public dimension get minimum size dimension name dim get name fig get minimum size int w name dim width padding 2 int h name dim height padding return new dimension math max w w 2 math max h h 2 getminimumsize namedim getnamefig getminimumsize namedim namedim override protected void set standard bounds int x int y int w int h if get name fig null return rectangle old bounds get bounds get name fig set bounds x padding y w padding 2 h padding get big port set bounds x y w h cover set bounds x y w h figr rect get big port set corner radius h cover set corner radius h s1 set bounds x w 2 sx sw y h 1 sy sh sw sh s2 set bounds x w 1 sx sw y h 2 sy sh sw sh s3 set shape x w sx 2 sw sw 2 y h sy sh 2 x w sx sw 2 y h sy 2 sh sh 2 calc bounds update edges fire prop change bounds old bounds get bounds setstandardbounds getnamefig oldbounds getbounds getnamefig setbounds getbigport setbounds setbounds figrrect getbigport setcornerradius setcornerradius setbounds setbounds setshape calcbounds updateedges firepropchange oldbounds getbounds see org tigris gef presentation fig set line color java awt color override public void set line color color col cover set line color col setlinecolor setlinecolor setlinecolor see org tigris gef presentation fig get line color public color get line color return cover get line color getlinecolor getlinecolor getlinecolor see org tigris gef presentation fig set fill color java awt color public void set fill color color col cover set fill color col setfillcolor setfillcolor setfillcolor see org tigris gef presentation fig get fill color public color get fill color return cover get fill color getfillcolor getfillcolor getfillcolor see org tigris gef presentation fig set filled boolean override public void set filled boolean f cover set filled f setfilled setfilled setfilled override public boolean is filled return cover is filled isfilled isfilled see org tigris gef presentation fig set line width int override public void set line width int w cover set line width w setlinewidth setlinewidth setlinewidth see org tigris gef presentation fig get line width override public int get line width return cover get line width getlinewidth getlinewidth getlinewidth override protected void model changed property change event mee let our superclass sort itself out first super model changed mee if mee instanceof association change event mee instanceof attribute change event rendering changed update listeners get owner get owner modelchanged propertychangeevent modelchanged associationchangeevent attributechangeevent renderingchanged updatelisteners getowner getowner override protected void update listeners object old owner object new owner set object l new hash set object if new owner null add the listeners to the new owner l add new object new owner null and listen to name changes of the submachine object machine model get facade get submachine new owner if machine null l add new object machine null update element listeners l updatelisteners oldowner newowner hashset newowner newowner newowner getfacade getsubmachine newowner updateelementlisteners override protected void update name text string s if get owner null object machine model get facade get submachine get owner if machine null s model get facade get name machine if s null s get name fig set text s updatenametext getowner getfacade getsubmachine getowner getfacade getname getnamefig settext for testing purposes in tests this constructor can be called so the instance is filled private project browser this argouml null true null theinstance projectbrowser the constructor param application name the title of the frame param splash the splash screen to show at startup param main application flag indicating whether we are the top level application false if we are providing components to another top level app param left bottom pane the panel to fit in the left bottom corner private project browser string application name splash screen splash boolean main application j panel left bottom pane super application name the instance this is main application main application get content pane set font default font todo this causes a cyclic depencency with action save project save action new action save project project manager get manager set save action save action create panels splash left bottom pane if is main application menu bar new generic argo menu bar get content pane set layout new border layout this setj menu bar menu bar get content pane add menubar border layout north get content pane add assemble panels border layout center j panel bottom new j panel bottom set layout new border layout bottom add status bar border layout center bottom add new heap monitor border layout east get content pane add bottom border layout south set app name application name allows me to ask do you want to save first set default close operation project browser do nothing on close add window listener new window closer set application icon add listener for project changes project manager get manager add property change listener this add listener to get notified when active diagram changes target manager get instance add target listener this add a listener to focus changes rationale reset the undo manager to start a new chain add keyboard focus listener applicationname mainapplication leftbottompane projectbrowser applicationname splashscreen mainapplication jpanel leftbottompane applicationname theinstance ismainapplication mainapplication getcontentpane setfont defaultfont actionsaveproject saveaction actionsaveproject projectmanager getmanager setsaveaction saveaction createpanels leftbottompane ismainapplication menubar genericargomenubar getcontentpane setlayout borderlayout setjmenubar menubar getcontentpane _menubar borderlayout getcontentpane assemblepanels borderlayout jpanel jpanel setlayout borderlayout statusbar borderlayout heapmonitor borderlayout getcontentpane borderlayout setappname applicationname setdefaultcloseoperation projectbrowser do_nothing_on_close addwindowlistener windowcloser setapplicationicon projectmanager getmanager addpropertychangelistener targetmanager getinstance addtargetlistener addkeyboardfocuslistener private void add keyboard focus listener keyboard focus manager kfm keyboard focus manager get current keyboard focus manager kfm add property change listener new property change listener private object obj see java beans property change listener property change java beans property change event public void property change property change event evt if focus owner equals evt get property name evt get new value null we get many many events why so let s filter obj evt get new value obj evt get new value todo bob says we re looking at focus change to flag the start of an interaction this is to detect when focus is gained in a prop panel field on the assumption editing of that field is about to start not a good assumption we need to see if we can get rid of this project p project manager get manager get current project if p null p get undo manager start interaction focus this next line is ideal for debugging the taborder focus traversal see e g issue 1849 system out println focus changed obj addkeyboardfocuslistener keyboardfocusmanager keyboardfocusmanager getcurrentkeyboardfocusmanager addpropertychangelistener propertychangelistener propertychangelistener propertychange propertychangeevent propertychange propertychangeevent focusowner getpropertyname getnewvalue getnewvalue getnewvalue projectmanager getmanager getcurrentproject getundomanager startinteraction public void property change property change event evt if focus owner equals evt get property name evt get new value null we get many many events why so let s filter obj evt get new value obj evt get new value todo bob says we re looking at focus change to flag the start of an interaction this is to detect when focus is gained in a prop panel field on the assumption editing of that field is about to start not a good assumption we need to see if we can get rid of this project p project manager get manager get current project if p null p get undo manager start interaction focus this next line is ideal for debugging the taborder focus traversal see e g issue 1849 system out println focus changed obj propertychange propertychangeevent focusowner getpropertyname getnewvalue getnewvalue getnewvalue projectmanager getmanager getcurrentproject getundomanager startinteraction private void set application icon final image icon argo image16x16 resource loader wrapper lookup icon resource argo icon16x16 jr es pre 1 6 0 cannot handle multiple images using set icon images so use reflection to conditionally make the call to this set icon images todo we can remove all of this reflection code when we go to java 1 6 as a minimum jre version see issue 4989 if java runtime utility is jre5 with jre 1 6 0 do it the old way using javax swing j frame set icon image and accept the blurry icon set icon image argo image16x16 get image else final image icon argo image32x32 resource loader wrapper lookup icon resource argo icon32x32 final list image argo images new array list image 2 argo images add argo image16x16 get image argo images add argo image32x32 get image try java awt window set icon images is new in java 6 check for it using reflection on current instance final method m get class get method set icon images list class m invoke this argo images catch invocation target exception e log error exception e catch no such method exception e log error exception e catch illegal argument exception e log error exception e catch illegal access exception e log error exception e setapplicationicon imageicon argoimage16x16 resourceloaderwrapper lookupiconresource argoicon16x16 jres seticonimages seticonimages javaruntimeutility isjre5 jframe seticonimage seticonimage argoimage16x16 getimage imageicon argoimage32x32 resourceloaderwrapper lookupiconresource argoicon32x32 argoimages arraylist argoimages argoimage16x16 getimage argoimages argoimage32x32 getimage seticonimages getclass getmethod seticonimages argoimages invocationtargetexception nosuchmethodexception illegalargumentexception illegalaccessexception singleton retrieval method for the projectbrowser do not use this before make instance is called return the singleton instance of the projectbrowser public static synchronized project browser get instance assert the instance null return the instance makeinstance projectbrowser getinstance theinstance theinstance creator method for the project browser which optionally allows all components to be created without making a top level application window visible param splash true if we are allowed to show a splash screen param main application true to create a top level application false if integrated with something else param left bottom pane panel to place in the bottom left corner of the gui return the singleton instance of the projectbrowser public static project browser make instance splash screen splash boolean main application j panel left bottom pane return new project browser argouml splash main application left bottom pane projectbrowser mainapplication leftbottompane projectbrowser makeinstance splashscreen mainapplication jpanel leftbottompane projectbrowser mainapplication leftbottompane see java awt component get locale override public locale get locale return locale get default getlocale getlocale getdefault creates the panels in the working area param splash true if we show the splashscreen during startup param left bottom pane panel to be placed in the bottom left southwest corner of the ui protected void create panels splash screen splash j panel left bottom pane if splash null splash get status bar show status translator localize statusmsg bar making project browser splash get status bar show progress 10 splash set visible true editor pane new multi editor pane if splash null splash get status bar show status translator localize statusmsg bar making project browser explorer splash get status bar inc progress 5 explorer pane new navigator pane splash the workarea is all the visible space except the menu toolbar and status bar workarea is laid out as a border split pane where the various components that make up the argo application can be positioned work area pane new border split pane create the todopane if splash null splash get status bar show status translator localize statusmsg bar making project browser to do pane splash get status bar inc progress 5 todo pane left bottom pane create details panes restore panel sizes leftbottompane createpanels splashscreen jpanel leftbottompane getstatusbar showstatus getstatusbar showprogress setvisible editorpane multieditorpane getstatusbar showstatus getstatusbar incprogress explorerpane navigatorpane bordersplitpane workareapane bordersplitpane getstatusbar showstatus getstatusbar incprogress todopane leftbottompane createdetailspanes restorepanelsizes private component assemble panels add panel editor pane position center add panel explorer pane position west add panel todo pane position south west there are various details panes all of which could hold different tabs pages according to users settings place each pane in the required border area for map entry position details pane entry details panes by compass point entry set position position entry get key add panel entry get value position toolbar boundary is the area between the menu and the status bar it contains the workarea at centre and the toolbar position north south east or west final j panel toolbar boundary new j panel toolbar boundary set layout new dock border layout todo should save and restore the last positions of the toolbars final string toolbar position border layout north toolbar boundary add menu bar get file toolbar toolbar position toolbar boundary add menu bar get edit toolbar toolbar position toolbar boundary add menu bar get view toolbar toolbar position toolbar boundary add menu bar get create diagram toolbar toolbar position toolbar boundary add work area pane border layout center registers all toolbars and enables north panel hiding when all toolbars are hidden argo toolbar manager get instance register toolbar menu bar get file toolbar menu bar get file toolbar 0 argo toolbar manager get instance register toolbar menu bar get edit toolbar menu bar get edit toolbar 1 argo toolbar manager get instance register toolbar menu bar get view toolbar menu bar get view toolbar 2 argo toolbar manager get instance register toolbar menu bar get create diagram toolbar menu bar get create diagram toolbar 3 final j tool bar toolbars new j tool bar menu bar get file toolbar menu bar get edit toolbar menu bar get view toolbar menu bar get create diagram toolbar for j tool bar toolbar toolbars toolbar add component listener new component adapter public void component hidden component event e boolean all hidden true for j tool bar bar toolbars if bar is visible all hidden false break if all hidden for j tool bar bar toolbars toolbar boundary get layout remove layout component bar toolbar boundary get layout layout container toolbar boundary public void component shown component event e j tool bar one visible null for j tool bar bar toolbars if bar is visible one visible bar break if one visible null toolbar boundary add one visible toolbar position toolbar boundary get layout layout container toolbar boundary end registering toolbar return toolbar boundary assemblepanels addpanel editorpane addpanel explorerpane addpanel todopane southwest detailspane detailspanesbycompasspoint entryset getkey addpanel getvalue jpanel toolbarboundary jpanel toolbarboundary setlayout dockborderlayout toolbarposition borderlayout toolbarboundary menubar getfiletoolbar toolbarposition toolbarboundary menubar getedittoolbar toolbarposition toolbarboundary menubar getviewtoolbar toolbarposition toolbarboundary menubar getcreatediagramtoolbar toolbarposition toolbarboundary workareapane borderlayout argotoolbarmanager getinstance registertoolbar menubar getfiletoolbar menubar getfiletoolbar argotoolbarmanager getinstance registertoolbar menubar getedittoolbar menubar getedittoolbar argotoolbarmanager getinstance registertoolbar menubar getviewtoolbar menubar getviewtoolbar argotoolbarmanager getinstance registertoolbar menubar getcreatediagramtoolbar menubar getcreatediagramtoolbar jtoolbar jtoolbar menubar getfiletoolbar menubar getedittoolbar menubar getviewtoolbar menubar getcreatediagramtoolbar jtoolbar addcomponentlistener componentadapter componenthidden componentevent allhidden jtoolbar isvisible allhidden allhidden jtoolbar toolbarboundary getlayout removelayoutcomponent toolbarboundary getlayout layoutcontainer toolbarboundary componentshown componentevent jtoolbar onevisible jtoolbar isvisible onevisible onevisible toolbarboundary onevisible toolbarposition toolbarboundary getlayout layoutcontainer toolbarboundary toolbarboundary toolbar add component listener new component adapter public void component hidden component event e boolean all hidden true for j tool bar bar toolbars if bar is visible all hidden false break if all hidden for j tool bar bar toolbars toolbar boundary get layout remove layout component bar toolbar boundary get layout layout container toolbar boundary addcomponentlistener componentadapter componenthidden componentevent allhidden jtoolbar isvisible allhidden allhidden jtoolbar toolbarboundary getlayout removelayoutcomponent toolbarboundary getlayout layoutcontainer toolbarboundary public void component shown component event e j tool bar one visible null for j tool bar bar toolbars if bar is visible one visible bar break if one visible null toolbar boundary add one visible toolbar position toolbar boundary get layout layout container toolbar boundary componentshown componentevent jtoolbar onevisible jtoolbar isvisible onevisible onevisible toolbarboundary onevisible toolbarposition toolbarboundary getlayout layoutcontainer toolbarboundary private void create details panes work in progress here to allow multiple details panes with different contents bob tarling east pane make details pane border split pane east vertical get instance south pane make details pane border split pane south horizontal get instance south east pane make details pane border split pane southeast horizontal get instance north west pane make details pane border split pane northwest horizontal get instance north pane make details pane border split pane north horizontal get instance north east pane make details pane border split pane northeast horizontal get instance if south pane null details panes by compass point put position south south pane if south east pane null details panes by compass point put position south east south east pane if east pane null details panes by compass point put position east east pane if north west pane null details panes by compass point put position north west north west pane if north pane null details panes by compass point put position north north pane if north east pane null details panes by compass point put position north east north east pane add target listeners for details panes iterator it details panes by compass point entry set iterator while it has next target manager get instance add target listener details pane map entry it next get value createdetailspanes eastpane makedetailspane bordersplitpane getinstance southpane makedetailspane bordersplitpane getinstance southeastpane makedetailspane bordersplitpane getinstance northwestpane makedetailspane bordersplitpane getinstance northpane makedetailspane bordersplitpane getinstance northeastpane makedetailspane bordersplitpane getinstance southpane detailspanesbycompasspoint southpane southeastpane detailspanesbycompasspoint southeast southeastpane eastpane detailspanesbycompasspoint eastpane northwestpane detailspanesbycompasspoint northwest northwestpane northpane detailspanesbycompasspoint northpane northeastpane detailspanesbycompasspoint northeast northeastpane detailspanesbycompasspoint entryset hasnext targetmanager getinstance addtargetlistener detailspane getvalue add a panel to a split pane area param comp the panel to add param position the position where the panel should be added public void add panel component comp position position work area pane add comp position to string addpanel workareapane tostring remove a panel from a split pane area param comp the panel to remove public void remove panel component comp work area pane remove comp work area pane validate work area pane repaint removepanel workareapane workareapane workareapane set the size of each panel to that last saved in the configuration file private void restore panel sizes if north pane null north pane set preferred size new dimension 0 get saved height argo key screen north height if south pane null south pane set preferred size new dimension 0 get saved height argo key screen south height if east pane null east pane set preferred size new dimension get saved width argo key screen east width 0 if explorer pane null explorer pane set preferred size new dimension get saved width argo key screen west width 0 if north west pane null north west pane set preferred size get saved dimensions argo key screen northwest width argo key screen north height if todo pane null todo pane set preferred size get saved dimensions argo key screen southwest width argo key screen south height if north east pane null north east pane set preferred size get saved dimensions argo key screen northeast width argo key screen north height if south east pane null south east pane set preferred size get saved dimensions argo key screen southeast width argo key screen south height restorepanelsizes northpane northpane setpreferredsize getsavedheight key_screen_north_height southpane southpane setpreferredsize getsavedheight key_screen_south_height eastpane eastpane setpreferredsize getsavedwidth key_screen_east_width explorerpane explorerpane setpreferredsize getsavedwidth key_screen_west_width northwestpane northwestpane setpreferredsize getsaveddimensions key_screen_northwest_width key_screen_north_height todopane todopane setpreferredsize getsaveddimensions key_screen_southwest_width key_screen_south_height northeastpane northeastpane setpreferredsize getsaveddimensions key_screen_northeast_width key_screen_north_height southeastpane southeastpane setpreferredsize getsaveddimensions key_screen_southeast_width key_screen_south_height convenience methods to return saved width and height values private dimension get saved dimensions configuration key width configuration key height return new dimension get saved width width get saved height height getsaveddimensions configurationkey configurationkey getsavedwidth getsavedheight return new dimension get saved width width get saved height height private int get saved width configuration key width return configuration get integer width default componentwidth getsavedwidth getsavedheight getsavedwidth configurationkey getinteger default_componentwidth return configuration get integer width default componentwidth private int get saved height configuration key height return configuration get integer height default componentheight getinteger default_componentwidth getsavedheight configurationkey getinteger default_componentheight create a title for the main window s title param project file name the project file name param active diagram the new current diagram protected void build title string project file name argo diagram active diagram if project file name null equals project file name if project manager get manager get current project null project file name project manager get manager get current project get name todo why would this be null if active diagram null active diagram diagram utils get active diagram string change indicator if save action null save action is enabled change indicator if active diagram null if monitored diagram null monitored diagram remove property change listener name this active diagram add property change listener name this monitored diagram active diagram set title project file name active diagram get name get app name change indicator else set title project file name get app name change indicator projectfilename activediagram buildtitle projectfilename argodiagram activediagram projectfilename projectfilename projectmanager getmanager getcurrentproject projectfilename projectmanager getmanager getcurrentproject getname activediagram activediagram diagramutils getactivediagram changeindicator saveaction saveaction isenabled changeindicator activediagram monitoreddiagram monitoreddiagram removepropertychangelistener activediagram addpropertychangelistener monitoreddiagram activediagram settitle projectfilename activediagram getname getappname changeindicator settitle projectfilename getappname changeindicator public void property change property change event evt if evt get property name equals name evt get source instanceof argo diagram build title project manager get manager get current project get name argo diagram evt get source propertychange propertychangeevent getpropertyname getsource argodiagram buildtitle projectmanager getmanager getcurrentproject getname argodiagram getsource set the save indicator the after the title to appear depending on the current save action enabled status public void show save indicator title handler build title null null showsaveindicator titlehandler buildtitle return the application name argouml as shown in the titlebar public string get app name return app name getappname appname param n the application name argouml as shown in the titlebar public void set app name string n app name n setappname appname the method used by the navigator pane multi editor and details pane to set the target of the application p the target is either a model element usually selected in the navigation pane or properties panel or a fig selected in a diagram p the concept of a selection transaction is used to prevent a change of target in one view creating a call back to this method which would then change the target in all views again p param o the target private void set target object o target manager get instance set target o navigatorpane multieditor detailspane settarget targetmanager getinstance settarget select the tab page containing the todo item param o the todo item to select deprecated for 0 25 5 by tfmorris send an event that the details pane tab to do will be listening for deprecated public void set to do item object o iterator it details panes by compass point values iterator while it has next details pane details pane details pane it next if details pane set to do item o return detailspane tabtodo settodoitem detailspanesbycompasspoint hasnext detailspane detailspane detailspane detailspane settodoitem get the tab page instance of the given class param tab class the given class return the tabpage deprecated by for 0 25 5 by tfmorris tabs should register themselves with whoever they need to communicate with in a distributed fashion rather than relying on a central registry currently the only place this is used is to communicate between wiz step and tab to do in the cognitive subsystem deprecated public abstract argoj panel get tab class tab class in theory there can be multiple details pane work in progress it must first be determined which details page contains the properties tab bob tarling 7 dec 2002 for details pane details pane details panes by compass point values abstract argoj panel tab details pane get tab tab class if tab null return tab throw new illegal state exception no tab class get name tab found tabclass wizstep tabtodo abstractargojpanel gettab tabclass detailspane detailspane detailspanesbycompasspoint abstractargojpanel detailspane gettab tabclass illegalstateexception tabclass getname return the status bar public status bar get status bar return status bar statusbar getstatusbar statusbar see javax swing j frame getj menu bar override public j menu bar getj menu bar return menu bar jframe getjmenubar jmenubar getjmenubar menubar return the editor pane public multi editor pane get editor pane return editor pane multieditorpane geteditorpane editorpane return the explorer pane public navigator pane get explorer pane return explorer pane navigatorpane getexplorerpane explorerpane return the details pane public j panel get details pane return south pane jpanel getdetailspane southpane override public void set visible boolean b super set visible b if b globals set status bar get status bar setvisible setvisible setstatusbar getstatusbar private void update status string status argo event pump fire event new argo status event argo event types status text this status updatestatus argoeventpump fireevent argostatusevent argoeventtypes status_text save the positions of the screen splitters sizes and postion of main window in the properties file private void save screen configuration if explorer pane null configuration set integer argo key screen west width explorer pane get width if east pane null configuration set integer argo key screen east width east pane get width if north pane null configuration set integer argo key screen north height north pane get height if south pane null configuration set integer argo key screen south height south pane get height if todo pane null configuration set integer argo key screen southwest width todo pane get width if south east pane null configuration set integer argo key screen southeast width south east pane get width if north west pane null configuration set integer argo key screen northwest width north west pane get width if north east pane null configuration set integer argo key screen northeast width north east pane get width boolean maximized get extended state maximized both if maximized configuration set integer argo key screen width get width configuration set integer argo key screen height get height configuration set integer argo key screen left x getx configuration set integer argo key screen top y gety configuration set boolean argo key screen maximized maximized savescreenconfiguration explorerpane setinteger key_screen_west_width explorerpane getwidth eastpane setinteger key_screen_east_width eastpane getwidth northpane setinteger key_screen_north_height northpane getheight southpane setinteger key_screen_south_height southpane getheight todopane setinteger key_screen_southwest_width todopane getwidth southeastpane setinteger key_screen_southeast_width southeastpane getwidth northwestpane setinteger key_screen_northwest_width northwestpane getwidth northeastpane setinteger key_screen_northeast_width northeastpane getwidth getextendedstate maximized_both setinteger key_screen_width getwidth setinteger key_screen_height getheight setinteger key_screen_left_x setinteger key_screen_top_y setboolean key_screen_maximized build a new details pane for the given compass point param compass point the position for which to build the pane param orientation the required orientation of the pane return the details pane or null if none is required for the given compass point private details pane make details pane string compass point orientation orientation details pane details pane new details pane compass point to lower case orientation if details pane has tabs return null return details pane compasspoint detailspane makedetailspane compasspoint detailspane detailspane detailspane compasspoint tolowercase detailspane hastabs detailspane exit the application if no save is required if a save is required then prompt the user if they wish to save and exit exit without saving or cancel the exit operation public void try exit if save action null save action is enabled project p project manager get manager get current project string t message format format translator localize optionpane exit save changes to new object p get name int response j option pane show confirm dialog this t t j option pane yes no cancel option if response j option pane cancel option response j option pane closed option return if response j option pane yes option try save project manager get manager get current project null project manager get manager get current project geturi null if save action is enabled return save screen configuration configuration save system exit 0 tryexit saveaction saveaction isenabled projectmanager getmanager getcurrentproject messageformat getname joptionpane showconfirmdialog joptionpane yes_no_cancel_option joptionpane cancel_option joptionpane closed_option joptionpane yes_option trysave projectmanager getmanager getcurrentproject projectmanager getmanager getcurrentproject saveaction isenabled savescreenconfiguration see java awt window dispose public void dispose class window closer extends window adapter constructor public window closer windowcloser windowadapter windowcloser see java awt event window listener window closing java awt event window event public void window closing window event e try exit windowlistener windowclosing windowevent windowclosing windowevent tryexit public void property change property change event evt the project changed if evt get property name equals project manager current project property name project p project evt get new value if p null title handler build title p get name null designer the designer get to do list remove all elements designer set critiquing root p update all panes target manager get instance set target p get initial target todo do we want to use the project here instead of just its name argo event pump fire event new argo status event argo event types status project loaded this p get name propertychange propertychangeevent getpropertyname projectmanager current_project_property_name getnewvalue titlehandler buildtitle getname thedesigner gettodolist removeallelements setcritiquingroot targetmanager getinstance settarget getinitialtarget argoeventpump fireevent argostatusevent argoeventtypes status_project_loaded getname see org argouml ui targetmanager target listener target added org argouml ui targetmanager target event public void target added target event e target changed e get new target targetlistener targetadded targetevent targetadded targetevent targetchanged getnewtarget see org argouml ui targetmanager target listener target removed org argouml ui targetmanager target event public void target removed target event e target changed e get new target targetlistener targetremoved targetevent targetremoved targetevent targetchanged getnewtarget see org argouml ui targetmanager target listener target set org argouml ui targetmanager target event public void target set target event e target changed e get new target targetlistener targetset targetevent targetset targetevent targetchanged getnewtarget called to update the current namespace and active diagram after the target has changed param target the new target private void target changed object target if target instanceof argo diagram title handler build title null argo diagram target determine remove enabled project p project manager get manager get current project object the current namespace null target target manager get instance get target if target instanceof argo diagram the current namespace argo diagram target get namespace else if model get facade isa namespace target the current namespace target else if model get facade isa model element target the current namespace model get facade get namespace target else the current namespace p get root p set current namespace the current namespace if target instanceof argo diagram p set active diagram argo diagram target targetchanged argodiagram titlehandler buildtitle argodiagram determineremoveenabled projectmanager getmanager getcurrentproject thecurrentnamespace targetmanager getinstance gettarget argodiagram thecurrentnamespace argodiagram getnamespace getfacade isanamespace thecurrentnamespace getfacade isamodelelement thecurrentnamespace getfacade getnamespace thecurrentnamespace getroot setcurrentnamespace thecurrentnamespace argodiagram setactivediagram argodiagram enabled the remove action if an item is selected in anything other then the activity or state diagrams private void determine remove enabled editor editor globals cur editor collection figs editor get selection manager get figs boolean remove enabled figs is empty graph model gm editor get graph model if gm instanceof uml mutable graph support remove enabled uml mutable graph support gm is remove from diagram allowed figs remove from diagram set enabled remove enabled determineremoveenabled cureditor getselectionmanager getfigs removeenabled isempty graphmodel getgraphmodel umlmutablegraphsupport removeenabled umlmutablegraphsupport isremovefromdiagramallowed removefromdiagram setenabled removeenabled returns the todopane return to do pane public j panel get todo pane return todo pane todopane jpanel gettodopane todopane return returns the default font public font get default font return default font defaultfont getdefaultfont defaultfont try to save the project possibly not creating a new file param overwrite if true then we overwrite without asking public void try save boolean overwrite this try save overwrite false trysave trysave try to save the project param overwrite if true then we overwrite without asking param save new file if true we ll ask for a new file even if the current project already had one public void try save boolean overwrite boolean save new file uri uri project manager get manager get current project geturi file file null this method is invoked from several places so we have to check whether if the project uri is set or not if uri null save new file file new file uri does the file really exists if file exists project file doesn t exist let s pop up a message dialog int response j option pane show confirm dialog this translator localize optionpane save project file not found translator localize optionpane save project file not found title j option pane yes no option and let s ask the user whether he wants to save the actual project into a new file or not if response j option pane yes option save new file true else save action has been cancelled return else attempt to save this project under a new name save new file true prompt the user for the new name if save new file file get new file if the user cancelled the operation we don t have to save anything if file null return let s call the real save method try save with progress monitor overwrite file savenewfile trysave savenewfile projectmanager getmanager getcurrentproject savenewfile joptionpane showconfirmdialog joptionpane yes_no_option joptionpane yes_option savenewfile savenewfile savenewfile getnewfile trysavewithprogressmonitor checks if the given file is writable or read only param file the file to be checked return true if the given file is read only private boolean is file readonly file file try return file null file exists file can write file exists file create new file catch io exception io exc return true isfilereadonly canwrite createnewfile ioexception ioexc loads a project displaying a nice progress monitor param overwrite if true the file is going to be overwritten param file the target file todo separate this into a swing specific class tfm public void try save with progress monitor boolean overwrite file file save swing worker worker new save swing worker overwrite file thread current thread set priority thread max priority worker start progressmonitor trysavewithprogressmonitor saveswingworker saveswingworker currentthread setpriority max_priority rebuild the title using the name of the current project public void build title with current project name title handler build title project manager get manager get current project get name null buildtitlewithcurrentprojectname titlehandler buildtitle projectmanager getmanager getcurrentproject getname try to save the project param overwrite if true then we overwrite without asking param file the file to save to param pmw the progress monitor to be updated return true if successful todo separate this into a swing specific class tfm public boolean try save boolean overwrite file file progress monitor pmw log info saving the project project project project manager get manager get current project persistence manager pm persistence manager get instance project file persister persister null try if persistence manager get instance confirm overwrite argo frame get instance overwrite file return false if this is file readonly file j option pane show message dialog this translator localize optionpane save project cant write translator localize optionpane save project cant write title j option pane information message return false string s status message format format translator localize statusmsg bar save project status writing new object file update status s status persister pm get save persister pm set save persister null if persister null persister pm get persister from file name file get name if persister null throw new illegal state exception filename project get name is not of a known file type test simulate errors repair any errors in the project string report project repair if report length 0 todo i18n report an inconsistency has been detected when saving the model these have been repaired and are reported below the save will continue with the model having been amended as described n report report error pmw translator localize dialog repair report true if pmw null pmw update progress 25 persister add progress listener pmw project pre save persister save project file project post save argo event pump fire event new argo status event argo event types status project saved this file get absolute path log debug setting most recent project file to file get canonical path notification of menu bar save action set enabled false add file saved file configuration set string argo key most recent project file file get canonical path return true catch exception ex string s message message format format translator localize optionpane save project general exception new object ex get message j option pane show message dialog this s message translator localize optionpane save project general exception title j option pane error message report error pmw translator localize dialog error save error new object file get name true ex log error s message ex return false progressmonitor trysave progressmonitor projectmanager getmanager getcurrentproject persistencemanager persistencemanager getinstance projectfilepersister persistencemanager getinstance confirmoverwrite argoframe getinstance isfilereadonly joptionpane showmessagedialog joptionpane information_message sstatus messageformat updatestatus sstatus getsavepersister setsavepersister getpersisterfromfilename getname illegalstateexception getname testsimulateerrors reporterror updateprogress addprogresslistener presave postsave argoeventpump fireevent argostatusevent argoeventtypes status_project_saved getabsolutepath getcanonicalpath saveaction setenabled addfilesaved setstring key_most_recent_project_file getcanonicalpath smessage messageformat getmessage joptionpane showmessagedialog smessage joptionpane error_message reporterror getname smessage private void test simulate errors change to true to enable testing if false layer lay globals cur editor get layer manager get active layer list figs lay get contents no edges a fig with a null owner if figs size 0 fig fig fig figs get 0 log error setting owner of fig get class get name to null fig set owner null a fig with a null layer if figs size 1 fig fig fig figs get 1 fig set layer null a fig with a removed model element if figs size 2 fig fig fig figs get 2 object owner fig get owner model get uml factory delete owner testsimulateerrors cureditor getlayermanager getactivelayer getcontentsnoedges getclass getname setowner setlayer getowner getumlfactory register a new file saved param file the file throws io exception if we cannot get the file name from the file public void add file saved file file throws io exception todo this should listen for file save events tfm generic argo menu bar menu generic argo menu bar getj menu bar if menu null menu add file saved file get canonical path ioexception addfilesaved ioexception genericargomenubar genericargomenubar getjmenubar addfilesaved getcanonicalpath if the current project is dirty needs saving then this function will ask confirmation from the user if the user indicates that saving is needed then saving is attempted see action exit action performed for a very similar procedure return true if we can continue with opening public boolean ask confirmation and save project browser pb project browser get instance project p project manager get manager get current project if p null save action is enabled string t message format format translator localize optionpane open project save changes to new object p get name int response j option pane show confirm dialog pb t t j option pane yes no cancel option if response j option pane cancel option response j option pane closed option return false if response j option pane yes option try save project manager get manager get current project null project manager get manager get current project geturi null if save action is enabled return false return true actionexit actionperformed askconfirmationandsave projectbrowser projectbrowser getinstance projectmanager getmanager getcurrentproject saveaction isenabled messageformat getname joptionpane showconfirmdialog joptionpane yes_no_cancel_option joptionpane cancel_option joptionpane closed_option joptionpane yes_option trysave projectmanager getmanager getcurrentproject projectmanager getmanager getcurrentproject saveaction isenabled loads a project displaying a nice progress monitor param file the project to be opened param showui whether to show the gui or not todo this needs to be refactored to be gui independent tfm public void load project with progress monitor file file boolean showui load swing worker worker new load swing worker file showui worker start progressmonitor loadprojectwithprogressmonitor loadswingworker loadswingworker loads the project file and opens all kinds of error message windows if it doesn t work for some reason in those cases it preserves the old project param file the file to open param showui true if an error message may be shown to the user false if run in commandline mode param pmw the progress monitor to be updated if not needed use null return true if the file was successfully opened todo separate this into a swing specific class tfm public boolean load project file file boolean showui progress monitor pmw log info loading project persistence manager pm persistence manager get instance project old project project manager get manager get current project if old project null remove the old project first it s wasteful to create a temp empty project but too much of argouml depends on having a current project project p project manager get manager make empty project project manager get manager set current project p project manager get manager remove project old project old project p boolean success false todo this is actually a hack some diagram types like the statechart diagrams access the current diagram to get some info this might cause problems if there s another statechart diagram active so i remove the current project before loading the new one designer disable critiquing designer clear critiquing clear dialogs project project null if file can read report error pmw file not found file showui designer enable critiquing success false else hide save action during load otherwise we get the appearing in title bar and the save enabling as models are updated todo do we still need this now the save enablement is improved final abstract action remembered save action this save action this save action null project manager get manager set save action null try project file persister persister pm get persister from file name file get name if persister null throw new illegal state exception filename file get name is not of a known file type if pmw null persister add progress listener pmw project persister do load file if pmw null persister remove progress listener pmw thread utils check if interrupted if model get diagram interchange model null todo this assumes no more than one project at a time will be loaded if it is ever reinstituted this needs to be fixed collection diagrams diagram factory get instance get diagram iterator diag diagrams iterator while diag has next project add member diag next if diagrams is empty project set active diagram argo diagram diagrams iterator next let s save this project in the mru list this add file saved file let s save this project as the last used one in the configuration file configuration set string argo key most recent project file file get canonical path update status translator localize statusmsg bar open project status read new object file get name success true catch version exception ex report error pmw translator localize dialog error file version error new object ex get message showui catch out of memory error ex log error out of memory while loading project ex report error pmw translator localize dialog error memory limit showui catch java lang interrupted exception ex log error project loading interrupted by user catch uml version exception ex report error pmw translator localize dialog error file version error new object ex get message showui ex catch xmi format exception ex if ex get cause instanceof xmi reference exception an error that can be corrected by the user so no stack trace but instead an explanation and a hint how to fix string reference xmi reference exception ex get cause get reference report error pmw translator localize dialog error xmi reference error new object reference ex get message ex to string showui else report error pmw translator localize dialog error xmi format error new object ex get message showui ex catch io exception ex log error exception while loading project ex report error pmw translator localize dialog error open error new object file get name showui ex catch open exception ex log error exception while loading project ex report error pmw translator localize dialog error open error new object file get name showui ex catch runtime exception ex log error exception while loading project ex report error pmw translator localize dialog error open error new object file get name showui ex finally try if success project project manager get manager make empty project project manager get manager set current project project if old project null project manager get manager remove project old project project get project settings init command cmd new non undoable command public object execute this is temporary load project should create a new project with its own undo manager and so there should be no command return null project get undo manager add command cmd log info there are project get diagram list size diagrams in the current project designer enable critiquing finally make sure save action is always reinstated this save action remembered save action we clear the save required flag on the swing event thread in the hopes that it gets done after any other background work listener updates that is being done there swing utilities invoke later new runnable public void run project manager get manager set save action remembered save action remembered save action set enabled false return success progressmonitor loadproject progressmonitor persistencemanager persistencemanager getinstance oldproject projectmanager getmanager getcurrentproject oldproject projectmanager getmanager makeemptyproject projectmanager getmanager setcurrentproject projectmanager getmanager removeproject oldproject oldproject disablecritiquing clearcritiquing cleardialogs canread reporterror enablecritiquing abstractaction rememberedsaveaction saveaction saveaction projectmanager getmanager setsaveaction projectfilepersister getpersisterfromfilename getname illegalstateexception getname addprogresslistener doload removeprogresslistener threadutils checkifinterrupted getdiagraminterchangemodel diagramfactory getinstance getdiagram hasnext addmember isempty setactivediagram argodiagram addfilesaved setstring key_most_recent_project_file getcanonicalpath updatestatus getname versionexception reporterror getmessage outofmemoryerror reporterror interruptedexception umlversionexception reporterror getmessage xmiformatexception getcause xmireferenceexception xmireferenceexception getcause getreference reporterror getmessage tostring reporterror getmessage ioexception reporterror getname openexception reporterror getname runtimeexception reporterror getname projectmanager getmanager makeemptyproject projectmanager getmanager setcurrentproject oldproject projectmanager getmanager removeproject oldproject getprojectsettings nonundoablecommand undomanager getundomanager addcommand getdiagramlist enablecritiquing saveaction rememberedsaveaction swingutilities invokelater projectmanager getmanager setsaveaction rememberedsaveaction rememberedsaveaction setenabled command cmd new non undoable command public object execute this is temporary load project should create a new project with its own undo manager and so there should be no command return null nonundoablecommand undomanager swing utilities invoke later new runnable public void run project manager get manager set save action remembered save action remembered save action set enabled false swingutilities invokelater projectmanager getmanager setsaveaction rememberedsaveaction rememberedsaveaction setenabled open a message dialog with an error message param message the message to display param showui true if an error message may be shown to the user false if run in commandline mode private void report error progress monitor monitor final string message boolean showui if showui if monitor null monitor notify message translator localize dialog error title translator localize dialog error open save error message else swing utilities invoke later new runnable public void run j dialog dialog new exception dialog argo frame get instance translator localize dialog error title translator localize dialog error open save error message dialog set visible true else system err print message reporterror progressmonitor notifymessage swingutilities invokelater jdialog exceptiondialog argoframe getinstance setvisible swing utilities invoke later new runnable public void run j dialog dialog new exception dialog argo frame get instance translator localize dialog error title translator localize dialog error open save error message dialog set visible true swingutilities invokelater jdialog exceptiondialog argoframe getinstance setvisible open a message dialog with an error message param message the message to display param showui true if an error message may be shown to the user false if run in commandline mode param ex the exception that was thrown private void report error progress monitor monitor final string message boolean showui final throwable ex if showui if monitor null monitor notify message translator localize dialog error title message exception dialog format exception message ex ex instanceof open exception else swing utilities invoke later new runnable public void run j dialog dialog new exception dialog argo frame get instance translator localize dialog error title message exception dialog format exception message ex ex instanceof open exception dialog set visible true else string writer sw new string writer print writer pw new print writer sw ex print stack trace pw string exception sw to string todo does anyone use command line if so localization is needed tfm report error monitor please report the error below to the argouml development team at http argouml tigris org n message n n exception showui reporterror progressmonitor notifymessage exceptiondialog formatexception openexception swingutilities invokelater jdialog exceptiondialog argoframe getinstance exceptiondialog formatexception openexception setvisible stringwriter stringwriter printwriter printwriter printstacktrace tostring reporterror swing utilities invoke later new runnable public void run j dialog dialog new exception dialog argo frame get instance translator localize dialog error title message exception dialog format exception message ex ex instanceof open exception dialog set visible true swingutilities invokelater jdialog exceptiondialog argoframe getinstance exceptiondialog formatexception openexception setvisible open a message dialog with an error message and an explanation no stack trace since it s not an application error but a user issue param message the message to display param explanation the explanation to display param showui true if an error message may be shown to the user false if run in commandline mode private void report error progress monitor monitor final string message final string explanation boolean showui if showui if monitor null monitor notify message translator localize dialog error title explanation message else swing utilities invoke later new runnable public void run j dialog dialog new exception dialog argo frame get instance translator localize dialog error title explanation message dialog set visible true else report error monitor message n explanation n n showui reporterror progressmonitor notifymessage swingutilities invokelater jdialog exceptiondialog argoframe getinstance setvisible reporterror swing utilities invoke later new runnable public void run j dialog dialog new exception dialog argo frame get instance translator localize dialog error title explanation message dialog set visible true swingutilities invokelater jdialog exceptiondialog argoframe getinstance setvisible we should remove all open dialogs they have as parent the project browser this is needed for the non modal dialogs such as find and goto public void clear dialogs window windows get owned windows for int i 0 i windows length i if windows i instanceof find dialog windows i dispose find dialog get instance reset projectbrowser cleardialogs getownedwindows finddialog finddialog getinstance get the action that can save the current project return the save action public abstract action get save action return save action abstractaction getsaveaction saveaction get the action that removes selected figs from the diagram return the remove from diagram action public abstract action get remove from diagram action return remove from diagram abstractaction getremovefromdiagramaction removefromdiagram return the file to save to protected file get new file project browser pb project browser get instance project p project manager get manager get current project j file chooser chooser null uri uri p geturi if uri null file project file new file uri if project file length 0 chooser new j file chooser project file else chooser new j file chooser chooser set selected file project file else chooser new j file chooser string s chooser title translator localize filechooser save as project chooser set dialog title s chooser title p get name adding project files icon chooser set file view project file view get instance chooser set accept all file filter used false persistence manager get instance set save file chooser filters chooser uri null util uri to filename uri to string null int retval chooser show save dialog pb if retval j file chooser approve option file the file chooser get selected file abstract file persister filter abstract file persister chooser get file filter if the file null configuration set string persistence manager key project name path persistence manager get instance get base name the file get path string name the file get name if name ends with filter get extension the file new file the file get parent name filter get extension persistence manager get instance set save persister filter return the file return null getnewfile projectbrowser projectbrowser getinstance projectmanager getmanager getcurrentproject jfilechooser projectfile projectfile jfilechooser projectfile jfilechooser setselectedfile projectfile jfilechooser schoosertitle setdialogtitle schoosertitle getname setfileview projectfileview getinstance setacceptallfilefilterused persistencemanager getinstance setsavefilechooserfilters uritofilename tostring showsavedialog jfilechooser approve_option thefile getselectedfile abstractfilepersister abstractfilepersister getfilefilter thefile setstring persistencemanager key_project_name_path persistencemanager getinstance getbasename thefile getpath thefile getname endswith getextension thefile thefile getparent getextension persistencemanager getinstance setsavepersister thefile constructor for uml state machine transition list model public uml composite state subvertex list model super subvertex umlstatemachinetransitionlistmodel umlcompositestatesubvertexlistmodel see org argouml uml ui uml model element list model2 build model list protected void build model list set all elements model get facade get subvertices get target umlmodelelementlistmodel2 buildmodellist buildmodellist setallelements getfacade getsubvertices gettarget see org argouml uml ui uml model element list model2 is valid element object protected boolean is valid element object element return model get facade get subvertices get target contains element umlmodelelementlistmodel2 isvalidelement isvalidelement getfacade getsubvertices gettarget construct a new default property panel for a simple state public prop panel simple state this label simple state lookup icon simple state proppanelsimplestate lookupicon simplestate construct a new property panel for a simple state with the given attributes param name the name of the properties panel shown at the top param icon the icon shown at the top private prop panel simple state string name image icon icon super name icon add field label name get name text field add field label container get container scroll add field label entry get entry scroll add field label exit get exit scroll add field label do activity get do scroll add field label deferrable get deferrable events scroll add separator add field label incoming get incoming scroll add field label outgoing get outgoing scroll add field label internal transitions get internal transitions scroll proppanelsimplestate imageicon addfield getnametextfield addfield getcontainerscroll addfield getentryscroll addfield getexitscroll addfield getdoscroll addfield getdeferrableeventsscroll addseparator addfield getincomingscroll addfield getoutgoingscroll addfield getinternaltransitionsscroll the constructor public action new signal super button new signal put value action name translator localize button new signal icon icon resource loader wrapper lookup icon signal sending put value action small icon icon actionnewsignal putvalue resourceloaderwrapper lookupicon signalsending putvalue small_icon creates a new signal and in case of a signal event as target also set the signal for this event p inherit doc public void action performed action event e object target target manager get instance get model target if model get facade isa signal event target model get facade isa send action target model get facade isa reception target model get facade isa behavioral feature target object new sig model get common behavior factory build signal target target manager get instance set target new sig else object ns null if model get facade isa namespace target ns target else ns model get facade get namespace target object new element model get common behavior factory create signal target manager get instance set target new element model get core helper set namespace new element ns super action performed e signalevent inheritdoc actionperformed actionevent targetmanager getinstance getmodeltarget getfacade isasignalevent getfacade isasendaction getfacade isareception getfacade isabehavioralfeature newsig getcommonbehaviorfactory buildsignal targetmanager getinstance settarget newsig getfacade isanamespace getfacade getnamespace newelement getcommonbehaviorfactory createsignal targetmanager getinstance settarget newelement getcorehelper setnamespace newelement actionperformed the default constructor for this class loads resources from the same class loader that loaded this class public resource model loader this clazz this get class classloader resourcemodelloader getclass loads resources from the class loader that loaded the given class param c the reference class public resource model loader class c clazz c classloader resourcemodelloader public collection load model profile reference reference throws profile exception log info loading profile from resource reference get path return super load model clazz get resource reference get path reference get public reference loadmodel profilereference profileexception getpath loadmodel getresource getpath getpublicreference make the version of argouml public static void init application version init version stable version applicationversion stable_version don t allow instantiation private argo version argoversion public class save exception extends persistence exception the constructor param message the message to be shown param cause the cause of the exception public save exception string message throwable cause super message cause saveexception persistenceexception saveexception param message the message to be shown public save exception string message super message saveexception param cause the cause of the exception public save exception throwable cause super cause saveexception the constructor public action save project super translator localize action save project resource loader wrapper lookup icon action save project set the tooltip string put value action short description translator localize action save project super set enabled false actionsaveproject resourceloaderwrapper lookupicon putvalue short_description setenabled the constructor param name the name of the action param icon the icon to represent this action graphically protected action save project string name icon icon super name icon actionsaveproject public void action performed action event e log info performing save action project browser get instance try save project manager get manager get current project null project manager get manager get current project geturi null actionperformed actionevent projectbrowser getinstance trysave projectmanager getmanager getcurrentproject projectmanager getmanager getcurrentproject set the enabled state of the save action when we become enabled inform the user by highlighting the title bar with an asterisk this method is undoable this method is synchronized so that it can be used from any thread without external synchronization param is enabled new state for save command override public synchronized void set enabled final boolean is enabled if is enabled this enabled return if log is debug enabled if enabled is enabled throwable throwable new throwable throwable fill in stack trace log debug save action enabled by throwable else log debug save state changed from enabled to is enabled internal set enabled is enabled isenabled setenabled isenabled isenabled isdebugenabled isenabled fillinstacktrace isenabled internalsetenabled isenabled set the enabled state of this action and displays the save indicator param is enabled true to enable the action private void internal set enabled boolean is enabled super set enabled is enabled project browser get instance show save indicator isenabled internalsetenabled isenabled setenabled isenabled projectbrowser getinstance showsaveindicator this constructor is only availible to subclasses of this class if you use it you should also override link add char add char to recognize when your separator should that control if you don t then you may block all other separators protected custom separator pattern new char 0 match pattern addchar addchar customseparator this constructor creates a new custom separator that matches the character start unless you override link add char add char the default behaviour is to return false in add char until start is encountered and then has free part returns false param start the start character public custom separator char start pattern new char 1 pattern 0 start match new char pattern length addchar addchar addchar hasfreepart customseparator this constructor creates a new custom separator that matches the string start unless you override link add char add char the default behaviour is to return false in add char until start is encountered and then has free part returns false param start the start string public custom separator string start pattern start to char array match new char pattern length addchar addchar addchar hasfreepart customseparator tochararray called to reset the separator before staring to look for a new token public void reset int i for i 0 i match length i match i 0 returns the length of the matched token it is not required to be meaningful unless add char has returned true and has free part returned false or end char returned true return the length of the matched token public int token length return pattern length addchar hasfreepart endchar tokenlength called to allow you to decide if you want to capure control of the matching process if you return true then link has free part has free part will be checked to see if you expect more things to follow p the default behaviour is to return false until the character or string given as parameter to the constructor has been matched param c the next character in the sequence being tokenized return true to gain control of the matching false to continue matching public boolean add char char c int i for i 0 i match length 1 i match i match i 1 match match length 1 c for i 0 i match length i if match i pattern i return false return true hasfreepart hasfreepart addchar called to check if more characters are expected to follow after add char has returned true if true then any following characters will be fed to end char until end char returns true p the default behaviour is to return false return true to continue feeding characters to end char or false public boolean has free part return false addchar endchar endchar endchar hasfreepart called to check if more characters are expected in the free part of the token param c the next character in the sequence being tokenized return true to indicate that the token is complete or false to continue feeding characters through end char public boolean end char char c return true endchar endchar called to how many characters the custom separator read after the end of the separator this allows them to see beyond the end but these characters will be fed to the separators again when looking for the next token so be careful return the number of characters that were read after the end of the token had been read public int get peek count return 0 customseparator getpeekcount constructor deprecated for 0 28 by tfmorris use link uml activity diagram string object graph model deprecated public uml activity diagram super try set name get new diagram name catch property veto exception pve no action required in case of veto on set name todo all super constructors should take a graph model set graph model create graph model umlactivitydiagram graphmodel umlactivitydiagram setname getnewdiagramname propertyvetoexception setname graphmodel setgraphmodel creategraphmodel constructor param namespace the namespace for the diagram param agraph the activity graph for the diagram deprecated for 0 28 by tfmorris use link uml activity diagram string object graph model deprecated public uml activity diagram object namespace object agraph this if namespace null namespace model get facade get namespace agraph if model get facade isa namespace namespace model get facade isa activity graph agraph throw new illegal argument exception if model get facade get name namespace null if model get facade get name namespace trim equals string name model get facade get name namespace activity model get facade get behaviors namespace size try set name name catch property veto exception pve no action required setup namespace agraph activitygraph umlactivitydiagram graphmodel umlactivitydiagram getfacade getnamespace getfacade isanamespace getfacade isaactivitygraph illegalargumentexception getfacade getname getfacade getname getfacade getname getfacade getbehaviors setname propertyvetoexception public void initialize object o if model get facade isa activity graph o return object context model get facade get context o if context null if model get facade isa behavioral feature context setup model get facade get namespace model get facade get owner context o else setup context o else object namespace4 diagram model get facade get namespace o if namespace4 diagram null setup namespace4 diagram o else throw new illegal state exception cannot find context nor namespace while initializing activity diagram getfacade isaactivitygraph getfacade getcontext getfacade isabehavioralfeature getfacade getnamespace getfacade getowner namespace4diagram getfacade getnamespace namespace4diagram namespace4diagram illegalstateexception method to perform a number of important initializations of an em activity diagram em p each diagram type has a similar em um lxxx diagram em class p changed em lay em from em layer perspective em to em layer perspective mutable em this class is a child of em layer perspective em and was implemented to correct some difficulties in changing the model em lay em is used mainly in em layer manager em gef to control the adding changing and deleting layers on the diagram psager tigris org jan 24 2002 param namespace namespace from the model param agraph activity graph from the model public void setup object namespace object agraph if model get facade isa namespace namespace model get facade isa activity graph agraph throw new illegal argument exception set namespace namespace the activity graph agraph activity diagram graph model gm create graph model gm set home model namespace if the activity graph null gm set machine the activity graph activity diagram renderer rend new activity diagram renderer layer perspective lay new layer perspective mutable model get facade get name namespace gm lay set graph node renderer rend lay set graph edge renderer rend set layer lay listen to activitygraph deletion delete this diagram model get pump add model event listener this the activity graph new string remove namespace umlxxxdiagram layerperspective layerperspectivemutable layerperspective layermanager activitygraph getfacade isanamespace getfacade isaactivitygraph illegalargumentexception setnamespace theactivitygraph activitydiagramgraphmodel creategraphmodel sethomemodel theactivitygraph setmachine theactivitygraph activitydiagramrenderer activitydiagramrenderer layerperspective layerperspectivemutable getfacade getname setgraphnoderenderer setgraphedgerenderer setlayer getpump addmodeleventlistener theactivitygraph should be created in constructor private activity diagram graph model create graph model if get graph model instanceof activity diagram graph model return activity diagram graph model get graph model else return new activity diagram graph model activitydiagramgraphmodel creategraphmodel getgraphmodel activitydiagramgraphmodel activitydiagramgraphmodel getgraphmodel activitydiagramgraphmodel public void property change property change event evt if evt get source the activity graph evt instanceof delete instance event remove equals evt get property name model get pump remove model event listener this the activity graph new string remove namespace get project move to trash this if evt get source get state machine object new namespace model get facade get namespace get state machine if get namespace new namespace the namespace of the activitygraph is changed set namespace new namespace uml mutable graph support get graph model set home model new namespace propertychange propertychangeevent getsource theactivitygraph deleteinstanceevent getpropertyname getpump removemodeleventlistener theactivitygraph getproject movetotrash getsource getstatemachine newnamespace getfacade getnamespace getstatemachine getnamespace newnamespace setnamespace newnamespace umlmutablegraphsupport getgraphmodel sethomemodel newnamespace public object get owner if get graph model instanceof activity diagram graph model throw new illegal state exception incorrect graph model of get graph model get class get name activity diagram graph model gm activity diagram graph model get graph model return gm get machine getowner getgraphmodel activitydiagramgraphmodel illegalstateexception getgraphmodel getclass getname activitydiagramgraphmodel activitydiagramgraphmodel getgraphmodel getmachine return the statemachine todo if this method is called by any of the figs it will introduce a dependency cycle it would be much better if they could just use link org argouml uml diagram argo diagram get owner which does the same thing public object get state machine graph model gm get graph model if gm instanceof state diagram graph model object machine state diagram graph model gm get machine if model get uml factory is removed machine return machine return null argodiagram getowner getstatemachine graphmodel getgraphmodel statediagramgraphmodel statediagramgraphmodel getmachine getumlfactory isremoved param sm set the statemachine for this diagram public void set state machine object sm if model get facade isa state machine sm throw new illegal argument exception activity diagram graph model get graph model set machine sm setstatemachine getfacade isastatemachine illegalargumentexception activitydiagramgraphmodel getgraphmodel setmachine get the actions from which to create a toolbar or equivalent graphic triggers see org argouml uml diagram ui uml diagram get uml actions return the array of actions protected object get uml actions object actions get action state get action transition null get action start pseudo state get action final pseudo state get action junction pseudo state get action fork pseudo state get action join pseudo state get action swimlane null get action call state get action object flow state get action subactivity state null get trigger actions get action guard get effect actions return actions umldiagram getumlactions getumlactions getactionstate getactiontransition getactionstartpseudostate getactionfinalpseudostate getactionjunctionpseudostate getactionforkpseudostate getactionjoinpseudostate getactionswimlane getactioncallstate getactionobjectflowstate getactionsubactivitystate gettriggeractions getactionguard geteffectactions protected object get trigger actions object actions get action call event get action change event get action signal event get action time event tool bar utility manage default actions diagram activity trigger return actions gettriggeractions getactioncallevent getactionchangeevent getactionsignalevent getactiontimeevent toolbarutility managedefault protected object get effect actions object actions get action call action get action create action get action destroy action get action return action get action send action get action terminate action get action uninterpreted action get action action sequence tool bar utility manage default actions diagram activity effect return actions geteffectactions getactioncallaction getactioncreateaction getactiondestroyaction getactionreturnaction getactionsendaction getactionterminateaction getactionuninterpretedaction getactionactionsequence toolbarutility managedefault see org argouml uml diagram ui uml diagram get label name public string get label name return translator localize label activity diagram umldiagram getlabelname getlabelname return returns the action call state protected action get action call state if action call state null action call state new radio action new cmd create node model get meta types get call state button new callstate return action call state actioncallstate getactioncallstate actioncallstate actioncallstate radioaction cmdcreatenode getmetatypes getcallstate actioncallstate return returns the action final pseudo state protected action get action final pseudo state if action final pseudo state null action final pseudo state new radio action new cmd create node model get meta types get final state button new finalstate return action final pseudo state actionfinalpseudostate getactionfinalpseudostate actionfinalpseudostate actionfinalpseudostate radioaction cmdcreatenode getmetatypes getfinalstate actionfinalpseudostate return returns the action fork pseudo state protected action get action fork pseudo state if action fork pseudo state null action fork pseudo state new radio action new action create pseudostate model get pseudostate kind get fork button new fork return action fork pseudo state actionforkpseudostate getactionforkpseudostate actionforkpseudostate actionforkpseudostate radioaction actioncreatepseudostate getpseudostatekind getfork actionforkpseudostate return returns the action join pseudo state protected action get action join pseudo state if action join pseudo state null action join pseudo state new radio action new action create pseudostate model get pseudostate kind get join button new join return action join pseudo state actionjoinpseudostate getactionjoinpseudostate actionjoinpseudostate actionjoinpseudostate radioaction actioncreatepseudostate getpseudostatekind getjoin actionjoinpseudostate return returns the action junction pseudo state protected action get action junction pseudo state if action junction pseudo state null action junction pseudo state new radio action new action create pseudostate model get pseudostate kind get junction button new junction return action junction pseudo state actionjunctionpseudostate getactionjunctionpseudostate actionjunctionpseudostate actionjunctionpseudostate radioaction actioncreatepseudostate getpseudostatekind getjunction actionjunctionpseudostate return returns the action swimlane protected action get action swimlane if action swimlane null action swimlane new action create partition get state machine return action swimlane actionswimlane getactionswimlane actionswimlane actionswimlane actioncreatepartition getstatemachine actionswimlane return returns the action object flow state protected action get action object flow state if action object flow state null action object flow state new radio action new cmd create node model get meta types get object flow state button new objectflowstate return action object flow state actionobjectflowstate getactionobjectflowstate actionobjectflowstate actionobjectflowstate radioaction cmdcreatenode getmetatypes getobjectflowstate actionobjectflowstate return returns the action start pseudo state protected action get action start pseudo state if action start pseudo state null action start pseudo state new radio action new action create pseudostate model get pseudostate kind get initial button new initial return action start pseudo state actionstartpseudostate getactionstartpseudostate actionstartpseudostate actionstartpseudostate radioaction actioncreatepseudostate getpseudostatekind getinitial actionstartpseudostate return returns the action state protected action get action state if action state null action state new radio action new cmd create node model get meta types get action state button new actionstate return action state actionstate getactionstate actionstate actionstate radioaction cmdcreatenode getmetatypes getactionstate actionstate return returns the action subactivity state protected action get action subactivity state if action subactivity state null action subactivity state new radio action new cmd create node model get meta types get subactivity state button new subactivitystate return action subactivity state actionsubactivitystate getactionsubactivitystate actionsubactivitystate actionsubactivitystate radioaction cmdcreatenode getmetatypes getsubactivitystate actionsubactivitystate return returns the action transition protected action get action transition if action transition null action transition new radio action new action set mode mode create poly edge class edge class model get meta types get transition button new transition return action transition actiontransition getactiontransition actiontransition actiontransition radioaction actionsetmode modecreatepolyedge edgeclass getmetatypes gettransition actiontransition return returns the action call event protected action get action call event if action call event null action call event new button action new call event return action call event actioncallevent getactioncallevent actioncallevent actioncallevent buttonactionnewcallevent actioncallevent return returns the action call event protected action get action change event if action change event null action change event new button action new change event return action change event actioncallevent getactionchangeevent actionchangeevent actionchangeevent buttonactionnewchangeevent actionchangeevent return returns the action call event protected action get action signal event if action signal event null action signal event new button action new signal event return action signal event actioncallevent getactionsignalevent actionsignalevent actionsignalevent buttonactionnewsignalevent actionsignalevent return returns the action call event protected action get action time event if action time event null action time event new button action new time event return action time event actioncallevent getactiontimeevent actiontimeevent actiontimeevent buttonactionnewtimeevent actiontimeevent protected action get action guard if action guard null action guard new button action new guard return action guard getactionguard actionguard actionguard buttonactionnewguard actionguard protected action get action call action if action call action null action call action action new call action get button instance return action call action getactioncallaction actioncallaction actioncallaction actionnewcallaction getbuttoninstance actioncallaction protected action get action create action if action create action null action create action action new create action get button instance return action create action getactioncreateaction actioncreateaction actioncreateaction actionnewcreateaction getbuttoninstance actioncreateaction protected action get action destroy action if action destroy action null action destroy action action new destroy action get button instance return action destroy action getactiondestroyaction actiondestroyaction actiondestroyaction actionnewdestroyaction getbuttoninstance actiondestroyaction protected action get action return action if action return action null action return action action new return action get button instance return action return action getactionreturnaction actionreturnaction actionreturnaction actionnewreturnaction getbuttoninstance actionreturnaction protected action get action send action if action send action null action send action action new send action get button instance return action send action getactionsendaction actionsendaction actionsendaction actionnewsendaction getbuttoninstance actionsendaction protected action get action terminate action if action terminate action null action terminate action action new terminate action get button instance return action terminate action getactionterminateaction actionterminateaction actionterminateaction actionnewterminateaction getbuttoninstance actionterminateaction protected action get action uninterpreted action if action uninterpreted action null action uninterpreted action action new uninterpreted action get button instance return action uninterpreted action getactionuninterpretedaction actionuninterpretedaction actionuninterpretedaction actionnewuninterpretedaction getbuttoninstance actionuninterpretedaction protected action get action action sequence if action action sequence null action action sequence action new action sequence get button instance return action action sequence getactionactionsequence actionactionsequence actionactionsequence actionnewactionsequence getbuttoninstance actionactionsequence see org argouml uml diagram ui uml diagram get dependent element public object get dependent element return get state machine the activity graph umldiagram getdependentelement getdependentelement getstatemachine activitygraph public boolean is relocation allowed object base return false todo we may return the following when the relocate has been implemented model get activity graphs helper is adding activity graph allowed base isrelocationallowed getactivitygraphshelper isaddingactivitygraphallowed suppress warnings unchecked public collection get relocation candidates object root todo we may return something useful when the relocate has been implemented collection c new hash set c add get owner return c suppresswarnings getrelocationcandidates hashset getowner see org argouml uml diagram ui uml diagram relocate java lang object public boolean relocate object base return false umldiagram once the diagram has loaded we build the previous next links between any swimlanes override public void post load fig partition previous null create a map of partitions keyed by x coordinate hash map map new hash map iterator it new array list get layer get contents iterator while it has next fig f fig it next if f instanceof fig partition map put integer value of f getx f sort the x coordinates into order list x list new array list map key set collections sort x list link the previous next reference of the swimlanes according to the x order it x list iterator while it has next fig f fig map get it next if f instanceof fig partition fig partition fp fig partition f if previous null previous set next partition fp fp set previous partition previous fp set next partition null previous fp postload figpartition hashmap hashmap arraylist getlayer getcontents hasnext figpartition valueof xlist arraylist keyset xlist xlist hasnext figpartition figpartition figpartition setnextpartition setpreviouspartition setnextpartition extends basic functionality to handle logic for enclosement of states within a swimlane param enclosed the fig node enclosed param old encloser the previous encloser null if none param new encloser the encloser null if none public void encloser changed fig node enclosed fig node old encloser fig node new encloser if old encloser null new encloser null return if enclosed instanceof fig state vertex enclosed instanceof fig object flow state change partition enclosed fignode oldencloser newencloser encloserchanged fignode fignode oldencloser fignode newencloser oldencloser newencloser figstatevertex figobjectflowstate changepartition extends basic functionality to handle logic for enclosement of states within a swimlane param enclosed the fig node enclosed private void change partition fig node enclosed assert enclosed null object state enclosed get owner activity graphs helper activity graph model get activity graphs helper for object f get layer get contents no edges if f instanceof fig partition fig partition fig fig partition f object partition fig get owner if fig get bounds intersects enclosed get bounds activity graph add content partition state else if is state in partition state partition activity graph remove content partition state fignode changepartition fignode getowner activitygraphshelper activitygraph getactivitygraphshelper getlayer getcontentsnoedges figpartition figpartition figpartition getowner getbounds getbounds activitygraph addcontent isstateinpartition activitygraph removecontent private boolean is state in partition object state object partition return model get facade get contents partition contains state isstateinpartition getfacade getcontents override public boolean does accept object object to accept if model get facade isa partition object to accept return true else if model get facade isa state object to accept return true else if model get facade isa pseudostate object to accept object kind model get facade get kind object to accept if kind null log warn found a null type pseudostate return false if kind equals model get pseudostate kind get shallow history return false else if kind equals model get pseudostate kind get deep history return false return true else if model get facade isa comment object to accept return true return false doesaccept objecttoaccept getfacade isapartition objecttoaccept getfacade isastate objecttoaccept getfacade isapseudostate objecttoaccept getfacade getkind objecttoaccept getpseudostatekind getshallowhistory getpseudostatekind getdeephistory getfacade isacomment objecttoaccept override public fig node drop object dropped object point location fig node fig node null if location is non null convert to a rectangle that we can use rectangle bounds null if location null bounds new rectangle location x location y 0 0 diagram settings settings get diagram settings if model get facade isa partition dropped object fig node new fig partition dropped object bounds settings else if model get facade isa action state dropped object fig node new fig action state dropped object bounds settings else if model get facade isa call state dropped object fig node new fig call state dropped object bounds settings else if model get facade isa object flow state dropped object fig node new fig object flow state dropped object bounds settings else if model get facade isa subactivity state dropped object fig node new fig subactivity state dropped object bounds settings else if model get facade isa final state dropped object fig node new fig final state dropped object bounds settings else if model get facade isa pseudostate dropped object object kind model get facade get kind dropped object if kind null log warn found a null type pseudostate return null if kind equals model get pseudostate kind get initial fig node new fig initial state dropped object bounds settings else if kind equals model get pseudostate kind get choice fig node new fig branch state dropped object bounds settings else if kind equals model get pseudostate kind get junction fig node new fig junction state dropped object bounds settings else if kind equals model get pseudostate kind get fork fig node new fig fork state dropped object bounds settings else if kind equals model get pseudostate kind get join fig node new fig join state dropped object bounds settings else log warn found a type not known else if model get facade isa comment dropped object fig node new fig comment dropped object bounds settings if fig node null if location is null here the position of the new fig node is set after in org tigris gef base mode place mouse pressed mouse event e if location null fig node set location location x location y log debug dropped object dropped object converted to fig node else log debug dropped object not added this usualy means that this type of object is not accepted return fig node fignode droppedobject fignode fignode diagramsettings getdiagramsettings getfacade isapartition droppedobject fignode figpartition droppedobject getfacade isaactionstate droppedobject fignode figactionstate droppedobject getfacade isacallstate droppedobject fignode figcallstate droppedobject getfacade isaobjectflowstate droppedobject fignode figobjectflowstate droppedobject getfacade isasubactivitystate droppedobject fignode figsubactivitystate droppedobject getfacade isafinalstate droppedobject fignode figfinalstate droppedobject getfacade isapseudostate droppedobject getfacade getkind droppedobject getpseudostatekind getinitial fignode figinitialstate droppedobject getpseudostatekind getchoice fignode figbranchstate droppedobject getpseudostatekind getjunction fignode figjunctionstate droppedobject getpseudostatekind getfork fignode figforkstate droppedobject getpseudostatekind getjoin fignode figjoinstate droppedobject getfacade isacomment droppedobject fignode figcomment droppedobject fignode fignode modeplace mousepressed mouseevent fignode setlocation droppedobject fignode fignode construct a new property panel for a final state public prop panel final state super label final state lookup icon final state add field label name get name text field add field label container get container scroll add field label entry get entry scroll add field label do activity get do scroll add separator add field label incoming get incoming scroll add field label internal transitions get internal transitions scroll proppanelfinalstate lookupicon finalstate addfield getnametextfield addfield getcontainerscroll addfield getentryscroll addfield getdoscroll addseparator addfield getincomingscroll addfield getinternaltransitionsscroll the constructor deprecated for 0 27 3 by tfmorris suppress warnings deprecation deprecated public fig edge association class set between nearest points true fig poly get fig set rectilinear false set dashed true suppresswarnings figedgeassociationclass setbetweennearestpoints figpoly getfig setrectilinear setdashed the constructor for the association class fig param class box fig the figure representing the class param owner fig the owner fig deprecated for 0 27 3 by tfmorris deprecated public fig edge association class fig class association class class box fig fig association class owner fig this construct figs class box fig owner fig associationclass classboxfig ownerfig figedgeassociationclass figclassassociationclass classboxfig figassociationclass ownerfig constructfigs classboxfig ownerfig private void construct figs fig class association class class box fig fig owner fig log info fig edge association class constructor if class box fig null throw new illegal argument exception no class box found while creating fig edge association class if owner fig null throw new illegal argument exception no association edge found while creating fig edge association class set dest fig node class box fig set dest port fig class box fig final fig node port if owner fig instanceof fig edge model element fig edge model element owner fig make edge port port fig edge model element owner fig get edge port else port fig node owner fig set source port fig port set source fig node port compute route constructfigs figclassassociationclass classboxfig ownerfig figedgeassociationclass classboxfig illegalargumentexception figedgeassociationclass ownerfig illegalargumentexception figedgeassociationclass setdestfignode classboxfig setdestportfig classboxfig fignode ownerfig figedgemodelelement figedgemodelelement ownerfig makeedgeport figedgemodelelement ownerfig getedgeport fignode ownerfig setsourceportfig setsourcefignode computeroute the constructor for the association class fig param class box fig the figure representing the class param owner fig the owner fig param settings render settings fig edge association class fig class association class class box fig fig association class owner fig diagram settings settings super owner fig get owner settings construct figs class box fig owner fig associationclass classboxfig ownerfig figedgeassociationclass figclassassociationclass classboxfig figassociationclass ownerfig diagramsettings ownerfig getowner constructfigs classboxfig ownerfig the constructor for the association class fig param class box fig the figure representing the class param owner fig the owner fig param settings render settings public fig edge association class fig class association class class box fig fig node association owner fig diagram settings settings super owner fig get owner settings construct figs class box fig owner fig associationclass classboxfig ownerfig figedgeassociationclass figclassassociationclass classboxfig fignodeassociation ownerfig diagramsettings ownerfig getowner constructfigs classboxfig ownerfig override public void set fig fig f super set fig f get fig set dashed true setfig setfig getfig setdashed see org argouml uml diagram ui fig edge model element can edit org tigris gef presentation fig override protected boolean can edit fig f return false figedgemodelelement canedit canedit override protected void model changed property change event e todo are we intentionally eating all events tfm 20060203 document modelchanged propertychangeevent if the user requests deletion of this fig then delegate to the attached fig association class return the attached fig association class override protected fig get remove delegate fig node node get dest fig node if node instanceof fig edge port node instanceof fig node association node get source fig node if node instanceof fig edge port node instanceof fig node association log warn the is no fig edge port attached to the association class link return null final fig delegate actually return the fig edge that the fig edge port is part of if node instanceof fig edge port delegate node get group else delegate node if log is info enabled log info delegating remove to delegate get class get name throw new illegal argument exception return delegate figassociationclass figassociationclass getremovedelegate fignode getdestfignode figedgeport fignodeassociation getsourcefignode figedgeport fignodeassociation figedgeport figedge figedgeport figedgeport getgroup isinfoenabled getclass getname illegalargumentexception override public void set dest fig node fig node fn if fn instanceof fig class association class throw new illegal argument exception the dest of an association class dashed link can only be a fig class association class super set dest fig node fn setdestfignode fignode figclassassociationclass illegalargumentexception figclassassociationclass setdestfignode override public void set source fig node fig node fn if fn instanceof fig edge port fn instanceof fig node association throw new illegal argument exception the source of an association class dashed link can only be a fig edge port super set source fig node fn setsourcefignode fignode figedgeport fignodeassociation illegalargumentexception figedgeport setsourcefignode construct a new fig partition param owner owning uml element param bounds position and size param settings rendering settings public fig partition object owner rectangle bounds diagram settings settings super owner bounds settings init figs figpartition figpartition diagramsettings initfigs constructor deprecated for 0 27 4 by tfmorris use link fig partition object rectangle diagram settings suppress warnings deprecation deprecated public fig partition init figs figpartition diagramsettings suppresswarnings figpartition initfigs private void init figs todo define constants for magic numbers set big port new fig rect x0 y0 160 200 debug color debug color get big port set filled false get big port set line width 0 left line new fig line x0 y0 10 300 line color right line new fig line 150 y0 160 300 line color bottom line new fig line x0 300 150 300 line color top line new fig line x0 y0 150 10 line color get name fig set line width 0 get name fig set bounds x0 y0 50 25 get name fig set filled false seperator new fig line x0 y0 15 150 25 line color add fig get big port add fig right line add fig left line add fig top line add fig bottom line add fig get name fig add fig seperator set filled false set bounds get bounds initfigs setbigport figrect debug_color debug_color getbigport setfilled getbigport setlinewidth leftline figline line_color rightline figline line_color bottomline figline line_color topline figline line_color getnamefig setlinewidth getnamefig setbounds getnamefig setfilled figline line_color addfig getbigport addfig rightline addfig leftline addfig topline addfig bottomline addfig getnamefig addfig setfilled setbounds getbounds constructor which hooks the fig into an existing uml element param gm ignored param node the uml element deprecated for 0 27 4 by tfmorris use link fig partition object rectangle diagram settings suppress warnings deprecation deprecated public fig partition suppress warnings unused graph model gm object node this set owner node figpartition diagramsettings suppresswarnings figpartition suppresswarnings graphmodel setowner override public object clone fig partition fig clone fig partition super clone iterator it fig clone get figs iterator fig clone set big port fig rect it next fig clone right line fig line it next fig clone left line fig line it next fig clone bottom line fig line it next fig clone top line fig line it next fig clone set name fig fig text it next fig clone seperator fig line it next return fig clone figpartition figclone figpartition figclone getfigs figclone setbigport figrect figclone rightline figline figclone leftline figline figclone bottomline figline figclone topline figline figclone setnamefig figtext figclone figline figclone override public void set line color color col right line set line color col left line set line color col bottom line set line color col top line set line color col seperator set line color col setlinecolor rightline setlinecolor leftline setlinecolor bottomline setlinecolor topline setlinecolor setlinecolor see org tigris gef presentation fig get line color override public color get line color return right line get line color getlinecolor getlinecolor rightline getlinecolor override public void set fill color color col get big port set fill color col get name fig set fill color col setfillcolor getbigport setfillcolor getnamefig setfillcolor see org tigris gef presentation fig get fill color override public color get fill color return get big port get fill color getfillcolor getfillcolor getbigport getfillcolor override public void set filled boolean f get big port set filled f get name fig set filled f super set filled f setfilled getbigport setfilled getnamefig setfilled setfilled override public boolean is filled return get big port is filled isfilled getbigport isfilled override public void set line width int w right line set line width w left line set line width w setlinewidth rightline setlinewidth leftline setlinewidth see org tigris gef presentation fig get line width override public int get line width return right line get line width getlinewidth getlinewidth rightline getlinewidth see org argouml uml diagram ui fig node model element place string override public string place string return fignodemodelelement placestring placestring override public dimension get minimum size dimension name dim get name fig get minimum size int w name dim width int h name dim height we want to maintain a minimum size for the partition w math max min width w h math max min height h return new dimension w h getminimumsize namedim getnamefig getminimumsize namedim namedim min_width min_height override protected void set standard bounds int x int y int w int h if get name fig null return rectangle old bounds get bounds rectangle name bounds get name fig get bounds get name fig set bounds x y w name bounds height get big port set bounds x y w h left line set bounds x y 0 h right line set bounds x w 1 y 0 h top line set bounds x y w 1 0 bottom line set bounds x y h w 1 0 seperator set bounds x y name bounds height w 1 0 fire prop change bounds old bounds get bounds calc bounds x x y y w w h h update edges setstandardbounds getnamefig oldbounds getbounds namebounds getnamefig getbounds getnamefig setbounds namebounds getbigport setbounds leftline setbounds rightline setbounds topline setbounds bottomline setbounds setbounds namebounds firepropchange oldbounds getbounds calcbounds _x _y _w _h updateedges override public selection make selection return new selection partition this makeselection selectionpartition on post placement look to see if there are any other fig partitions if so place to the right and resize height param activity graph the uml activity graph element that contains the partition public void append to pool object activity graph list partitions get partitions get layer model get core helper set model element container get owner activity graph if partitions size 1 fig pool fp new fig pool null get bounds get settings get layer add fp get layer bring to front this else if partitions size 1 fig pool fp get fig pool fp set width fp get width get width int x 0 iterator it partitions iterator fig partition f null fig partition previous fig null while it has next f fig partition it next if f this f getx f get width x previous fig f x f getx set previous partition previous fig previous partition set next partition this set bounds x previous fig get width previous fig gety get width previous fig get height figpartitions activitygraph activitygraph appendtopool activitygraph getpartitions getlayer getcorehelper setmodelelementcontainer getowner activitygraph figpool figpool getbounds getsettings getlayer getlayer bringtofront figpool getfigpool setwidth getwidth getwidth figpartition figpartition previousfig hasnext figpartition getwidth previousfig setpreviouspartition previousfig previouspartition setnextpartition setbounds previousfig getwidth previousfig getwidth previousfig getheight override public void remove from diagram impl int width get width fig pool fig pool get fig pool if fig pool null needed for project deletion super remove from diagram impl return int new fig pool width fig pool get width width super remove from diagram impl fig partition next next partition while next null next translate with contents width next next next partition if next partition null previous partition null we removed the last partition so now remove the pool too fig pool remove from diagram return if next partition null next partition set previous partition previous partition if previous partition null previous partition set next partition next partition set previous partition null set next partition null fig pool set width new fig pool width removefromdiagramimpl getwidth figpool figpool getfigpool figpool removefromdiagramimpl newfigpoolwidth figpool getwidth removefromdiagramimpl figpartition nextpartition translatewithcontents nextpartition nextpartition previouspartition figpool removefromdiagram nextpartition nextpartition setpreviouspartition previouspartition previouspartition previouspartition setnextpartition nextpartition setpreviouspartition setnextpartition figpool setwidth newfigpoolwidth and translate those private void translate with contents int dx for fig f get fig pool get enclosed figs f setx f getx dx setx getx dx damage translatewithcontents getfigpool getenclosedfigs get all the partitions on the same layer as this fig partition return th partitions private list fig partition get partitions layer layer final list fig partition partitions new array list fig partition for object o layer get contents if o instanceof fig partition partitions add fig partition o return partitions figpartition figpartition getpartitions figpartition arraylist figpartition getcontents figpartition figpartition get all the partitions on the same layer as this fig partition return th partitions private fig pool get fig pool if get layer null this test needed for project deletion for object o get layer get contents if o instanceof fig pool return fig pool o return null figpartition figpool getfigpool getlayer getlayer getcontents figpool figpool param next partition the next partition to set void set next partition fig partition next this next partition next nextpartition nextpartition setnextpartition figpartition nextpartition param previous partition the previous partition to set void set previous partition fig partition previous this previous partition previous left line set visible previous partition null previouspartition previouspartition setpreviouspartition figpartition previouspartition leftline setvisible previouspartition when dragging this partition drag all other partitions with it return all the partitions to drag togther override public list get drag dependencies list dependents get partitions get layer dependents add get fig pool dependents add all get fig pool get enclosed figs return dependents getdragdependencies getpartitions getlayer getfigpool addall getfigpool getenclosedfigs construct a new selection partition for the given partition param f the fig public selection partition fig partition f super f selectionpartition selectionpartition figpartition return a handle id for the handle under the mouse or 1 if none needs more work in the future return a handle instance or null p pre 0 1 2 3 4 5 6 7 pre public void hit handle rectangle r handle h if get content is resizable update handle box rectangle test rect new rectangle 0 0 0 0 test rect set bounds cx hand size 2 cy hand size 2 hand size ch hand size 2 boolean left edge r intersects test rect test rect set bounds cx cw hand size 2 cy hand size 2 hand size ch hand size 2 boolean right edge r intersects test rect test rect set bounds cx hand size 2 cy hand size 2 cw hand size 2 hand size boolean top edge r intersects test rect test rect set bounds cx hand size 2 cy ch hand size 2 cw hand size 2 hand size boolean bottom edge r intersects test rect todo midpoints for side handles if left edge top edge h index handle northwest h instructions resize top left else if right edge top edge h index handle northeast h instructions resize top right else if left edge bottom edge h index handle southwest h instructions resize bottom left else if right edge bottom edge h index handle southeast h instructions resize bottom right todo side handles else h index 1 h instructions move object s else h index 1 h instructions move object s hithandle getcontent isresizable updatehandlebox testrect testrect setbounds hand_size hand_size hand_size hand_size leftedge testrect testrect setbounds hand_size hand_size hand_size hand_size rightedge testrect testrect setbounds hand_size hand_size hand_size hand_size topedge testrect testrect setbounds hand_size hand_size hand_size hand_size bottomedge testrect leftedge topedge rightedge topedge leftedge bottomedge rightedge bottomedge update the private variables cx etc that represent the rectangle on whose corners handles are to be drawn private void update handle box final rectangle c rect get content get handle box cx c rect x cy c rect y cw c rect width ch c rect height updatehandlebox crect getcontent gethandlebox crect crect crect crect paint the handles at the four corners and midway along each edge of the bounding box override public void paint graphics g final fig fig get content if get content is resizable update handle box g set color globals get prefs handle color for fig g fill rect cx hand size 2 cy hand size 2 hand size hand size g fill rect cx cw hand size 2 cy hand size 2 hand size hand size g fill rect cx hand size 2 cy ch hand size 2 hand size hand size g fill rect cx cw hand size 2 cy ch hand size 2 hand size hand size else final int x fig getx final int y fig gety final int w fig get width final int h fig get height g set color globals get prefs handle color for fig g draw rect x border width y border width w border width 2 1 h border width 2 1 g draw rect x border width 1 y border width 1 w border width 2 2 1 h border width 2 2 1 g fill rect x hand size y hand size hand size hand size g fill rect x w y hand size hand size hand size g fill rect x hand size y h hand size hand size g fill rect x w y h hand size hand size getcontent getcontent isresizable updatehandlebox setcolor getprefs handlecolorfor fillrect hand_size hand_size hand_size hand_size fillrect hand_size hand_size hand_size hand_size fillrect hand_size hand_size hand_size hand_size fillrect hand_size hand_size hand_size hand_size getwidth getheight setcolor getprefs handlecolorfor drawrect border_width border_width border_width border_width drawrect border_width border_width border_width border_width fillrect hand_size hand_size hand_size hand_size fillrect hand_size hand_size hand_size fillrect hand_size hand_size hand_size fillrect hand_size hand_size change some attribute of the selected fig when the user drags one of its handles public void drag handle int mx int my int anx int any handle hand final fig fig get content update handle box final int x cx final int y cy final int w cw final int h ch int newx x newy y new width w new height h dimension min size fig get minimum size int min width min size width min height min size height switch hand index case 1 fig translate anx mx any my return case handle northwest new width x w mx new width new width min width min width new width new height y h my new height new height min height min height new height newx x w new width newy y h new height if newx new width x w newx newx new width x w if newy new height y h newy newy new height y h set handle box previous partition newx newy new width new height return case handle north break case handle northeast new width mx x new width new width min width min width new width new height y h my new height new height min height min height new height newy y h new height if newy new height y h newy newy new height y h set handle box next partition newx newy new width new height break case handle west break case handle east break case handle southwest new width x w mx new width new width min width min width new width new height my y new height new height min height min height new height newx x w new width if newx new width x w newx newx new width x w set handle box previous partition newx newy new width new height break case handle south break case handle southeast new width mx x new width new width min width min width new width new height my y new height new height min height min height new height set handle box next partition newx newy new width new height break draghandle getcontent updatehandlebox newwidth newheight minsize getminimumsize minwidth minsize minheight minsize newwidth newwidth newwidth minwidth minwidth newwidth newheight newheight newheight minheight minheight newheight newwidth newheight newwidth newwidth newheight newheight sethandlebox previouspartition newwidth newheight newwidth newwidth newwidth minwidth minwidth newwidth newheight newheight newheight minheight minheight newheight newheight newheight newheight sethandlebox nextpartition newwidth newheight newwidth newwidth newwidth minwidth minwidth newwidth newheight newheight newheight minheight minheight newheight newwidth newwidth newwidth sethandlebox previouspartition newwidth newheight newwidth newwidth newwidth minwidth minwidth newwidth newheight newheight newheight minheight minheight newheight sethandlebox nextpartition newwidth newheight private void set handle box fig partition neighbour int x int y int width int height final list fig partition partitions get partitions get layer int new neighbour width 0 if neighbour null new neighbour width neighbour get width get content get width width if neighbour get minimum size width new neighbour width return int lowx 0 int total width 0 for fig f partitions if f get content f set handle box x y width height else if f neighbour f previous partition f set handle box f getx y new neighbour width height else if f neighbour f next partition f set handle box x width y new neighbour width height else f set handle box f getx y f get width height if f get handle box getx lowx total width 0 lowx f get handle box x total width f get handle box width fig pool pool get fig pool pool set bounds lowx y total width height sethandlebox figpartition figpartition getpartitions getlayer newneighbourwidth newneighbourwidth getwidth getcontent getwidth getminimumsize newneighbourwidth totalwidth getcontent sethandlebox previouspartition sethandlebox newneighbourwidth nextpartition sethandlebox newneighbourwidth sethandlebox getwidth gethandlebox totalwidth gethandlebox totalwidth gethandlebox figpool getfigpool setbounds totalwidth constructor for uml message sender list model public uml message sender list model super sender umlmessagesenderlistmodel umlmessagesenderlistmodel see org argouml uml ui uml model element list model2 build model list protected void build model list remove all elements add element model get facade get sender get target umlmodelelementlistmodel2 buildmodellist buildmodellist removeallelements addelement getfacade getsender gettarget see org argouml uml ui uml model element list model2 is valid element object protected boolean is valid element object elem return model get facade get sender get target elem umlmodelelementlistmodel2 isvalidelement isvalidelement getfacade getsender gettarget constructor for uml state vertex outgoing list model public uml state vertex outgoing list model super outgoing umlstatevertexoutgoinglistmodel umlstatevertexoutgoinglistmodel protected void build model list array list c new array list model get facade get outgoings get target if model get facade isa state get target array list i new array list model get facade get internal transitions get target c remove all i set all elements c buildmodellist arraylist arraylist getfacade getoutgoings gettarget getfacade isastate gettarget arraylist arraylist getfacade getinternaltransitions gettarget removeall setallelements protected boolean is valid element object element array list c new array list model get facade get outgoings get target if model get facade isa state get target array list i new array list model get facade get internal transitions get target c remove all i return c contains element isvalidelement arraylist arraylist getfacade getoutgoings gettarget getfacade isastate gettarget arraylist arraylist getfacade getinternaltransitions gettarget removeall construct a property panel for component elements public prop panel component super label component lookup icon component add field translator localize label name get name text field add field translator localize label namespace get namespace selector add get modifiers panel add separator add field translator localize label generalizations get generalization scroll add field translator localize label specializations get specialization scroll add separator add field translator localize label client dependencies get client dependency scroll add field translator localize label supplier dependencies get supplier dependency scroll j list res list new uml linked list new uml component resident list model add field translator localize label residents new j scroll pane res list add action new action navigate namespace add action get action new reception add action new action new stereotype add action get delete action proppanelcomponent lookupicon addfield getnametextfield addfield getnamespaceselector getmodifierspanel addseparator addfield getgeneralizationscroll addfield getspecializationscroll addseparator addfield getclientdependencyscroll addfield getsupplierdependencyscroll jlist reslist umllinkedlist umlcomponentresidentlistmodel addfield jscrollpane reslist addaction actionnavigatenamespace addaction getactionnewreception addaction actionnewstereotype addaction getdeleteaction the constructor param x the initial x position param y the initial y position param w the initial width param h the initial height param expand only true if the fig should never shrink deprecated for 0 27 3 by tfmorris use link fig single line text object rectangle diagram settings boolean suppress warnings deprecation deprecated public fig single line text int x int y int w int h boolean expand only super x y w h expand only initialize init notation arguments there is no notation provider yet expandonly figsinglelinetext diagramsettings suppresswarnings figsinglelinetext expandonly expandonly initnotationarguments notationprovider private void initialize set fill color fill color in case someone turns it on set filled false set tab action fig text end editing set return action fig text end editing set line width 0 set text color text color setfillcolor fill_color setfilled settabaction figtext end_editing setreturnaction figtext end_editing setlinewidth settextcolor text_color the constructor param x the initial x position param y the initial y position param w the initial width param h the initial height param expand only true if this fig shall not shrink param property the property to listen to deprecated for 0 27 3 by tfmorris use link fig single line text object rectangle diagram settings boolean deprecated public fig single line text int x int y int w int h boolean expand only string property this x y w h expand only new string property expandonly figsinglelinetext diagramsettings figsinglelinetext expandonly expandonly the constructor param x the initial x position param y the initial y position param w the initial width param h the initial height param expand only true if this fig shall not shrink param all properties the properties to listen to see org tigris gef presentation fig text fig text int int int int boolean deprecated for 0 27 3 by tfmorris use link fig single line text object rectangle diagram settings boolean deprecated public fig single line text int x int y int w int h boolean expand only string all properties this x y w h expand only this properties all properties expandonly allproperties figtext figtext figsinglelinetext diagramsettings figsinglelinetext expandonly allproperties expandonly allproperties construct text fig param owner owning uml element param bounds position and size param settings rendering settings param expand only true if the fig should only expand and never contract public fig single line text object owner rectangle bounds diagram settings settings boolean expand only this owner bounds settings expand only string null expandonly figsinglelinetext diagramsettings expandonly expandonly construct text fig param owner owning uml element param bounds position and size param settings rendering settings param expand only true if the fig should only expand and never contract param property name of property to listen to public fig single line text object owner rectangle bounds diagram settings settings boolean expand only string property this owner bounds settings expand only new string property expandonly figsinglelinetext diagramsettings expandonly expandonly constructor for text fig without owner using this constructor shall mean that this fig will never have an owner param bounds position and size param settings rendering settings param expand only true if the fig should only expand and never contract public fig single line text rectangle bounds diagram settings settings boolean expand only this null bounds settings expand only expandonly figsinglelinetext diagramsettings expandonly expandonly construct text fig param owner owning uml element param bounds position and size param settings rendering settings param expand only true if the fig should only expand and never contract param all properties names of properties to listen to public fig single line text object owner rectangle bounds diagram settings settings boolean expand only string all properties super owner bounds settings expand only initialize this properties all properties add model listener expandonly allproperties figsinglelinetext diagramsettings expandonly allproperties expandonly allproperties addmodellistener override public dimension get minimum size dimension d new dimension font font get font if font null return d int maxw 0 int maxh 0 if get font metrics null maxh font get size else maxh get font metrics get height maxw get font metrics string width get text int overallh maxh get top margin get bot margin int overallw maxw get left margin get right margin d width overallw d height overallh return d getminimumsize getfont getfontmetrics getsize getfontmetrics getheight getfontmetrics stringwidth gettext gettopmargin getbotmargin getleftmargin getrightmargin override protected boolean is start editing key key event ke if ke get modifiers key event meta mask key event alt mask 0 return super is start editing key ke else return false isstarteditingkey keyevent getmodifiers keyevent meta_mask keyevent alt_mask isstarteditingkey suppress warnings deprecation deprecated override public void set owner object owner super set owner owner if owner null properties null add model listener set text todo mvw remove this suppresswarnings setowner setowner addmodellistener settext private void add model listener if properties null get owner null model get pump add model event listener this get owner properties addmodellistener getowner getpump addmodeleventlistener getowner override public void remove from diagram if get owner null properties null model get pump remove model event listener this get owner properties super remove from diagram removefromdiagram getowner getpump removemodeleventlistener getowner removefromdiagram override public void property change property change event pce if remove equals pce get property name pce get source get owner delete from model if pce instanceof uml change event final uml change event event uml change event pce runnable do work runnable new runnable public void run try update layout event catch invalid element exception e if log is debug enabled log debug event event get class get name log debug source event get source log debug old event get old value log debug name event get property name log debug update layout method accessed deleted element e swing utilities invoke later do work runnable propertychange propertychangeevent getpropertyname getsource getowner deletefrommodel umlchangeevent umlchangeevent umlchangeevent doworkrunnable updatelayout invalidelementexception isdebugenabled getclass getname getsource getoldvalue getpropertyname updatelayout swingutilities invokelater doworkrunnable runnable do work runnable new runnable public void run try update layout event catch invalid element exception e if log is debug enabled log debug event event get class get name log debug source event get source log debug old event get old value log debug name event get property name log debug update layout method accessed deleted element e doworkrunnable updatelayout invalidelementexception isdebugenabled getclass getname getsource getoldvalue getpropertyname updatelayout this is a template method called by the argouml framework as the result of a change to a model element do not call this method directly yourself p override this in any subclasses in order to redisplay the fig due to change of any model element that this fig is listening to p p this method is guaranteed by the framework to be running on the swing awt thread p param event the uml change event that caused the change protected void update layout uml change event event assert event null if get owner event get source properties null arrays as list properties contains event get property name event instanceof attribute change event todo why does it fail for changing the name of an associationend why should it pass assert arrays as list properties contains event get property name event get property name todo do we really always need to do this or only if notation provider is null set text umlchangeevent updatelayout umlchangeevent getowner getsource aslist getpropertyname attributechangeevent aslist getpropertyname getpropertyname notationprovider settext this function without parameter shall determine the text of the fig taking values from the owner and then call link set text string to be implemented as required by sub classes protected void set text settext settext public void rendering changed super rendering changed this is needed for e g guillemet notation change on a class name see issue 5419 set text renderingchanged renderingchanged settext the constructor param l the listener param p the event public delayed change notify delayedv change listener l property change event p listener l pce p delayedchangenotify delayedvchangelistener propertychangeevent see java lang runnable run public void run listener delayed vetoable change pce delayedvetoablechange construct a table cell render which uses the name of a uml element public uml table cell renderer super tablecellrender umltablecellrenderer override public void set value object value if model get facade isa model element value string name model get facade get name value set text name else if value instanceof string set text string value else set text setvalue getfacade isamodelelement getfacade getname settext settext settext constructor public uml generalization parent list model super parent umlgeneralizationparentlistmodel protected void build model list if get target null return remove all elements add element model get facade get general get target buildmodellist gettarget removeallelements addelement getfacade getgeneral gettarget see org argouml uml ui uml model element list model2 is valid element object protected boolean is valid element object o return model get facade get general get target o umlmodelelementlistmodel2 isvalidelement isvalidelement getfacade getgeneral gettarget override public void load project project input stream input stream throws open exception if the model repository doesn t manage a di model then we must generate our figs by inspecting pgml try give the parser a map of model elements keyed by their uuid this is used to allocate figs to their owner using the href attribute in pgml diagram settings default settings project get project settings get default diagram settings todo we need the project specific diagram settings here pgml stack parser parser new pgml stack parser project getuuid refs default settings log info adding translations registered by modules for map entry string string translation class translations entry set parser add translation translation get key translation get value argo diagram d parser read argo diagram input stream false input stream close project add member d catch exception e if e instanceof open exception throw open exception e throw new open exception e inputstream inputstream openexception diagramsettings defaultsettings getprojectsettings getdefaultdiagramsettings pgmlstackparser pgmlstackparser getuuidrefs defaultsettings class_translations entryset addtranslation getkey getvalue argodiagram readargodiagram inputstream inputstream addmember openexception openexception openexception override public void load project project url url throws open exception try load project url open stream catch io exception e throw new open exception e openexception openstream ioexception openexception override public string get main tag return pgml getmaintag override public void save project member member output stream out stream throws save exception project member diagram diagram member project member diagram member ocl expander expander try expander new ocl expander template reader get instance read pgml tee catch expansion exception e throw new save exception e output stream writer output writer try output writer new output stream writer out stream argo get encoding catch unsupported encoding exception e1 throw new save exception bad encoding e1 try warning the output stream version of this doesn t work tfm expander expand output writer diagram member get diagram catch expansion exception e throw new save exception e finally try output writer flush catch io exception e throw new save exception e projectmember outputstream outstream saveexception projectmemberdiagram diagrammember projectmemberdiagram oclexpander oclexpander templatereader getinstance pgml_tee expansionexception saveexception outputstreamwriter outputwriter outputwriter outputstreamwriter outstream getencoding unsupportedencodingexception saveexception outputstream outputwriter diagrammember getdiagram expansionexception saveexception outputwriter ioexception saveexception figs are stored by class name and recreated by reflection if the class name changes or moves this provides a simple way of translating from class name at time of save to the current class name without need for xsl param original class name param new class name public void add translation final string original class name final string new class name class translations put original class name new class name originalclassname newclassname addtranslation originalclassname newclassname class_translations originalclassname newclassname constructor for uml namespace owned element list model public uml namespace owned element list model super owned element umlnamespaceownedelementlistmodel umlnamespaceownedelementlistmodel ownedelement protected void build model list if get target null set all elements model get facade get owned elements get target buildmodellist gettarget setallelements getfacade getownedelements gettarget see org argouml uml ui uml model element list model2 is valid element object protected boolean is valid element object element return model get facade get owned elements get target contains element umlmodelelementlistmodel2 isvalidelement isvalidelement getfacade getownedelements gettarget the constructor param x x param y y param w width param h height deprecated for 0 27 3 by tfmorris use link fig compartment object rectangle diagram settings suppress warnings deprecation deprecated public fig compartment int x int y int w int h construct figs x y w h figcompartment diagramsettings suppresswarnings figcompartment constructfigs private void construct figs int x int y int w int h big port new fig rect x y w h line color fill color big port set filled true set filled true big port set line width 0 set line width 0 add fig big port constructfigs bigport figrect line_color fill_color bigport setfilled setfilled bigport setlinewidth setlinewidth addfig bigport construct a new fig compartment param owner owning uml element param bounds rectangle describing bounds of compartment param settings render settings public fig compartment object owner rectangle bounds diagram settings settings super owner settings construct figs bounds x bounds y bounds width bounds height figcompartment figcompartment diagramsettings constructfigs return the bigport public fig get big port return big port getbigport bigport the minimum width is the minimum width of the child with the widest miniumum width the minimum height is the total minimum height of all child figs plus a 2 pixel padding return the minimum width override public dimension get minimum size int min width 0 int min height 0 for fig fig collection fig get figs if fig is visible fig get big port int fw fig get minimum size width if fw min width min width fw min height fig get minimum size height min height 2 2 pixel padding after compartment return new dimension min width min height getminimumsize minwidth minheight getfigs isvisible getbigport getminimumsize minwidth minwidth minheight getminimumsize minheight minwidth minheight override protected void set bounds impl int x int y int w int h int neww w int newh h int fw int yy y for fig fig collection fig get figs if fig is visible fig get big port fw fig get minimum size width set new bounds for all included figs fig set bounds x 1 yy 1 fw fig get minimum size height if neww fw 2 neww fw 2 yy fig get minimum size height get big port set bounds x y neww newh calc bounds setboundsimpl getfigs isvisible getbigport getminimumsize setbounds getminimumsize getminimumsize getbigport setbounds calcbounds create a new model element for the compartment protected abstract void create model element createmodelelement the constructor public style panel fig node model element super get fill field set renderer new color renderer get line field set renderer new color renderer display pane new j panel display pane set layout new flow layout flow layout left add to display pane path check box display label set label for display pane add display pane 0 add in front of the others add display label 0 add the label in front of the pane this instead of the label display pane set border new titled border translator localize display path check box add item listener this stylepanelfignodemodelelement getfillfield setrenderer colorrenderer getlinefield setrenderer colorrenderer displaypane jpanel displaypane setlayout flowlayout flowlayout addtodisplaypane pathcheckbox displaylabel setlabelfor displaypane displaypane displaylabel displaypane setborder titledborder pathcheckbox additemlistener add a given checkbox to the panel param cb the given checkbox public void add to display pane j check box cb display pane add cb addtodisplaypane jcheckbox displaypane override public void set target object t fig old target get panel target if old target null old target remove property change listener this super set target t fig new target get panel target if new target null new target add property change listener this settarget oldtarget getpaneltarget oldtarget oldtarget removepropertychangelistener settarget newtarget getpaneltarget newtarget newtarget addpropertychangelistener public void refresh refresh transaction true let the parent do its refresh super refresh object target get panel target todo why is this code even getting called for a fig generalization if target instanceof path container path container pc path container get panel target path check box set selected pc is path visible refresh transaction false lets redraw the box set targetb box refreshtransaction getpaneltarget figgeneralization pathcontainer pathcontainer pathcontainer getpaneltarget pathcheckbox setselected ispathvisible refreshtransaction settargetbbox public void item state changed item event e if refresh transaction object src e get source if src path check box path container pc path container get panel target pc set path visible path check box is selected else super item state changed e itemstatechanged itemevent refreshtransaction getsource pathcheckbox pathcontainer pathcontainer getpaneltarget setpathvisible pathcheckbox isselected itemstatechanged this function is called when the fig property is changed from outside this panel e g when the fig is relocated or when one of its properties change p we currently only need to react on the property that indicates that the path visible is changed see the fig node model element for when this event is triggered p when the user toggles the visibility of the path in the fig s pop up menu then this function updates the presentation panel checkbox param evt the event see java beans property change listener property change java beans property change event public void property change property change event evt if path visible equals evt get property name refresh transaction true path check box set selected boolean evt get new value refresh transaction false pathvisible fignodemodelelement propertychangelistener propertychange propertychangeevent propertychange propertychangeevent pathvisible getpropertyname refreshtransaction pathcheckbox setselected getnewvalue refreshtransaction return a fig that can be used to represent the given node p param gm the graph model for which we are rendering param lay the layer in the graph on which we want this figure param node the node to be rendered an model element object param style attributes an optional map of attributes to style the fig return the fig to be used or code null code if we can t create one public fig node get fig node for graph model gm layer lay object node map style attributes fig node model element fig node null create a new version of the relevant fig argo diagram diag diagram utils get active diagram if diag instanceof uml diagram uml diagram diag does accept node fig node fig node model element uml diagram diag drop node null else log debug this get class to string get fig node for gm to string lay to string node to string cannot create this sort of node return null todo shouldn t we throw an exception here lay add fig node fig node set di element graph change adapter get instance create element gm node return fig node styleattributes fignode getfignodefor graphmodel styleattributes fignodemodelelement fignode argodiagram diagramutils getactivediagram umldiagram umldiagram doesaccept fignode fignodemodelelement umldiagram getclass tostring getfignodefor tostring tostring tostring fignode fignode setdielement graphchangeadapter getinstance createelement fignode return a fig that can be used to represent the given edge p generally the same code as for the class diagram since it s very related to it deal with each of the edge types in turn p param gm the graph model for which we are rendering param lay the layer in the graph on which we want this figure param edge the edge to be rendered an model element object param style attributes an optional map of attributes to style the fig return the fig to be used or code null code if we can t create one see org tigris gef graph graph edge renderer get fig edge for org tigris gef graph graph model org tigris gef base layer java lang object java util map public fig edge get fig edge for graph model gm layer lay object edge map style attributes if log is debug enabled log debug making figedge for edge if edge null throw new illegal argument exception a model edge must be supplied diagram settings settings argo diagram layer perspective lay get diagram get diagram settings fig edge new edge null if model get facade isa association edge new edge new fig association edge settings else if model get facade isa generalization edge new edge new fig generalization edge settings else if model get facade isa extend edge new edge new fig extend edge settings the nodes at the two ends object base model get facade get base edge object extension model get facade get extension edge the figs for the two end nodes fig node basefn fig node lay presentation for base fig node extensionfn fig node lay presentation for extension link the new extend relationship in to the ends remember we draw from the extension use case to the base use case new edge set source port fig extensionfn new edge set source fig node extensionfn new edge set dest port fig basefn new edge set dest fig node basefn else if model get facade isa include edge new edge new fig include edge settings object base model get facade get base edge object addition model get facade get addition edge the figs for the two end nodes fig node basefn fig node lay presentation for base fig node additionfn fig node lay presentation for addition link the new include relationship in to the ends new edge set source port fig basefn new edge set source fig node basefn new edge set dest port fig additionfn new edge set dest fig node additionfn else if model get facade isa dependency edge new edge new fig dependency edge settings where there is more than one supplier or client take the first element in each case there really ought to be a check that there are some here for safety object supplier model get facade get suppliers edge to array 0 object client model get facade get clients edge to array 0 the figs for the two end nodes fig node supplierfn fig node lay presentation for supplier fig node clientfn fig node lay presentation for client link the new dependency in to the ends new edge set source port fig clientfn new edge set source fig node clientfn new edge set dest port fig supplierfn new edge set dest fig node supplierfn else if edge instanceof comment edge new edge new fig edge note edge settings if new edge null throw new illegal argument exception don t know how to create fig edge for model type edge get class get name else set ports lay new edge lay add new edge new edge set layer lay new edge set di element graph change adapter get instance create element gm edge return new edge classdiagram styleattributes graphedgerenderer getfigedgefor graphmodel figedge getfigedgefor graphmodel styleattributes isdebugenabled illegalargumentexception diagramsettings argodiagram layerperspective getdiagram getdiagramsettings figedge newedge getfacade isaassociation newedge figassociation getfacade isageneralization newedge figgeneralization getfacade isaextend newedge figextend getfacade getbase getfacade getextension fignode fignode presentationfor fignode fignode presentationfor newedge setsourceportfig newedge setsourcefignode newedge setdestportfig newedge setdestfignode getfacade isainclude newedge figinclude getfacade getbase getfacade getaddition fignode fignode presentationfor fignode fignode presentationfor newedge setsourceportfig newedge setsourcefignode newedge setdestportfig newedge setdestfignode getfacade isadependency newedge figdependency getfacade getsuppliers toarray getfacade getclients toarray fignode fignode presentationfor fignode fignode presentationfor newedge setsourceportfig newedge setsourcefignode newedge setdestportfig newedge setdestfignode commentedge newedge figedgenote newedge illegalargumentexception figedge getclass getname setports newedge newedge newedge setlayer newedge setdielement graphchangeadapter getinstance createelement newedge param owner the owner of the link public fig return action message object owner super owner set dest arrow head new arrow head greater set dashed true figreturnactionmessage setdestarrowhead arrowheadgreater setdashed see org tigris gef presentation fig edge set fig org tigris gef presentation fig public void set fig fig f super set fig f set dashed true figedge setfig setfig setfig setdashed public fig return action message this null figreturnactionmessage construct a property panel for a component instance public prop panel component instance super label component instance lookup icon component instance add field translator localize label name get name text field add field translator localize label namespace get namespace selector add separator add field translator localize label stimili sent get stimuli sender scroll add field translator localize label stimili received get stimuli receiver scroll j list res list new uml linked list new uml container resident list model add field translator localize label residents new j scroll pane res list add separator abstract action add model element2 action new action add instance classifier model get meta types get component j scroll pane classifier scroll new j scroll pane new uml mutable linked list new uml instance classifier list model action null null true add field translator localize label classifiers classifier scroll add action new action navigate container element add action new action new stereotype add action get delete action componentinstance proppanelcomponentinstance lookupicon componentinstance addfield getnametextfield addfield getnamespaceselector addseparator addfield getstimulisenderscroll addfield getstimulireceiverscroll jlist reslist umllinkedlist umlcontainerresidentlistmodel addfield jscrollpane reslist addseparator abstractactionaddmodelelement2 actionaddinstanceclassifier getmetatypes getcomponent jscrollpane classifierscroll jscrollpane umlmutablelinkedlist umlinstanceclassifierlistmodel addfield classifierscroll addaction actionnavigatecontainerelement addaction actionnewstereotype addaction getdeleteaction constructor for action new use case extension point protected action new use case extension point super actionnewusecaseextensionpoint actionnewusecaseextensionpoint public void action performed action event e super action performed e if model get facade isa use case get target model get use cases factory build extension point get target actionperformed actionevent actionperformed getfacade isausecase gettarget getusecasesfactory buildextensionpoint gettarget the constructor param the field the input text field public diagram name document j text field the field field the field target manager tm target manager get instance tm add target listener this set target tm get target thefield diagramnamedocument jtextfield thefield thefield targetmanager targetmanager getinstance addtargetlistener settarget gettarget if the currently selected object is a diagram then update the name field p mvw i added the stop events mechanism because otherwise updating the field causes the uml model to be adapted param t the currently selected object private void set target object t if t instanceof argo diagram stop events true field set text argo diagram t get name stop events false stopevents settarget argodiagram stopevents settext argodiagram getname stopevents see org argouml ui targetmanager target listener target added org argouml ui targetmanager target event public void target added target event e set target e get new target targetlistener targetadded targetevent targetadded targetevent settarget getnewtarget see org argouml ui targetmanager target listener target removed org argouml ui targetmanager target event public void target removed target event e set target e get new target targetlistener targetremoved targetevent targetremoved targetevent settarget getnewtarget see org argouml ui targetmanager target listener target set org argouml ui targetmanager target event public void target set target event e set target e get new target targetlistener targetset targetevent targetset targetevent settarget getnewtarget see javax swing event document listener insert update javax swing event document event public void insert update document event e update e documentlistener insertupdate documentevent insertupdate documentevent see javax swing event document listener remove update javax swing event document event public void remove update document event e update e documentlistener removeupdate documentevent removeupdate documentevent see javax swing event document listener changed update javax swing event document event public void changed update document event e update e documentlistener changedupdate documentevent changedupdate documentevent if a new name has been typed by the user then let s update the name of the diagram param e the documentevent from the documentlistener interface private void update document event e if stop events object target target manager get instance get target if target instanceof argo diagram argo diagram d argo diagram target try int document length e get document get length string new name e get document get text 0 document length string old name d get name prevent triggering too many events by set name if old name equals new name d set name new name if highlight tag null field get highlighter remove highlight highlight tag highlight tag null catch property veto exception pe provide feedback to the user that their name was not accepted try highlight tag field get highlighter add highlight 0 field get text length default highlighter default painter catch bad location exception e1 log debug nested exception e1 catch bad location exception ble log debug ble documentevent stopevents targetmanager getinstance gettarget argodiagram argodiagram argodiagram documentlength getdocument getlength newname getdocument gettext documentlength oldname getname setname oldname newname setname newname highlighttag gethighlighter removehighlight highlighttag highlighttag propertyvetoexception highlighttag gethighlighter addhighlight gettext defaulthighlighter defaultpainter badlocationexception badlocationexception see org argouml ui explorer rules perspective rule get rule name public string get rule name return translator localize misc transition guard perspectiverule getrulename getrulename public collection get children object parent if model get facade isa transition parent collection col new array list col add model get facade get guard parent return col return collections empty set getchildren getfacade isatransition arraylist getfacade getguard empty_set public set get dependencies object parent if model get facade isa transition parent set set new hash set set add parent return set return collections empty set getdependencies getfacade isatransition hashset empty_set constructor for action new signal event protected action new signal event super put value name translator localize button new signalevent actionnewsignalevent actionnewsignalevent putvalue java lang object protected object create event object ns return model get state machines factory build signal event ns createevent getstatemachinesfactory buildsignalevent return returns the singleton public static action new signal event get singleton return singleton actionnewsignalevent getsingleton public prop panel create prop panel object object if object instanceof uml activity diagram return new prop paneluml activity diagram return null proppanel createproppanel umlactivitydiagram proppanelumlactivitydiagram param event type reported by this event param src object that caused the event param message the status text string already translated to be shown public argo status event int event type object src string message super event type src text message eventtype argostatusevent eventtype eventtype indicates the start of the 100 digit range for status events return the first id reserved for events override public int get event start range return any status event geteventstartrange any_status_event return returns the event text containing either a status message or the name of the project that was saved loaded public string get text return text gettext constructor for uml state machine transition list model public uml state machine transition list model super transition umlstatemachinetransitionlistmodel umlstatemachinetransitionlistmodel see org argouml uml ui uml model element list model2 build model list protected void build model list set all elements model get facade get transitions get target umlmodelelementlistmodel2 buildmodellist buildmodellist setallelements getfacade gettransitions gettarget see org argouml uml ui uml model element list model2 is valid element object protected boolean is valid element object element return model get facade get transitions get target contains element umlmodelelementlistmodel2 isvalidelement isvalidelement getfacade gettransitions gettarget public class init notationui implements init subsystem public void init initnotationui initsubsystem public list gui settings tab interface get project settings tabs list gui settings tab interface result new array list gui settings tab interface result add new settings tab notation argo scope project return result guisettingstabinterface getprojectsettingstabs guisettingstabinterface arraylist guisettingstabinterface settingstabnotation scope_project public list gui settings tab interface get settings tabs list gui settings tab interface result new array list gui settings tab interface result add new settings tab notation argo scope application return result guisettingstabinterface getsettingstabs guisettingstabinterface arraylist guisettingstabinterface settingstabnotation scope_application public list abstract argoj panel get details tabs return collections empty list abstractargojpanel getdetailstabs emptylist the constructor public action save all graphics super translator localize action save all graphics null set the tooltip string put value action short description translator localize action save all graphics actionsaveallgraphics putvalue short_description public void action performed action event ae try save false actionperformed actionevent trysave param can overwrite true if we can overwrite without asking return success public boolean try save boolean can overwrite return try save can overwrite null canoverwrite trysave canoverwrite trysave canoverwrite param can overwrite true if we can overwrite without asking param directory directory to save to if null user will be prompted to choose return success save status public boolean try save boolean can overwrite file directory overwrite can overwrite project p project manager get manager get current project target manager tm target manager get instance file save dir directory null directory get save dir p if save dir null the user cancelled return false boolean ok so far true argo diagram active diagram diagram utils get active diagram for argo diagram d p get diagram list tm set target d ok so far try save diagram d save dir if ok so far break tm set target active diagram return ok so far canoverwrite trysave canoverwrite canoverwrite projectmanager getmanager getcurrentproject targetmanager targetmanager getinstance savedir getsavedir savedir oksofar argodiagram activediagram diagramutils getactivediagram argodiagram getdiagramlist settarget oksofar trysavediagram savedir oksofar settarget activediagram oksofar param target the diagram param save dir the directory to save to return continue exporting diagrams if true protected boolean try save diagram object target file save dir if target instanceof diagram string default name diagram target get name default name util strip junk default name todo it s probably worthwhile to abstract and factor this chooser and directory stuff more file handling is coming i m sure try file the file new file save dir default name save graphics manager get instance get default suffix string name the file get name string path the file get parent save graphics action cmd save graphics manager get instance get save action by suffix save graphics manager get instance get default suffix if cmd null show status unknown graphics file type with extension save graphics manager get instance get default suffix return false show status writing path name boolean result save graphics to file the file cmd show status wrote path name return result catch file not found exception ignore log error got a file not found exception ignore catch io exception ignore log error got an io exception ignore return false savedir trysavediagram savedir defaultname getname defaultname stripjunk defaultname thefile savedir defaultname savegraphicsmanager getinstance getdefaultsuffix thefile getname thefile getparent savegraphicsaction savegraphicsmanager getinstance getsaveactionbysuffix savegraphicsmanager getinstance getdefaultsuffix showstatus savegraphicsmanager getinstance getdefaultsuffix showstatus savegraphicstofile thefile showstatus filenotfoundexception filenotfoundexception ioexception ioexception param p the current project return returns null if the user did not approve his choice protected file get save dir project p j file chooser chooser get file chooser p string fn configuration get string save graphics manager key saveall graphics path if fn length 0 chooser set selected file new file fn int retval chooser show save dialog argo frame get instance if retval j file chooser approve option file the file chooser get selected file string path the file get path configuration set string save graphics manager key saveall graphics path path return the file return null getsavedir jfilechooser getfilechooser getstring savegraphicsmanager key_saveall_graphics_path setselectedfile showsavedialog argoframe getinstance jfilechooser approve_option thefile getselectedfile thefile getpath setstring savegraphicsmanager key_saveall_graphics_path thefile param the file the file to write param cmd the action to execute to save the graphics return continue exporting diagrams if true throws io exception private boolean save graphics to file file the file save graphics action cmd throws io exception if the file exists overwrite string message translator message format optionpane confirm overwrite new object the file string title translator localize optionpane confirm overwrite title custom button text object options translator localize optionpane confirm overwrite overwrite 0 translator localize optionpane confirm overwrite overwrite all 1 translator localize optionpane confirm overwrite skip this one 2 translator localize optionpane confirm overwrite cancel 3 int response j option pane show option dialog argo frame get instance message title j option pane yes no cancel option j option pane question message null do not use a custom icon options the titles of buttons options 0 default button title if response 1 overwrite true if response 2 return true if response 3 return false if response j option pane closed option return false file output stream fo null try fo new file output stream the file cmd set stream fo cmd set scale configuration get integer save graphics manager key graphics resolution 1 cmd action performed null finally if fo null fo close return true thefile ioexception savegraphicstofile thefile savegraphicsaction ioexception thefile messageformat thefile joptionpane showoptiondialog argoframe getinstance joptionpane yes_no_cancel_option joptionpane question_message joptionpane closed_option fileoutputstream fileoutputstream thefile setstream setscale getinteger savegraphicsmanager key_graphics_resolution actionperformed private j file chooser get file chooser project p j file chooser chooser null try if p null p geturi null p geturi tourl get file length 0 chooser new j file chooser p geturi tourl get file catch malformedurl exception ex log error exception in opening j file chooser ex if chooser null chooser new j file chooser chooser set dialog title translator localize filechooser save all graphics chooser set dialog type j file chooser open dialog chooser set file selection mode j file chooser directories only chooser set multi selection enabled false return chooser jfilechooser getfilechooser jfilechooser getfile jfilechooser getfile malformedurlexception jfilechooser jfilechooser setdialogtitle setdialogtype jfilechooser open_dialog setfileselectionmode jfilechooser directories_only setmultiselectionenabled private void show status string text argo event pump fire event new argo status event argo event types status text this text showstatus argoeventpump fireevent argostatusevent argoeventtypes status_text param url the url system id to load param public id the public id for which the model will be known must be equal in different machines in order to be possible to load the model return a collection of top level elements in the profile usually a single package stereotyped profile throws profile exception if the xmi reader couldn t read the profile public collection load model url url url public id throws profile exception if url null throw new profile exception null profile url zip input stream zis null try collection elements null xmi reader xmi reader model get xmi reader if url get path to lower case ends with zip zis new zip input stream url open stream zip entry entry zis get next entry todo check if it s ok to just get the first zip entry since the zip file should contain only one xmi file thn if entry null url make zip entry url url entry get name zis close input source input source new input source url to external form input source set public id public id to string elements xmi reader parse input source true return elements catch uml exception e throw new profile exception error loading profile xmi file e catch io exception e throw new profile exception i o error loading profile xmi e publicid publicid profileexception xmireader loadmodel publicid profileexception profileexception zipinputstream xmireader xmireader getxmireader getpath tolowercase endswith zipinputstream openstream zipentry getnextentry makezipentryurl getname inputsource inputsource inputsource toexternalform inputsource setpublicid publicid tostring xmireader inputsource umlexception profileexception ioexception profileexception load a profile from a profile reference param reference profile reference for desired profile return a collection of top level elements in the profile usually a single package stereotyped profile throws profile exception if the xmi reader couldn t read the profile public collection load model final profile reference reference throws profile exception return load model reference get public reference reference get public reference profilereference profilereference profileexception xmireader loadmodel profilereference profileexception loadmodel getpublicreference getpublicreference private url make zip entry url url url string entry name throws malformedurl exception string entryurl jar url entry name return new url entryurl makezipentryurl entryname malformedurlexception entryname create a new resolved critic using the name of the critic and the list of objects that triggered the critic given as parameters param cr the name of the critic that has been resolved param offs the list of related objects public resolved critic string cr list string offs critic cr if offs null offenders new array list string offs else offenders new array list string resolvedcritic resolvedcritic arraylist arraylist same as link resolved critic critic list set boolean param c the critic that has been resolved param offs the set of objects that triggered the critic throws unresolvable exception if some of the objects does not have a itemuid and does not accept a new one public resolved critic critic c list set offs throws unresolvable exception this c offs true resolvedcritic listset unresolvableexception resolvedcritic listset unresolvableexception creates a new resolved critic from the given information param c the critic that has been resolved param offs the set of objects that triggered the critic param can create if it should try to assign new itemui ds to objects that doesn t have throws unresolvable exception if some of the objects does not have a itemuid and does not accept a new one public resolved critic critic c list set offs boolean can create throws unresolvable exception if c null throw new illegal argument exception log debug adding resolution for c get class can create try if offs null offs size 0 offenders new array list string offs size import offenders offs can create else offenders new array list string catch unresolvable exception ure try get critic string c catch unresolvable exception ure2 throw new unresolvable exception ure2 get message n ure get message throw ure critic get critic string c resolvedcritic cancreate itemuids unresolvableexception resolvedcritic listset cancreate unresolvableexception illegalargumentexception getclass cancreate arraylist importoffenders cancreate arraylist unresolvableexception getcriticstring unresolvableexception unresolvableexception getmessage getmessage getcriticstring override public int hash code if critic null return 0 return critic hash code hashcode hashcode equals returns true if and only if obj also is a resolved critic has the same critic name and has all related objects that this object has note that it is not required that this object has all related objects that that object has p formally that is inconsistent with link object equals object equals as specified in java lang object but it was probably practical somehow p the param obj is the object to compare to returns true if equal according to the description false otherwise inherit doc override public boolean equals object obj resolved critic rc if obj null obj instanceof resolved critic return false rc resolved critic obj if critic null if rc critic null return false else if critic equals rc critic return false if offenders null return true if rc offenders null return false for string offender offenders if offender null continue int j for j 0 j rc offenders size j if offender equals rc offenders get j break if j rc offenders size return false return true resolvedcritic inheritdoc resolvedcritic resolvedcritic resolvedcritic obtains a string that identifies the type of critic param c a critic throws unresolvable exception not implemented return a identifying name of the critic protected string get critic string critic c throws unresolvable exception todo should throw if the string is not good if c null throw new unresolvable exception critic is null string s c get class to string return s unresolvableexception getcriticstring unresolvableexception unresolvableexception getclass tostring imports the set of related objects in set to this object if an object does not have an itemuid can create determines if one will be provided if some object does not have an itemuid and can create is false or the object does not accept an itemuid then unresolvable exception is thrown param set the set of related objects to import param can create if itemui ds are allowed to be created throws unresolvable exception if not all objects can be imported protected void import offenders list set set boolean can create throws unresolvable exception string fail null for object obj set string id itemuid getid of object obj can create if id null if can create throw new unresolvable exception itemuid missing or unable to create for class obj get class if fail null fail obj get class to string else fail fail obj get class to string log warn offender obj get class unresolvable use this for fast fail instead sacrificed for complete fail d00mst throw new unresolvable exception unable to create itemuid for class obj get class else offenders add id if fail null throw new unresolvable exception unable to create itemuid for some class es fail cancreate cancreate unresolvableexception cancreate itemuids unresolvableexception importoffenders listset cancreate unresolvableexception getidofobject cancreate cancreate unresolvableexception getclass getclass tostring getclass tostring getclass unresolvableexception getclass unresolvableexception gets the content of critic return the critic this instance resolves public string get critic return critic getcritic gets the list of related objects offenders return the list of offenders of the critic this instance resolved public list string get offender list return offenders getoffenderlist override public string to string string buffer sb new string buffer resolved critic critic for int i 0 i offenders size i if i 0 sb append sb append offenders get i return sb to string tostring stringbuffer stringbuffer resolvedcritic tostring constructor for uml transition trigger list param data model the model public uml state deferrable event list uml model element list model2 data model super data model umltransitiontriggerlist datamodel umlstatedeferrableeventlist umlmodelelementlistmodel2 datamodel datamodel private static pred is final state the instance new pred is final state private pred is final state predisfinalstate theinstance predisfinalstate predisfinalstate see org tigris gef util predicate predicate java lang object public boolean predicate object obj return model get facade isa final state obj getfacade isafinalstate return the instance public static pred is final state get the instance return the instance predisfinalstate gettheinstance theinstance public enumeration gen object cls set res new hash set if model get facade isa generalizable element cls accumulate ancestors cls res return collections enumeration res hashset getfacade isageneralizableelement accumulateancestors param cls the class in fact any generalizable element will do param accum the accumulated list of generalizations public void accumulate ancestors object cls collection accum collection gens model get facade get generalizations cls if gens null return for object g gens object ge model get facade get general g if accum contains ge accum add ge accumulate ancestors cls accum generalizableelement accumulateancestors getfacade getgeneralizations getfacade getgeneral accumulateancestors private static final logger log logger get logger uml list2 class constructor for uml list2 used by subclasses that want to add their own renderer to the list param data model the data model param renderer the renderer protected uml list2 list model data model list cell renderer renderer super data model set double buffered true if renderer null set cell renderer renderer set font look and feel mgr get instance get standard font add mouse listener this getlogger umllist2 umllist2 datamodel umllist2 listmodel datamodel listcellrenderer datamodel setdoublebuffered setcellrenderer setfont lookandfeelmgr getinstance getstandardfont addmouselistener getter for the target first approach to get rid of the container return object public object get target return uml model element list model2 get model get target gettarget umlmodelelementlistmodel2 getmodel gettarget see targettable model view get targettable model public target listener get targettable model return target listener get model targettablemodelview gettargettablemodel targetlistener gettargettablemodel targetlistener getmodel see java awt event mouse listener mouse clicked java awt event mouse event public void mouse clicked mouse event e show popup e mouselistener mouseclicked mouseevent mouseclicked mouseevent showpopup public void mouse entered mouse event e if has popup set cursor cursor get predefined cursor cursor crosshair cursor mouseentered mouseevent haspopup setcursor getpredefinedcursor crosshair_cursor public void mouse exited mouse event e if has popup set cursor cursor get predefined cursor cursor default cursor mouseexited mouseevent haspopup setcursor getpredefinedcursor default_cursor see java awt event mouse listener mouse pressed java awt event mouse event public void mouse pressed mouse event e show popup e mouselistener mousepressed mouseevent mousepressed mouseevent showpopup see java awt event mouse listener mouse released java awt event mouse event public void mouse released mouse event e show popup e mouselistener mousereleased mouseevent mousereleased mouseevent showpopup private final void show popup mouse event event if event is popup trigger model get model management helper is read only get target point point event get point int index location to index point j popup menu popup new j popup menu list model lm get model if lm instanceof uml model element list model2 if uml model element list model2 lm build popup popup index log debug showing popup popup show this point x point y showpopup mouseevent ispopuptrigger getmodelmanagementhelper isreadonly gettarget getpoint locationtoindex jpopupmenu jpopupmenu listmodel getmodel umlmodelelementlistmodel2 umlmodelelementlistmodel2 buildpopup protected boolean has popup if get model instanceof uml model element list model2 return uml model element list model2 get model has popup return false haspopup getmodel umlmodelelementlistmodel2 umlmodelelementlistmodel2 getmodel haspopup constructor public action collaboration diagram super action collaboration diagram actioncollaborationdiagram public argo diagram create diagram object namespace return diagram factory get instance create diagram diagram factory diagram type collaboration create collaboration namespace null argodiagram creatediagram diagramfactory getinstance creatediagram diagramfactory diagramtype createcollaboration override public int get num steps if possible constructor return 2 return 1 getnumsteps possibleconstructor private list string get options list string res new array list string res add option0 res add option1 return res getoptions arraylist method to tell the wizard what path it should work with param b set to constructor is true if we shall take the path where the oper is converted to a constructor public void set possible constructor boolean b possible constructor b settoconstructor setpossibleconstructor possibleconstructor override public j panel make panel int new step if possible constructor return super make panel new step switch new step case 0 return super make panel new step case 1 if step1 null step1 new wiz step choice this get instructions get options step1 set target get to do item return step1 case 2 if stereotype path chosen if step2 null step2 new wiz step cue this translator localize critics wiz oper name stereotype step2 set target get to do item return step2 return super make panel 1 default return null jpanel makepanel newstep possibleconstructor makepanel newstep newstep makepanel newstep wizstepchoice getinstructions getoptions settarget gettodoitem stereotypepathchosen wizstepcue wizopername settarget gettodoitem makepanel there is a possibility that the next step forward takes another path in this wizard to allow for this we must destroy the path already traveled by p todo i linus would say that this is really a problem with the wizard implementation since i believe it should be possible to explore a path in the wizard and then go back inherit doc override public void undo action int orig step super undo action orig step if get step 1 remove panel orig step if orig step 1 object oper get model element if added create stereotype model get core helper remove stereotype oper create stereotype inheritdoc undoaction origstep undoaction origstep getstep removepanel origstep origstep getmodelelement addedcreatestereotype getcorehelper removestereotype createstereotype override public void do action int old step if possible constructor super do action old step return switch old step case 1 int choice 1 if step1 null choice step1 get selected index switch choice case 1 throw new illegal argument exception nothing selected should not get here case 0 stereotype path chosen true object oper get model element we need to find the stereotype with the name create and the base class behavioral feature in the model if there is none then we create one and put it there object m model get facade get model oper object the stereotype null for iterator iter model get facade get owned elements m iterator iter has next object candidate iter next if model get facade isa stereotype candidate continue if create equals model get facade get name candidate continue collection base classes model get facade get base classes candidate iterator iter2 base classes null base classes iterator null if iter2 null behavioral feature equals iter2 next continue the stereotype candidate break if the stereotype null the stereotype model get extension mechanisms factory build stereotype create m model get core helper set name the stereotype create the stereotype set stereotype model get extension mechanisms helper add base class the stereotype behavioral feature object targetns find namespace model get facade get namespace oper model get facade get model oper model get core helper add owned element targetns the stereotype try create stereotype the stereotype model get core helper add stereotype oper the stereotype added create stereotype true catch exception pve log error could not set stereotype pve return case 1 nothing to do stereotype path chosen false return default return case 2 if stereotype path chosen super do action 1 return default doaction oldstep possibleconstructor doaction oldstep oldstep getselectedindex illegalargumentexception stereotypepathchosen getmodelelement behavioralfeature getfacade getmodel thestereotype getfacade getownedelements hasnext getfacade isastereotype getfacade getname baseclasses getfacade getbaseclasses baseclasses baseclasses behavioralfeature thestereotype thestereotype thestereotype getextensionmechanismsfactory buildstereotype getcorehelper setname thestereotype thestereotype setstereotype getextensionmechanismshelper addbaseclass thestereotype behavioralfeature findnamespace getfacade getnamespace getfacade getmodel getcorehelper addownedelement thestereotype createstereotype thestereotype getcorehelper addstereotype thestereotype addedcreatestereotype stereotypepathchosen stereotypepathchosen doaction uml combo box entry find namespace private static object find namespace object phantomns object target model object ns null object target parentns null if phantomns null return target model object parentns model get facade get namespace phantomns if parentns null return target model target parentns find namespace parentns target model see if there is already an element with the same name collection owned elements model get facade get owned elements target parentns string phantom name model get facade get name phantomns string target name if owned elements null object owned element iterator iter owned elements iterator while iter has next owned element iter next target name model get facade get name owned element if target name null phantom name equals target name if model get facade isa package owned element ns owned element break if ns null ns model get model management factory create package model get core helper set name ns phantom name model get core helper add owned element target parentns ns return ns umlcomboboxentry findnamespace findnamespace targetmodel targetparentns targetmodel getfacade getnamespace targetmodel targetparentns findnamespace targetmodel ownedelements getfacade getownedelements targetparentns phantomname getfacade getname targetname ownedelements ownedelement ownedelements hasnext ownedelement targetname getfacade getname ownedelement targetname phantomname targetname getfacade isapackage ownedelement ownedelement getmodelmanagementfactory createpackage getcorehelper setname phantomname getcorehelper addownedelement targetparentns return returns the singleton deprecated for 0 27 3 by tfmorris use link gen composite classes2 get instance public static gen composite classes getsingleton return singleton gencompositeclasses2 getinstance gencompositeclasses see org tigris gef util child generator gen java lang object deprecated for 0 27 3 by tfmorris use link gen composite classes2 child iterator object public enumeration gen object o return collections enumeration collect children o childgenerator gencompositeclasses2 childiterator collectchildren collect children p todo move this method to the subclass gen composite classes2 when this deprecated class is removed param o the parent element return a collection of children protected collection collect children object o list res new array list if model get facade isa classifier o return res object cls o list ends new array list model get facade get association ends cls if ends null return res iterator assoc ends ends iterator while assoc ends has next object ae assoc ends next if model get aggregation kind get composite equals model get facade get aggregation ae object asc model get facade get association ae array list conn new array list model get facade get connections asc if conn null conn size 2 continue object other end ae conn get 0 conn get 1 conn get 0 if model get facade get type ae model get facade get type other end res add model get facade get type other end return res gencompositeclasses2 collectchildren arraylist getfacade isaclassifier arraylist getfacade getassociationends assocends assocends hasnext assocends getaggregationkind getcomposite getfacade getaggregation getfacade getassociation arraylist arraylist getfacade getconnections otherend getfacade gettype getfacade gettype otherend getfacade gettype otherend construct a property panel for uml method elements public prop panel method super label method lookup icon method add field translator localize label name get name text field add field translator localize label owner get owner scroll the specification field shows the operation add field translator localize label specification new uml combo box navigator translator localize label specification navigate tooltip get specification combo box add get visibility panel j panel modifiers panel create border panel translator localize label modifiers modifiers panel add new uml behavioral feature query check box modifiers panel add new uml feature owner scope check box add modifiers panel add separator uml expression model2 procedure model new uml method procedure expression model this add field translator localize label language new uml expression language field procedure model false j scroll pane body pane new j scroll pane new uml expression body field procedure model true add field translator localize label body body pane add action new action navigate owner add action get delete action proppanelmethod lookupicon addfield getnametextfield addfield getownerscroll addfield umlcomboboxnavigator getspecificationcombobox getvisibilitypanel jpanel modifierspanel createborderpanel modifierspanel umlbehavioralfeaturequerycheckbox modifierspanel umlfeatureownerscopecheckbox modifierspanel addseparator umlexpressionmodel2 proceduremodel umlmethodprocedureexpressionmodel addfield umlexpressionlanguagefield proceduremodel jscrollpane bodypane jscrollpane umlexpressionbodyfield proceduremodel addfield bodypane addaction actionnavigateowner addaction getdeleteaction return the specification combo box public uml combo box2 get specification combo box if specification combo box null if specification combo box model null specification combo box model new uml method specification combo box model specification combo box new uml combo box2 specification combo box model new action set method specification return specification combo box combobox umlcombobox2 getspecificationcombobox specificationcombobox specificationcomboboxmodel specificationcomboboxmodel umlmethodspecificationcomboboxmodel specificationcombobox umlcombobox2 specificationcomboboxmodel actionsetmethodspecification specificationcombobox extends uml combo box model2 constructor public uml method specification combo box model super specification false model get pump add class model event listener this model get meta types get operation method umlcomboboxmodel2 umlmethodspecificationcomboboxmodel getpump addclassmodeleventlistener getmetatypes getoperation protected boolean is valid element object element object specification model get core helper get specification get target return specification element isvalidelement getcorehelper getspecification gettarget protected void build model list if get target null remove all elements object classifier model get facade get owner get target add all model get facade get operations classifier buildmodellist gettarget removeallelements getfacade getowner gettarget addall getfacade getoperations see org argouml uml ui uml combo box model2 get selected model element protected object get selected model element return model get core helper get specification get target umlcomboboxmodel2 getselectedmodelelement getselectedmodelelement getcorehelper getspecification gettarget public void model changed uml change event evt if evt instanceof attribute change event if evt get property name equals specification if evt get source get target get changed element evt null object elem get changed element evt set selected item elem modelchanged umlchangeevent attributechangeevent getpropertyname getsource gettarget getchangedelement getchangedelement setselecteditem constructor for action set structural feature type protected action set method specification super translator localize set null set the tooltip string put value action short description translator localize set actionsetstructuralfeaturetype actionsetmethodspecification putvalue short_description public void action performed action event e super action performed e object source e get source object old operation null object new operation null object method null if source instanceof uml combo box2 uml combo box2 box uml combo box2 source object o box get target the method if model get facade isa method o method o old operation model get core helper get specification method o box get selected item the selected operation if model get facade isa operation o new operation o if new operation old operation method null model get core helper set specification method new operation actionperformed actionevent actionperformed getsource oldoperation newoperation umlcombobox2 umlcombobox2 umlcombobox2 gettarget getfacade isamethod oldoperation getcorehelper getspecification getselecteditem getfacade isaoperation newoperation newoperation oldoperation getcorehelper setspecification newoperation the constructor param container the container of uml user interface components param property name the name of the property public uml method procedure expression model uml user interface container container string property name super container property name propertyname umlmethodprocedureexpressionmodel umluserinterfacecontainer propertyname propertyname this returns a procedure expression see org argouml uml ui uml expression model2 get expression public object get expression return model get facade get body target manager get instance get target procedureexpression umlexpressionmodel2 getexpression getexpression getfacade getbody targetmanager getinstance gettarget sets the body of the target which is a method the body is the procedure expression which consists of a body and language param expression a procedure expression see org argouml uml ui uml expression model2 set expression java lang object public void set expression object expression object target target manager get instance get target if target null throw new illegal state exception there is no target for get container model get core helper set body target expression procedureexpression procedureexpression umlexpressionmodel2 setexpression setexpression targetmanager getinstance gettarget illegalstateexception getcontainer getcorehelper setbody see org argouml uml ui uml expression model2 new expression public object new expression log debug new empty procedure expression return model get data types factory create procedure expression umlexpressionmodel2 newexpression newexpression getdatatypesfactory createprocedureexpression construct a property panel for a classifier role public prop panel classifier role super label classifier role lookup icon classifier role add field translator localize label name get name text field add field translator localize label namespace get namespace selector add field translator localize label multiplicity get multiplicity combo box j list base list new uml mutable linked list new uml classifier role base list model action add classifier role base singleton null action remove classifier role base get instance true add field translator localize label base new j scroll pane base list add separator add field translator localize label generalizations get generalization scroll add field translator localize label specializations get specialization scroll add field translator localize label associationrole ends get association end scroll add separator j list available contents list new uml linked list new uml classifier role available contents list model add field translator localize label available contents new j scroll pane available contents list j list available features list new uml linked list new uml classifier role available features list model add field translator localize label available features new j scroll pane available features list add action new action navigate container element add action get action new reception add action new action new stereotype add action get delete action classifierrole proppanelclassifierrole lookupicon classifierrole addfield getnametextfield addfield getnamespaceselector addfield getmultiplicitycombobox jlist baselist umlmutablelinkedlist umlclassifierrolebaselistmodel actionaddclassifierrolebase actionremoveclassifierrolebase getinstance addfield jscrollpane baselist addseparator addfield getgeneralizationscroll addfield getspecializationscroll addfield getassociationendscroll addseparator jlist availablecontentslist umllinkedlist umlclassifierroleavailablecontentslistmodel addfield jscrollpane availablecontentslist jlist availablefeatureslist umllinkedlist umlclassifierroleavailablefeatureslistmodel addfield jscrollpane availablefeatureslist addaction actionnavigatecontainerelement addaction getactionnewreception addaction actionnewstereotype addaction getdeleteaction returns the multiplicity combo box return uml multiplicity combo box2 protected j panel get multiplicity combo box if multiplicity combo box null multiplicity combo box new uml multiplicity panel return multiplicity combo box multiplicitycombobox umlmultiplicitycombobox2 jpanel getmultiplicitycombobox multiplicitycombobox multiplicitycombobox umlmultiplicitypanel multiplicitycombobox public class type then name order extends name order creates a new instance of type then name order public type then name order typethennameorder nameorder typethennameorder typethennameorder override public int compare object obj1 object obj2 if obj1 instanceof default mutable tree node default mutable tree node node default mutable tree node obj1 obj1 node get user object if obj2 instanceof default mutable tree node default mutable tree node node default mutable tree node obj2 obj2 node get user object if obj1 null if obj2 null return 0 return 1 else if obj2 null return 1 string type name obj1 get class get name string type name1 obj2 get class get name all diagram types treated equally see issue 2260 if type name index of diagram 1 type name1 index of diagram 1 return compare user objects obj1 obj2 int type name order type name compare to type name1 if type name order 0 return compare user objects obj1 obj2 if type name index of diagram 1 type name1 index of diagram 1 return 1 if type name index of diagram 1 type name1 index of diagram 1 return 1 if type name index of package 1 type name1 index of package 1 return 1 if type name index of package 1 type name1 index of package 1 return 1 return type name order defaultmutabletreenode defaultmutabletreenode defaultmutabletreenode getuserobject defaultmutabletreenode defaultmutabletreenode defaultmutabletreenode getuserobject typename getclass getname typename1 getclass getname typename indexof typename1 indexof compareuserobjects typenameorder typename compareto typename1 typenameorder compareuserobjects typename indexof typename1 indexof typename indexof typename1 indexof typename indexof typename1 indexof typename indexof typename1 indexof typenameorder see java lang object to string override public string to string return translator localize combobox order by type name tostring tostring public collection get children object parent if model get facade isa state machine parent set argo diagram return list new hash set argo diagram project proj project manager get manager get current project for argo diagram diagram proj get diagram list if diagram instanceof uml activity diagram uml activity diagram activity diagram uml activity diagram diagram object activity graph activity diagram get state machine if activity graph parent return list add activity diagram continue if diagram instanceof uml state diagram uml state diagram state diagram uml state diagram diagram object state machine state diagram get state machine if state machine parent return list add state diagram continue return return list return collections empty set getchildren getfacade isastatemachine argodiagram returnlist hashset argodiagram projectmanager getmanager getcurrentproject argodiagram getdiagramlist umlactivitydiagram umlactivitydiagram activitydiagram umlactivitydiagram activitygraph activitydiagram getstatemachine activitygraph returnlist activitydiagram umlstatediagram umlstatediagram statediagram umlstatediagram statemachine statediagram getstatemachine statemachine returnlist statediagram returnlist empty_set see org argouml ui explorer rules perspective rule get rule name public string get rule name return translator localize misc state machine diagram perspectiverule getrulename getrulename see org argouml ui explorer rules perspective rule get dependencies java lang object public set get dependencies object parent return collections empty set perspectiverule getdependencies getdependencies empty_set the constructor public cr opp end vs attr setup head and desc add supported decision uml decision inheritance add supported decision uml decision relationships add supported decision uml decision naming set knowledge types critic kt syntax add trigger association end add trigger structural feature croppendvsattr setupheadanddesc addsupporteddecision umldecision addsupporteddecision umldecision addsupporteddecision umldecision setknowledgetypes kt_syntax addtrigger associationend addtrigger structuralfeature override public boolean predicate2 object dm designer dsgr if model get facade isa classifier dm return no problem object cls m classifier dm collection string names seen new array list string collection str model get facade get features cls warn about inherited name conflicts different critic iterator features str iterator while features has next object o features next if model get facade isa structural feature o continue object sf m structural feature o string sf name model get facade get name sf if equals sf name continue string name str sf name if name str length 0 continue names seen add name str collection assoc ends model get facade get association ends cls warn about inherited name conflicts different critic iterator my ends assoc ends iterator while my ends has next object my ae m association end my ends next object asc m association model get facade get association my ae collection conn model get facade get connections asc if model get facade isa association role asc conn model get facade get connections asc if conn null continue iterator asc ends conn iterator while asc ends has next object ae m association end asc ends next if model get facade get type ae cls continue string ae name model get facade get name ae if equals ae name continue string ae name str ae name if ae name str null ae name str length 0 continue if names seen contains ae name str return problem found return no problem getfacade isaclassifier no_problem mclassifier namesseen arraylist getfacade getfeatures hasnext getfacade isastructuralfeature mstructuralfeature sfname getfacade getname sfname namestr sfname namestr namesseen namestr assocends getfacade getassociationends myends assocends myends hasnext myae massociationend myends massociation getfacade getassociation myae getfacade getconnections getfacade isaassociationrole getfacade getconnections ascends ascends hasnext massociationend ascends getfacade gettype aename getfacade getname aename aenamestr aename aenamestr aenamestr namesseen aenamestr problem_found no_problem public set object get criticized design materials set object ret new hash set object ret add model get meta types get classifier return ret getcriticizeddesignmaterials hashset getmetatypes getclassifier the constructor public cr seq instance without classifier setup head and desc add supported decision uml decision patterns crseqinstancewithoutclassifier setupheadanddesc addsupporteddecision umldecision override public boolean predicate2 object dm designer dsgr if dm instanceof uml sequence diagram return no problem uml sequence diagram sd uml sequence diagram dm list set offs compute offenders sd if offs null return no problem return problem found umlsequencediagram no_problem umlsequencediagram umlsequencediagram listset computeoffenders no_problem problem_found override public to do item to do item object dm designer dsgr uml sequence diagram sd uml sequence diagram dm list set offs compute offenders sd return new uml to do item this offs dsgr todoitem todoitem umlsequencediagram umlsequencediagram listset computeoffenders umltodoitem override public boolean still valid to do item i designer dsgr if is active return false list set offs i get offenders uml sequence diagram sd uml sequence diagram offs get 0 if predicate dm dsgr return false list set new offs compute offenders sd boolean res offs equals new offs return res stillvalid todoitem isactive listset getoffenders umlsequencediagram umlsequencediagram listset newoffs computeoffenders newoffs if there are instances that have no classifiers they belong to the returned vector set is not null then in the vector set are the uml sequence diagram and all fig objects fig component instances and figm node instances with no classifier param sd the diagram to check return the set of offenders public list set compute offenders uml sequence diagram sd collection figs sd get layer get contents list set offs null for object obj figs if obj instanceof fig node model element continue fig node model element fn fig node model element obj if fn null model get facade isa instance fn get owner object minst fn get owner if minst null collection col model get facade get classifiers minst if col size 0 continue if offs null offs new list set offs add sd offs add fn return offs umlsequencediagram figobjects figcomponentinstances figmnodeinstances listset computeoffenders umlsequencediagram getlayer getcontents listset fignodemodelelement fignodemodelelement fignodemodelelement getfacade isainstance getowner getowner getfacade getclassifiers listset construct a new selection node for the given fig param f the given fig public selection node fig f super f selectionnode selectionnode override protected icon get icons return icons geticons override protected string get instructions int index return instructions index base getinstructions override protected object get new edge type int index return model get meta types get association getnewedgetype getmetatypes getassociation override protected object get new node int index return model get core factory create node getnewnode getcorefactory createnode override protected object get new node type int index return model get meta types get node getnewnodetype getmetatypes getnode override protected boolean is reverse edge int index if index bottom index left return true return false isreverseedge return the instance of the printmanager public static print manager get instance return instance printmanager getinstance the constructor private print manager instantiation not allowed printmanager print the active diagram public void print object target diagram utils get active diagram if target instanceof argo diagram print cmd action performed null diagramutils getactivediagram argodiagram printcmd actionperformed show the page setup dialog public void show page setup dialog print cmd do page setup showpagesetupdialog printcmd dopagesetup the constructor public cr no trigger or guard setup head and desc add supported decision uml decision state machines set knowledge types critic kt completeness add trigger trigger add trigger guard crnotriggerorguard setupheadanddesc addsupporteddecision umldecision state_machines setknowledgetypes kt_completeness addtrigger addtrigger public boolean predicate2 object dm designer dsgr if model get facade isa transition dm return no problem object transition m transition dm object target model get facade get target transition if model get facade isa pseudostate target return no problem object trigger model get facade get trigger transition object guard model get facade get guard transition object source model get facade get source transition wfr transitions omg uml 1 3 object k model get facade get kind target if model get facade equals pseudostate kind k model get pseudostate kind get join return no problem if model get facade isa state source return no problem if model get facade get do activity source null return no problem boolean has trigger trigger null model get facade get name trigger null model get facade get name trigger length 0 if has trigger return no problem boolean no guard guard null model get facade get expression guard null model get facade get body model get facade get expression guard null model get facade get body model get facade get expression guard to string length 0 if no guard return problem found return no problem getfacade isatransition no_problem mtransition getfacade gettarget getfacade isapseudostate no_problem getfacade gettrigger getfacade getguard getfacade getsource getfacade getkind getfacade equalspseudostatekind getpseudostatekind getjoin no_problem getfacade isastate no_problem getfacade getdoactivity no_problem hastrigger getfacade getname getfacade getname hastrigger no_problem noguard getfacade getexpression getfacade getbody getfacade getexpression getfacade getbody getfacade getexpression tostring noguard problem_found no_problem public set object get criticized design materials set object ret new hash set object ret add model get meta types get transition return ret getcriticizeddesignmaterials hashset getmetatypes gettransition the constructor public uml signal context list model super context umlsignalcontextlistmodel protected void build model list if get target null set all elements model get facade get contexts get target buildmodellist gettarget setallelements getfacade getcontexts gettarget protected boolean is valid element object element return model get facade isa behavioral feature element model get facade get contexts get target contains element isvalidelement getfacade isabehavioralfeature getfacade getcontexts gettarget add a dependency on the given profile from this profile param p the profile throws illegal argument exception never thrown protected final void add profile dependency profile p throws illegal argument exception add profile dependency p get profile identifier illegalargumentexception addprofiledependency illegalargumentexception addprofiledependency getprofileidentifier add a dependency on the given profile from this profile param profile identifier the profile identifier protected void add profile dependency string profile identifier dependencies add profile identifier profileidentifier addprofiledependency profileidentifier profileidentifier return the dependencies public final set profile get dependencies if profile facade is initiated set profile ret new hash set profile for string pid dependencies profile p profile facade get manager look for registered profile pid if p null ret add p ret add all p get dependencies return ret else return new hash set profile getdependencies profilefacade isinitiated hashset profilefacade getmanager lookforregisteredprofile addall getdependencies hashset return the ids of the dependencies public final set string get dependenciesid return dependencies getdependenciesid return the name for this profile public abstract string get display name getdisplayname return the formating strategy offered by this profile if any returns code null code if this profile has no formating strategy public formating strategy get formating strategy return null formatingstrategy getformatingstrategy return the fig node strategy offered by this profile if any returns code null code if this profile has no fig node strategy public fig node strategy get figure strategy return null fignodestrategy fignodestrategy fignodestrategy getfigurestrategy return the default type strategy offered by this profile if any returns code null code if this profile has no default type strategy public default type strategy get default type strategy return null defaulttypestrategy defaulttypestrategy defaulttypestrategy getdefaulttypestrategy return a collection of the top level uml packages containing the profile throws profile exception if failed to get profile public collection get profile packages throws profile exception return new array list profileexception getprofilepackages profileexception arraylist return the display name override public string to string return get display name tostring getdisplayname return returns the critics defined by this profile public set critic get critics return critics getcritics return a unique identifier for this profile for technical reasons this identifier should not contain stars public string get profile identifier return get display name getprofileidentifier getdisplayname param critics set the critics to set protected void set critics set critic critics set this critics critics set criticsset setcritics criticsset criticsset the constructor public cr component instance without classifier setup head and desc add supported decision uml decision patterns crcomponentinstancewithoutclassifier setupheadanddesc addsupporteddecision umldecision public boolean predicate2 object dm designer dsgr if dm instanceof uml deployment diagram return no problem uml deployment diagram dd uml deployment diagram dm list set offs compute offenders dd if offs null return no problem return problem found umldeploymentdiagram no_problem umldeploymentdiagram umldeploymentdiagram listset computeoffenders no_problem problem_found public to do item to do item object dm designer dsgr uml deployment diagram dd uml deployment diagram dm list set offs compute offenders dd return new uml to do item this offs dsgr todoitem todoitem umldeploymentdiagram umldeploymentdiagram listset computeoffenders umltodoitem public boolean still valid to do item i designer dsgr if is active return false list set offs i get offenders uml deployment diagram dd uml deployment diagram offs get 0 if predicate dm dsgr return false list set new offs compute offenders dd boolean res offs equals new offs return res stillvalid todoitem isactive listset getoffenders umldeploymentdiagram umldeploymentdiagram listset newoffs computeoffenders newoffs if there are component instances that have no enclosing figm node instance the returned list set is not null then in the list set are the uml deployment diagram and all fig component instances with no enclosing figm node instance param deployment diagram the diagram to check return the set of offenders public list set compute offenders uml deployment diagram deployment diagram collection figs deployment diagram get layer get contents list set offs null iterator fig iter figs iterator while fig iter has next object obj fig iter next if obj instanceof fig component instance continue fig component instance fig component instance fig component instance obj if fig component instance null object coi fig component instance get owner if coi null collection col model get facade get classifiers coi if col size 0 continue if offs null offs new list set offs add deployment diagram offs add fig component instance return offs figmnodeinstance listset listset umldeploymentdiagram figcomponentinstances figmnodeinstance deploymentdiagram listset computeoffenders umldeploymentdiagram deploymentdiagram deploymentdiagram getlayer getcontents listset figiter figiter hasnext figiter figcomponentinstance figcomponentinstance figcomponentinstance figcomponentinstance figcomponentinstance figcomponentinstance getowner getfacade getclassifiers listset deploymentdiagram figcomponentinstance the constructor public status bar progress set minimum 0 progress set maximum 100 progress set minimum size new dimension 100 20 progress set size new dimension 100 20 msg set minimum size new dimension 300 20 msg set size new dimension 300 20 msg set font new font dialog font plain 10 msg set foreground color black set layout new border layout set border new etched border etched border lowered add msg border layout center add progress border layout east statusbar setminimum setmaximum setminimumsize setsize setminimumsize setsize setfont setforeground setlayout borderlayout setborder etchedborder etchedborder borderlayout borderlayout param s the status string to show public void show status string s msg set text s paint immediately get bounds showstatus settext paintimmediately getbounds param percent the percentage of the progress bar to be shown public void show progress int percent progress set value percent showprogress setvalue param delata percent an increment for the progrss bar public void inc progress int delata percent progress set value progress get value delata percent delatapercent incprogress delatapercent setvalue getvalue delatapercent param s the status bar text param work the work that has to be done i e the maximum value for the progress public synchronized void do fake progress string s int work status text s show status status text not implemented yet progress set maximum work progress set value 0 thread t new thread this t start dofakeprogress statustext showstatus statustext setmaximum setvalue public synchronized void run int work progress get maximum for int i 0 i work i progress set value i repaint try wait 10 catch interrupted exception ex show status status text done repaint try wait 1000 catch interrupted exception ex progress set value 0 show status repaint getmaximum setvalue interruptedexception showstatus statustext interruptedexception setvalue showstatus constructor for uml include addition list model public uml include addition list model super addition umlincludeadditionlistmodel umlincludeadditionlistmodel see org argouml uml ui uml model element list model2 build model list protected void build model list super build model list add element model get facade get addition get target umlmodelelementlistmodel2 buildmodellist buildmodellist buildmodellist addelement getfacade getaddition gettarget public toolbar manager menu item action string name object new key super name this key new key toolbars new array list j tool bar toolbarmanagermenuitemaction newkey newkey arraylist jtoolbar public object get key return key getkey public array list j tool bar get toolbars return toolbars arraylist jtoolbar gettoolbars public void action performed final action event e swing utilities invoke later new runnable public void run for j tool bar toolbar get toolbars toolbar set visible j check box menu item e get source is selected make this change persistant configuration key configuration key configuration make key argo toolbar manager key name toolbar get name configuration set string configuration key boolean toolbar is visible to string for j menu item menu item all menu items if menu item get action equals this menu item set selected j check box menu item e get source is selected actionperformed actionevent swingutilities invokelater jtoolbar gettoolbars setvisible jcheckboxmenuitem getsource isselected configurationkey configurationkey makekey argotoolbarmanager key_name getname setstring configurationkey isvisible tostring jmenuitem menuitem allmenuitems menuitem getaction menuitem setselected jcheckboxmenuitem getsource isselected swing utilities invoke later new runnable public void run for j tool bar toolbar get toolbars toolbar set visible j check box menu item e get source is selected make this change persistant configuration key configuration key configuration make key argo toolbar manager key name toolbar get name configuration set string configuration key boolean toolbar is visible to string swingutilities invokelater jtoolbar gettoolbars setvisible jcheckboxmenuitem getsource isselected configurationkey configurationkey makekey argotoolbarmanager key_name getname setstring configurationkey isvisible tostring private constructor private argo toolbar manager argotoolbarmanager get single instance return single instance public static argo toolbar manager get instance if instance null instance new argo toolbar manager return instance argotoolbarmanager getinstance argotoolbarmanager registers new toolbar param key class that is toolbar connected to or toolbar object itself if there is just one toolbar of that kind in the application param toolbar new toolbar to register param preffered menu position preffered menu postition 1 for the last postition private void register new object key j tool bar new toolbar int preffered menu position if menus don t containt menu item necessary for this class create it j check box menu item wanted menu item null for int i 0 i get menu get item count i toolbar manager menu item action menu item action toolbar manager menu item action get menu get item i get action if menu item action get key equals key wanted menu item j check box menu item get menu get item i if there is persistant state for this toolbar respect it or add it to persistance data boolean visibility get configured toolbar appearance new toolbar get name new toolbar set visible visibility create new menu item if it doesn t exist for this class if wanted menu item null toolbar manager menu item action action new toolbar manager menu item action translator localize new toolbar get name key wanted menu item new j check box menu item translator localize new toolbar get name new toolbar is visible wanted menu item set action action j check box menu item menu item2 new j check box menu item translator localize new toolbar get name new toolbar is visible menu item2 set action action get menu insert wanted menu item preffered menu position get popup menu insert menu item2 preffered menu position all menu items add wanted menu item all menu items add menu item2 array list j tool bar tool bars for class toolbar manager menu item action wanted menu item get action get toolbars if visibility is already changed for this class respect it boolean visible true if tool bars for class size 0 visible tool bars for class get 0 is visible new toolbar set visible visible add toolbar tool bars for class add new toolbar register popup menu with toolbar new toolbar add mouse listener new mouse adapter override public void mouse released mouse event e super mouse released e if e is popup trigger get popup menu show e get component e getx e gety override public void mouse pressed mouse event e super mouse pressed e if e is popup trigger get popup menu show e get component e getx e gety prefferedmenuposition registernew jtoolbar newtoolbar prefferedmenuposition jcheckboxmenuitem wantedmenuitem getmenu getitemcount toolbarmanagermenuitemaction menuitemaction toolbarmanagermenuitemaction getmenu getitem getaction menuitemaction getkey wantedmenuitem jcheckboxmenuitem getmenu getitem getconfiguredtoolbarappearance newtoolbar getname newtoolbar setvisible wantedmenuitem toolbarmanagermenuitemaction toolbarmanagermenuitemaction newtoolbar getname wantedmenuitem jcheckboxmenuitem newtoolbar getname newtoolbar isvisible wantedmenuitem setaction jcheckboxmenuitem menuitem2 jcheckboxmenuitem newtoolbar getname newtoolbar isvisible menuitem2 setaction getmenu wantedmenuitem prefferedmenuposition getpopupmenu menuitem2 prefferedmenuposition allmenuitems wantedmenuitem allmenuitems menuitem2 arraylist jtoolbar toolbarsforclass toolbarmanagermenuitemaction wantedmenuitem getaction gettoolbars toolbarsforclass toolbarsforclass isvisible newtoolbar setvisible toolbarsforclass newtoolbar newtoolbar addmouselistener mouseadapter mousereleased mouseevent mousereleased ispopuptrigger getpopupmenu getcomponent mousepressed mouseevent mousepressed ispopuptrigger getpopupmenu getcomponent new toolbar add mouse listener new mouse adapter override public void mouse released mouse event e super mouse released e if e is popup trigger get popup menu show e get component e getx e gety newtoolbar addmouselistener mouseadapter mousereleased mouseevent mousereleased ispopuptrigger getpopupmenu getcomponent override public void mouse pressed mouse event e super mouse pressed e if e is popup trigger get popup menu show e get component e getx e gety mousepressed mouseevent mousepressed ispopuptrigger getpopupmenu getcomponent registers container with all containing toolbars if all toolbars are hidden container will be hidden too this means that when toolbars are placed on j panel when all toolbars are hidden this panel needs to be hidden too param container container param toolbars toolbars in the container public void register container final j component container final j tool bar toolbars for j tool bar toolbar toolbars register new toolbar toolbar 1 for j tool bar toolbar toolbars toolbar add component listener new component adapter public void component hidden component event e boolean all hidden true for j tool bar bar toolbars if bar is visible all hidden false break if all hidden container set visible false public void component shown component event e j tool bar one visible null for j tool bar bar toolbars if bar is visible one visible bar break if one visible null container set visible true jpanel registercontainer jcomponent jtoolbar jtoolbar registernew jtoolbar addcomponentlistener componentadapter componenthidden componentevent allhidden jtoolbar isvisible allhidden allhidden setvisible componentshown componentevent jtoolbar onevisible jtoolbar isvisible onevisible onevisible setvisible toolbar add component listener new component adapter public void component hidden component event e boolean all hidden true for j tool bar bar toolbars if bar is visible all hidden false break if all hidden container set visible false addcomponentlistener componentadapter componenthidden componentevent allhidden jtoolbar isvisible allhidden allhidden setvisible public void component shown component event e j tool bar one visible null for j tool bar bar toolbars if bar is visible one visible bar break if one visible null container set visible true componentshown componentevent jtoolbar onevisible jtoolbar isvisible onevisible onevisible setvisible registers new toolbar for specific group param key group that toolbar belongs to param new toolbar new toolbar to register param preffered menu position preffered menu postition 1 for the last postition public void register toolbar object key j tool bar new toolbar int preffered menu position register new key new toolbar preffered menu position newtoolbar prefferedmenuposition registertoolbar jtoolbar newtoolbar prefferedmenuposition registernew newtoolbar prefferedmenuposition gets popup menu return popup menu private j popup menu get popup menu if popup null popup new j popup menu return popup jpopupmenu getpopupmenu jpopupmenu gets menu for all toolbars return menu to be shown in view menu public j menu get menu if menu null menu new j menu return menu jmenu getmenu jmenu gets toolbar visibility status from configuration if it doesn t exist in configuration it does not create new entries in configuration for that toolbar param toolbar name name of the toolbar to get visibility status return visibility status public boolean get configured toolbar appearance string toolbar name configuration key key configuration make key toolbars toolbar name string visibility as string configuration get string key return visibility as string equals false false true toolbarname getconfiguredtoolbarappearance toolbarname configurationkey makekey toolbarname visibilityasstring getstring visibilityasstring constructor for prop panel structural feature param name the name of the panel to be shown at the top param icon the icon for the property panel protected prop panel structural feature string name image icon icon super name icon proppanelstructuralfeature proppanelstructuralfeature imageicon returns the multiplicity combo box return uml multiplicity combo box2 public j panel get multiplicity combo box if multiplicity combo box null multiplicity combo box new uml multiplicity panel return multiplicity combo box multiplicitycombobox umlmultiplicitycombobox2 jpanel getmultiplicitycombobox multiplicitycombobox multiplicitycombobox umlmultiplicitypanel multiplicitycombobox returns the type combo box return uml combo box2 public uml combo box2 get type combo box if type combo box null if type combo box model null type combo box model new uml structural feature type combo box model type combo box new uml combo box2 type combo box model action set structural feature type get instance return type combo box typecombobox umlcombobox2 umlcombobox2 gettypecombobox typecombobox typecomboboxmodel typecomboboxmodel umlstructuralfeaturetypecomboboxmodel typecombobox umlcombobox2 typecomboboxmodel actionsetstructuralfeaturetype getinstance typecombobox returns the changeability radio button panel return uml radio button panel public uml radio button panel get changeability radio button panel if changeability radio button panel null changeability radio button panel new uml structural feature changeability radio button panel translator localize label changeability true return changeability radio button panel changeabilityradiobuttonpanel umlradiobuttonpanel umlradiobuttonpanel getchangeabilityradiobuttonpanel changeabilityradiobuttonpanel changeabilityradiobuttonpanel umlstructuralfeaturechangeabilityradiobuttonpanel changeabilityradiobuttonpanel returns the target scope check box return uml check box2 deprecated for 0 27 2 by tfmorris structural features no longer have a target scope in uml 2 x no replacement this appears unused so it can be scheduled for a speedy removal deprecated public uml check box2 get target scope check box if target scope check box null target scope check box new uml structural feature target scope check box return target scope check box targetscopecheckbox umlcheckbox2 structuralfeatures targetscope umlcheckbox2 gettargetscopecheckbox targetscopecheckbox targetscopecheckbox umlstructuralfeaturetargetscopecheckbox targetscopecheckbox public class cr cross namespace assoc extends cruml constructor for the critic p sets up the resource name which will allow headline and description to found for the current locale provides a design issue category modularity and a knowledge type syntax public cr cross namespace assoc setup head and desc add supported decision uml decision modularity set knowledge types critic kt syntax crcrossnamespaceassoc crcrossnamespaceassoc setupheadanddesc addsupporteddecision umldecision setknowledgetypes kt_syntax the trigger for the critic p get the association then loop through the association ends checking that their associated classifiers are in the namespace i e are part of the same model or subsystem p param dm the link java lang object object to be checked against the critic param dsgr the link org argouml cognitive designer designer creating the model not used this is for future development of argouml return link problem found problem found if the critic is triggered otherwise link no problem no problem public boolean predicate2 object dm designer dsgr only look at associations if model get facade isa association dm return no problem object ns model get facade get namespace dm if ns null return problem found get the association and its connections iterate over all the association ends and check that each connected classifier is in the same sub system or model iterator assoc ends model get facade get connections dm iterator while assoc ends has next the next association end and its classifier check the classifier is in the namespace of the association if not we have a problem object clf model get facade get type assoc ends next if clf null ns model get facade get namespace clf return problem found if we drop out there is no problem return no problem problem_found problem_found no_problem no_problem getfacade isaassociation no_problem getfacade getnamespace problem_found associationends assocends getfacade getconnections assocends hasnext associationend getfacade gettype assocends getfacade getnamespace problem_found no_problem public set object get criticized design materials set object ret new hash set object ret add model get meta types get association class return ret getcriticizeddesignmaterials hashset getmetatypes getassociationclass the constructor public prop panel return action super label return action lookup icon return action proppanelreturnaction lookupicon returnaction constructor public action use case diagram super action usecase diagram actionusecasediagram suppress warnings deprecation deprecated override public argo diagram create diagram object namespace if model get facade isa namespace namespace log error no namespace as argument log error namespace throw new illegal argument exception the argument namespace is not a namespace return diagram factory get instance create diagram diagram factory diagram type use case namespace null suppresswarnings argodiagram creatediagram getfacade isanamespace illegalargumentexception diagramfactory getinstance creatediagram diagramfactory diagramtype usecase override public argo diagram create diagram object namespace diagram settings settings if model get facade isa namespace namespace log error no namespace as argument log error namespace throw new illegal argument exception the argument namespace is not a namespace return diagram factory get instance create diagram factory diagram type use case namespace settings argodiagram creatediagram diagramsettings getfacade isanamespace illegalargumentexception diagramfactory getinstance diagramfactory diagramtype usecase see org argouml uml ui action add diagram is valid namespace object public boolean is valid namespace object handle return model get facade isa package handle model get facade isa classifier handle actionadddiagram isvalidnamespace isvalidnamespace getfacade isapackage getfacade isaclassifier the constructor public cr circular assoc class setup head and desc add supported decision uml decision relationships set knowledge types critic kt semantics crcircularassocclass setupheadanddesc addsupporteddecision umldecision setknowledgetypes kt_semantics public boolean predicate2 object dm designer dsgr self all connections for all ar ar participant self if model get facade isa association class dm return no problem collection participants model get facade get connections dm if participants null return no problem iterator iter participants iterator while iter has next object a end iter next if model get facade isa association end a end object type model get facade get type a end if model get facade isa association class type return problem found return no problem allconnections forall getfacade isaassociationclass no_problem getfacade getconnections no_problem hasnext aend getfacade isaassociationend aend getfacade gettype aend getfacade isaassociationclass problem_found no_problem public set object get criticized design materials set object ret new hash set object ret add model get meta types get association class return ret getcriticizeddesignmaterials hashset getmetatypes getassociationclass main constructor deprecated by for 0 27 4 by tfmorris use link fig object object rectangle diagram settings suppress warnings deprecation deprecated public fig object super init figs figobject diagramsettings suppresswarnings figobject initfigs private void init figs set big port new fig rect x0 y0 90 50 debug color debug color cover new fig rect x0 y0 90 50 line color fill color get name fig set line width 0 get name fig set filled false get name fig set underline true dimension name min get name fig get minimum size get name fig set bounds x0 y0 name min width 20 name min height add figs to the fig node in back to front order add fig get big port add fig cover add fig get name fig rectangle r get bounds set bounds r x r y name min width name min height initfigs setbigport figrect debug_color debug_color figrect line_color fill_color getnamefig setlinewidth getnamefig setfilled getnamefig setunderline namemin getnamefig getminimumsize getnamefig setbounds namemin namemin fignode addfig getbigport addfig addfig getnamefig getbounds setbounds namemin namemin constructor that hooks the fig to an existing uml element param gm ignored param node the uml element deprecated by for 0 27 4 by tfmorris use link fig object object rectangle diagram settings suppress warnings deprecation deprecated public fig object suppress warnings unused graph model gm object node this set owner node figobject diagramsettings suppresswarnings figobject suppresswarnings graphmodel setowner construct a new fig object param owner owning uml element param bounds position and size param settings render settings public fig object object owner rectangle bounds diagram settings settings super owner bounds settings init figs figobject figobject diagramsettings initfigs see org argouml uml diagram ui fig node model element get notation provider type override protected int get notation provider type return notation provider factory2 type object fignodemodelelement getnotationprovidertype getnotationprovidertype notationproviderfactory2 type_object override public object clone fig object fig clone fig object super clone iterator it fig clone get figs iterator fig clone set big port fig rect it next fig clone cover fig rect it next fig clone set name fig fig text it next return fig clone figobject figclone figobject figclone getfigs figclone setbigport figrect figclone figrect figclone setnamefig figtext figclone see org tigris gef presentation fig set line color java awt color override public void set line color color col cover set line color col setlinecolor setlinecolor setlinecolor see org tigris gef presentation fig get line color override public color get line color return cover get line color getlinecolor getlinecolor getlinecolor see org tigris gef presentation fig set fill color java awt color override public void set fill color color col cover set fill color col setfillcolor setfillcolor setfillcolor see org tigris gef presentation fig get fill color override public color get fill color return cover get fill color getfillcolor getfillcolor getfillcolor see org tigris gef presentation fig set filled boolean override public void set filled boolean f cover set filled f setfilled setfilled setfilled override public boolean is filled return cover is filled isfilled isfilled see org tigris gef presentation fig set line width int override public void set line width int w cover set line width w setlinewidth setlinewidth setlinewidth see org tigris gef presentation fig get line width override public int get line width return cover get line width getlinewidth getlinewidth getlinewidth see org tigris gef presentation fig make selection override public selection make selection return new selection object this makeselection makeselection selectionobject override public dimension get minimum size dimension name min get name fig get minimum size int w name min width 10 int h name min height 5 w math max 60 w return new dimension w h getminimumsize namemin getnamefig getminimumsize namemin namemin override protected void set standard bounds int x int y int w int h if get name fig null return rectangle old bounds get bounds dimension name min get name fig get minimum size get big port set bounds x y w h cover set bounds x y w h get name fig set bounds x y name min width 10 name min height 4 bigport set bounds x 1 y 1 w 2 h 2 x x y y w w h h fire prop change bounds old bounds get bounds calc bounds x x y y w w h h update edges setstandardbounds getnamefig oldbounds getbounds namemin getnamefig getminimumsize getbigport setbounds setbounds getnamefig setbounds namemin namemin _bigport setbounds _x _y _w _h firepropchange oldbounds getbounds calcbounds _x _y _w _h updateedges override public void set enclosing fig fig encloser assert model get facade isa object get owner object owner get owner if encloser null model get facade isa component instance encloser get owner model get common behavior helper set component instance owner encloser get owner super set enclosing fig encloser else if model get facade get component instance owner null model get common behavior helper set component instance owner null super set enclosing fig null if encloser null model get facade isa component encloser get owner move into component encloser super set enclosing fig encloser else if encloser null model get facade isa node encloser get owner super set enclosing fig encloser else if encloser null super set enclosing fig null setenclosingfig getfacade isaobject getowner getowner getfacade isacomponentinstance getowner getcommonbehaviorhelper setcomponentinstance getowner setenclosingfig getfacade getcomponentinstance getcommonbehaviorhelper setcomponentinstance setenclosingfig getfacade isacomponent getowner moveintocomponent setenclosingfig getfacade isanode getowner setenclosingfig setenclosingfig the constructor public cr unconventional oper name setup head and desc add supported decision uml decision naming set knowledge types critic kt syntax add trigger feature name crunconventionalopername setupheadanddesc addsupporteddecision umldecision setknowledgetypes kt_syntax addtrigger feature_name override public boolean predicate2 object dm designer dsgr if model get facade isa operation dm return no problem object oper dm string my name model get facade get name oper if my name null my name equals return no problem string name str my name if name str null name str length 0 return no problem char inital char name str char at 0 for object stereo model get facade get stereotypes oper if create equals model get facade get name stereo constructor equals model get facade get name stereo return no problem if character is lower case inital char return problem found return no problem getfacade isaoperation no_problem myname getfacade getname myname myname no_problem namestr myname namestr namestr no_problem initalchar namestr charat getfacade getstereotypes getfacade getname getfacade getname no_problem islowercase initalchar problem_found no_problem override public to do item to do item object dm designer dsgr object f dm list set offs compute offenders f return new uml to do item this offs dsgr todoitem todoitem listset computeoffenders umltodoitem param dm the object to be checked return the set of offenders protected list set compute offenders object dm list set offs new list set dm offs add model get facade get owner dm return offs listset computeoffenders listset listset getfacade getowner override public boolean still valid to do item i designer dsgr if is active return false list set offs i get offenders object f offs get 0 if predicate f dsgr return false list set new offs compute offenders f boolean res offs equals new offs return res stillvalid todoitem isactive listset getoffenders listset newoffs computeoffenders newoffs candidate for constructor tests if the operation name is the same as the class name if so an alternative path in the wizard is possible where we are suggested to make the operation a constructor param me the operation to check return true if this operation looks like a constructor protected boolean candidate for constructor object me if model get facade isa operation me return false object oper me string my name model get facade get name oper if my name null my name equals return false object cl model get facade get owner oper string name cl model get facade get name cl if name cl null name cl equals return false if my name equals name cl return true return false candidateforconstructor candidateforconstructor getfacade isaoperation myname getfacade getname myname myname getfacade getowner namecl getfacade getname namecl namecl myname namecl override public void init wizard wizard w if w instanceof wiz oper name to do item item to do item w get to do item object me item get offenders get 0 string sug model get facade get name me sug compute suggestion sug boolean cand candidate for constructor me string ins if cand ins super get localized string ins ext else ins super get instructions wiz oper name w set instructions ins wiz oper name w set suggestion sug wiz oper name w set possible constructor cand initwizard wizopername todoitem todoitem gettodoitem getoffenders getfacade getname computesuggestion candidateforconstructor getlocalizedstring getinstructions wizopername setinstructions wizopername setsuggestion wizopername setpossibleconstructor public string compute suggestion string sug if sug null return return sug substring 0 1 to lower case sug substring 1 computesuggestion tolowercase see org argouml cognitive critics critic get wizard class org argouml cognitive to do item override public class get wizard class to do item item return wiz oper name class getwizardclass todoitem getwizardclass todoitem wizopername public set object get criticized design materials set object ret new hash set object ret add model get meta types get operation return ret getcriticizeddesignmaterials hashset getmetatypes getoperation see org argouml ui explorer rules perspective rule get rule name public string get rule name return translator localize misc state outgoing states perspectiverule getrulename getrulename public collection get children object parent if model get facade isa state vertex parent return model get state machines helper get outgoing states parent return collections empty set getchildren getfacade isastatevertex getstatemachineshelper getoutgoingstates empty_set public set get dependencies object parent if model get facade isa state vertex parent set set new hash set set add parent return set return collections empty set getdependencies getfacade isastatevertex hashset empty_set construct a property panel for a subsystem public prop panel subsystem super label subsystem lookup icon subsystem add field translator localize label available features get feature scroll add action new action new operation proppanelsubsystem lookupicon addfield getfeaturescroll addaction actionnewoperation the constructor public action new operation super action key put value action name translator localize action key actionnewoperation action_key putvalue action_key override public void action performed action event e object target target manager get instance get model target if model get facade isa classifier target project p project manager get manager get current project object return type p get default return type object new oper model get core factory build operation target return type target manager get instance set target new oper super action performed e actionperformed actionevent targetmanager getinstance getmodeltarget getfacade isaclassifier projectmanager getmanager getcurrentproject returntype getdefaultreturntype newoper getcorefactory buildoperation returntype targetmanager getinstance settarget newoper actionperformed returns the feature scroll return j scroll pane public j scroll pane get feature scroll if feature scroll null j list list new uml linked list feature list model feature scroll new j scroll pane list return feature scroll featurescroll jscrollpane jscrollpane getfeaturescroll featurescroll jlist umllinkedlist featurelistmodel featurescroll jscrollpane featurescroll public final class mode create usage extends mode create dependency protected final object get meta type return model get meta types get usage modecreateusage modecreatedependency getmetatype getmetatypes getusage constructor param advanced mode true if we show advanced columns public table model critics boolean advanced mode critics new array list critic agency get critic list set initial sorting on critic headline collections sort critics new comparator critic public int compare critic o1 critic o2 return o1 get headline compare to o2 get headline advanced advanced mode advancedmode tablemodelcritics advancedmode arraylist getcriticlist getheadline compareto getheadline advancedmode set initial sorting on critic headline collections sort critics new comparator critic public int compare critic o1 critic o2 return o1 get headline compare to o2 get headline getheadline compareto getheadline param row the selected row return the critic shown on that row public critic get critic at row int row return critics get row getcriticatrow see javax swing table table model get column count public int get column count return advanced 6 3 tablemodel getcolumncount getcolumncount public string get column name int c if c 0 return translator localize dialog browse column name active if c 1 return translator localize dialog browse column name headline if c 2 return translator localize dialog browse column name snoozed if c 3 return translator localize dialog browse column name priority if c 4 return translator localize dialog browse column name supported decision if c 5 return translator localize dialog browse column name knowledge type throw new illegal argument exception getcolumnname illegalargumentexception public class get column class int c if c 0 return boolean class if c 1 return string class if c 2 return string class if c 3 return integer class if c 4 return string class if c 5 return string class throw new illegal argument exception getcolumnclass illegalargumentexception see javax swing table table model is cell editable int int public boolean is cell editable int row int col return col 0 tablemodel iscelleditable iscelleditable see javax swing table table model get row count public int get row count if critics null return 0 return critics size tablemodel getrowcount getrowcount public object get value at int row int col critic cr critics get row if col 0 return cr is enabled boolean true boolean false if col 1 return cr get headline if col 2 return cr is active no yes if col 3 return cr get priority if col 4 return list to string cr get supported decisions if col 5 return list to string cr get knowledge types throw new illegal argument exception getvalueat isenabled getheadline isactive getpriority listtostring getsupporteddecisions listtostring getknowledgetypes illegalargumentexception private string list to string list l string buffer buf new string buffer iterator i l iterator boolean has next i has next while has next object o i next buf append string value of o has next i has next if has next buf append return buf to string listtostring stringbuffer stringbuffer hasnext hasnext hasnext valueof hasnext hasnext hasnext tostring public void set value at object a value int row index int column index log debug setting table value row index column index if column index 0 return if a value instanceof boolean return boolean enable boolean a value critic cr critics get row index cr set enabled enable boolean value fire table rows updated row index row index todo setvalueat avalue rowindex columnindex rowindex columnindex columnindex avalue avalue rowindex setenabled booleanvalue firetablerowsupdated rowindex rowindex public void vetoable change property change event pce swing utilities invoke later new runnable public void run fire table structure changed vetoablechange propertychangeevent swingutilities invokelater firetablestructurechanged public void vetoable change property change event pce swing utilities invoke later new runnable public void run fire table structure changed vetoablechange propertychangeevent swingutilities invokelater firetablestructurechanged param advanced mode true causes advanced mode void set advanced boolean advanced mode advanced advanced mode fire table structure changed advancedmode setadvanced advancedmode advancedmode firetablestructurechanged the constructor param tag the localization tag for the panel title public style panel string tag super translator localize tag set layout new labelled layout stylepanel setlayout labelledlayout add a separator protected final void add seperator add labelled layout get seperator addseperator labelledlayout getseperator this method must be overridden by implementors if they don t want to refresh the whole style panel every time a property change events is fired the default behavior is to always call link refresh see refresh public void refresh property change event e refresh propertychangeevent public void set target object t if t instanceof fig if model get facade isauml element t argo diagram diagram diagram utils get active diagram if diagram null t diagram presentation for t if t instanceof fig return else return panel target fig t refresh settarget getfacade isaumlelement argodiagram diagramutils getactivediagram presentationfor paneltarget see org argouml ui tab target get target public object get target return panel target tabtarget gettarget gettarget paneltarget see org argouml ui tab target refresh public void refresh tablemodel set target target table set model tablemodel tabtarget _tablemodel settarget _target _table setmodel _tablemodel public boolean should be enabled object target argo diagram diagram diagram utils get active diagram target target instanceof fig target diagram get containing fig target return target instanceof fig shouldbeenabled argodiagram diagramutils getactivediagram getcontainingfig see javax swing event document listener insert update javax swing event document event public void insert update document event e log debug get class get name insert documentlistener insertupdate documentevent insertupdate documentevent getclass getname see javax swing event document listener remove update javax swing event document event public void remove update document event e insert update e documentlistener removeupdate documentevent removeupdate documentevent insertupdate see javax swing event document listener changed update javax swing event document event public void changed update document event e documentlistener changedupdate documentevent changedupdate documentevent see java awt event item listener item state changed java awt event item event public void item state changed item event e itemlistener itemstatechanged itemevent itemstatechanged itemevent see javax swing event list selection listener value changed javax swing event list selection event public void value changed list selection event lse listselectionlistener valuechanged listselectionevent valuechanged listselectionevent see java awt event action listener action performed java awt event action event public void action performed action event ae object src ae get source if src config do config actionlistener actionperformed actionevent actionperformed actionevent getsource _config doconfig target event public void target added target event e set target e get new target targetevent targetadded targetevent settarget getnewtarget target event public void target removed target event e set target e get new target targetevent targetremoved targetevent settarget getnewtarget see org argouml ui targetmanager target listener target set target event public void target set target event e set target e get new target targetlistener targetset targetevent targetset targetevent settarget getnewtarget return returns the target protected fig get panel target return panel target _target getpaneltarget paneltarget the constructor param n the name of this priority param pri the priority number public priority node string n int pri name n priority pri prioritynode return the list of all the priorities public static list priority node get priority list if priorities null priorities new array list priority node priorities add new priority node high to do item high priority priorities add new priority node medium to do item med priority priorities add new priority node low to do item low priority return priorities prioritynode getprioritylist arraylist prioritynode prioritynode todoitem high_priority prioritynode todoitem med_priority prioritynode todoitem low_priority return the name public string get name return name getname return the priority public int get priority return priority getpriority see java lang object to string override public string to string return get name tostring tostring getname this method enables exiting the dialog by pressing the escape key param dialog the j dialog public static void load common key map final j dialog dialog j root pane root pane dialog get root pane root pane get input map j component when in focused window put key stroke get key stroke key event vk escape 0 action key escape add the action to the component root pane get action map put action key escape new abstract action private static final long serial versionuid 0 public void action performed action event evt dialog dispose jdialog loadcommonkeymap jdialog jrootpane rootpane getrootpane rootpane getinputmap jcomponent when_in_focused_window keystroke getkeystroke keyevent vk_escape action_key_escape rootpane getactionmap action_key_escape abstractaction serialversionuid actionperformed actionevent private static final long serial versionuid 0 public void action performed action event evt dialog dispose serialversionuid actionperformed actionevent constructor for uml association end role base list model public uml association end role base list model super base umlassociationendrolebaselistmodel umlassociationendrolebaselistmodel protected void build model list remove all elements if get target null model get facade get base get target null add element model get facade get base get target buildmodellist removeallelements gettarget getfacade getbase gettarget addelement getfacade getbase gettarget protected boolean is valid element object base if model get facade isa association end base return false object assoc end role get target object assoc role model get facade get association assoc end role return model get facade get connections model get facade get base assoc role contains base isvalidelement getfacade isaassociationend assocendrole gettarget assocrole getfacade getassociation assocendrole getfacade getconnections getfacade getbase assocrole the constructor public cr invalid initial setup head and desc add supported decision uml decision state machines add trigger outgoing crinvalidinitial setupheadanddesc addsupporteddecision umldecision state_machines addtrigger public boolean predicate2 object dm designer dsgr if model get facade isa pseudostate dm return no problem object k model get facade get kind dm if model get facade equals pseudostate kind k model get pseudostate kind get initial return no problem collection outgoing model get facade get outgoings dm int n outgoing outgoing null 0 outgoing size if n outgoing 1 return problem found return no problem getfacade isapseudostate no_problem getfacade getkind getfacade equalspseudostatekind getpseudostatekind getinitial no_problem getfacade getoutgoings noutgoing noutgoing problem_found no_problem public set object get criticized design materials set object ret new hash set object ret add model get meta types get pseudostate return ret getcriticizeddesignmaterials hashset getmetatypes getpseudostate private default constructor private stereotype utility super stereotypeutility public static action get apply stereotype actions object model element set available stereotypes get available stereotypes model element if available stereotypes is empty action menu actions new action available stereotypes size iterator it available stereotypes iterator for int i 0 it has next i menu actions i new action add stereotype model element it next return menu actions return new action 0 getapplystereotypeactions modelelement availablestereotypes getavailablestereotypes modelelement availablestereotypes isempty menuactions availablestereotypes availablestereotypes hasnext menuactions actionaddstereotype modelelement menuactions returns a set of all unique applicable stereotypes for a given modelelement param model element the given modelelement return the set with stereotype uml objects public static set object get available stereotypes object model element set list paths new hash set list set object available stereotypes new tree set object new path comparator collection models project manager get manager get current project get models collection top level models project manager get manager get current project get models adds all stereotypes defined at the top level namespaces collection top level stereotypes get top level stereotypes top level models collection valid top level stereotypes new array list add all unique model elements from available stereotypes paths model get extension mechanisms helper get all possible stereotypes models model element for object stereotype top level stereotypes if model get extension mechanisms helper is valid stereotype model element stereotype valid top level stereotypes add stereotype add all unique model elements from available stereotypes paths valid top level stereotypes adds all stereotypes defined at the profiles applied to the current namespace object namespace model get facade get namespace model element if namespace null while true get applicable stereotypes in namespace model element paths available stereotypes namespace object new namespace model get facade get namespace namespace if new namespace null break namespace new namespace adds all stereotypes defined at the profiles applied to the current project add all unique model elements from available stereotypes paths project manager get manager get current project get profile configuration find all stereotypes for model element model element return available stereotypes modelelement getavailablestereotypes modelelement hashset availablestereotypes treeset pathcomparator projectmanager getmanager getcurrentproject getmodels toplevelmodels projectmanager getmanager getcurrentproject getmodels toplevelstereotypes gettoplevelstereotypes toplevelmodels validtoplevelstereotypes arraylist addalluniquemodelelementsfrom availablestereotypes getextensionmechanismshelper getallpossiblestereotypes modelelement toplevelstereotypes getextensionmechanismshelper isvalidstereotype modelelement validtoplevelstereotypes addalluniquemodelelementsfrom availablestereotypes validtoplevelstereotypes getfacade getnamespace modelelement getapplicablestereotypesinnamespace modelelement availablestereotypes newnamespace getfacade getnamespace newnamespace newnamespace addalluniquemodelelementsfrom availablestereotypes projectmanager getmanager getcurrentproject getprofileconfiguration findallstereotypesformodelelement modelelement availablestereotypes private static collection object get top level stereotypes collection object top level models collection object ret new array list object for object model top level models for object stereotype model get extension mechanisms helper get stereotypes model object namespace model get facade get namespace stereotype if model get facade get namespace namespace null ret add stereotype return ret gettoplevelstereotypes toplevelmodels arraylist toplevelmodels getextensionmechanismshelper getstereotypes getfacade getnamespace getfacade getnamespace private static void get applicable stereotypes in namespace object model element set list paths set object available stereotypes object namespace collection all profiles get all profile packages model get facade get model model element collection object all applied profiles new array list object for object profile package all profiles collection all dependencies model get core helper get dependencies profile package namespace for object dependency all dependencies if model get extension mechanisms helper has stereotype dependency applied profile all applied profiles add profile package break add all unique model elements from available stereotypes paths get applicable stereotypes model element all applied profiles getapplicablestereotypesinnamespace modelelement availablestereotypes allprofiles getallprofilepackages getfacade getmodel modelelement allappliedprofiles arraylist profilepackage allprofiles alldependencies getcorehelper getdependencies profilepackage alldependencies getextensionmechanismshelper hasstereotype appliedprofile allappliedprofiles profilepackage addalluniquemodelelementsfrom availablestereotypes getapplicablestereotypes modelelement allappliedprofiles private static collection object get applicable stereotypes object model element collection object all applied profiles collection object ret new array list object for object profile all applied profiles for object stereotype model get extension mechanisms helper get stereotypes profile if model get extension mechanisms helper is valid stereotype model element stereotype ret add stereotype return ret getapplicablestereotypes modelelement allappliedprofiles arraylist allappliedprofiles getextensionmechanismshelper getstereotypes getextensionmechanismshelper isvalidstereotype modelelement private static collection object get all profile packages object model collection col model get model management helper get all model elements of kind model model get meta types get package collection object ret new array list object for object element col if model get facade isa package element model get extension mechanisms helper has stereotype element profile ret add element return ret getallprofilepackages getmodelmanagementhelper getallmodelelementsofkind getmetatypes getpackage arraylist getfacade isapackage getextensionmechanismshelper hasstereotype helper method for build model list p adds those elements from source that do not have the same path as any path in paths to elements and its path to paths thus elements will never contain two objects with the same path unless they are added by other means private static void add all unique model elements from set object elements set list paths collection object source for object obj source list path model get model management helper get path list obj if paths contains path paths add path elements add obj buildmodellist addalluniquemodelelementsfrom getmodelmanagementhelper getpathlist replace the previous set of stereotypes applied to the given modelelement with a new set given in the form of a separated string of stereotype names param element the uml element to modify param stereotype comma separated list of stereotype names empty string or code null code represents no stereotypes param remove current true if all current stereotypes should be removed before adding the new stereotypes false if new stereotypes should be added to existing ones public static void deal with stereotypes object element string builder stereotype boolean remove current if stereotype null deal with stereotypes element string null remove current else deal with stereotypes element stereotype to string remove current removecurrent dealwithstereotypes stringbuilder removecurrent dealwithstereotypes removecurrent dealwithstereotypes tostring removecurrent this function shall replace the previous set of stereotypes of the given modelelement with a new set given in the form of a separated string of stereotype names param umlobject the uml element to adapt param stereotype comma separated list stereotype names empty string or code null code represents no stereotypes param full false if stereotypes are only added true if removal should be done too public static void deal with stereotypes object umlobject string stereotype boolean full string token my tokenizer mst collection string stereotypes new array list string convert the string e g aaa bbb ccc into separate stereotype names e g aaa bbb ccc if stereotype null mst new my tokenizer stereotype while mst has more tokens token mst next token if equals token equals token stereotypes add token if full collect the to be removed stereotypes collection object to be removed new array list object for object stereo model get facade get stereotypes umlobject string stereotypename model get facade get name stereo if stereotypename null stereotypes contains stereotypename to be removed add get stereotype umlobject stereotypename and now remove them for object o to be removed model get core helper remove stereotype umlobject o add stereotypes for string stereotypename stereotypes if model get extension mechanisms helper has stereotype umlobject stereotypename object umlstereo get stereotype umlobject stereotypename if umlstereo null model get core helper add stereotype umlobject umlstereo dealwithstereotypes mytokenizer arraylist mytokenizer hasmoretokens nexttoken toberemoved arraylist getfacade getstereotypes getfacade getname toberemoved getstereotype toberemoved getcorehelper removestereotype getextensionmechanismshelper hasstereotype getstereotype getcorehelper addstereotype finds a stereotype with the given name either in the user model or in one of the profiles models if it s not found a new stereotype will be created in the root model param obj a model element to find a suitable stereotype for param name the name of the stereotype to search for return a stereotype named name or possibly null private static object get stereotype object obj string name object root model get facade get model obj object stereo stereo find stereotype contained obj root name todo the following rather than the above is probably the correct way to search stereo find stereotype obj null name if stereo null return stereo project project project manager get manager get current project stereo project get profile configuration find stereotype for object name obj if stereo null return stereo if root null name length 0 stereo model get extension mechanisms factory build stereotype obj name root return stereo modelelement getstereotype getfacade getmodel findstereotypecontained findstereotype projectmanager getmanager getcurrentproject getprofileconfiguration findstereotypeforobject getextensionmechanismsfactory buildstereotype search for a stereotype with the name given in a namespace and its containing namespaces param obj the model element to be suitable for param namespace the namespace to start search at if null the namespace of the given model element will be used as the starting point param name the name of the stereotype to search for return an stereotype named name or null if none is found private static object find stereotype final object obj final object namespace final string name object ns namespace if ns null ns model get facade get namespace obj if ns null return null collection owned elements model get facade get owned elements ns for object element owned elements if model get facade isa stereotype element name equals model get facade get name element return element if not found try the parent namespace ns model get facade get namespace ns if namespace null return find stereotype obj ns name return null findstereotype getfacade getnamespace ownedelements getfacade getownedelements ownedelements getfacade isastereotype getfacade getname getfacade getnamespace findstereotype search descending recursively for a stereotype with the name given in name note you probably don t want to use this because it s searching the wrong direction param obj the model element to be suitable for param root the model element to search from param name the name of the stereotype to search for return an stereotype named name or null if none is found private static object find stereotype contained object obj object root string name object stereo if root null return null if model get facade isa stereotype root name equals model get facade get name root if model get extension mechanisms helper is valid stereotype obj root return root if model get facade isa namespace root return null collection owned elements model get facade get owned elements root loop through each element in the namespace recursing for object owned element owned elements stereo find stereotype contained obj owned element name if stereo null return stereo return null findstereotypecontained getfacade isastereotype getfacade getname getextensionmechanismshelper isvalidstereotype getfacade isanamespace ownedelements getfacade getownedelements ownedelement ownedelements findstereotypecontained ownedelement constructor for prop paneluml activity diagram public prop paneluml activity diagram super translator localize label activity diagram lookup icon activity diagram proppanelumlactivitydiagram proppanelumlactivitydiagram lookupicon activitydiagram construct a property panel for uml interface elements public prop panel interface super label interface lookup icon interface add field translator localize label name get name text field add field translator localize label namespace get namespace selector add get modifiers panel add get visibility panel add separator add field translator localize label generalizations get generalization scroll add field translator localize label specializations get specialization scroll add separator add field translator localize label association ends get association end scroll add field translator localize label features get feature scroll add action new action navigate namespace add action new action add operation add action get action new reception add action new action new interface add action new action new stereotype add action get delete action proppanelinterface lookupicon addfield getnametextfield addfield getnamespaceselector getmodifierspanel getvisibilitypanel addseparator addfield getgeneralizationscroll addfield getspecializationscroll addseparator addfield getassociationendscroll addfield getfeaturescroll addaction actionnavigatenamespace addaction actionaddoperation addaction getactionnewreception addaction actionnewinterface addaction actionnewstereotype addaction getdeleteaction public class init class diagram implements init subsystem public list abstract argoj panel get details tabs return collections empty list initclassdiagram initsubsystem abstractargojpanel getdetailstabs emptylist public list gui settings tab interface get project settings tabs return collections empty list guisettingstabinterface getprojectsettingstabs emptylist public list gui settings tab interface get settings tabs return collections empty list guisettingstabinterface getsettingstabs emptylist public void init set up the property panels for class diagrams prop panel factory diagram factory new class diagram prop panel factory prop panel factory manager add prop panel factory diagram factory proppanelfactory diagramfactory classdiagramproppanelfactory proppanelfactorymanager addproppanelfactory diagramfactory creates a new instance of dnd argoj tree public dnd explorer tree super this add tree selection listener new dnd tree selection listener drag source drag source get default drag source the drag gesture recognizer fires events in response to drag gestures in a component drag gesture recognizer dgr drag source create default drag gesture recognizer this dnd constants action copy or move specifies valid actions this eliminates right mouse clicks as valid actions dgr set source actions dgr get source actions input event button3 mask first argument component to associate the target with second argument drop target listener new drop target this new argo drop target listener key stroke ctrlc key stroke get key stroke control c this get input map put ctrlc diagram to clipboard action this get action map put diagram to clipboard action new action save diagram to clipboard dndargojtree dndexplorertree addtreeselectionlistener dndtreeselectionlistener dragsource dragsource getdefaultdragsource draggesturerecognizer dragsource createdefaultdraggesturerecognizer dndconstants action_copy_or_move setsourceactions getsourceactions inputevent button3_mask droptargetlistener droptarget argodroptargetlistener keystroke keystroke getkeystroke getinputmap diagram_to_clipboard_action getactionmap diagram_to_clipboard_action actionsavediagramtoclipboard the drag gesture listener is notified of drag gestures by a recognizer the typical response is to initiate a drag by invoking drag source start drag p todo find a way to show a different image when multiple elements are dragged param drag gesture event the drag gesture event describing the gesture that has just occurred see java awt dnd drag gesture listener drag gesture recognized java awt dnd drag gesture event public void drag gesture recognized drag gesture event drag gesture event get the selected targets uml model elements from the target manager collection targets target manager get instance get model targets if targets size 1 return if log is debug enabled log debug drag start transferring targets size targets transferable model elements tf new transferable model elements targets point pt drag origin drag gesture event get drag origin tree path path get path for location pt drag origin x pt drag origin y if path null return rectangle ra path get path bounds path click offset set location pt drag origin x ra path x pt drag origin y ra path y get the cell renderer which is a j label for the path being dragged j label lbl j label get cell renderer get tree cell renderer component this tree path get last path component value false is selected dont want a colored background is expanded path is expanded get model is leaf path get last path component is leaf 0 row not important for rendering false has focus dont want a focus rectangle the layout manager would normally do this lbl set size int ra path get width int ra path get height get a buffered image of the selection for dragging a ghost image ghost image new buffered image int ra path get width int ra path get height buffered image type int argb pre graphics2d g2 ghost image create graphics ask the cell renderer to paint itself into the buffered image make the image ghostlike g2 set composite alpha composite get instance alpha composite src 0 5f lbl paint g2 now paint a gradient under the ghosted j label text but not under the icon if any icon icon lbl get icon int n start of text icon null 0 icon get icon width lbl get icon text gap make the gradient ghostlike g2 set composite alpha composite get instance alpha composite dst over 0 5f g2 set paint new gradient paint n start of text 0 system color control shadow get width 0 new color 255 255 255 0 g2 fill rect n start of text 0 get width ghost image get height g2 dispose remember the path being dragged because if it is being moved we will have to delete it later source path path we pass our drag image just in case it is supported by the platform drag gesture event start drag null ghost image new point 5 5 tf this dragsource startdrag draggestureevent draggestureevent draggesturelistener draggesturerecognized draggestureevent draggesturerecognized draggestureevent draggestureevent modelelements targetmanager targetmanager getinstance getmodeltargets isdebugenabled transferablemodelelements transferablemodelelements ptdragorigin draggestureevent getdragorigin treepath getpathforlocation ptdragorigin ptdragorigin rapath getpathbounds clickoffset setlocation ptdragorigin rapath ptdragorigin rapath jlabel jlabel jlabel getcellrenderer gettreecellrenderercomponent getlastpathcomponent isselected isexpanded isexpanded getmodel isleaf getlastpathcomponent isleaf hasfocus setsize rapath getwidth rapath getheight ghostimage bufferedimage rapath getwidth rapath getheight bufferedimage type_int_argb_pre ghostimage creategraphics bufferedimage setcomposite alphacomposite getinstance alphacomposite jlabel geticon nstartoftext geticonwidth geticontextgap setcomposite alphacomposite getinstance alphacomposite dst_over setpaint gradientpaint nstartoftext systemcolor controlshadow getwidth fillrect nstartoftext getwidth ghostimage getheight sourcepath draggestureevent startdrag ghostimage private boolean is valid drag tree path destination path transferable tf if destination path null log debug no valid drag no destination found return false if selected tree path is descendant destination path log debug no valid drag move to descendent return false if tf is data flavor supported transferable model elements uml collection flavor log debug no valid drag flavor not supported return false object dest default mutable tree node destination path get last path component get user object todo support other types of drag here you set the owner by dragging into a namespace an alternative could be to drag states into composite states if the destination is not a name space then abort if model get facade isa namespace dest log debug no valid drag not a namespace return false we are sure dest is a namespace now if model get model management helper is read only dest log debug no valid drag this is not an editable uml element profile return false if the destination is a data type then abort todo any namespace can contain other elements why don t we allow this tfm mvw these are the wf rs for data type 1 a data type can only contain operations which all must be queries self all features for all f f ocl is kind of operation and f ocl as type operation is query 2 a data type cannot contain any other model elements self all contents is empty imho we should enforce these wf rs here so it is still possible to copy or move query operations hence we should allow this if model get facade isa data type dest log debug no valid drag destination is a data type return false let s check all dragged elements if one of these may be dropped then the drag is valid the others will be ignored when dropping try collection transfers collection tf get transfer data transferable model elements uml collection flavor for object element transfers if model get facade isauml element element if model get model management helper is read only element if model get facade isa model element dest model get facade isa namespace element model get core helper is valid namespace element dest log debug valid drag namespace dest return true if model get facade isa feature element model get facade isa classifier dest return true if element instanceof relocatable relocatable d relocatable element if d is relocation allowed dest log debug valid drag diagram dest return true catch unsupported flavor exception e log debug e catch io exception e log debug e log debug no valid drag not a valid namespace return false isvaliddrag treepath destinationpath destinationpath selectedtreepath isdescendant destinationpath isdataflavorsupported transferablemodelelements uml_collection_flavor defaultmutabletreenode destinationpath getlastpathcomponent getuserobject namespace getfacade isanamespace getmodelmanagementhelper isreadonly datatype wfrs datatype datatype allfeatures forall ocliskindof oclastype isquery datatype modelelements allcontents isempty wfrs getfacade isadatatype datatype gettransferdata transferablemodelelements uml_collection_flavor getfacade isaumlelement getmodelmanagementhelper isreadonly getfacade isamodelelement getfacade isanamespace getcorehelper isvalidnamespace getfacade isafeature getfacade isaclassifier isrelocationallowed unsupportedflavorexception ioexception public void drag drop end drag source drop event drag source drop event source path null ghost image null dragdropend dragsourcedropevent dragsourcedropevent sourcepath ghostimage see java awt dnd drag source listener drag enter java awt dnd drag source drag event public void drag enter drag source drag event drag source drag event empty implementation not used dragsourcelistener dragenter dragsourcedragevent dragenter dragsourcedragevent dragsourcedragevent see java awt dnd drag source listener drag exit java awt dnd drag source event public void drag exit drag source event drag source event empty implementation not used dragsourcelistener dragexit dragsourceevent dragexit dragsourceevent dragsourceevent public void drag over drag source drag event drag source drag event transferable tf drag source drag event get drag source context get transferable this is the mouse location on the screen point drag loc drag source drag event get location this is the j tree location on the screen point tree loc get location on screen now substract to find the location within the j tree drag loc translate tree loc x tree loc y tree path destination path get path for location drag loc x drag loc y if is valid drag destination path tf drag source drag event get drag source context set cursor drag source default move drop else drag source drag event get drag source context set cursor drag source default copy no drop dragover dragsourcedragevent dragsourcedragevent dragsourcedragevent getdragsourcecontext gettransferable dragloc dragsourcedragevent getlocation jtree treeloc getlocationonscreen jtree dragloc treeloc treeloc treepath destinationpath getpathforlocation dragloc dragloc isvaliddrag destinationpath dragsourcedragevent getdragsourcecontext setcursor dragsource defaultmovedrop dragsourcedragevent getdragsourcecontext setcursor dragsource defaultcopynodrop see java awt dnd drag source listener drop action changed java awt dnd drag source drag event public void drop action changed drag source drag event drag source drag event empty implementation not used dragsourcelistener dropactionchanged dragsourcedragevent dropactionchanged dragsourcedragevent dragsourcedragevent class dnd tree selection listener implements tree selection listener public void value changed tree selection event tree selection event selected tree path tree selection event get new lead selection path dndtreeselectionlistener treeselectionlistener valuechanged treeselectionevent treeselectionevent selectedtreepath treeselectionevent getnewleadselectionpath public void autoscroll point pt figure out which row we re on int n row get row for location pt x pt y if we are not on a row then ignore this autoscroll request if n row 0 return rectangle ra outer get bounds now decide if the row is at the top of the screen or at the bottom we do this to make the previous row or the next row visible as appropriate if were at the absolute top or bottom just return the first or last row respectively is row at top of screen n row pt y ra outer y autoscroll margin yes scroll up one row n row 0 0 n row 1 no scroll down one row n row get row count 1 n row 1 n row scroll row to visible n row nrow getrowforlocation nrow raouter getbounds nrow raouter autoscroll_margin nrow nrow nrow getrowcount nrow nrow scrollrowtovisible nrow public insets get autoscroll insets rectangle ra outer get bounds rectangle ra inner get parent get bounds return new insets ra inner y ra outer y autoscroll margin ra inner x ra outer x autoscroll margin ra outer height ra inner height ra inner y ra outer y autoscroll margin ra outer width ra inner width ra inner x ra outer x autoscroll margin getautoscrollinsets raouter getbounds rainner getparent getbounds rainner raouter autoscroll_margin rainner raouter autoscroll_margin raouter rainner rainner raouter autoscroll_margin raouter rainner rainner raouter autoscroll_margin the constructor public argo drop target listener cue line color new color system color control shadow get red system color control shadow get green system color control shadow get blue 64 set up a hover timer so that a node will be automatically expanded or collapsed if the user lingers on it for more than a short time hover timer new timer 1000 new action listener see java awt event action listener action performed java awt event action event public void action performed action event e if get path for row 0 equals is root path last path return if is expanded last path collapse path last path else expand path last path hover timer set repeats false set timer to one shot mode argodroptargetlistener cuelinecolor systemcolor controlshadow getred systemcolor controlshadow getgreen systemcolor controlshadow getblue hovertimer actionlistener actionlistener actionperformed actionevent actionperformed actionevent getpathforrow isrootpath lastpath isexpanded lastpath collapsepath lastpath expandpath lastpath hovertimer setrepeats public void action performed action event e if get path for row 0 equals is root path last path return if is expanded last path collapse path last path else expand path last path actionperformed actionevent getpathforrow isrootpath lastpath isexpanded lastpath collapsepath lastpath expandpath lastpath public void drag enter drop target drag event drop target drag event log debug drag enter if is drag acceptable drop target drag event drop target drag event reject drag else drop target drag event accept drag drop target drag event get drop action dragenter droptargetdragevent droptargetdragevent dragenter isdragacceptable droptargetdragevent droptargetdragevent rejectdrag droptargetdragevent acceptdrag droptargetdragevent getdropaction public void drag exit drop target event drop target event log debug drag exit if drag source is drag image supported repaint ghost rectangle get bounds dragexit droptargetevent droptargetevent dragexit dragsource isdragimagesupported ghostrectangle getbounds called when a drag operation is ongoing while the mouse pointer is still over the operable part of the drop site for the code drop target code registered with this listener see java awt dnd drop target listener drag over java awt dnd drop target drag event public void drag over drop target drag event drop target drag event point pt drop target drag event get location if pt equals last mouse location return many many of these events this slows things down log debug drag over last mouse location pt graphics2d g2 graphics2d get graphics the next condition becomes false when dragging in something from another application if ghost image null if a drag image is not supported by the platform then draw my own drag image if drag source is drag image supported rub out the last ghost image and cue line paint immediately ghost rectangle get bounds and remember where we are about to draw the new ghost image ghost rectangle set rect pt x click offset x pt y click offset y ghost image get width ghost image get height g2 draw image ghost image affine transform get translate instance ghost rectangle getx ghost rectangle gety null else just rub out the last cue line paint immediately cue line get bounds tree path path get path for location pt x pt y if path last path last path path hover timer restart in any case draw over the ghost image if necessary a cue line indicating where a drop will occur rectangle ra path get path bounds path if ra path null cue line set rect 0 ra path y int ra path get height get width 2 g2 set color cue line color g2 fill cue line and include the cue line in the area to be rubbed out next time ghost rectangle ghost rectangle create union cue line testcase drag something from another application into argouml and the explorer shows the drop icon instead of the no drop try if drop target drag event is data flavor supported transferable model elements uml collection flavor drop target drag event reject drag return catch null pointer exception e drop target drag event reject drag return if path null drop target drag event reject drag return to prohibit dropping onto the drag source if path equals source path drop target drag event reject drag return if selected tree path is descendant path drop target drag event reject drag return object dest default mutable tree node path get last path component get user object if the destination is not a name space then reject if model get facade isa namespace dest if log is debug enabled string name if model get facade isauml element dest name model get facade get name dest else if dest null name null else name dest to string log debug no valid drag model get facade isauml element dest name not a namespace not a uml element drop target drag event reject drag return we are sure dest is a namespace now if model get model management helper is read only dest log debug no valid drag not an editable uml element profile return if the destination is a data type then reject if model get facade isa data type dest log debug no valid drag destination is a data type drop target drag event reject drag return drop target drag event accept drag drop target drag event get drop action droptarget droptargetlistener dragover droptargetdragevent dragover droptargetdragevent droptargetdragevent droptargetdragevent getlocation lastmouselocation dragover lastmouselocation getgraphics ghostimage dragsource isdragimagesupported paintimmediately ghostrectangle getbounds ghostrectangle setrect clickoffset clickoffset ghostimage getwidth ghostimage getheight drawimage ghostimage affinetransform gettranslateinstance ghostrectangle ghostrectangle paintimmediately cueline getbounds treepath getpathforlocation lastpath lastpath hovertimer rapath getpathbounds rapath cueline setrect rapath rapath getheight getwidth setcolor cuelinecolor cueline ghostrectangle ghostrectangle createunion cueline nodrop droptargetdragevent isdataflavorsupported transferablemodelelements uml_collection_flavor droptargetdragevent rejectdrag nullpointerexception droptargetdragevent rejectdrag droptargetdragevent rejectdrag sourcepath droptargetdragevent rejectdrag selectedtreepath isdescendant droptargetdragevent rejectdrag defaultmutabletreenode getlastpathcomponent getuserobject namespace getfacade isanamespace isdebugenabled getfacade isaumlelement getfacade getname tostring getfacade isaumlelement droptargetdragevent rejectdrag getmodelmanagementhelper isreadonly datatype getfacade isadatatype datatype droptargetdragevent rejectdrag droptargetdragevent acceptdrag droptargetdragevent getdropaction the drop what is done when the mousebutton is released see java awt dnd drop target listener drop java awt dnd drop target drop event public void drop drop target drop event drop target drop event log debug dropping prevent hover timer from doing an unwanted expand path or collapse path hover timer stop clear the ghost image repaint ghost rectangle get bounds if is drop acceptable drop target drop event drop target drop event reject drop return try transferable tr drop target drop event get transferable get new parent node point loc drop target drop event get location tree path destination path get path for location loc x loc y if log is debug enabled log debug drop location x loc x y loc y if is valid drag destination path tr drop target drop event reject drop return get the model elements that are being transfered collection model elements collection tr get transfer data transferable model elements uml collection flavor if log is debug enabled log debug transfer data model elements object dest default mutable tree node destination path get last path component get user object object src default mutable tree node source path get last path component get user object int action drop target drop event get drop action the user drop actions are ctrl shift action link ctrl action copy shift action move none action move boolean copy action action dnd constants action copy boolean move action action dnd constants action move if move action copy action drop target drop event reject drop return if model get facade isauml element dest if model get model management helper is read only dest drop target drop event reject drop return if model get facade isauml element src if model get model management helper is read only src drop target drop event reject drop return todo really should be element model element but we don t have a type which is portable for this collection object new targets new array list object try drop target drop event accept drop action for object me model elements if model get facade isauml element me if model get model management helper is read only me continue if log is debug enabled log debug move action move copy me if model get core helper is valid namespace me dest if move action model get core helper set namespace me dest new targets add me if copy action try new targets add model get copy helper copy me dest catch runtime exception e todo the copy function is not yet completely implemented so we will have some exceptions here and there log error exception e if me instanceof relocatable relocatable d relocatable me if d is relocation allowed dest if d relocate dest explorer event adaptor get instance model element changed src explorer event adaptor get instance model element changed dest todo make the tree refresh and expand really work in all cases make visible destination path expand path destination path new targets add me if model get facade isa feature me model get facade isa classifier dest if move action model get core helper remove feature model get facade get owner me me model get core helper add feature dest me new targets add me if copy action new targets add model get copy helper copy me dest drop target drop event get drop target context drop complete true target manager get instance set targets new targets catch java lang illegal state exception ils log debug drop illegal state exception drop target drop event reject drop drop target drop event get drop target context drop complete true catch io exception io log debug drop io exception drop target drop event reject drop catch unsupported flavor exception ufe log debug drop unsupported flavor exception drop target drop event reject drop droptargetlistener droptargetdropevent droptargetdropevent droptargetdropevent expandpath collapsepath hovertimer ghostrectangle getbounds isdropacceptable droptargetdropevent droptargetdropevent rejectdrop droptargetdropevent gettransferable droptargetdropevent getlocation treepath destinationpath getpathforlocation isdebugenabled isvaliddrag destinationpath droptargetdropevent rejectdrop modelelements gettransferdata transferablemodelelements uml_collection_flavor isdebugenabled modelelements defaultmutabletreenode destinationpath getlastpathcomponent getuserobject defaultmutabletreenode sourcepath getlastpathcomponent getuserobject droptargetdropevent getdropaction dropactions action_link action_copy action_move action_move copyaction dndconstants action_copy moveaction dndconstants action_move moveaction copyaction droptargetdropevent rejectdrop getfacade isaumlelement getmodelmanagementhelper isreadonly droptargetdropevent rejectdrop getfacade isaumlelement getmodelmanagementhelper isreadonly droptargetdropevent rejectdrop modelelement newtargets arraylist droptargetdropevent acceptdrop modelelements getfacade isaumlelement getmodelmanagementhelper isreadonly isdebugenabled moveaction getcorehelper isvalidnamespace moveaction getcorehelper setnamespace newtargets copyaction newtargets getcopyhelper runtimeexception isrelocationallowed explorereventadaptor getinstance modelelementchanged explorereventadaptor getinstance modelelementchanged makevisible destinationpath expandpath destinationpath newtargets getfacade isafeature getfacade isaclassifier moveaction getcorehelper removefeature getfacade getowner getcorehelper addfeature newtargets copyaction newtargets getcopyhelper droptargetdropevent getdroptargetcontext dropcomplete targetmanager getinstance settargets newtargets illegalstateexception illegalstateexception droptargetdropevent rejectdrop droptargetdropevent getdroptargetcontext dropcomplete ioexception ioexception droptargetdropevent rejectdrop unsupportedflavorexception unsupportedflavorexception droptargetdropevent rejectdrop public void drop action changed drop target drag event drop target drag event if is drag acceptable drop target drag event drop target drag event reject drag else drop target drag event accept drag drop target drag event get drop action dropactionchanged droptargetdragevent droptargetdragevent isdragacceptable droptargetdragevent droptargetdragevent rejectdrag droptargetdragevent acceptdrag droptargetdragevent getdropaction param drop target event the droptargetevent return true if the drag is acceptable public boolean is drag acceptable drop target drag event drop target event only accept copy or move gestures ie link is not supported if drop target event get drop action dnd constants action copy or move 0 return false do this if you want to prohibit dropping onto the drag source point pt drop target event get location tree path path get path for location pt x pt y if path null return false if path equals source path return false return true droptargetevent isdragacceptable droptargetdragevent droptargetevent droptargetevent getdropaction dndconstants action_copy_or_move droptargetevent getlocation treepath getpathforlocation sourcepath param drop target drop event the droptargetdropevent return true if the drop is acceptable public boolean is drop acceptable drop target drop event drop target drop event only accept copy or move gestures ie link is not supported if drop target drop event get drop action dnd constants action copy or move 0 return false do this if you want to prohibit dropping onto the drag source point pt drop target drop event get location tree path path get path for location pt x pt y if path null return false if path equals source path return false return true droptargetdropevent isdropacceptable droptargetdropevent droptargetdropevent droptargetdropevent getdropaction dndconstants action_copy_or_move droptargetdropevent getlocation treepath getpathforlocation sourcepath return returns the main panel protected j panel get main panel return main panel jpanel getmainpanel mainpanel return returns the wiz icon protected static image icon get wizard icon return wiz icon wiz_icon imageicon getwizardicon wiz_icon param b the button to set the mnemonic for param key the mnemonic protected static final void set mnemonic j button b string key string m translator localize key if m null return if m length 1 b set mnemonic m char at 0 setmnemonic jbutton setmnemonic charat the constructor public wiz step set mnemonic back button mnemonic button back set mnemonic next button mnemonic button next set mnemonic finish button mnemonic button finish set mnemonic help button mnemonic button help button panel set layout new grid layout 1 5 button panel add back button button panel add next button button panel add new spacer panel button panel add finish button button panel add new spacer panel button panel add help button back button set margin new insets 0 0 0 0 next button set margin new insets 0 0 0 0 finish button set margin new insets 0 0 0 0 help button set margin new insets 0 0 0 0 j panel south panel new j panel new flow layout flow layout center south panel add button panel set layout new border layout add main panel border layout center add south panel border layout south back button add action listener this next button add action listener this finish button add action listener this help button add action listener this wizstep setmnemonic backbutton setmnemonic nextbutton setmnemonic finishbutton setmnemonic helpbutton buttonpanel setlayout gridlayout buttonpanel backbutton buttonpanel nextbutton buttonpanel spacerpanel buttonpanel finishbutton buttonpanel spacerpanel buttonpanel helpbutton backbutton setmargin nextbutton setmargin finishbutton setmargin helpbutton setmargin jpanel southpanel jpanel flowlayout flowlayout southpanel buttonpanel setlayout borderlayout mainpanel borderlayout southpanel borderlayout backbutton addactionlistener nextbutton addactionlistener finishbutton addactionlistener helpbutton addactionlistener param item the target item public void set target object item target item enable buttons settarget enablebuttons enable disable the buttons public void enable buttons if target null back button set enabled false next button set enabled false finish button set enabled false help button set enabled false else if target instanceof to do item to do item tdi to do item target wizard w get wizard back button set enabled w null w can go back false next button set enabled w null w can go next false finish button set enabled w null w can finish false if tdi get more infourl null equals tdi get more infourl help button set enabled false else help button set enabled true else return enablebuttons backbutton setenabled nextbutton setenabled finishbutton setenabled helpbutton setenabled todoitem todoitem todoitem getwizard backbutton setenabled cangoback nextbutton setenabled cangonext finishbutton setenabled canfinish getmoreinfourl getmoreinfourl helpbutton setenabled helpbutton setenabled set the target anew todo this method is never used what is its intention remove it return the wizard or null public wizard get wizard if target instanceof to do item return to do item target get wizard return null getwizard todoitem todoitem getwizard the back button has been pressed so we do the back action public void do back wizard w get wizard if w null w back update tab to do doback getwizard updatetabtodo the next button has been pressed so we do the next action public void do next wizard w get wizard if w null w next update tab to do donext getwizard updatetabtodo the finish button has been pressed so we do the finish action public void do finsh wizard w get wizard if w null w finish update tab to do dofinsh getwizard updatetabtodo called when the help button is pressed public void do help if target instanceof to do item return to do item item to do item target string url string item get more infourl start browser open url url string dohelp todoitem todoitem todoitem urlstring getmoreinfourl startbrowser openurl urlstring set the target and make visible protected void update tab to do todo tab to do should listen for an event that this fires so that we can decouple from the project browser tfm tab to do ttd tab to do project browser get instance get tab tab to do class j panel ws get wizard get current panel if ws instanceof wiz step wiz step ws set target target ttd show step ws updatetabtodo tabtodo projectbrowser tabtodo tabtodo projectbrowser getinstance gettab tabtodo jpanel getwizard getcurrentpanel wizstep wizstep settarget showstep public void action performed action event ae object src ae get source if src back button do back else if src next button do next else if src finish button do finsh else if src help button do help actionperformed actionevent getsource backbutton doback nextbutton donext finishbutton dofinsh helpbutton dohelp see javax swing event document listener insert update javax swing event document event public void insert update document event e enable buttons documentlistener insertupdate documentevent insertupdate documentevent enablebuttons see javax swing event document listener remove update javax swing event document event public void remove update document event e insert update e documentlistener removeupdate documentevent removeupdate documentevent insertupdate see javax swing event document listener changed update javax swing event document event public void changed update document event e apparently this method is never called documentlistener changedupdate documentevent changedupdate documentevent see org argouml ui targetmanager target listener target added org argouml ui targetmanager target event public void target added target event e set target e get new target targetlistener targetadded targetevent targetadded targetevent settarget getnewtarget public void target removed target event e how to handle empty target lists probably the wizstep should only show an empty pane in that case set target e get new target targetremoved targetevent settarget getnewtarget see org argouml ui targetmanager target listener target set org argouml ui targetmanager target event public void target set target event e set target e get new target targetlistener targetset targetevent targetset targetevent settarget getnewtarget param event type reported by this event param src object that caused the event public argo notation event int event type object src super event type src eventtype argonotationevent eventtype eventtype indicates the start of the 100 digit range for notation events return the first id reserved for events the constructor param d the diagram param p the project public project member diagram argo diagram d project p super util strip junk d get name p set diagram d projectmemberdiagram argodiagram stripjunk getname setdiagram used by argo tee return the diagram public argo diagram get diagram return diagram argodiagram getdiagram see org argouml kernel abstract project member get type public string get type return member type abstractprojectmember gettype gettype member_type see org argouml kernel abstract project member get zip file extension override public string get zip file extension return file ext abstractprojectmember getzipfileextension getzipfileextension file_ext param d the diagram protected void set diagram argo diagram d diagram d setdiagram argodiagram see org argouml kernel project member repair public string repair return diagram repair projectmember constructor param the project uri uri to read the project from public project impl uri the project uri this todo why was this next line in the code so long uri persistence manager get instance fix uri extension the project uri uri the project uri theprojecturi projectimpl theprojecturi persistencemanager getinstance fixuriextension theprojecturi theprojecturi constructor public project impl set profile configuration new profile configuration this project settings new project settings model get model management factory set root model null authorname configuration get string argo key user fullname authoremail configuration get string argo key user email description this should be moved to a ui action version application version get version history file default model type cache new hash map string object log info making empty project with empty model add search path project dir projectimpl setprofileconfiguration profileconfiguration projectsettings projectsettings getmodelmanagementfactory setrootmodel getstring key_user_fullname getstring key_user_email applicationversion getversion historyfile defaultmodeltypecache hashmap addsearchpath project_dir public string get name todo maybe separate name if uri null return untitled file return new file uri get name getname untitled_file getname public uri get uri return uri geturi public uri geturi return uri param the uri the uri for the project public void set uri uri the uri if log is debug enabled log debug setting project uri from uri to the uri uri the uri theuri seturi theuri isdebugenabled theuri theuri public void set file final file file uri the project uri file touri if log is debug enabled log debug setting project file name from uri to the project uri uri the project uri setfile theprojecturi isdebugenabled theprojecturi theprojecturi public list string get search path list return collections unmodifiable list searchpath getsearchpathlist unmodifiablelist public void add search path final string search path element if searchpath contains search path element searchpath add search path element addsearchpath searchpathelement searchpathelement searchpathelement public list project member get members log info getting the members there are members size return members projectmember getmembers param d the diagram private void add diagram member argo diagram d check for duplicate name and rename if necessary int serial get diagram count while is valid diagram name d get name try d set name d get name serial catch property veto exception e serial project member pm new project member diagram d this add diagram d if diagram added successfully add the member too members add pm adddiagrammember argodiagram getdiagramcount isvaliddiagramname getname setname getname propertyvetoexception projectmember projectmemberdiagram adddiagram param pm the member to be added private void add todo member project member todo list pm adding a todo member removes any existing one members add pm log info added todo member there are now members size addtodomember projectmembertodolist public void add member object m if m null throw new illegal argument exception a model member must be suppleid else if m instanceof argo diagram log info adding diagram member add diagram member argo diagram m else if m instanceof project member todo list log info adding todo member add todo member project member todo list m else if model get facade isa model m log info adding model member add model member m else throw new illegal argument exception the member must be a uml model todo member or diagram it is m get class get name log info there are now members size members addmember illegalargumentexception argodiagram adddiagrammember argodiagram projectmembertodolist addtodomember projectmembertodolist getfacade isamodel addmodelmember illegalargumentexception getclass getname param m the model private void add model member final object m boolean member found false object current member members get 0 if current member instanceof project member model object current model project member model current member get model if current model m member found true if member found if models contains m add model m got past the veto add the member project member pm new project member model m this log info adding model member to start of member list members add pm else log info attempted to load 2 models throw new illegal argument exception attempted to load 2 models addmodelmember memberfound currentmember currentmember projectmembermodel currentmodel projectmembermodel currentmember getmodel currentmodel memberfound memberfound addmodel projectmember projectmembermodel illegalargumentexception public void add model final object model if model get facade isa model model throw new illegal argument exception if models contains model set root model addmodel getfacade isamodel illegalargumentexception setroot private void add model internal final object model models add model roots add model set current namespace model set save enabled true if models size 1 roots size 1 log debug multiple roots models addmodelinternal setcurrentnamespace setsaveenabled removes a project member diagram completely from the project param d the argo diagram protected void remove project member diagram argo diagram d if active diagram d log debug deleting active diagram d argo diagram default diagram null if diagrams size 1 we re deleting the last diagram so lets create a new one todo once we go mdi we won t need this log debug deleting last diagram creating new default diag object project root get root if model get uml factory is removed project root default diagram diagram factory get instance create default diagram project root add member default diagram else make the topmost diagram that is not the one being deleted current default diagram diagrams get 0 log debug candidate default diagram is default diagram if default diagram d default diagram diagrams get 1 log debug switching default diagram to default diagram active diagram default diagram target manager get instance set target active diagram log debug new active diagram is default diagram remove diagram d members remove d d remove set save enabled true argodiagram removeprojectmemberdiagram argodiagram activediagram argodiagram defaultdiagram projectroot getroot getumlfactory isremoved projectroot defaultdiagram diagramfactory getinstance createdefaultdiagram projectroot addmember defaultdiagram defaultdiagram defaultdiagram defaultdiagram defaultdiagram defaultdiagram activediagram defaultdiagram targetmanager getinstance settarget activediagram defaultdiagram removediagram setsaveenabled enables the save action if this project is the current project param enable true to enable private void set save enabled boolean enable project manager pm project manager get manager if pm get current project this pm set save enabled enable setsaveenabled projectmanager projectmanager getmanager getcurrentproject setsaveenabled public string get authorname return authorname getauthorname public void set authorname final string s final string old author name authorname abstract command command new abstract command public object execute authorname s return null public void undo authorname old author name undo manager execute command setauthorname oldauthorname abstractcommand abstractcommand oldauthorname undomanager final string old author name authorname abstract command command new abstract command public object execute authorname s return null oldauthorname abstractcommand abstractcommand public void undo authorname old author name oldauthorname public string get authoremail return authoremail getauthoremail public void set authoremail final string s final string old author email authoremail abstract command command new abstract command public object execute authoremail s return null public void undo authoremail old author email undo manager execute command setauthoremail oldauthoremail abstractcommand abstractcommand oldauthoremail undomanager final string old author email authoremail abstract command command new abstract command public object execute authoremail s return null oldauthoremail abstractcommand abstractcommand public void undo authoremail old author email oldauthoremail public string get version return version getversion public void set version string s version s setversion public string get description return description getdescription public void set description final string s final string old description description abstract command command new abstract command public object execute description s return null public void undo description old description undo manager execute command setdescription olddescription abstractcommand abstractcommand olddescription undomanager final string old description description abstract command command new abstract command public object execute description s return null olddescription abstractcommand abstractcommand public void undo description old description olddescription public string get history file return history file gethistoryfile historyfile public void set history file final string s history file s sethistoryfile historyfile public list get user defined model list return models getuserdefinedmodellist public collection get models set result new hash set result add all models for profile profile get profile configuration get profiles try result add all profile get profile packages catch org argouml profile profile exception e log error exception when fetching models from profile profile get display name e return collections unmodifiable collection result getmodels hashset addall getprofileconfiguration getprofiles addall getprofilepackages profileexception getdisplayname unmodifiablecollection suppress warnings deprecation deprecated public object get model if models size 1 return null return models iterator next suppresswarnings getmodel public object find type string s return find type s true findtype findtype public object get default attribute type if profile configuration get default type strategy null return profile configuration get default type strategy get default attribute type return null getdefaultattributetype profileconfiguration getdefaulttypestrategy profileconfiguration getdefaulttypestrategy getdefaultattributetype public object get default parameter type if profile configuration get default type strategy null return profile configuration get default type strategy get default parameter type return null getdefaultparametertype profileconfiguration getdefaulttypestrategy profileconfiguration getdefaulttypestrategy getdefaultparametertype public object get default return type if profile configuration get default type strategy null return profile configuration get default type strategy get default return type return null getdefaultreturntype profileconfiguration getdefaulttypestrategy profileconfiguration getdefaulttypestrategy getdefaultreturntype public object find type string s boolean define new if s null s s trim if s null s length 0 return null object cls null for object model models cls find type in model s model if cls null return cls cls find type in default model s if cls null define new log debug new type defined cls model get core factory build class get current namespace model get core helper set name cls s return cls findtype definenew findtypeinmodel findtypeindefaultmodel definenew getcorefactory buildclass getcurrentnamespace getcorehelper setname public collection fig find figs for member object member collection fig figs new array list fig for argo diagram diagram diagrams fig fig diagram get containing fig member if fig null figs add fig return figs findfigsformember arraylist argodiagram getcontainingfig public collection find all presentations for object obj collection fig figs new array list fig for argo diagram diagram diagrams fig a fig diagram presentation for obj if a fig null figs add a fig return figs findallpresentationsfor arraylist argodiagram afig presentationfor afig afig public object find type in model string type name object namespace if type name null throw new illegal argument exception type name must be non null if model get facade isa namespace namespace throw new illegal argument exception looking for the classifier type name in a non namespace object of namespace a namespace was expected collection all classifiers model get model management helper get all model elements of kind namespace model get meta types get classifier for object classifier all classifiers if type name equals model get facade get name classifier return classifier return null findtypeinmodel typename typename illegalargumentexception typename getfacade isanamespace illegalargumentexception typename allclassifiers getmodelmanagementhelper getallmodelelementsofkind getmetatypes getclassifier allclassifiers typename getfacade getname suppress warnings deprecation deprecated public void set current namespace final object m if m null model get facade isa namespace m throw new illegal argument exception current namespace m suppresswarnings setcurrentnamespace getfacade isanamespace illegalargumentexception currentnamespace suppress warnings deprecation deprecated public object get current namespace return current namespace suppresswarnings getcurrentnamespace currentnamespace public list argo diagram get diagram list return collections unmodifiable list diagrams argodiagram getdiagramlist unmodifiablelist public int get diagram count return diagrams size getdiagramcount public argo diagram get diagram string name for argo diagram ad diagrams if ad get name null ad get name equals name return ad if ad get itemuid null ad get itemuid to string equals name return ad return null argodiagram getdiagram argodiagram getname getname getitemuid getitemuid tostring public void add diagram final argo diagram d send indeterminate new value instead of making copy of vector d set project this diagrams add d d add property change listener name new namepcl set save enabled true adddiagram argodiagram setproject addpropertychangelistener setsaveenabled private class namepcl implements property change listener public void property change property change event evt set save enabled true propertychangelistener propertychange propertychangeevent setsaveenabled removes a diagram from the list with diagrams removes hopefully the event listeners for this diagram does not remove the diagram from the project members this should not be called directly use move to trash if you want to remove a diagram param d the argo diagram protected void remove diagram argo diagram d diagrams remove d remove the dependent modelelements such as the statemachine for a statechartdiagram object o d get dependent element if o null move to trash o movetotrash argodiagram removediagram argodiagram getdependentelement movetotrash public int get presentation count for object me if model get facade isauml element me throw new illegal argument exception int presentations 0 for argo diagram d diagrams presentations d get layer presentation count for me return presentations getpresentationcountfor getfacade isaumlelement illegalargumentexception argodiagram getlayer presentationcountfor public object get initial target if saved diagram name null hence a diagram name was saved in the project that we are loading so we use this name to retrieve any matching diagram return get diagram saved diagram name if diagrams size 0 use the first diagram return diagrams get 0 if models size 0 if there was no diagram at all then use the first uml model return models iterator next return null getinitialtarget saveddiagramname getdiagram saveddiagramname suppress warnings deprecation deprecated public vetoable change support get veto support if veto support null veto support new vetoable change support this return veto support suppresswarnings vetoablechangesupport getvetosupport vetosupport vetosupport vetoablechangesupport vetosupport public void pre save for argo diagram diagram diagrams diagram pre save presave argodiagram presave public void post save for argo diagram diagram diagrams diagram post save set save enabled true postsave argodiagram postsave setsaveenabled public void post load long start time system current time millis for argo diagram diagram diagrams diagram post load long end time system current time millis log debug diagram post load took end time start time msec issue 1725 the root is not set which leads to problems with displaying prop panels object model get model log info setting root model to model set root model set save enabled true we don t need this hash map anymore so free up the memory uuid refs null postload starttime currenttimemillis argodiagram postload endtime currenttimemillis endtime starttime getmodel setroot setsaveenabled hashmap uuidrefs empty the trash can and permanently delete all objects that it contains private void empty trash can trashcan clear emptytrashcan public void move to trash object obj if obj instanceof collection iterator i collection obj iterator while i has next object trash i next if trashcan contains trash trash internal trash else if trashcan contains obj trash internal obj movetotrash hasnext trashinternal trashinternal removes some object from the project param obj the object to be thrown away protected void trash internal object obj todo this should only be checking for the top level package if anything at all if model get facade isa model obj return can not delete the model if obj null trashcan add obj if model get facade isauml element obj model get uml factory delete obj todo presumably this is only relevant if obj is actually a model an added test of model get facade isa model obj would clarify what is going on here if models contains obj models remove obj else if obj instanceof argo diagram remove project member diagram argo diagram obj fire an event some anyone who cares about diagrams being removed can listen for it project manager get manager fire property changed remove obj null else if obj instanceof fig fig obj delete from model if we delete a fig edge or fig node we actually call this method with the owner not the fig itself however this method is called by action delete model elements for primitive figs without owner log info request to delete a fig obj get class get name else if obj instanceof comment edge todo why is this a special case tfm comment edge ce comment edge obj log info removing the link from ce get annotated element to ce get comment ce delete trashinternal getfacade isamodel getfacade isaumlelement getumlfactory getfacade isamodel argodiagram removeprojectmemberdiagram argodiagram projectmanager getmanager firepropertychanged deletefrommodel figedge fignode actiondeletemodelelements getclass getname commentedge commentedge commentedge getannotatedelement getcomment suppress warnings deprecation deprecated public boolean is in trash object obj return trashcan contains obj suppresswarnings isintrash public object find type in default model string name if default model type cache contains key name return default model type cache get name object result profile configuration find type name default model type cache put name result return result findtypeindefaultmodel defaultmodeltypecache containskey defaultmodeltypecache profileconfiguration findtype defaultmodeltypecache suppress warnings deprecation deprecated public final object get root return root suppresswarnings getroot suppress warnings deprecation deprecated public void set root final object the root if the root null throw new illegal argument exception a root model element is required if model get facade isa model the root throw new illegal argument exception the root model element must be a model got the root get class get name object tree root model get model management factory get root model if tree root null models remove tree root root the root todo we don t really want to do the following but i m not sure what depends on it tfm 20070725 model get model management factory set root model the root todo end up with multiple models here add model internal the root roots clear roots add the root suppresswarnings setroot theroot theroot illegalargumentexception getfacade isamodel theroot illegalargumentexception theroot getclass getname treeroot getmodelmanagementfactory getrootmodel treeroot treeroot theroot getmodelmanagementfactory setrootmodel theroot addmodelinternal theroot theroot public final collection get roots return collections unmodifiable collection roots getroots unmodifiablecollection public void set roots final collection elements boolean model found false for object element elements if model get facade isa package element log warn top level element other than package found model get facade get name element if model get facade isa model element add model element if model found set root element model found true roots clear roots add all elements setroots modelfound getfacade isapackage getfacade getname getfacade isamodel addmodel modelfound setroot modelfound addall public boolean is valid diagram name string name boolean rv true for argo diagram diagram diagrams if diagram get name equals name rv false break return rv isvaliddiagramname argodiagram getname public map string object getuuid refs return uuid refs getuuidrefs uuidrefs public void set search path final list string the searchpath searchpath clear searchpath add all the searchpath setsearchpath thesearchpath addall thesearchpath public void setuuid refs map string object uuid refs uuid refs uuid refs setuuidrefs uuidrefs uuidrefs uuidrefs suppress warnings deprecation deprecated public void set veto support vetoable change support the veto support veto support the veto support suppresswarnings setvetosupport vetoablechangesupport thevetosupport vetosupport thevetosupport suppress warnings deprecation deprecated public argo diagram get active diagram return active diagram suppresswarnings argodiagram getactivediagram activediagram suppress warnings deprecation deprecated public void set active diagram final argo diagram the diagram active diagram the diagram suppresswarnings setactivediagram argodiagram thediagram activediagram thediagram public void set saved diagram name string diagram name saved diagram name diagram name setsaveddiagramname diagramname saveddiagramname diagramname public void remove for argo diagram diagram diagrams diagram remove members clear if roots is empty try model get uml factory delete extent roots iterator next catch invalid element exception e log warn extent deleted a second time roots clear models clear diagrams clear searchpath clear if uuid refs null uuid refs clear if default model type cache null default model type cache clear uuid refs null default model type cache null uri null authorname null authoremail null description null version null history file null current namespace null veto support null active diagram null saved diagram name null empty trash can argodiagram isempty getumlfactory deleteextent invalidelementexception uuidrefs uuidrefs defaultmodeltypecache defaultmodeltypecache uuidrefs defaultmodeltypecache historyfile currentnamespace vetosupport activediagram saveddiagramname emptytrashcan public int get persistence version return persistence version getpersistenceversion persistenceversion public void set persistence version int pv persistence version pv setpersistenceversion persistenceversion public string repair string builder report new string builder iterator it members iterator while it has next project member member project member it next report append member repair return report to string stringbuilder stringbuilder hasnext projectmember projectmember tostring public project settings get project settings return project settings projectsettings getprojectsettings projectsettings return project settings public undo manager get undo manager return undo manager projectsettings undomanager getundomanager undomanager public profile configuration get profile configuration return profile configuration profileconfiguration getprofileconfiguration profileconfiguration public void set profile configuration profile configuration pc if this profile configuration pc if this profile configuration null this members remove this profile configuration this profile configuration pc there s just one profile configuration in a project and there s no other way to add another one members add pc profile facade apply configuration pc setprofileconfiguration profileconfiguration profileconfiguration profileconfiguration profileconfiguration profileconfiguration profileconfiguration profilefacade applyconfiguration public boolean is dirty todo placeholder implementation until support for tracking on a per project basis is implemented return dirty return project manager get manager is save action enabled isdirty projectmanager getmanager issaveactionenabled public void set dirty boolean is dirty todo placeholder implementation until support for tracking on a per project basis is implemented dirty is dirty project manager get manager set save enabled is dirty setdirty isdirty isdirty projectmanager getmanager setsaveenabled isdirty the constructor public cr nodes overlap todo name is not expanded for diagram objects setup head and desc add supported decision uml decision class selection add supported decision uml decision expected usage add supported decision uml decision state machines set knowledge types critic kt presentation crnodesoverlap setupheadanddesc addsupporteddecision umldecision class_selection addsupporteddecision umldecision expected_usage addsupporteddecision umldecision state_machines setknowledgetypes kt_presentation override public boolean predicate2 object dm designer dsgr if dm instanceof diagram return no problem diagram d diagram dm fixes bug 669 sequencediagrams always overlap so they shall never report a problem if dm instanceof uml sequence diagram return no problem list set offs compute offenders d if offs null return no problem return problem found no_problem umlsequencediagram no_problem listset computeoffenders no_problem problem_found override public to do item to do item object dm designer dsgr diagram d diagram dm list set offs compute offenders d return new to do item this offs dsgr todoitem todoitem listset computeoffenders todoitem override public boolean still valid to do item i designer dsgr if is active return false list set offs i get offenders diagram d diagram offs get 0 if predicate dm dsgr return false list set new offs compute offenders d boolean res offs equals new offs return res stillvalid todoitem isactive listset getoffenders listset newoffs computeoffenders newoffs param d the diagram return the set of offenders public list set compute offenders diagram d todo algorithm is n 2 in number of nodes list figs d get layer get contents int num figs figs size list set offs null for int i 0 i num figs 1 i object oi figs get i if oi instanceof fig node continue fig node fni fig node oi rectangle boundsi fni get bounds for int j i 1 j num figs j object oj figs get j if oj instanceof fig node continue fig node fnj fig node oj if fnj intersects boundsi if d instanceof uml deployment diagram if fni instanceof fig node model element if fig node model element fni get enclosing fig fnj continue if fnj instanceof fig node model element if fig node model element fnj get enclosing fig fni continue in deployment diagrams the situation is not the same as in other diagrams only classes interfaces and objects can intersect each other while they are not the enclosing fig so you have to prouve only these elements else if fni instanceof fig class fni instanceof fig interface fni instanceof fig object fnj instanceof fig class fnj instanceof fig interface fnj instanceof fig object continue if offs null offs new list set offs add d offs add fni offs add fnj break return offs listset computeoffenders getlayer getcontents numfigs listset numfigs fignode fignode fignode getbounds numfigs fignode fignode fignode umldeploymentdiagram fignodemodelelement fignodemodelelement getenclosingfig fignodemodelelement fignodemodelelement getenclosingfig deploymentdiagrams enclosingfig figclass figinterface figobject figclass figinterface figobject listset see org argouml uml cognitive critics cruml get criticized design materials public set object get criticized design materials set object ret new hash set object return ret getcriticizeddesignmaterials getcriticizeddesignmaterials hashset constructor for uml check box2 param text the text of the check box param a the action we re going to listen to param name the property set name public uml check box2 string text action a string name super text set font look and feel mgr get instance get standard font property set name name add action listener a set action command string a get value action action command key umlcheckbox2 umlcheckbox2 setfont lookandfeelmgr getinstance getstandardfont propertysetname addactionlistener setactioncommand getvalue action_command_key see java beans property change listener property change java beans property change event public void property change property change event evt build model propertychangelistener propertychange propertychangeevent propertychange propertychangeevent buildmodel return the target return the target public object get target return check box target gettarget checkboxtarget sets the target this method will not be used until the target does not come via the container param target the target to set public void set target object target target target instanceof fig fig target get owner target if model get facade isauml element check box target model get pump remove model event listener this check box target property set name if model get facade isauml element target check box target target model get pump add model event listener this check box target property set name build model settarget getowner getfacade isaumlelement checkboxtarget getpump removemodeleventlistener checkboxtarget propertysetname getfacade isaumlelement checkboxtarget getpump addmodeleventlistener checkboxtarget propertysetname buildmodel builds the model that is it sets the checkbox to true or false the name of this method is chosen to be compliant with for example uml model element list model2 umlmodelelementlistmodel2 see target listener target added target event public void target added target event e set target e get new target targetlistener targetadded targetevent targetadded targetevent settarget getnewtarget see target listener target removed target event public void target removed target event e set target e get new target targetlistener targetremoved targetevent targetremoved targetevent settarget getnewtarget see target listener target set target event public void target set target event e set target e get new target targetlistener targetset targetevent targetset targetevent settarget getnewtarget create a new model element which in graph terminology is an edge ie a model element that links two other model elements and makes no sense to exist by itelf param the meta type the type of model element to create param the source the source model element to link param the destination the destination model element to link param relationship descr a textual description that describes how source relates to destination public action create edge model element final object the meta type final object the source final object the destination final string relationship descr super message format format relationship descr new object display text tree get model element display name the source display text tree get model element display name the destination this meta type the meta type this source the source this dest the destination themetatype thesource thedestination relationshipdescr actioncreateedgemodelelement themetatype thesource thedestination relationshipdescr messageformat relationshipdescr displaytexttree getmodelelementdisplayname thesource displaytexttree getmodelelementdisplayname thedestination metatype themetatype thesource thedestination public void action performed action event e object root model project manager get manager get current project get model try model get uml factory build connection meta type source null dest null null root model catch illegal model element connection exception e1 log error exception e1 actionperformed actionevent rootmodel projectmanager getmanager getcurrentproject getmodel getumlfactory buildconnection metatype rootmodel illegalmodelelementconnectionexception constructor for uml message sender list model public uml stimulus sender list model super sender umlmessagesenderlistmodel umlstimulussenderlistmodel see org argouml uml ui uml model element list model2 build model list protected void build model list remove all elements add element model get facade get sender get target umlmodelelementlistmodel2 buildmodellist buildmodellist removeallelements addelement getfacade getsender gettarget see org argouml uml ui uml model element list model2 is valid element object protected boolean is valid element object elem return model get facade get sender get target elem umlmodelelementlistmodel2 isvalidelement isvalidelement getfacade getsender gettarget constructor for uml classifier role available features list model public uml classifier role available features list model super umlclassifierroleavailablefeatureslistmodel umlclassifierroleavailablefeatureslistmodel see org argouml uml ui uml model element list model2 build model list protected void build model list set all elements model get collaborations helper all available features get target umlmodelelementlistmodel2 buildmodellist buildmodellist setallelements getcollaborationshelper allavailablefeatures gettarget public void property change property change event e if e instanceof add association event if e get property name equals base e get source get target object clazz get changed element e add all model get facade get features clazz model get pump add model event listener this clazz feature else if e get property name equals feature model get facade get bases get target contains e get source add element get changed element e else if e instanceof remove association event if e get property name equals base e get source get target object clazz get changed element e model get pump remove model event listener this clazz feature else if e get property name equals feature model get facade get bases get target contains e get source remove element get changed element e else super property change e propertychange propertychangeevent addassociationevent getpropertyname getsource gettarget getchangedelement addall getfacade getfeatures getpump addmodeleventlistener getpropertyname getfacade getbases gettarget getsource addelement getchangedelement removeassociationevent getpropertyname getsource gettarget getchangedelement getpump removemodeleventlistener getpropertyname getfacade getbases gettarget getsource removeelement getchangedelement propertychange public void set target object target if get target null enumeration enumeration elements while enumeration has more elements object base enumeration next element model get pump remove model event listener this base feature model get pump remove model event listener this get target base target target instanceof fig fig target get owner target if model get facade isa model element target todo isn t this an error condition should we not throw an exception or at least log return set list target target if get target null collection bases model get facade get bases get target iterator it bases iterator while it has next object base it next model get pump add model event listener this base feature make sure we know it when a classifier is added as a base model get pump add model event listener this get target base remove all elements set building model true build model list set building model false if get size 0 fire interval added this 0 get size 1 settarget gettarget hasmoreelements nextelement getpump removemodeleventlistener getpump removemodeleventlistener gettarget getowner getfacade isamodelelement setlisttarget gettarget getfacade getbases gettarget hasnext getpump addmodeleventlistener getpump addmodeleventlistener gettarget removeallelements setbuildingmodel buildmodellist setbuildingmodel getsize fireintervaladded getsize see org argouml uml ui uml model element list model2 is valid element object protected boolean is valid element object element return false umlmodelelementlistmodel2 isvalidelement isvalidelement constructor for action new time event protected action new time event super put value name translator localize button new timeevent actionnewtimeevent actionnewtimeevent putvalue java lang object protected object create event object ns return model get state machines factory build time event ns createevent getstatemachinesfactory buildtimeevent return returns the singleton public static action new time event get singleton return singleton actionnewtimeevent getsingleton constructor for action add package import action add package import super actionaddpackageimport actionaddpackageimport protected list get choices list vec new array list todo correctly implement next function in the model subsystem for issue 1942 vec add all model get model management helper get all possible imports get target return vec getchoices arraylist addall getmodelmanagementhelper getallpossibleimports gettarget protected list get selected list vec new array list vec add all model get facade get imported elements get target return vec getselected arraylist addall getfacade getimportedelements gettarget protected string get dialog title return translator localize dialog title add imported elements getdialogtitle override protected void do it collection selected object pack get target model get model management helper set imported elements pack selected doit gettarget getmodelmanagementhelper setimportedelements the constructor param message the uml object public sd message notation uml object message super message sdmessagenotationuml generate a textual description for a message m inherit doc see org argouml notation notation provider to string object notation settings public string to string final object model element notation settings settings if settings instanceof sd notation settings return to string model element sd notation settings settings is show sequence numbers else return to string model element true inheritdoc notationprovider tostring notationsettings tostring modelelement notationsettings sdnotationsettings tostring modelelement sdnotationsettings isshowsequencenumbers tostring modelelement suppress warnings deprecation public string to string final object model element final map args return to string model element notation provider is value hide sequence nrs args suppresswarnings tostring modelelement tostring modelelement notationprovider isvalue hidesequencenrs initializes a progress monitor param parent the component to be set as parent param title the internationalized title of the progress monitor public progress monitor window j frame parent string title pbar new progress monitor parent title null 0 100 pbar set millis to decide to popup 250 pbar set millis to popup 500 parent repaint update progress 5 progressmonitor progressmonitor progressmonitorwindow jframe progressmonitor setmillistodecidetopopup setmillistopopup updateprogress public void progress final progress event event final int progress int event get position if pbar null file load save gets done on a background thread so we ll probably have to queue this to the swing event thread if swing utilities is event dispatch thread swing utilities invoke later new runnable public void run update progress progress else update progress progress progressevent getposition swingutilities iseventdispatchthread swingutilities invokelater updateprogress updateprogress if swing utilities is event dispatch thread swing utilities invoke later new runnable public void run update progress progress swingutilities iseventdispatchthread swingutilities invokelater updateprogress public void update progress final int progress if pbar null pbar set progress progress object args new object string value of progress pbar set note translator localize dialog progress note args updateprogress setprogress valueof setnote see org argouml application api progress monitor is canceled public boolean is canceled return pbar null pbar is canceled progressmonitor iscanceled iscanceled iscanceled public void close queue to event thread to prevent race during close swing utilities invoke later new runnable public void run pbar close pbar null swingutilities invokelater queue to event thread to prevent race during close swing utilities invoke later new runnable public void run pbar close pbar null swingutilities invokelater public void notify message final string title final string introduction final string message final string message string introduction message pbar set note message string swing utilities invoke later new runnable public void run j dialog dialog new exception dialog argo frame get instance title introduction message dialog set visible true notifymessage messagestring setnote messagestring swingutilities invokelater jdialog exceptiondialog argoframe getinstance setvisible swing utilities invoke later new runnable public void run j dialog dialog new exception dialog argo frame get instance title introduction message dialog set visible true swingutilities invokelater jdialog exceptiondialog argoframe getinstance setvisible see org argouml application api progress monitor notify null action public void notify null action ignored progressmonitor notifynullaction notifynullaction see org argouml application api progress monitor set maximum progress int public void set maximum progress int max pbar set maximum max progressmonitor setmaximumprogress setmaximumprogress setmaximum public void update sub task string action todo concatenate tfm overwrite for now pbar set note action updatesubtask setnote public void update main task string name pbar set note name updatemaintask setnote see org argouml ui explorer rules perspective rule get rule name public string get rule name return translator localize misc model elements perspectiverule getrulename getrulename public collection get children object parent if model get facade isa namespace parent return model get facade get owned elements parent return collections empty set getchildren getfacade isanamespace getfacade getownedelements empty_set public set get dependencies object parent if model get facade isa namespace parent set set new hash set set add parent return set return collections empty set getdependencies getfacade isanamespace hashset empty_set param keyword the text to show param bounds position and size param settings rendering settings public fig keyword string keyword rectangle bounds diagram settings settings super bounds settings true initialize keyword text keyword set text keyword figkeyword diagramsettings keywordtext settext private void initialize set editable false set text color text color set text filled false set justification fig text justify center set right margin 3 set left margin 3 super set line width 0 seteditable settextcolor text_color settextfilled setjustification figtext justify_center setrightmargin setleftmargin setlinewidth force the line width to 0 since the fig group that contains the stereotype may want to show a border but we don t override public void set line width int w super set line width 0 figgroup setlinewidth setlinewidth this is needed for updating the guillemet style override protected void set text set text keyword text settext settext keywordtext add guillemets to any text set to this fig inherit doc override public void set text string text assert keyword text equals text super set text notation utility uml format stereotype text get settings get notation settings is use guillemets inheritdoc settext keywordtext settext notationutilityuml formatstereotype getsettings getnotationsettings isuseguillemets public class init diagram appearanceui implements init subsystem public void init do nothing initdiagramappearanceui initsubsystem public list gui settings tab interface get project settings tabs list gui settings tab interface result new array list gui settings tab interface result add new settings tab diagram appearance argo scope project return result guisettingstabinterface getprojectsettingstabs guisettingstabinterface arraylist guisettingstabinterface settingstabdiagramappearance scope_project public list gui settings tab interface get settings tabs list gui settings tab interface result new array list gui settings tab interface result add new settings tab diagram appearance argo scope application return result guisettingstabinterface getsettingstabs guisettingstabinterface arraylist guisettingstabinterface settingstabdiagramappearance scope_application public list abstract argoj panel get details tabs return collections empty list abstractargojpanel getdetailstabs emptylist constructor for uml parameter behavioral feat list model public uml parameter behavioral feat list model super behavioral feature umlparameterbehavioralfeatlistmodel umlparameterbehavioralfeatlistmodel behavioralfeature protected void build model list if get target null remove all elements add element model get facade get behavioral feature get target buildmodellist gettarget removeallelements addelement getfacade getbehavioralfeature gettarget see org argouml uml ui uml model element list model2 is valid element object protected boolean is valid element object o return model get facade get behavioral feature get target o umlmodelelementlistmodel2 isvalidelement isvalidelement getfacade getbehavioralfeature gettarget the constructor param poster the poster param h the headline param p the priority param d the description param m the more info url param offs the offenders public uml to do item poster poster string h int p string d string m list set offs super poster h p d m offs umltodoitem listset the constructor param poster the poster param h the headline param p the priority param d the description param m the more info url public uml to do item poster poster string h int p string d string m super poster h p d m umltodoitem the constructor param c the poster critic param dm the offenders param dsgr the designer public uml to do item critic c object dm designer dsgr super c dm dsgr umltodoitem the constructor param c the poster critic param offs the offenders param dsgr the designer public uml to do item critic c list set offs designer dsgr super c offs dsgr umltodoitem listset the constructor param c the critic that created this todoitem public uml to do item critic c super c umltodoitem action jumps to the diagram containing all or most of the offenders and calls link deselect link select around the call to link project actions jump to diagram showing java util list override public void action deselect this also sets the target as a convenient side effect project actions jump to diagram showing get offenders select projectactions jumptodiagramshowing projectactions jumptodiagramshowing getoffenders override public void deselect project p project manager get manager get current project for object dm get offenders if dm instanceof highlightable highlightable dm set highlight false else if p null iterator iter figs p find figs for member dm iterator while iter figs has next object f iter figs next if f instanceof highlightable highlightable f set highlight false projectmanager getmanager getcurrentproject getoffenders sethighlight iterfigs findfigsformember iterfigs hasnext iterfigs sethighlight override public void select project p project manager get manager get current project for object dm get offenders if dm instanceof highlightable highlightable dm set highlight true else if p null iterator iter figs p find figs for member dm iterator while iter figs has next object f iter figs next if f instanceof highlightable highlightable f set highlight true projectmanager getmanager getcurrentproject getoffenders sethighlight iterfigs findfigsformember iterfigs hasnext iterfigs sethighlight override public list set get offenders final list set offenders super get offenders todo should not be using assert here but i don t want to change to illegal state exception at lead up to a release as i don t know how much testing is done with assert on assert offenders size 0 model get facade isauml element offenders get 0 offenders get 0 instanceof fig offenders get 0 instanceof diagram return offenders listset getoffenders listset getoffenders illegalstateexception getfacade isaumlelement override protected void check argument object dm if model get facade isauml element dm dm instanceof fig dm instanceof diagram throw new illegal argument exception the offender must be a model element a fig or a diagram checkargument getfacade isaumlelement illegalargumentexception return the singleton instance of the generator manager public static generator manager get instance return instance generatormanager getinstance the constructor private generator manager private constructor to enforce singleton generatormanager registers a new generator if a generator with the same language is already registered it s replaced by the new one param lang the language param gen the code generator object to register public void add generator language lang code generator gen if curr language null curr language lang generators put lang gen argo event pump fire event new argo generator event argo event types generator added gen log debug added generator gen for lang codegenerator addgenerator codegenerator currlanguage currlanguage argoeventpump fireevent argogeneratorevent argoeventtypes generator_added removes a generator if no generator with that name is registered nothing is done param lang the language shall not be null return the old generator being removed or null public code generator remove generator language lang code generator old generators remove lang if lang equals curr language iterator it generators key set iterator if it has next curr language language it next else curr language null if old null argo event pump fire event new argo generator event argo event types generator removed old log debug removed generator old for lang return old codegenerator removegenerator codegenerator currlanguage keyset hasnext currlanguage currlanguage argoeventpump fireevent argogeneratorevent argoeventtypes generator_removed removes the generator associated with the specified language param name the language name return the old generator or null if there wasn t any public code generator remove generator string name language lang find language name if lang null return remove generator lang return null codegenerator removegenerator findlanguage removegenerator access method that finds the correct generator based on a name param lang the language return a code generator or code null code if not found public code generator get generator language lang if lang null return null return generators get lang codegenerator codegenerator getgenerator param name the name of the language return a code generator or code null code if not found public code generator get generator string name language lang find language name return get generator lang codegenerator codegenerator getgenerator findlanguage getgenerator return the current language name or code null code if there are no generator registered at all public language get curr language return curr language getcurrlanguage currlanguage return the current generator or code null code if there are no generator registered at all public code generator get curr generator return curr language null null get generator curr language codegenerator getcurrgenerator currlanguage getgenerator currlanguage return a copy of the map of the generators the map keys language objects and values are code generator objects public map language code generator get generators object clone hash map language code generator generators clone return map language code generator clone codegenerator codegenerator getgenerators hashmap codegenerator codegenerator return a copy of the set of the languages public set language get languages return generators key set getlanguages keyset find a language by name from the available ones param name the name of the language return the language with the specified name or null if it doesn t exist public language find language string name for language lang get languages if lang get name equals name return lang return null findlanguage getlanguages getname gets the path of the code base for a model element p if empty or not existing return code null code param me the model element return string representation of source path tag tagged value public static string get code path object me if me null return null object tagged value model get facade get tagged value me import interface source path tag string s if tagged value null return null s model get facade get value of tag tagged value if s null return s trim return null source_path_tag getcodepath taggedvalue getfacade gettaggedvalue importinterface source_path_tag taggedvalue getfacade getvalueoftag taggedvalue this method returns a list of source files to import p processing each file in turn is equivalent to a breadth first search through the directory structure param file file or directory to import param recurse if true descend directory tree recursively param filters array of file suffixes to match for filtering param monitor a progress monitor which will be monitored for cancellation requests progress updates are not provided since the amount of time required to get the files is non deterministic return a list of files to be imported public static list file get list file file boolean recurse suffix filter filters progress monitor monitor if file null return collections empty list list file results new array list file list file to do directories new linked list file set file seen directories new hash set file to do directories add file while to do directories is empty if monitor null monitor is canceled return collections empty list file cur dir to do directories remove 0 if cur dir is directory for some reason this alleged directory is a single file this could be that there is some confusion or just the normal that a single file was selected and is supposed to be imported results add cur dir continue get the contents of the directory file files cur dir list files if files null for file cur file cur dir list files the following test can cause trouble with links because links are accepted as directories even if they link files links could also result in infinite loops for this reason we don t do this traversing recursively if cur file is directory if this file is a directory if recurse seen directories contains cur file to do directories add cur file seen directories add cur file else if matches suffix cur file filters results add cur file return results getlist suffixfilter progressmonitor emptylist arraylist tododirectories linkedlist seendirectories hashset tododirectories tododirectories isempty iscanceled emptylist curdir tododirectories curdir isdirectory curdir curdir listfiles curfile curdir listfiles curfile isdirectory seendirectories curfile tododirectories curfile seendirectories curfile matchessuffix curfile curfile tells if the filename matches one of the given suffixes param file file to be tested param filters array of filters to test against return true if parseable false if not public static boolean matches suffix object file suffix filter filters if file instanceof file return false if filters null for int i 0 i filters length i if filters i accept file file return true return false matchessuffix suffixfilter the constructor param objectflowstate the object flow state represented by this notation public object flow state type notation uml object objectflowstate super objectflowstate objectflowstate objectflowstatetypenotationuml public void parse object model element string text try parse object flow state1 model element text catch parse exception pe string msg statusmsg bar error parsing objectflowstate object args pe get localized message integer value of pe get error offset argo event pump fire event new argo help event argo event types help changed this translator message format msg args modelelement parseobjectflowstate1 modelelement parseexception getlocalizedmessage valueof geterroroffset argoeventpump fireevent argohelpevent argoeventtypes help_changed messageformat do the actual parsing p this method does create a class if a classifier with the given name is not encountered see for explanation issue 4382 param object flow state the given element to be altered param s the new string return the altered object flow state throws parse exception when the given text was rejected protected object parse object flow state1 object object flow state string s throws parse exception object c model get activity graphs helper find classifier by name object flow state s if c null great the class already existed just use it model get core helper set type object flow state c return object flow state let s create a class with the given name otherwise the user will not understand why we refuse his input if s null s length 0 object top state model get facade get container object flow state if top state null object machine model get facade get state machine top state if machine null object ns model get facade get namespace machine if ns null object clazz model get core factory build class s ns model get core helper set type object flow state clazz return object flow state string msg parsing error object flow type classifier not found object args s throw new parse exception translator localize msg args 0 objectflowstate objectflowstate parseexception parseobjectflowstate1 objectflowstate parseexception getactivitygraphshelper findclassifierbyname objectflowstate getcorehelper settype objectflowstate objectflowstate topstate getfacade getcontainer objectflowstate topstate getfacade getstatemachine topstate getfacade getnamespace getcorefactory buildclass getcorehelper settype objectflowstate objectflowstate parseexception see org argouml notation providers notation provider get parsing help public string get parsing help return parsing help fig objectflowstate1 notationprovider getparsinghelp getparsinghelp suppress warnings deprecation deprecated public string to string object model element map args return to string model element suppresswarnings tostring modelelement tostring modelelement private string to string object model element object classifier model get facade get type model element if model get facade isa classifier in state classifier classifier model get facade get type classifier if classifier null return string name model get facade get name classifier if name null name return name tostring modelelement getfacade gettype modelelement getfacade isaclassifierinstate getfacade gettype getfacade getname override public string to string object model element notation settings settings return to string model element tostring modelelement notationsettings tostring modelelement constructor for action new pseudo state protected action new synch state super put value action name translator localize button new synchstate actionnewpseudostate actionnewsynchstate putvalue see java awt event action listener action performed java awt event action event public void action performed action event e super action performed e model get state machines factory build synch state get target actionlistener actionperformed actionevent actionperformed actionevent actionperformed getstatemachinesfactory buildsynchstate gettarget return returns the singleton public static action new synch state get instance return singleton actionnewsynchstate getinstance constructor for uml classifier structural feature list model public uml class attribute list model super feature umlclassifierstructuralfeaturelistmodel umlclassattributelistmodel protected void build model list if get target null set all elements model get facade get attributes get target buildmodellist gettarget setallelements getfacade getattributes gettarget see org argouml uml ui uml model element list model2 is valid element object protected boolean is valid element object element return model get facade get attributes get target contains element umlmodelelementlistmodel2 isvalidelement isvalidelement getfacade getattributes gettarget protected void move down int index1 int index2 index1 1 object clss get target list c model get facade get attributes clss if index1 c size 1 object mem1 c get index1 object mem2 c get index2 list f model get facade get features clss index2 f index of mem2 model get core helper remove feature clss mem1 model get core helper add feature clss index2 mem1 movedown gettarget getfacade getattributes getfacade getfeatures indexof getcorehelper removefeature getcorehelper addfeature see org argouml uml ui uml model element ordered list model2 move to bottom int override protected void move to bottom int index object clss get target list c model get facade get attributes clss if index c size 1 object mem1 c get index model get core helper remove feature clss mem1 model get core helper add feature clss c size 1 mem1 umlmodelelementorderedlistmodel2 movetobottom movetobottom gettarget getfacade getattributes getcorehelper removefeature getcorehelper addfeature see org argouml uml ui uml model element ordered list model2 move to top int override protected void move to top int index object clss get target list c model get facade get attributes clss if index 0 object mem1 c get index model get core helper remove feature clss mem1 model get core helper add feature clss 0 mem1 umlmodelelementorderedlistmodel2 movetotop movetotop gettarget getfacade getattributes getcorehelper removefeature getcorehelper addfeature constructor for popup menu public popup menu super j menu p menu new j menu p menu set text translator localize button new pseudostate p menu add new action new pseudo state model get pseudostate kind get choice label pseudostate choice p menu add new action new pseudo state model get pseudostate kind get initial label pseudostate initial p menu add new action new pseudo state model get pseudostate kind get deep history label pseudostate deephistory p menu add new action new pseudo state model get pseudostate kind get junction label pseudostate junction p menu add new action new pseudo state model get pseudostate kind get shallow history label pseudostate shallowhistory p menu add new action new pseudo state model get pseudostate kind get fork label pseudostate fork p menu add new action new pseudo state model get pseudostate kind get join label pseudostate join j menu new menu new j menu new menu set text translator localize action new new menu add p menu new menu add action new synch state get instance action new synch state get instance set target get target new menu add action new stub state get instance action new stub state get instance set target get target new menu add action new composite state get singleton action new composite state get singleton set target get target new menu add action new simple state get singleton action new simple state get singleton set target get target new menu add action new final state get singleton action new final state get singleton set target get target new menu add action new submachine state get instance action new submachine state get instance set target get target add new menu add separator action remove model element singleton set target get selected value action remove model element singleton set object to remove get selected value add action remove model element singleton popupmenu popupmenu jmenu pmenu jmenu pmenu settext pmenu actionnewpseudostate getpseudostatekind getchoice pmenu actionnewpseudostate getpseudostatekind getinitial pmenu actionnewpseudostate getpseudostatekind getdeephistory pmenu actionnewpseudostate getpseudostatekind getjunction pmenu actionnewpseudostate getpseudostatekind getshallowhistory pmenu actionnewpseudostate getpseudostatekind getfork pmenu actionnewpseudostate getpseudostatekind getjoin jmenu newmenu jmenu newmenu settext newmenu pmenu newmenu actionnewsynchstate getinstance actionnewsynchstate getinstance settarget gettarget newmenu actionnewstubstate getinstance actionnewstubstate getinstance settarget gettarget newmenu actionnewcompositestate getsingleton actionnewcompositestate getsingleton settarget gettarget newmenu actionnewsimplestate getsingleton actionnewsimplestate getsingleton settarget gettarget newmenu actionnewfinalstate getsingleton actionnewfinalstate getsingleton settarget gettarget newmenu actionnewsubmachinestate getinstance actionnewsubmachinestate getinstance settarget gettarget newmenu addseparator actionremovemodelelement settarget getselectedvalue actionremovemodelelement setobjecttoremove getselectedvalue actionremovemodelelement constructor for uml composite state subvertex list param data model the data model public uml composite state subvertex list uml model element list model2 data model super data model umlcompositestatesubvertexlist datamodel umlcompositestatesubvertexlist umlmodelelementlistmodel2 datamodel datamodel see org argouml uml ui uml mutable linked list get popup menu public j popup menu get popup menu return new popup menu umlmutablelinkedlist getpopupmenu jpopupmenu getpopupmenu popupmenu constructor public uml object flow state classifier combo box model super type false umlobjectflowstateclassifiercomboboxmodel see org argouml uml ui uml combo box model2 is valid element object protected boolean is valid element object o return model get facade isa classifier o umlcomboboxmodel2 isvalidelement isvalidelement getfacade isaclassifier get all classifiers that are not classifier in state see org argouml uml ui uml combo box model2 build model list protected void build model list object model project manager get manager get current project get model collection new list new array list model get core helper get all classifiers model get the current type normally we won t need this but who knows if get target null object type model get facade get type get target if type null if new list contains type new list add type set elements new list classifierinstate umlcomboboxmodel2 buildmodellist buildmodellist projectmanager getmanager getcurrentproject getmodel newlist arraylist getcorehelper getallclassifiers gettarget getfacade gettype gettarget newlist newlist setelements newlist returns a classifier that may be a classifier in state inherit doc protected object get selected model element if get target null return model get facade get type get target return null classifierinstate inheritdoc getselectedmodelelement gettarget getfacade gettype gettarget the function in the parent removes items from the list when deselected we do not need that here param evt a property change event object describing the event source and the property that has changed public void model changed uml change event evt building model true build model list building model false set selected item get selected model element propertychangeevent modelchanged umlchangeevent buildingmodel buildmodellist buildingmodel setselecteditem getselectedmodelelement private static list string get commands if label texts and action commands null label texts and action commands new array list string label texts and action commands add new string translator localize label concurrency sequential action set operation concurrency kind sequential command label texts and action commands add new string translator localize label concurrency guarded action set operation concurrency kind guarded command label texts and action commands add new string translator localize label concurrency concurrent action set operation concurrency kind concurrent command return label texts and action commands getcommands labeltextsandactioncommands labeltextsandactioncommands arraylist labeltextsandactioncommands actionsetoperationconcurrencykind sequential_command labeltextsandactioncommands actionsetoperationconcurrencykind guarded_command labeltextsandactioncommands actionsetoperationconcurrencykind concurrent_command labeltextsandactioncommands constructor param title the title of the panel param horizontal determines the orientation public uml operation concurrency radio button panel string title boolean horizontal super title get commands concurrency action set operation concurrency kind get instance horizontal umloperationconcurrencyradiobuttonpanel getcommands actionsetoperationconcurrencykind getinstance public void build model if get target null object target get target object kind model get facade get concurrency target if kind null set selected null else if kind equals model get concurrency kind get sequential set selected action set operation concurrency kind sequential command else if kind equals model get concurrency kind get guarded set selected action set operation concurrency kind guarded command else if kind equals model get concurrency kind get concurrent set selected action set operation concurrency kind concurrent command else set selected action set operation concurrency kind sequential command buildmodel gettarget gettarget getfacade getconcurrency setselected getconcurrencykind getsequential setselected actionsetoperationconcurrencykind sequential_command getconcurrencykind getguarded setselected actionsetoperationconcurrencykind guarded_command getconcurrencykind getconcurrent setselected actionsetoperationconcurrencykind concurrent_command setselected actionsetoperationconcurrencykind sequential_command public object get child object parent int index if parent instanceof to do list return get decision list get index if parent instanceof decision decision dec decision parent list to do item item list designer the designer get to do list get to do item list synchronized item list for to do item item item list if item get poster supports dec if index 0 return item index throw new index out of bounds exception get child shouldn t get here go list to decisions to items getchild todolist getdecisionlist todoitem itemlist thedesigner gettodolist gettodoitemlist itemlist todoitem itemlist getposter indexoutofboundsexception getchild golisttodecisionstoitems private int get child count cond object parent boolean stopafterone if parent instanceof to do list return get decision list size if parent instanceof decision decision dec decision parent int count 0 list to do item item list designer the designer get to do list get to do item list synchronized item list for to do item item item list if item get poster supports dec count if stopafterone count 0 break return count return 0 getchildcountcond todolist getdecisionlist todoitem itemlist thedesigner gettodolist gettodoitemlist itemlist todoitem itemlist getposter see javax swing tree tree model get child count java lang object public int get child count object parent return get child count cond parent false treemodel getchildcount getchildcount getchildcountcond param parent the object to check its offspring return the nr of children private boolean has children object parent return get child count cond parent true 0 haschildren getchildcountcond public int get index of child object parent object child if parent instanceof to do list return get decision list index of child if parent instanceof decision instead of making a new list decrement index return when found and index 0 list to do item candidates new array list to do item decision dec decision parent list to do item item list designer the designer get to do list get to do item list synchronized item list for to do item item item list if item get poster supports dec candidates add item return candidates index of child return 1 getindexofchild todolist getdecisionlist indexof todoitem arraylist todoitem todoitem itemlist thedesigner gettodolist gettodoitemlist itemlist todoitem itemlist getposter indexof public boolean is leaf object node if node instanceof to do list return false if node instanceof decision has children node return false return true isleaf todolist haschildren javax swing tree tree path java lang object public void value for path changed tree path path object new value treepath valueforpathchanged treepath newvalue see javax swing tree tree model add tree model listener javax swing event tree model listener public void add tree model listener tree model listener l treemodel addtreemodellistener treemodellistener addtreemodellistener treemodellistener see javax swing tree tree model remove tree model listener javax swing event tree model listener public void remove tree model listener tree model listener l treemodel removetreemodellistener treemodellistener removetreemodellistener treemodellistener return the decisions public list decision get decision list return designer the designer get decision model get decision list getdecisionlist thedesigner getdecisionmodel getdecisionlist constructor for action new call event protected action new call event super put value name translator localize button new callevent actionnewcallevent actionnewcallevent putvalue see org argouml uml ui behavior state machines action new event create event java lang object protected object create event object ns return model get state machines factory build call event ns state_machines actionnewevent createevent createevent getstatemachinesfactory buildcallevent return returns the singleton public static action new call event get singleton return singleton actionnewcallevent getsingleton the constructor deprecated for 0 27 3 by tfmorris use link fig classifier box with attributes object rectangle diagram settings suppress warnings deprecation deprecated public fig classifier box with attributes super attributes fig compartment new fig attributes compartment default compartment bounds x default compartment bounds y default compartment bounds width default compartment bounds height figclassifierboxwithattributes diagramsettings suppresswarnings figclassifierboxwithattributes attributesfigcompartment figattributescompartment default_compartment_bounds default_compartment_bounds default_compartment_bounds default_compartment_bounds construct a fig with owner bounds and settings param owner the model element that owns this fig param bounds the rectangle defining the bounds param settings the rendering settings public fig classifier box with attributes object owner rectangle bounds diagram settings settings super owner bounds settings attributes fig compartment new fig attributes compartment owner default compartment bounds settings figclassifierboxwithattributes diagramsettings attributesfigcompartment figattributescompartment default_compartment_bounds return the vector of graphics for the uml attributes if any first one is the rectangle for the entire operations box protected fig attributes compartment get attributes fig return attributes fig compartment figattributescompartment getattributesfig attributesfigcompartment public rectangle get attributes bounds return attributes fig compartment get bounds getattributesbounds attributesfigcompartment getbounds public boolean is attributes visible return attributes fig compartment null attributes fig compartment is visible isattributesvisible attributesfigcompartment attributesfigcompartment isvisible override protected argoj menu build add menu argoj menu add menu super build add menu action add attribute new action add attribute add attribute set enabled is single target add menu insert add attribute 0 return add menu argojmenu buildaddmenu argojmenu addmenu buildaddmenu addattribute actionaddattribute addattribute setenabled issingletarget addmenu addattribute addmenu used by pgml tee return the class name and bounds together with compartment visibility override public string class name and bounds return super class name and bounds attributes visible is attributes visible classnameandbounds classnameandbounds attributesvisible isattributesvisible override protected void update listeners object old owner object new owner set object listeners new hash set object collect the set of model elements that we want to listen to if new owner null todo because we get called on each and every change event when the model is in a state of flux we ll often get an invalid element exception before we finish this collection the only saving grace is that we re called so many times that on the last time things should be stable again and we ll get a good set of elements for the final update we need a better mechanism add the listeners to the new owner listeners add new object new owner null and its stereotypes todo aren t stereotypes handled elsewhere for object stereotype model get facade get stereotypes new owner listeners add new object stereotype null and its features for object feat model get facade get features new owner listeners add new object feat null and the stereotypes of its features for object stereotype model get facade get stereotypes feat listeners add new object stereotype null and the parameter of its operations if model get facade isa operation feat for object param model get facade get parameters feat listeners add new object param null update the listeners to match the desired set using the minimal update facility update element listeners listeners updatelisteners oldowner newowner hashset newowner invalidelementexception newowner newowner getfacade getstereotypes newowner getfacade getfeatures newowner getfacade getstereotypes getfacade isaoperation getfacade getparameters updateelementlisteners override public void rendering changed super rendering changed if get owner null todo we shouldn t actually have to do all this work update attributes renderingchanged renderingchanged getowner updateattributes override protected void update layout uml change event event super update layout event if event instanceof attribute change event object source event get source if model get facade isa attribute source todo we just need to get someone to rerender a single line of text which represents the element here but i m not sure how to do that tfm todo bob replies we shouldn t be interested in this event here the fig feature or its notation should be listen for change and the fig feature should be update from that update attributes else if event instanceof association change event get owner equals event get source object o null if event instanceof add association event o event get new value else if event instanceof remove association event o event get old value if model get facade isa attribute o todo bob says we should not be listening here for addition and removal of attributes this should be done in fig attributes compartment update attributes updatelayout umlchangeevent updatelayout attributechangeevent getsource getfacade isaattribute figfeature figfeature updateattributes associationchangeevent getowner getsource addassociationevent getnewvalue removeassociationevent getoldvalue getfacade isaattribute figattributescompartment updateattributes updates the attributes in the fig called from modelchanged if there is a modelevent effecting the attributes and from rendering changed in all cases todo looks like this should be private bob protected void update attributes if is attributes visible return attributes fig compartment populate todo make set bounds calc bounds and update bounds consistent set bounds get bounds renderingchanged updateattributes isattributesvisible attributesfigcompartment setbounds calcbounds updatebounds setbounds getbounds suppress warnings deprecation deprecated override public void set owner object owner attributes fig compartment set owner owner super set owner owner suppresswarnings setowner attributesfigcompartment setowner setowner param is visible true if the attribute compartment is visible see org argouml uml diagram attributes compartment container set attributes visible boolean public void set attributes visible boolean is visible set compartment visible attributes fig compartment is visible isvisible attributescompartmentcontainer setattributesvisible setattributesvisible isvisible setcompartmentvisible attributesfigcompartment isvisible override public dimension get minimum size use a size to build up the minimum size start with the size of the name compartment and build up dimension a size get name fig get minimum size a size height name v padding 2 a size height math max name fig height a size height a size add child dimensions a size get stereotype fig a size add child dimensions a size get attributes fig a size add child dimensions a size get operations fig a size width math max width a size width return a size getminimumsize asize asize getnamefig getminimumsize asize name_v_padding asize name_fig_height asize asize addchilddimensions asize getstereotypefig asize addchilddimensions asize getattributesfig asize addchilddimensions asize getoperationsfig asize asize asize sets the bounds but the size will be at least the one returned by link get minimum size unless checking of size is disabled p if the required height is bigger then the additional height is equally distributed among all figs i e compartments such that the cumulated height of all visible figs equals the demanded height p some of this has magic numbers hardcoded in p param x desired x coordinate of upper left corner param y desired y coordinate of upper left corner param width desired width of the fig class param height desired height of the fig class see org tigris gef presentation fig set bounds impl int int int int override protected void set standard bounds final int x final int y final int width final int height save our old boundaries so it can be used in property message later rectangle old bounds get bounds make sure we don t try to set things smaller than the minimum int w math max width get minimum size width int h math max height get minimum size height set bounds of big box get big port set bounds x y w h if border fig null border fig set bounds x y w h extra space to be distributed among compartments is the difference between the actual size and the min size final int whitespace h get minimum size height int current height 0 if get stereotype fig is visible int stereotype height get stereotype fig get minimum size height get stereotype fig set bounds x y w stereotype height current height stereotype height int name height get name fig get minimum size height get name fig set bounds x y current height w name height current height name height if is attributes visible int attributes height attributes fig compartment get minimum size height if is operations visible attributes height whitespace 2 attributes fig compartment set bounds x y current height w attributes height current height attributes height if is operations visible int operationsy y current height int operations height h y operationsy line width if operations height get operations fig get minimum size height operations height get operations fig get minimum size height get operations fig set bounds x operationsy w operations height now force calculation of the bounds of the figure update the edges and trigger anyone who s listening to see if the bounds property has changed calc bounds update edges log debug bounds change old old bounds new get bounds fire prop change bounds old bounds get bounds getminimumsize figclass figclass setboundsimpl setstandardbounds oldbounds getbounds getminimumsize getminimumsize getbigport setbounds borderfig borderfig setbounds getminimumsize currentheight getstereotypefig isvisible stereotypeheight getstereotypefig getminimumsize getstereotypefig setbounds stereotypeheight currentheight stereotypeheight nameheight getnamefig getminimumsize getnamefig setbounds currentheight nameheight currentheight nameheight isattributesvisible attributesheight attributesfigcompartment getminimumsize isoperationsvisible attributesheight attributesfigcompartment setbounds currentheight attributesheight currentheight attributesheight isoperationsvisible currentheight operationsheight line_width operationsheight getoperationsfig getminimumsize operationsheight getoperationsfig getminimumsize getoperationsfig setbounds operationsheight calcbounds updateedges oldbounds getbounds firepropchange oldbounds getbounds constructor for uml extension point location document public uml extension point location document super location umlextensionpointlocationdocument umlextensionpointlocationdocument see org argouml uml ui uml plain text document set property java lang string protected void set property string text model get use cases helper set location get target text umlplaintextdocument setproperty setproperty getusecaseshelper setlocation gettarget see org argouml uml ui uml plain text document get property protected string get property return model get facade get location get target umlplaintextdocument getproperty getproperty getfacade getlocation gettarget see org argouml ui explorer rules perspective rule get rule name public string get rule name return translator localize misc project model perspectiverule getrulename getrulename public collection get children object parent if parent instanceof project return project parent get user defined model list return collections empty set getchildren getuserdefinedmodellist empty_set see org argouml ui explorer rules perspective rule get dependencies java lang object public set get dependencies object parent todo what return collections empty set perspectiverule getdependencies getdependencies empty_set construct a new property panel for a message public prop panel message super label message lookup icon message add field translator localize label name get name text field add field translator localize label interaction new uml single row selector new uml message interaction list model add field translator localize label sender new uml single row selector new uml message sender list model add field translator localize label receiver new uml single row selector new uml message receiver list model add separator add field translator localize label activator new uml message activator combo box this new uml message activator combo box model add field translator localize label action new uml single row selector new uml message action list model j scroll pane predecessor scroll new j scroll pane new uml mutable linked list new uml message predecessor list model action add message predecessor get instance null add field translator localize label predecessor predecessor scroll add action new action navigate container element add action new action tool new action add action new action new stereotype add action get delete action proppanelmessage lookupicon addfield getnametextfield addfield umlsinglerowselector umlmessageinteractionlistmodel addfield umlsinglerowselector umlmessagesenderlistmodel addfield umlsinglerowselector umlmessagereceiverlistmodel addseparator addfield umlmessageactivatorcombobox umlmessageactivatorcomboboxmodel addfield umlsinglerowselector umlmessageactionlistmodel jscrollpane predecessorscroll jscrollpane umlmutablelinkedlist umlmessagepredecessorlistmodel actionaddmessagepredecessor getinstance addfield predecessorscroll addaction actionnavigatecontainerelement addaction actiontoolnewaction addaction actionnewstereotype addaction getdeleteaction construct an action to add a new uml action to the message public action tool new action super button new action put value action name translator localize button new action icon icon resource loader wrapper lookup icon call action put value action small icon icon actiontoolnewaction putvalue resourceloaderwrapper lookupicon callaction putvalue small_icon override public void action performed action event e object target target manager get instance get model target if model get facade isa message target model get common behavior factory build action target super action performed e actionperformed actionevent targetmanager getinstance getmodeltarget getfacade isamessage getcommonbehaviorfactory buildaction actionperformed the constructor public cr disambig class name setup head and desc add supported decision uml decision naming set knowledge types critic kt syntax add trigger name add trigger element ownership crdisambigclassname setupheadanddesc addsupporteddecision umldecision setknowledgetypes kt_syntax addtrigger addtrigger elementownership public boolean predicate2 object dm designer dsgr todo the wfr doesn t restrict this to classifiers tfm if model get facade isa classifier dm return no problem object classifier dm string design material name model get facade get name classifier if my name string equals name unspec return no problem if design material name null design material name length 0 return no problem collection element imports model get facade get element imports2 classifier if element imports null return no problem todo this is only checking immediate siblings when it needs to be checking all imported elements both here and by our parents and also taking into account visibility for iterator iter element imports iterator iter has next object imp iter next object pack model get facade get package imp string alias model get facade get alias imp if alias null alias length 0 alias design material name collection siblings model get facade get owned elements pack if siblings null return no problem iterator elems siblings iterator while elems has next object eo elems next object me model get facade get model element eo todo the wfr doesn t restrict this to classifiers tfm if model get facade isa classifier me continue if me classifier continue string me name model get facade get name me if me name null me name equals continue if me name equals alias return problem found return no problem getfacade isaclassifier no_problem designmaterialname getfacade getname mynamestring no_problem designmaterialname designmaterialname no_problem elementimports getfacade getelementimports2 elementimports no_problem elementimports hasnext getfacade getpackage getfacade getalias designmaterialname getfacade getownedelements no_problem hasnext getfacade getmodelelement getfacade isaclassifier mename getfacade getname mename mename mename problem_found no_problem see org argouml cognitive poster get clarifier public icon get clarifier return cl class name get the instance getclarifier getclarifier clclassname gettheinstance public void init wizard wizard w if w instanceof wizme name to do item item to do item w get to do item object me item get offenders get 0 string sug model get facade get name me string ins super get instructions wizme name w set instructions ins wizme name w set suggestion sug wizme name w set must edit true initwizard wizmename todoitem todoitem gettodoitem getoffenders getfacade getname getinstructions wizmename setinstructions wizmename setsuggestion wizmename setmustedit see org argouml cognitive critics critic get wizard class org argouml cognitive to do item public class get wizard class to do item item return wizme name class getwizardclass todoitem getwizardclass todoitem wizmename constructor for the critic sets up the resource name which will allow headline and description to be found for the current locale provides a design issue category patterns sets a priority for any to do items low and adds triggers for metaclasses stereotype structural feature and association end public cr singleton violated missing static attr setup head and desc add supported decision uml decision patterns set priority to do item med priority these may not actually make any difference at present the code behind add trigger needs more work add trigger stereotype add trigger structural feature add trigger association end structuralfeature associationend crsingletonviolatedmissingstaticattr setupheadanddesc addsupporteddecision umldecision setpriority todoitem med_priority addtrigger addtrigger addtrigger structuralfeature addtrigger associationend the trigger for the critic p first check we are actually stereotyped singleton or we will accept singleton p then check for a static attribute with the same type as the singleton class that will hold the instance of the singleton class when its created p param dm the link java lang object object to be checked against the critic param dsgr the link org argouml cognitive designer designer creating the model not used this is for future development of argouml return link problem found problem found if the critic is triggered otherwise link no problem no problem public boolean predicate2 object dm designer dsgr only look at classes if model get facade isa class dm return no problem we only look at singletons if model get facade is singleton dm return no problem iterator attrs model get facade get attributes dm iterator while attrs has next object attr attrs next if model get facade is static attr continue if model get facade get type attr dm return no problem found no such attribute return problem found problem_found problem_found no_problem no_problem getfacade isaclass no_problem getfacade issingleton no_problem getfacade getattributes hasnext getfacade isstatic getfacade gettype no_problem problem_found constructor public cr no transitions setup head and desc add supported decision uml decision state machines set knowledge types critic kt completeness add trigger incoming add trigger outgoing crnotransitions setupheadanddesc addsupporteddecision umldecision state_machines setknowledgetypes kt_completeness addtrigger addtrigger public boolean predicate2 object dm designer dsgr if model get facade isa state vertex dm return no problem object sv m state vertex dm if model get facade isa state sv object sm model get facade get state machine sv if sm null model get facade get top sm sv return no problem collection outgoing model get facade get outgoings sv collection incoming model get facade get incomings sv boolean needs outgoing outgoing null outgoing size 0 boolean needs incoming incoming null incoming size 0 if model get facade isa pseudostate sv object k model get facade get kind sv if k equals model get pseudostate kind get choice return no problem if k equals model get pseudostate kind get junction return no problem if k equals model get pseudostate kind get initial needs incoming false if model get facade isa final state sv needs outgoing false if needs incoming needs outgoing return problem found return no problem getfacade isastatevertex no_problem mstatevertex getfacade isastate getfacade getstatemachine getfacade gettop no_problem getfacade getoutgoings getfacade getincomings needsoutgoing needsincoming getfacade isapseudostate getfacade getkind getpseudostatekind getchoice no_problem getpseudostatekind getjunction no_problem getpseudostatekind getinitial needsincoming getfacade isafinalstate needsoutgoing needsincoming needsoutgoing problem_found no_problem public set object get criticized design materials set object ret new hash set object ret add model get meta types get state vertex return ret getcriticizeddesignmaterials hashset getmetatypes getstatevertex private int pattern count protected predicate string match string match patterns int count patterns match patterns pattern count count patterncount predicatestringmatch matchpatterns matchpatterns patterncount public static predicate create string pattern pattern pattern trim if equals pattern equals pattern return predicate true get instance string pats new string max pats int count 0 if pattern starts with pats count string tokenizer st new string tokenizer pattern while st has more elements string token st next token pats count token if pattern ends with pats count if count 0 return predicate true get instance if count 1 return new predicate equals pats 0 return new predicate string match pats count predicatetrue getinstance max_pats startswith stringtokenizer stringtokenizer hasmoreelements nexttoken endswith predicatetrue getinstance predicateequals predicatestringmatch public boolean evaluate object o if o null return false string target o to string if target starts with patterns 0 return false if target ends with patterns pattern count 1 return false for string pattern patterns int index target index of pattern if index 1 return false target target substring index pattern length return true tostring startswith endswith patterncount indexof creates a new instance of section public abstract section m ary new hash map string string abstractsection mary hashmap param id the string to generate param indent the current indentation return the generated string public static string generate string id string indent return write todo check if sections are not used within the file and put them as comments at the end of the file hint use a second map to compare with the used keys param filename the file name param indent the current indentation param output lost sections true if lost sections are to be written public void write string filename string indent boolean output lost sections try file reader f new file reader filename buffered reader fr new buffered reader f todo this is using the default platform character encoding specifying an encoding will produce more predictable results file writer fw new file writer filename out string line line fr read line while line null string section id get sect id line if section id null string content m ary get section id if content null fw write line line separator fw write content read until the end section is found discard generated content string end section id null do line fr read line if line null throw new eof exception reached end of file while looking for the end of section with id section id end section id get sect id line while end section id null if end section id equals section id log error mismatch between section id section id and end section id end section id m ary remove section id fw write line line fr read line if line null fw write line separator if m ary is empty output lost sections fw write lost code following line separator set map entries m ary entry set iterator itr map entries iterator while itr has next map entry entry map entry itr next fw write indent section entry get key begin line separator fw write string entry get value fw write indent section entry get key end line separator fw write fr close fw close catch io exception e log error error e to string outputlostsections outputlostsections filereader filereader bufferedreader bufferedreader filewriter filewriter readline sectionid getsectid sectionid mary sectionid line_separator endsectionid readline eofexception sectionid endsectionid getsectid endsectionid endsectionid sectionid sectionid sectionid endsectionid endsectionid mary sectionid readline line_separator mary isempty outputlostsections line_separator mapentries mary entryset mapentries hasnext getkey line_separator getvalue getkey line_separator ioexception tostring param filename the filename to read from public void read string filename try todo this is using the default platform character encoding specifying an encoding will produce more predictable results file reader f new file reader filename buffered reader fr new buffered reader f string line string builder content new string builder boolean in section false while line null line fr read line if line null if in section string section id get sect id line if section id null in section false m ary put section id content to string content new string builder else content append line line separator else string section id get sect id line if section id null in section true fr close catch io exception e log error error e to string filereader filereader bufferedreader bufferedreader stringbuilder stringbuilder insection readline insection sectionid getsectid sectionid insection mary sectionid tostring stringbuilder line_separator sectionid getsectid sectionid insection ioexception tostring param line the given line return the section identifier public static string get sect id string line final string begin section final string end1 begin final string end2 end int first line index of begin int second line index of end1 if second 0 second line index of end2 string s null if first 0 second 0 first first begin length s line substring first second return s getsectid indexof indexof indexof constructor for uml linked list cell renderer param show icon true if the icon should be shown public uml linked list cell renderer boolean show icon super show icon umllinkedlistcellrenderer showicon umllinkedlistcellrenderer showicon showicon constructor for uml linked list cell renderer param show icon true if the icon should be shown param show path true if the element containment path should be shown public uml linked list cell renderer boolean show icon boolean show path super show icon show path umllinkedlistcellrenderer showicon showpath umllinkedlistcellrenderer showicon showpath showicon showpath public component get list cell renderer component j list list object value int index boolean is selected boolean cell has focus j label label j label super get list cell renderer component list value index is selected cell has focus label set text html u label get text html return label getlistcellrenderercomponent jlist isselected cellhasfocus jlabel jlabel getlistcellrenderercomponent isselected cellhasfocus settext gettext constructor for uml transition trigger list param data model the model public uml transition trigger list uml model element list model2 data model super data model umltransitiontriggerlist datamodel umltransitiontriggerlist umlmodelelementlistmodel2 datamodel datamodel constructor for uml model element namespace combo box model public uml model element namespace combo box model super namespace true model get pump add class model event listener this model get meta types get namespace owned element umlmodelelementnamespacecomboboxmodel umlmodelelementnamespacecomboboxmodel getpump addclassmodeleventlistener getmetatypes getnamespace ownedelement see org argouml uml ui uml combo box model2 is valid element object protected boolean is valid element object o return model get facade isa namespace o model get core helper is valid namespace get target o umlcomboboxmodel2 isvalidelement isvalidelement getfacade isanamespace getcorehelper isvalidnamespace gettarget override protected void build minimal model list object target get target collection c new array list 1 if target null object namespace model get facade get namespace target if namespace null c contains namespace c add namespace set elements c set model invalid buildminimalmodellist gettarget arraylist getfacade getnamespace setelements setmodelinvalid protected void build model list set object elements new tree set object new path comparator object model project manager get manager get current project get root object target get target elements add all model get core helper get all possible namespaces target model these next lines for the case that the current namespace is not a valid one which of course should not happen but it does see the project attached to issue 3772 todo enhance the is valid namespace function so that this never happens if target null object namespace model get facade get namespace target if namespace null elements contains namespace elements add namespace log warn the current namespace is not a valid one our comparator will throw an invalid element exception if the old list contains deleted elements eg after a new project is loaded so remove all the old contents first remove all elements add all elements buildmodellist treeset pathcomparator projectmanager getmanager getcurrentproject getroot gettarget addall getcorehelper getallpossiblenamespaces isvalidnamespace getfacade getnamespace invalidelementexception removeallelements addall protected object get selected model element if get target null return model get facade get namespace get target return null getselectedmodelelement gettarget getfacade getnamespace gettarget override public void model changed uml change event evt rebuild the list from scratch to be sure it s correct object t get target if t null evt get source t evt get new value null build minimal model list in some cases see issue 3780 the list remains the same but the selected item differs without the next step the combo would not be refreshed set selected item get selected model element modelchanged umlchangeevent gettarget getsource getnewvalue buildminimalmodellist setselecteditem getselectedmodelelement override protected boolean is lazy return true islazy constructor for uml collaboration constraining element list model public uml collaboration constraining element list model super constraining element umlcollaborationconstrainingelementlistmodel umlcollaborationconstrainingelementlistmodel constrainingelement see org argouml uml ui uml model element list model2 build model list protected void build model list set all elements model get facade get constraining elements get target umlmodelelementlistmodel2 buildmodellist buildmodellist setallelements getfacade getconstrainingelements gettarget see org argouml uml ui uml model element list model2 is valid element object protected boolean is valid element object elem return model get facade get constraining elements get target contains elem umlmodelelementlistmodel2 isvalidelement isvalidelement getfacade getconstrainingelements gettarget constructor for uml association end aggregation radio button panel param title the title for the panel param horizontal determines the orientation public uml association end aggregation radio button panel string title boolean horizontal super title label texts and action commands aggregation action set association end aggregation get instance horizontal umlassociationendaggregationradiobuttonpanel umlassociationendaggregationradiobuttonpanel labeltextsandactioncommands actionsetassociationendaggregation getinstance public void build model if get target null object target get target object kind model get facade get aggregation target if kind null set selected null else if kind equals model get aggregation kind get none set selected action set association end aggregation none command else if kind equals model get aggregation kind get aggregate set selected action set association end aggregation aggregate command else if kind equals model get aggregation kind get composite set selected action set association end aggregation composite command else set selected action set association end aggregation none command buildmodel gettarget gettarget getfacade getaggregation setselected getaggregationkind getnone setselected actionsetassociationendaggregation none_command getaggregationkind getaggregate setselected actionsetassociationendaggregation aggregate_command getaggregationkind getcomposite setselected actionsetassociationendaggregation composite_command setselected actionsetassociationendaggregation none_command constructor for uml state entry list model public uml state entry list model super entry umlstateentrylistmodel umlstateentrylistmodel see org argouml uml ui uml model element list model2 build model list protected void build model list remove all elements add element model get facade get entry get target umlmodelelementlistmodel2 buildmodellist buildmodellist removeallelements addelement getfacade getentry gettarget see org argouml uml ui uml model element list model2 is valid element object protected boolean is valid element object element return element model get facade get entry get target umlmodelelementlistmodel2 isvalidelement isvalidelement getfacade getentry gettarget the constructor public cr multiple shallow history states setup head and desc add supported decision uml decision state machines add trigger parent add trigger kind crmultipleshallowhistorystates setupheadanddesc addsupporteddecision umldecision state_machines addtrigger addtrigger override public boolean predicate2 object dm designer dsgr if model get facade isa pseudostate dm return no problem object k model get facade get kind dm if model get facade equals pseudostate kind k model get pseudostate kind get shallow history return no problem container state composite state object cs model get facade get container dm if cs null log debug null parent state return no problem int initial state count 0 collection peers model get facade get subvertices cs for object sv peers if model get facade isa pseudostate sv model get facade equals pseudostate kind model get facade get kind sv model get pseudostate kind get shallow history initial state count if initial state count 1 return problem found return no problem getfacade isapseudostate no_problem getfacade getkind getfacade equalspseudostatekind getpseudostatekind getshallowhistory no_problem getfacade getcontainer no_problem initialstatecount getfacade getsubvertices getfacade isapseudostate getfacade equalspseudostatekind getfacade getkind getpseudostatekind getshallowhistory initialstatecount initialstatecount problem_found no_problem override public to do item to do item object dm designer dsgr list set offs compute offenders dm return new uml to do item this offs dsgr todoitem todoitem listset computeoffenders umltodoitem param ps the design material return the offenders protected list set compute offenders object ps list set offs new list set ps object cs model get facade get container ps if cs null log debug null parent in still valid return offs collection peers model get facade get subvertices cs for object sv peers if model get facade isa pseudostate sv model get facade equals pseudostate kind model get facade get kind sv model get pseudostate kind get shallow history offs add sv return offs listset computeoffenders listset listset getfacade getcontainer getfacade getsubvertices getfacade isapseudostate getfacade equalspseudostatekind getfacade getkind getpseudostatekind getshallowhistory override public boolean still valid to do item i designer dsgr if is active return false list set offs i get offenders object dm offs get 0 list set new offs compute offenders dm boolean res offs equals new offs return res stillvalid todoitem isactive listset getoffenders listset newoffs computeoffenders newoffs public set object get criticized design materials set object ret new hash set object ret add model get meta types get pseudostate return ret getcriticizeddesignmaterials hashset getmetatypes getpseudostate constructor param activity graph the uml element that contains the partition public action create partition object activity graph super model get meta types get partition button new partition machine activity graph activitygraph actioncreatepartition activitygraph getmetatypes getpartition activitygraph override protected mode create mode string instructions return new mode place partition this instructions machine createmode modeplacepartition the constructor public cr node inside element setup head and desc add supported decision uml decision patterns crnodeinsideelement setupheadanddesc addsupporteddecision umldecision override public boolean predicate2 object dm designer dsgr if dm instanceof uml deployment diagram return no problem uml deployment diagram dd uml deployment diagram dm list set offs compute offenders dd if offs null return no problem return problem found umldeploymentdiagram no_problem umldeploymentdiagram umldeploymentdiagram listset computeoffenders no_problem problem_found override public to do item to do item object dm designer dsgr uml deployment diagram dd uml deployment diagram dm list set offs compute offenders dd return new uml to do item this offs dsgr todoitem todoitem umldeploymentdiagram umldeploymentdiagram listset computeoffenders umltodoitem override public boolean still valid to do item i designer dsgr if is active return false list set offs i get offenders uml deployment diagram dd uml deployment diagram offs get 0 if predicate dm dsgr return false list set new offs compute offenders dd boolean res offs equals new offs return res stillvalid todoitem isactive listset getoffenders umldeploymentdiagram umldeploymentdiagram listset newoffs computeoffenders newoffs if there are nodes that have an enclosing fig the returned list set is not null then in the list set are the uml deployment diagram and all figm nodes with an enclosing fig param dd the diagram to check return the set of offenders public list set compute offenders uml deployment diagram dd collection figs dd get layer get contents list set offs null for object obj figs if obj instanceof figm node continue figm node fn figm node obj if fn get enclosing fig null if offs null offs new list set offs add dd offs add fn return offs listset listset umldeploymentdiagram figmnodes listset computeoffenders umldeploymentdiagram getlayer getcontents listset figmnode figmnode figmnode getenclosingfig listset see org argouml ui explorer rules perspective rule get rule name public string get rule name return translator localize misc classifier statemachine perspectiverule getrulename getrulename public collection get children object parent if model get facade isa classifier parent return model get facade get behaviors parent return collections empty set getchildren getfacade isaclassifier getfacade getbehaviors empty_set public set get dependencies object parent if model get facade isa classifier parent set set new hash set set add parent return set return collections empty set getdependencies getfacade isaclassifier hashset empty_set construct a new fig object flow state param owner owning uml element param bounds position and size param settings rendering settings public fig object flow state object owner rectangle bounds diagram settings settings super owner bounds settings state new fig single line text owner new rectangle x0 y0 width state height settings true init figs figobjectflowstate figobjectflowstate diagramsettings figsinglelinetext state_height initfigs main constructor fig object flow state called from file loading deprecated for 0 27 4 by tfmorris use link fig object flow state object rectangle diagram settings suppress warnings deprecation deprecated public fig object flow state state new fig single line text x0 y0 width state height true init figs argo event pump add listener argo event any notation event this figobjectflowstate figobjectflowstate diagramsettings suppresswarnings figobjectflowstate figsinglelinetext state_height initfigs argoeventpump addlistener argoevent any_notation_event private void init figs set big port new fig rect x0 y0 width height debug color debug color cover new fig rect x0 y0 width height line color fill color get name fig set underline true get name fig set line width 0 add figs to the fig node in back to front order add fig get big port add fig cover add fig get name fig add fig state enable size checking false set ready to edit false rectangle r get bounds set bounds r x r y r width r height initfigs setbigport figrect debug_color debug_color figrect line_color fill_color getnamefig setunderline getnamefig setlinewidth fignode addfig getbigport addfig addfig getnamefig addfig enablesizechecking setreadytoedit getbounds setbounds constructor fig object flow state that hooks the fig into an existing uml model element param gm ignored param node owner i e the uml element deprecated for 0 27 4 by tfmorris use link fig object flow state object rectangle diagram settings suppress warnings deprecation deprecated public fig object flow state graph model gm object node this set owner node enable size checking true figobjectflowstate figobjectflowstate diagramsettings suppresswarnings figobjectflowstate graphmodel setowner enablesizechecking override protected void init notation providers object own super init notation providers own if model get facade isa model element own notation name notation name notation find notation get notation settings get notation language notation provider type notation provider factory2 get instance get notation provider notation provider factory2 type objectflowstate type own notation name notation provider state notation provider factory2 get instance get notation provider notation provider factory2 type objectflowstate state own notation name initnotationproviders initnotationproviders getfacade isamodelelement notationname notationname findnotation getnotationsettings getnotationlanguage notationprovidertype notationproviderfactory2 getinstance getnotationprovider notationproviderfactory2 type_objectflowstate_type notationname notationproviderstate notationproviderfactory2 getinstance getnotationprovider notationproviderfactory2 type_objectflowstate_state notationname override protected void model changed property change event mee super model changed mee rendering changed update listeners get owner get owner modelchanged propertychangeevent modelchanged renderingchanged updatelisteners getowner getowner override protected void update listeners object old owner object new owner set object l new hash set object if new owner null don t listen to all property names we only need to listen to its type and remove l add new object new owner new string type remove register for events from the type object type model get facade get type new owner if model get facade isa classifier type if model get facade isa classifier in state type object classifier model get facade get type type l add new object classifier name l add new object type in state collection states model get facade get in states type iterator i states iterator while i has next l add new object i next name else l add new object type name update element listeners l updatelisteners oldowner newowner hashset newowner newowner getfacade gettype newowner getfacade isaclassifier getfacade isaclassifierinstate getfacade gettype instate getfacade getinstates hasnext updateelementlisteners override public object clone fig object flow state fig clone fig object flow state super clone iterator it fig clone get figs iterator fig clone set big port fig rect it next fig clone cover fig rect it next fig clone set name fig fig text it next fig clone state fig text it next return fig clone figobjectflowstate figclone figobjectflowstate figclone getfigs figclone setbigport figrect figclone figrect figclone setnamefig figtext figclone figtext figclone override public void set enclosing fig fig encloser layer perspective layer layer perspective get layer if the layer is null then most likely we are being deleted if layer null return super set enclosing fig encloser setenclosingfig layerperspective layerperspective getlayer setenclosingfig override public dimension get minimum size dimension temp dim get name fig get minimum size int w temp dim width padding 2 int h temp dim height padding temp dim state get minimum size w math max w temp dim width padding 2 h h padding temp dim height padding return new dimension math max w width 2 math max h height 2 getminimumsize tempdim getnamefig getminimumsize tempdim tempdim tempdim getminimumsize tempdim tempdim override protected void set standard bounds int x int y int w int h if get name fig null return rectangle old bounds get bounds dimension class dim get name fig get minimum size dimension state dim state get minimum size the height of the blank space above and below the text figs int blank h padding class dim height state dim height 2 get name fig set bounds x padding y blank w padding 2 class dim height state set bounds x padding y blank class dim height padding w padding 2 state dim height get big port set bounds x y w h cover set bounds x y w h calc bounds update edges fire prop change bounds old bounds get bounds setstandardbounds getnamefig oldbounds getbounds classdim getnamefig getminimumsize statedim getminimumsize classdim statedim getnamefig setbounds classdim setbounds classdim statedim getbigport setbounds setbounds calcbounds updateedges firepropchange oldbounds getbounds override public void rendering changed super rendering changed update classifier text update state text update bounds damage renderingchanged renderingchanged updateclassifiertext updatestatetext updatebounds updates the text of the classifier fig text private void update classifier text if is ready to edit if notation provider type null get name fig set text notation provider type to string get owner get notation settings figtext updateclassifiertext isreadytoedit notationprovidertype getnamefig settext notationprovidertype tostring getowner getnotationsettings updates the text of the state fig text private void update state text if is ready to edit state set text notation provider state to string get owner get notation settings figtext updatestatetext isreadytoedit settext notationproviderstate tostring getowner getnotationsettings see org tigris gef presentation fig set line color java awt color override public void set line color color col cover set line color col setlinecolor setlinecolor setlinecolor see org tigris gef presentation fig get line color override public color get line color return cover get line color getlinecolor getlinecolor getlinecolor see org tigris gef presentation fig set fill color java awt color override public void set fill color color col cover set fill color col setfillcolor setfillcolor setfillcolor see org tigris gef presentation fig get fill color override public color get fill color return cover get fill color getfillcolor getfillcolor getfillcolor see org tigris gef presentation fig set filled boolean override public void set filled boolean f cover set filled f setfilled setfilled setfilled override public boolean is filled return cover is filled isfilled isfilled see org tigris gef presentation fig set line width int override public void set line width int w cover set line width w setlinewidth setlinewidth setlinewidth see org tigris gef presentation fig get line width override public int get line width return cover get line width getlinewidth getlinewidth getlinewidth override public void key typed key event ke if is ready to edit if model get facade isa model element get owner update classifier text update state text set ready to edit true else log debug not ready to edit name return if ke is consumed get owner null return get name fig key typed ke keytyped keyevent isreadytoedit getfacade isamodelelement getowner updateclassifiertext updatestatetext setreadytoedit isconsumed getowner getnamefig keytyped override protected void text edited fig text ft throws property veto exception if ft get name fig notation provider type parse get owner ft get text ft set text notation provider type to string get owner notation settings get default settings else if ft state notation provider state parse get owner ft get text ft set text notation provider state to string get owner notation settings get default settings textedited figtext propertyvetoexception getnamefig notationprovidertype getowner gettext settext notationprovidertype tostring getowner notationsettings getdefaultsettings notationproviderstate getowner gettext settext notationproviderstate tostring getowner notationsettings getdefaultsettings override protected void text edit started fig text ft if ft get name fig show help notation provider type get parsing help if ft state show help notation provider state get parsing help texteditstarted figtext getnamefig showhelp notationprovidertype getparsinghelp showhelp notationproviderstate getparsinghelp see org tigris gef presentation fig make selection override public selection make selection return new selection action state this makeselection makeselection selectionactionstate private object annotated element public comment edge uuid uuid manager get instance get newuuid annotatedelement commentedge uuidmanager getinstance getnewuuid constructor param the source the source param the dest the destination public comment edge object the source object the dest if model get facade isa model element the source throw new illegal argument exception the source of the comment edge must be a model element if model get facade isa model element the dest throw new illegal argument exception the destination of the comment edge must be a model element if model get facade isa comment the source comment the source annotated element the dest else comment the dest annotated element the source this source the source this dest the dest uuid uuid manager get instance get newuuid thesource thedest commentedge thesource thedest getfacade isamodelelement thesource illegalargumentexception commentedge getfacade isamodelelement thedest illegalargumentexception commentedge getfacade isacomment thesource thesource annotatedelement thedest thedest annotatedelement thesource thesource thedest uuidmanager getinstance getnewuuid the source of this comment edge return the source public object get source return source commentedge getsource the destination of this comment edge return the destination public object get destination return dest commentedge getdestination return the uuid public object getuuid return uuid param destination the destination to set public void set destination object destination if destination null throw new illegal argument exception the destination of a comment edge cannot be null if model get facade isa model element destination throw new illegal argument exception the destination of the comment edge cannot be a destination get class get name dest destination setdestination illegalargumentexception getfacade isamodelelement illegalargumentexception commentedge getclass getname param the source the source to set public void set source object the source if the source null throw new illegal argument exception the source of a comment edge cannot be null if model get facade isa model element the source throw new illegal argument exception the source of the comment edge cannot be a the source get class get name this source the source thesource setsource thesource thesource illegalargumentexception getfacade isamodelelement thesource illegalargumentexception commentedge thesource getclass getname thesource commit suicide adapt the uml model public void delete if model get facade isa comment source model get core helper remove annotated element source dest else not safe to presume the destination is the comment if model get facade isa comment dest model get core helper remove annotated element dest source this send notification new notification remove this 0 getfacade isacomment getcorehelper removeannotatedelement getfacade isacomment getcorehelper removeannotatedelement sendnotification see java lang object to string public string to string this is the tooltip of a comment link return translator localize misc tooltip commentlink tostring tostring public object get annotated element return annotated element getannotatedelement annotatedelement public void set annotated element object the annotated element if the annotated element null throw new illegal argument exception an annotated element must be supplied if model get facade isa comment the annotated element throw new illegal argument exception an annotated element cannot be a comment this annotated element the annotated element setannotatedelement theannotatedelement theannotatedelement illegalargumentexception getfacade isacomment theannotatedelement illegalargumentexception annotatedelement theannotatedelement public object get comment return comment getcomment public void set comment object the comment if the comment null throw new illegal argument exception a comment must be supplied if model get facade isa comment the comment throw new illegal argument exception a comment cannot be a the comment get class get name this comment the comment setcomment thecomment thecomment illegalargumentexception getfacade isacomment thecomment illegalargumentexception thecomment getclass getname thecomment param multiplicity owner the uml element to represent the multiplicity of public multiplicity notation uml object multiplicity owner super multiplicity owner multiplicityowner multiplicitynotationuml multiplicityowner multiplicityowner override public string get parsing help return parsing help fig multiplicity getparsinghelp override public void parse final object multiplicity owner final string text try parse multiplicity multiplicity owner text catch parse exception pe final string msg statusmsg bar error parsing multiplicity final object args pe get localized message integer value of pe get error offset argo event pump fire event new argo help event argo event types help changed this translator message format msg args multiplicityowner parsemultiplicity multiplicityowner parseexception getlocalizedmessage valueof geterroroffset argoeventpump fireevent argohelpevent argoeventtypes help_changed messageformat protected object parse multiplicity final object multiplicity owner final string s1 throws parse exception string s s1 trim object multi null try multi model get data types factory create multiplicity s catch illegal argument exception iae throw new parse exception iae get localized message 0 model get core helper set multiplicity multiplicity owner multi return multi parsemultiplicity multiplicityowner parseexception getdatatypesfactory createmultiplicity illegalargumentexception parseexception getlocalizedmessage getcorehelper setmultiplicity multiplicityowner suppress warnings deprecation deprecated override public string to string object multiplicity owner map args return notation utility uml generate multiplicity multiplicity owner args suppresswarnings tostring multiplicityowner notationutilityuml generatemultiplicity multiplicityowner override public string to string object model element notation settings settings return notation utility uml generate multiplicity model element settings is show singular multiplicities tostring modelelement notationsettings notationutilityuml generatemultiplicity modelelement isshowsingularmultiplicities small icon diagram appearance stereotype view small icon stereotype style int value assert value this ordinal small_icon diagramappearance stereotype_view_small_icon stereotypestyle convert old style int representation to an enum the enum returned is the one at the given ordinal ie this is the inverse of the mapping done by ordinal param value one of the defined int values in diagram appearance return the corresponding stereotype view enum public static stereotype style get enum int value int counter 0 for stereotype style sv stereotype style values if counter value return sv counter return null diagramappearance stereotypeview stereotypestyle getenum stereotypestyle stereotypestyle construct an empty project settings with no parent and all values defaulted p public diagram settings this null diagramsettings construct a diagram settings object which inherits from the given parent settings e g project default diagram settings param parent settings settings to inherit from if default values aren t overridden public diagram settings diagram settings parent settings super parent parent settings if parent settings null notation settings new notation settings else notation settings new notation settings parent get notation settings recompute fonts diagramsettings parentsettings diagramsettings diagramsettings parentsettings parentsettings parentsettings notationsettings notationsettings notationsettings notationsettings getnotationsettings recomputefonts return returns the notation settings public notation settings get notation settings return notation settings notationsettings notationsettings getnotationsettings notationsettings param notation settings the notation settings to set public void set notation settings notation settings notation settings this notation settings notation settings notationsettings notationsettings setnotationsettings notationsettings notationsettings notationsettings notationsettings return returns code true code if we show bold names public boolean is show bold names if show bold names null if parent null return parent is show bold names else return false return show bold names isshowboldnames showboldnames isshowboldnames showboldnames param showem code true code if names are to be shown in bold font public void set show bold names final boolean showem if show bold names null show bold names showem return memento memento new memento public void redo show bold names showem public void undo show bold names showem do undoable memento setshowboldnames showboldnames showboldnames showboldnames showboldnames doundoable memento memento new memento public void redo show bold names showem showboldnames public void undo show bold names showem showboldnames return returns code true code if we show the arrows when both association ends of an association are navigable public boolean is show bidirectional arrows if show bidirectional arrows null if parent null return parent is show bidirectional arrows else return false return show bidirectional arrows isshowbidirectionalarrows showbidirectionalarrows isshowbidirectionalarrows showbidirectionalarrows param showem code true code if both arrows are to be shown when both association ends of an association are navigable public void set show bidirectional arrows final boolean showem if show bidirectional arrows null show bidirectional arrows showem return memento memento new memento public void redo show bidirectional arrows showem public void undo show bidirectional arrows showem do undoable memento setshowbidirectionalarrows showbidirectionalarrows showbidirectionalarrows showbidirectionalarrows showbidirectionalarrows doundoable memento memento new memento public void redo show bidirectional arrows showem showbidirectionalarrows public void undo show bidirectional arrows showem showbidirectionalarrows return returns the shadow width public int get default shadow width if default shadow width null if parent null return parent get default shadow width else return 0 return default shadow width getdefaultshadowwidth defaultshadowwidth getdefaultshadowwidth defaultshadowwidth param new width the shadow width public void set default shadow width final int new width if default shadow width null default shadow width new width return final integer old value default shadow width memento memento new memento public void redo default shadow width new width public void undo default shadow width old value do undoable memento newwidth setdefaultshadowwidth newwidth defaultshadowwidth defaultshadowwidth newwidth oldvalue defaultshadowwidth defaultshadowwidth newwidth defaultshadowwidth oldvalue doundoable memento memento new memento public void redo default shadow width new width defaultshadowwidth newwidth public void undo default shadow width old value defaultshadowwidth oldvalue return returns the default stereotype view todo enumeration here public stereotype style get default stereotype view if default stereotype view null if parent null return parent get default stereotype view else return stereotype style textual return default stereotype view stereotypestyle getdefaultstereotypeview defaultstereotypeview getdefaultstereotypeview stereotypestyle defaultstereotypeview return returns the default stereotype view as an int compatible with old users of diagram appearance defined ints deprecated for 0 27 2 by tfmorris for backward compatibility only public int get default stereotype view int return get default stereotype view ordinal diagramappearance getdefaultstereotypeviewint getdefaultstereotypeview param new view the default stereotype view deprecated for 0 27 2 by tfmorris not for use in new code only for help in transitioning to enum based methods use link set default stereotype view stereotype style public void set default stereotype view final int new view stereotype style sv stereotype style get enum new view if sv null throw new illegal argument exception bad argument new view set default stereotype view sv newview setdefaultstereotypeview stereotypestyle setdefaultstereotypeview newview stereotypestyle stereotypestyle getenum newview illegalargumentexception newview setdefaultstereotypeview param new view the default stereotype view public void set default stereotype view final stereotype style new view if default stereotype view null default stereotype view new view return final stereotype style old value default stereotype view memento memento new memento public void redo default stereotype view new view public void undo default stereotype view old value do undoable memento newview setdefaultstereotypeview stereotypestyle newview defaultstereotypeview defaultstereotypeview newview stereotypestyle oldvalue defaultstereotypeview defaultstereotypeview newview defaultstereotypeview oldvalue doundoable memento memento new memento public void redo default stereotype view new view defaultstereotypeview newview public void undo default stereotype view old value defaultstereotypeview oldvalue diagram font name p return diagram font name public string get font name if font name null if parent null return parent get font name else return dialog return font name getfontname fontname getfontname fontname diagram font name param new font name diagram font name public void set font name string new font name if font name null font name equals new font name return font name new font name recompute fonts newfontname setfontname newfontname fontname fontname newfontname fontname newfontname recomputefonts diagram font size p return diagram font size public int get font size if font size null if parent null return parent get font size else return 10 return font size getfontsize fontsize getfontsize fontsize diagram font size param new font size diagram font size public void set font size int new font size if font size null font size new font size return font size new font size recompute fonts newfontsize setfontsize newfontsize fontsize fontsize newfontsize fontsize newfontsize recomputefonts private void recompute fonts if we ve got a local uninherited font name or size or if we ve got no parent to inherit from recompute our cached fonts if font name null equals font name font size null parent null string name get font name int size get font size font plain new font name font plain size font italic new font name font italic size font bold new font name font bold size font bold italic new font name font bold font italic size else font plain null font italic null font bold null font bold italic null recomputefonts fontname fontname fontsize getfontname getfontsize fontplain fontitalic fontbold fontbolditalic fontplain fontitalic fontbold fontbolditalic returns the plain diagram font which corresponds to selected parameters return plain diagram font public font get font plain if font plain null return parent get font plain return font plain getfontplain fontplain getfontplain fontplain returns the italic diagram font which corresponds to selected parameters return italic diagram font public font get font italic if font italic null return parent get font italic return font italic getfontitalic fontitalic getfontitalic fontitalic returns the bold diagram font which corresponds to selected parameters return bold diagram font public font get font bold if font bold null return parent get font bold return font bold getfontbold fontbold getfontbold fontbold returns the bold italic diagram font which corresponds to selected parameters return bold italic diagram font public font get font bold italic if font bold italic null return parent get font bold italic return font bold italic getfontbolditalic fontbolditalic getfontbolditalic fontbolditalic utility function to convert a font style integer into a font param font style the style see the predefined constants in font return the font that corresponds to the style public font get font int font style if font style font italic 0 if font style font bold 0 return get font bold italic else return get font italic else if font style font bold 0 return get font bold else return get font plain fontstyle getfont fontstyle fontstyle fontstyle getfontbolditalic getfontitalic fontstyle getfontbold getfontplain private void do undoable memento memento todo undo should be managed externally or we should be given an undo manager to use the project s rather than using a global one if diagram undo manager get instance is generate mementos diagram undo manager get instance add memento memento memento redo todo mark diagram project as dirty doundoable diagramundomanager getinstance isgeneratemementos diagramundomanager getinstance addmemento the constructor public critic browser dialog super translator localize dialog browse label critics false j panel main content new j panel main content set layout new border layout 10 10 border split pane bsp new border split pane critics table j panel table panel new j panel new border layout 5 5 table new table critics new table model critics false this this critics label set text critics label get text table get model get row count table panel add critics label border layout north j scroll pane tablesp new j scroll pane table table panel add tablesp border layout center set tablesp s preferred height to 0 so that details height is used in pack tablesp set preferred size table get initial size bsp add table panel border split pane center critic details panel j panel details panel new j panel new grid bag layout details panel set border border factory create titled border translator localize dialog browse titled border critic details grid bag constraints label constraints new grid bag constraints label constraints anchor grid bag constraints east label constraints fill grid bag constraints both label constraints gridy 0 label constraints gridx 0 label constraints gridwidth 1 label constraints gridheight 1 label constraints insets new insets 0 10 5 4 grid bag constraints field constraints new grid bag constraints field constraints anchor grid bag constraints west field constraints fill grid bag constraints both field constraints gridy 0 field constraints gridx 1 field constraints gridwidth 3 field constraints gridheight 1 field constraints weightx 1 0 field constraints insets new insets 0 4 5 10 class name set border null label constraints gridy 0 field constraints gridy 0 details panel add cls name label label constraints details panel add class name field constraints label constraints gridy 1 field constraints gridy 1 details panel add headline label label constraints details panel add headline field constraints label constraints gridy 2 field constraints gridy 2 details panel add priority label label constraints details panel add priority field constraints label constraints gridy 3 field constraints gridy 3 details panel add more info label label constraints j panel more info panel new j panel new grid bag layout grid bag constraints grid constraints new grid bag constraints grid constraints anchor grid bag constraints west grid constraints gridx 0 grid constraints gridy 0 grid constraints weightx 100 grid constraints fill grid bag constraints both grid constraints insets new insets 0 0 5 0 more info panel add more info grid constraints grid constraints anchor grid bag constraints east grid constraints gridx 1 grid constraints fill grid bag constraints none grid constraints insets new insets 0 10 5 0 grid constraints weightx 0 more info panel add go button grid constraints more info panel set minimum size new dimension priority get width priority get height details panel add more info panel field constraints label constraints gridy 4 field constraints gridy 4 field constraints weighty 3 0 label constraints anchor grid bag constraints northeast details panel add desc label label constraints details panel add new j scroll pane desc field constraints desc set line wrap true desc set wrap style word true desc set margin new insets inset px inset px inset px inset px label constraints anchor grid bag constraints east label constraints gridy 5 field constraints gridy 5 field constraints weighty 0 details panel add clarifier label label constraints details panel add use clar field constraints label constraints gridy 6 field constraints gridy 6 j panel button panel new j panel new flow layout flow layout center button panel add wake button button panel add advanced button todo these buttons for future enhancement button panel add config button button panel add network button details panel add new j label label constraints details panel add button panel field constraints bsp add details panel border split pane east this add listeners this enable fields and buttons main content add bsp set resizable true set content main content num critic browser criticbrowserdialog jpanel maincontent jpanel maincontent setlayout borderlayout bordersplitpane bordersplitpane jpanel tablepanel jpanel borderlayout tablecritics tablemodelcritics criticslabel settext criticslabel gettext getmodel getrowcount tablepanel criticslabel borderlayout jscrollpane jscrollpane tablepanel borderlayout setpreferredsize getinitialsize tablepanel bordersplitpane jpanel detailspanel jpanel gridbaglayout detailspanel setborder borderfactory createtitledborder gridbagconstraints labelconstraints gridbagconstraints labelconstraints gridbagconstraints labelconstraints gridbagconstraints labelconstraints labelconstraints labelconstraints labelconstraints labelconstraints gridbagconstraints fieldconstraints gridbagconstraints fieldconstraints gridbagconstraints fieldconstraints gridbagconstraints fieldconstraints fieldconstraints fieldconstraints fieldconstraints fieldconstraints fieldconstraints classname setborder labelconstraints fieldconstraints detailspanel clsnamelabel labelconstraints detailspanel classname fieldconstraints labelconstraints fieldconstraints detailspanel headlinelabel labelconstraints detailspanel fieldconstraints labelconstraints fieldconstraints detailspanel prioritylabel labelconstraints detailspanel fieldconstraints labelconstraints fieldconstraints detailspanel moreinfolabel labelconstraints jpanel moreinfopanel jpanel gridbaglayout gridbagconstraints gridconstraints gridbagconstraints gridconstraints gridbagconstraints gridconstraints gridconstraints gridconstraints gridconstraints gridbagconstraints gridconstraints moreinfopanel moreinfo gridconstraints gridconstraints gridbagconstraints gridconstraints gridconstraints gridbagconstraints gridconstraints gridconstraints moreinfopanel gobutton gridconstraints moreinfopanel setminimumsize getwidth getheight detailspanel moreinfopanel fieldconstraints labelconstraints fieldconstraints fieldconstraints labelconstraints gridbagconstraints detailspanel desclabel labelconstraints detailspanel jscrollpane fieldconstraints setlinewrap setwrapstyleword setmargin inset_px inset_px inset_px inset_px labelconstraints gridbagconstraints labelconstraints fieldconstraints fieldconstraints detailspanel clarifierlabel labelconstraints detailspanel useclar fieldconstraints labelconstraints fieldconstraints jpanel buttonpanel jpanel flowlayout flowlayout buttonpanel wakebutton buttonpanel advancedbutton buttonpanel configbutton buttonpanel networkbutton detailspanel jlabel labelconstraints detailspanel buttonpanel fieldconstraints detailspanel bordersplitpane addlisteners enablefieldsandbuttons maincontent setresizable setcontent maincontent numcriticbrowser private void add listeners go button add action listener this network button add action listener this wake button add action listener this advanced button add action listener this config button add action listener this headline get document add document listener this more info get document add document listener this desc get document add document listener this priority add item listener this use clar add item listener this addlisteners gobutton addactionlistener networkbutton addactionlistener wakebutton addactionlistener advancedbutton addactionlistener configbutton addactionlistener getdocument adddocumentlistener moreinfo getdocument adddocumentlistener getdocument adddocumentlistener additemlistener useclar additemlistener private void enable fields and buttons class name set editable false headline set editable false priority set enabled false desc set editable false more info set editable false go button set enabled false wake button set enabled false advanced button set enabled true network button set enabled false config button set enabled false use clar set selected item null use clar repaint enablefieldsandbuttons classname seteditable seteditable setenabled seteditable moreinfo seteditable gobutton setenabled wakebutton setenabled advancedbutton setenabled networkbutton setenabled configbutton setenabled useclar setselecteditem useclar param t the new target private void set target critic cr if cr null enable fields and buttons class name set text headline set text priority set selected item null priority repaint more info set text desc set text return update buttons enabled class name set text cr get class get name headline set text cr get headline int p cr get priority if p to do item high priority priority set selected item high else if p to do item med priority priority set selected item medium else priority set selected item low priority repaint more info set text cr get more infourl desc set text cr get description template desc set caret position 0 use clar set selected item always use clar repaint settarget enablefieldsandbuttons classname settext settext setselecteditem moreinfo settext settext updatebuttonsenabled classname settext getclass getname settext getheadline getpriority todoitem high_priority setselecteditem todoitem med_priority setselecteditem setselecteditem moreinfo settext getmoreinfourl settext getdescriptiontemplate setcaretposition useclar setselecteditem useclar updates the states of the buttons protected void update buttons enabled this config button set enabled false this go button set enabled this target null this target get more infourl null this target get more infourl length 0 this network button set enabled false this wake button set enabled this target null this target is snoozed this target is enabled updatebuttonsenabled configbutton setenabled gobutton setenabled getmoreinfourl getmoreinfourl networkbutton setenabled wakebutton setenabled issnoozed isenabled private void set target headline if target null return string h headline get text target set headline h settargetheadline gettext setheadline private void set target priority if target null return string p string priority get selected item if p null return if p equals priorities 0 target set priority to do item high priority if p equals priorities 1 target set priority to do item med priority if p equals priorities 2 target set priority to do item low priority settargetpriority getselecteditem setpriority todoitem high_priority setpriority todoitem med_priority setpriority todoitem low_priority private void set target more info if target null return string mi more info get text target set more infourl mi settargetmoreinfo moreinfo gettext setmoreinfourl private void set target desc if target null return string d desc get text target set description d settargetdesc gettext setdescription private void set target use clarifiers log debug setting clarifier usage rule settargetuseclarifiers public void action performed action event e super action performed e if e get source go button start browser open url more info get text return if e get source network button log debug todo network return if e get source config button log debug todo config return if e get source wake button target unsnooze target set enabled true table repaint return if e get source advanced button table set advanced true advanced button set enabled false log debug unknown src in critic browser dialog e get source actionperformed actionevent actionperformed getsource gobutton startbrowser openurl moreinfo gettext getsource networkbutton getsource configbutton getsource wakebutton setenabled getsource advancedbutton setadvanced advancedbutton setenabled criticbrowserdialog getsource public void value changed list selection event lse if lse get value is adjusting return object src lse get source if src table get selection model log debug src src return log debug got value changed from src int row table get selected row if this target null this target delete observer this set target row 1 null table get critic at row row if this target null this target add observer this valuechanged listselectionevent getvalueisadjusting getsource getselectionmodel valuechanged getselectedrow deleteobserver settarget getcriticatrow addobserver see javax swing event table model listener table changed javax swing event table model event public void table changed table model event e update buttons enabled table repaint tablemodellistener tablechanged tablemodelevent tablechanged tablemodelevent updatebuttonsenabled public void insert update document event e log debug get class get name insert document h doc headline get document document mi doc more info get document document d doc desc get document if e get document h doc set target headline if e get document mi doc set target more info if e get document d doc set target desc insertupdate documentevent getclass getname hdoc getdocument midoc moreinfo getdocument ddoc getdocument getdocument hdoc settargetheadline getdocument midoc settargetmoreinfo getdocument ddoc settargetdesc see javax swing event document listener remove update javax swing event document event public void remove update document event e insert update e documentlistener removeupdate documentevent removeupdate documentevent insertupdate see javax swing event document listener changed update javax swing event document event public void changed update document event e log debug get class get name changed apparently this method is never called documentlistener changedupdate documentevent changedupdate documentevent getclass getname public void item state changed item event e object src e get source if src priority set target priority else if src use clar set target use clarifiers else log debug unknown item state changed src src itemstatechanged itemevent getsource settargetpriority useclar settargetuseclarifiers itemstatechanged see java util observer update java util observable java lang object public void update observable o object arg table repaint constructor deprecated for 0 27 3 by tfmorris use link fig dependency object diagram settings suppress warnings deprecation deprecated public fig dependency super middle group new fig text group construct figs figdependency diagramsettings suppresswarnings figdependency middlegroup figtextgroup constructfigs private void construct figs middle group add fig get name fig middle group add fig get stereotype fig add path item middle group new path item placement this middle group 50 25 set dest arrow head create end arrow set between nearest points true get fig set dashed true constructfigs middlegroup addfig getnamefig middlegroup addfig getstereotypefig addpathitem middlegroup pathitemplacement middlegroup setdestarrowhead createendarrow setbetweennearestpoints getfig setdashed create the arrow head for the dependency by default this is a stick figure arrow head with no fill descendants may override this as required return the arrow head protected arrow head create end arrow return new arrow head greater arrowhead createendarrow arrowheadgreater constructor that sets the uml element param dependency the uml element deprecated for 0 27 3 by tfmorris use link fig dependency object diagram settings suppress warnings deprecation deprecated public fig dependency object dependency this set owner dependency figdependency diagramsettings suppresswarnings figdependency setowner param dependency theuml element param lay the layer deprecated for 0 27 3 by tfmorris use link fig dependency object diagram settings suppress warnings deprecation deprecated public fig dependency object dependency layer lay this set owner dependency set layer lay figdependency diagramsettings suppresswarnings figdependency setowner setlayer construct a fig dependency param owner owning uml dependency param settings render settings public fig dependency object owner diagram settings settings super owner settings middle group new fig text group owner settings construct figs figdependency figdependency diagramsettings middlegroup figtextgroup constructfigs override public void set fig fig f super set fig f get fig set dashed true compute route this recomputes the route if you reload the diagram setfig setfig getfig setdashed computeroute see org argouml uml diagram ui fig edge model element can edit org tigris gef presentation fig override protected boolean can edit fig f return false figedgemodelelement canedit canedit public void set line color color color arrow head arrow get dest arrow head if arrow null arrow set line color get line color setlinecolor arrowhead getdestarrowhead setlinecolor getlinecolor override protected void update name text super update name text middle group calc bounds updatenametext updatenametext middlegroup calcbounds override protected void update stereotype text super update stereotype text middle group calc bounds updatestereotypetext updatestereotypetext middlegroup calcbounds see org argouml ui explorer rules perspective rule get rule name public string get rule name return translator localize misc classifier instance perspectiverule getrulename getrulename public collection get children object parent if model get facade isa classifier parent return collections empty set return model get facade get instances parent getchildren getfacade isaclassifier empty_set getfacade getinstances public set get dependencies object parent if model get facade isa classifier parent set set new hash set set add parent return set return collections empty set getdependencies getfacade isaclassifier hashset empty_set p constructor for the critic p p sets up the resource name which will allow headline and description to found for the current locale provides a design issue category naming and add triggers for connection and end name p public cr dup role names setup head and desc add supported decision uml decision naming these may not actually make any difference at present the code behind add trigger needs more work add trigger connection add trigger end name end_name crduprolenames setupheadanddesc addsupporteddecision umldecision addtrigger addtrigger addtrigger end_name p the trigger for the critic p p we do not handle association roles which are a subclass of association an association role should be fine if its parent is ok since it must have the same or fewer ends than its parent p p em note em argouml does not currently have a constructor to check that an association role is more tightly constrained than its parent p p then loop through the ends building a list of end names that we have seen and looking to see if the current end is already in that list we ignore any ends that are unnamed or have the empty string as name p p whilst this is an o n 2 algorithm most associations have only two ends so this is unlikely to cause difficulty p param dm the link java lang object object to be checked against the critic param dsgr the link org argouml cognitive designer designer creating the model not used this is for future development of argouml return link problem found problem found if the critic is triggered otherwise link no problem no problem public boolean predicate2 object dm designer dsgr only work for associations if model get facade isa association dm return no problem no problem if this is an association role if model get facade isa association role dm return no problem loop through all the ends comparing the name against those already seen ignoring any with no name no problem if there are no connections defined we will fall through immediately collection string names seen new array list string iterator conns model get facade get connections dm iterator while conns has next string name model get facade get name conns next ignore non existent and empty names if name null name equals continue is the name already in the list of those seen if not add it and go on round if names seen contains name return problem found names seen add name if we drop out there were no clashes return no problem problem_found problem_found no_problem no_problem getfacade isaassociation no_problem getfacade isaassociationrole no_problem namesseen arraylist getfacade getconnections hasnext getfacade getname namesseen problem_found namesseen no_problem public set object get criticized design materials set object ret new hash set object ret add model get meta types get association class return ret getcriticizeddesignmaterials hashset getmetatypes getassociationclass construct a property panel for a state since state is abstract this will never be instantiated directly but rather as part of the instantiation of one of its concrete subclasses param name the name of the properties panel to be shown at the top param icon the icon to be shown next to the name public abstract prop panel state string name image icon icon super name icon deferrable events scroll new scroll list new uml state deferrable event list model j list entry list new uml state entry list new uml state entry list model entry list set visible row count 2 entry scroll new j scroll pane entry list j list exit list new uml state exit list new uml state exit list model exit list set visible row count 2 exit scroll new j scroll pane exit list j list internal transition list new uml mutable linked list new uml state internal transition null new action new transition internal transitions scroll new j scroll pane internal transition list j list do list new uml state do activity list new uml state do activity list model do list set visible row count 2 do scroll new j scroll pane do list abstractproppanelstate imageicon deferrableeventsscroll scrolllist umlstatedeferrableeventlistmodel jlist entrylist umlstateentrylist umlstateentrylistmodel entrylist setvisiblerowcount entryscroll jscrollpane entrylist jlist exitlist umlstateexitlist umlstateexitlistmodel exitlist setvisiblerowcount exitscroll jscrollpane exitlist jlist internaltransitionlist umlmutablelinkedlist umlstateinternaltransition actionnewtransition internaltransitionsscroll jscrollpane internaltransitionlist jlist dolist umlstatedoactivitylist umlstatedoactivitylistmodel dolist setvisiblerowcount doscroll jscrollpane dolist override protected void add extra buttons super add extra buttons action a new action new transition a put value action short description translator localize button new internal transition icon icon resource loader wrapper lookup icon transition a put value action small icon icon add action a addextrabuttons addextrabuttons actionnewtransition putvalue short_description resourceloaderwrapper lookupicon putvalue small_icon addaction return returns the entry scroll protected j scroll pane get entry scroll return entry scroll entryscroll jscrollpane getentryscroll entryscroll return returns the exit scroll protected j scroll pane get exit scroll return exit scroll exitscroll jscrollpane getexitscroll exitscroll return returns the do scroll protected j scroll pane get do scroll return do scroll doscroll jscrollpane getdoscroll doscroll return returns the internal transitions scroll protected j scroll pane get internal transitions scroll return internal transitions scroll internaltransitionsscroll jscrollpane getinternaltransitionsscroll internaltransitionsscroll return returns the deferrable events scroll protected j scroll pane get deferrable events scroll return deferrable events scroll deferrableeventsscroll jscrollpane getdeferrableeventsscroll deferrableeventsscroll the constructor param o the target public action modifier leaf object o super checkbox final uc put value selected boolean value of value of target o actionmodifierleaf putvalue valueof valueoftarget see org argouml uml diagram ui abstract action check box menu item toggle value of target java lang object void toggle value of target object t model get core helper set leaf t model get facade is leaf t abstractactioncheckboxmenuitem togglevalueoftarget togglevalueoftarget getcorehelper setleaf getfacade isleaf see org argouml uml diagram ui abstract action check box menu item value of target java lang object boolean value of target object t return model get facade is leaf t abstractactioncheckboxmenuitem valueoftarget valueoftarget getfacade isleaf returns whether the key in this event is an action key this is a customization of key event is action key param evt the event to be verified return true if the event is an see java awt event key event is action key public static final boolean is action event key event evt int key code evt get key code switch key code argo customization case key event vk back space case key event vk delete case key event vk cancel key event is action key method case key event vk home case key event vk end case key event vk page up case key event vk page down case key event vk up case key event vk down case key event vk left case key event vk right case key event vk kp left case key event vk kp up case key event vk kp right case key event vk kp down case key event vk f1 case key event vk f2 case key event vk f3 case key event vk f4 case key event vk f5 case key event vk f6 case key event vk f7 case key event vk f8 case key event vk f9 case key event vk f10 case key event vk f11 case key event vk f12 case key event vk f13 case key event vk f14 case key event vk f15 case key event vk f16 case key event vk f17 case key event vk f18 case key event vk f19 case key event vk f20 case key event vk f21 case key event vk f22 case key event vk f23 case key event vk f24 case key event vk printscreen case key event vk scroll lock case key event vk caps lock case key event vk num lock case key event vk pause case key event vk insert case key event vk final case key event vk convert case key event vk nonconvert case key event vk accept case key event vk modechange case key event vk kana case key event vk kanji case key event vk alphanumeric case key event vk katakana case key event vk hiragana case key event vk full width case key event vk half width case key event vk roman characters case key event vk all candidates case key event vk previous candidate case key event vk code input case key event vk japanese katakana case key event vk japanese hiragana case key event vk japanese roman case key event vk kana lock case key event vk input method on off case key event vk again case key event vk undo case key event vk copy case key event vk paste case key event vk cut case key event vk find case key event vk props case key event vk stop case key event vk help return true return false keyevent isactionkey keyevent isactionkey isactionevent keyevent keycode getkeycode keycode keyevent vk_back_space keyevent vk_delete keyevent vk_cancel keyevent isactionkey keyevent vk_home keyevent vk_end keyevent vk_page_up keyevent vk_page_down keyevent vk_up keyevent vk_down keyevent vk_left keyevent vk_right keyevent vk_kp_left keyevent vk_kp_up keyevent vk_kp_right keyevent vk_kp_down keyevent vk_f1 keyevent vk_f2 keyevent vk_f3 keyevent vk_f4 keyevent vk_f5 keyevent vk_f6 keyevent vk_f7 keyevent vk_f8 keyevent vk_f9 keyevent vk_f10 keyevent vk_f11 keyevent vk_f12 keyevent vk_f13 keyevent vk_f14 keyevent vk_f15 keyevent vk_f16 keyevent vk_f17 keyevent vk_f18 keyevent vk_f19 keyevent vk_f20 keyevent vk_f21 keyevent vk_f22 keyevent vk_f23 keyevent vk_f24 keyevent vk_printscreen keyevent vk_scroll_lock keyevent vk_caps_lock keyevent vk_num_lock keyevent vk_pause keyevent vk_insert keyevent vk_final keyevent vk_convert keyevent vk_nonconvert keyevent vk_accept keyevent vk_modechange keyevent vk_kana keyevent vk_kanji keyevent vk_alphanumeric keyevent vk_katakana keyevent vk_hiragana keyevent vk_full_width keyevent vk_half_width keyevent vk_roman_characters keyevent vk_all_candidates keyevent vk_previous_candidate keyevent vk_code_input keyevent vk_japanese_katakana keyevent vk_japanese_hiragana keyevent vk_japanese_roman keyevent vk_kana_lock keyevent vk_input_method_on_off keyevent vk_again keyevent vk_undo keyevent vk_copy keyevent vk_paste keyevent vk_cut keyevent vk_find keyevent vk_props keyevent vk_stop keyevent vk_help returns a unique text for a key event code param key code the key code to be translated return the corrisponding text for the key code public static string get key text int key code int expected modifiers modifier public modifier static modifier final field fields key event class get declared fields for int i 0 i fields length i try if fields i get modifiers expected modifiers fields i get type integer type fields i get name starts with vk fields i get int key event class key code return fields i get name substring 3 catch illegal access exception e return unknown keyevent keycode keycode keycode getkeytext keycode expectedmodifiers keyevent getdeclaredfields getmodifiers expectedmodifiers gettype getname startswith vk_ getint keyevent keycode getname illegalaccessexception returns a unique text for the given key modifiers param modifiers the modifiers to be translated return the corrisponding text for the key code public static string get modifiers text int modifiers string buffer buf new string buffer if modifiers input event shift mask 0 buf append shift modifier append modifier joiner if modifiers input event ctrl mask 0 buf append ctrl modifier append modifier joiner if modifiers input event meta mask 0 buf append meta modifier append modifier joiner if modifiers input event alt mask 0 buf append alt modifier append modifier joiner if modifiers input event alt graph mask 0 buf append alt graph modifier append modifier joiner return buf to string keycode getmodifierstext stringbuffer stringbuffer inputevent shift_mask shift_modifier modifier_joiner inputevent ctrl_mask ctrl_modifier modifier_joiner inputevent meta_mask meta_modifier modifier_joiner inputevent alt_mask alt_modifier modifier_joiner inputevent alt_graph_mask alt_graph_modifier modifier_joiner tostring formats a given key stroke into a string param key stroke the key stroke to be formatted return the formatted string public static string format key stroke key stroke key stroke if key stroke null return get modifiers text key stroke get modifiers key event utils get key text key stroke get key code else return keystroke keystroke keystroke formatkeystroke keystroke keystroke keystroke getmodifierstext keystroke getmodifiers keyeventutils getkeytext keystroke getkeycode construct new prop panel using labelled layout p param icon the icon to display for the panel param label the label for the title of the panel to be localized public prop panel string label image icon icon super translator localize label labelled layout layout new labelled layout layout set hgap 5 set layout layout if icon null set title label new j label translator localize label icon swing constants left else set title label new j label translator localize label title label set label for button panel add title label add button panel add component listener this proppanel labelledlayout proppanel imageicon labelledlayout labelledlayout sethgap setlayout settitlelabel jlabel swingconstants settitlelabel jlabel titlelabel setlabelfor buttonpanel titlelabel buttonpanel addcomponentlistener override public void set orientation orientation orientation todo do we need to change the layout manager when changing orientation to match the behavior of the constructor if get orientation orientation labelled layout layout new labelled layout orientation vertical get instance set layout layout super set orientation orientation setorientation getorientation labelledlayout labelledlayout getinstance setlayout setorientation add a button to the toolbar of a property panel using the action to control the behavior of the action param action the action which will be used in the toolbar button protected void add action action action actions add action addaction add a button to the toolbar of a property panel using the action to control the behavior of the action param action the action which will be used in the toolbar button param tooltip the tooltip to set or null to skip setting of a new tooltip protected void add action action action string tooltip j button button new targettable button action if tooltip null button set tool tip text tooltip button set text button set focusable false actions add button addaction jbutton targettablebutton settooltiptext settext setfocusable add multiple buttons at once param action array the actions protected void add action object action array actions add action array actionarray addaction actionarray actionarray public void build toolbar log debug building toolbar tool bar factory factory new tool bar factory get actions factory set rollover true factory set floatable false j tool bar tool bar factory create tool bar tool bar set name misc toolbar properties button panel remove all button panel add border layout west tool bar set the tooltip of the arrow to open combined tools button panel put client property tool bar tool tip select tool translator localize action select buildtoolbar toolbarfactory toolbarfactory getactions setrollover setfloatable jtoolbar toolbar createtoolbar toolbar setname buttonpanel removeall buttonpanel borderlayout toolbar buttonpanel putclientproperty toolbar tooltipselecttool get the actions that will make up the toolbar on this panel return the list of actions to show for this panel protected list get actions return actions getactions implements targettable model view public targettable button action action super action targettablemodelview targettablebutton public target listener get targettable model if get action instanceof target listener return target listener get action return null targetlistener gettargettablemodel getaction targetlistener targetlistener getaction add a component with the specified label p param label the label for the component param component the component return the label added public j label add field string label component component j label jlabel create label for label component component set font std font add jlabel add component if component instanceof uml linked list uml model element list model2 list uml model element list model2 uml linked list component get model action create contained model element new action new action create contained model element list get meta type list get target new todo i18n return jlabel jlabel addfield jlabel createlabelfor setfont stdfont umllinkedlist umlmodelelementlistmodel2 umlmodelelementlistmodel2 umllinkedlist getmodel actioncreatecontainedmodelelement newaction actioncreatecontainedmodelelement getmetatype gettarget param label the text of the label the method cares about i18n param comp the component that this label is for return a new j label private j label create label for string label component comp j label jlabel new j label translator localize label jlabel set tool tip text translator localize label jlabel set font std font jlabel set label for comp return jlabel jlabel jlabel createlabelfor jlabel jlabel settooltiptext setfont stdfont setlabelfor add a component with the specified label positioned after another component param label the label for the component param component the component param after component the component before return the newly added label public j label add field after string label component component component after component int n component get component count for int i 0 i n component i if get component i after component j label jlabel create label for label component component set font std font add jlabel i add component i return jlabel throw new illegal argument exception component not found aftercomponent jlabel addfieldafter aftercomponent ncomponent getcomponentcount ncomponent getcomponent aftercomponent jlabel createlabelfor setfont stdfont illegalargumentexception add a component with the specified label positioned before another component p param label the label for the component param component the to be added component param before component the component before its label we add return the newly added component public j label add field before string label component component component before component int n component get component count for int i 0 i n component i if get component i before component j label jlabel create label for label component component set font std font add jlabel i 1 add component i return jlabel throw new illegal argument exception component not found beforecomponent jlabel addfieldbefore beforecomponent ncomponent getcomponentcount ncomponent getcomponent beforecomponent jlabel createlabelfor setfont stdfont illegalargumentexception add a separator protected final void add separator add labelled layout get separator addseparator labelledlayout getseparator set the target to be associated with a particular property panel p this involves resetting the third party listeners param t the object to be set as a target public void set target object t log debug set target called with t as parameter not target t t instanceof fig fig t get owner t if the target has changed notify the third party listener if it exists and dispatch a new element event listener to ourself otherwise dispatch a target reasserted to ourself runnable dispatch null if t target set up the target and its model element variant target t model element null if listener list null listener list collect target listeners this if model get facade isauml element target model element target this will add a new model element event listener after update is complete dispatch new uml change dispatch this uml change dispatch target changed add build toolbar else dispatch new uml change dispatch this uml change dispatch target reasserted swing utilities invoke later dispatch update the title label mvw this overrules the icon set initiallly why do we need this if title label null icon icon null if t null icon resource loader wrapper get instance lookup icon t if icon null title label set icon icon settarget settarget getowner modelelement listenerlist listenerlist collecttargetlisteners getfacade isaumlelement modelelement modelelement umlchangedispatch umlchangedispatch target_changed_add buildtoolbar umlchangedispatch umlchangedispatch target_reasserted swingutilities invokelater titlelabel titlelabel resourceloaderwrapper getinstance lookupicon titlelabel seticon builds a eventlistenerlist of all targetlisteners that are part of this container and its children components do not need to register themselves they are registered implicitly if they implement the target listener interface param container the container to search for targetlisteners return an event listener list with all target listeners on this container and its children private event listener list collect target listeners container container component components container get components event listener list list new event listener list for int i 0 i components length i if components i instanceof target listener list add target listener class target listener components i if components i instanceof targettable model view list add target listener class targettable model view components i get targettable model if components i instanceof container event listener list list2 collect target listeners container components i object objects list2 get listener list for int j 1 j objects length j 2 list add target listener class target listener objects j if container instanceof prop panel we presume that the container equals this prop panel for target listener action collect target listener actions list add target listener class action return list targetlistener eventlistenerlist targetlisteners eventlistenerlist collecttargetlisteners getcomponents eventlistenerlist eventlistenerlist targetlistener targetlistener targetlistener targettablemodelview targetlistener targettablemodelview gettargettablemodel eventlistenerlist collecttargetlisteners getlistenerlist targetlistener targetlistener proppanel proppanel targetlistener collecttargetlisteneractions targetlistener private collection target listener collect target listener actions collection target listener set new hash set target listener for object obj actions if obj instanceof target listener set add target listener obj return set targetlistener collecttargetlisteneractions targetlistener hashset targetlistener targetlistener targetlistener see org argouml ui tab target get target public final object get target return target tabtarget gettarget gettarget see org argouml ui tab target refresh public void refresh swing utilities invoke later new uml change dispatch this 0 tabtarget swingutilities invokelater umlchangedispatch see org argouml ui tab target should be enabled java lang object public boolean should be enabled object t t t instanceof fig fig t get owner t return model get facade isauml element t tabtarget shouldbeenabled shouldbeenabled getowner getfacade isaumlelement this method can be overridden in derived panels where the appropriate namespace for display may not be the same as the namespace of the target return the namespace protected object get display namespace object ns null object the target get target if model get facade isa model element the target ns model get facade get namespace the target return ns getdisplaynamespace thetarget gettarget getfacade isamodelelement thetarget getfacade getnamespace thetarget see org argouml uml ui uml user interface container get profile public profile configuration get profile return project manager get manager get current project get profile configuration umluserinterfacecontainer getprofile profileconfiguration getprofile projectmanager getmanager getcurrentproject getprofileconfiguration see org argouml uml ui uml user interface container get model element public final object get model element return model element umluserinterfacecontainer getmodelelement getmodelelement modelelement see org argouml uml ui uml user interface container format element java lang object public string format element object element return get profile get formating strategy format element element get display namespace umluserinterfacecontainer formatelement formatelement getprofile getformatingstrategy formatelement getdisplaynamespace see org argouml uml ui uml user interface container format namespace java lang object public string format namespace object namespace return get profile get formating strategy format element namespace null umluserinterfacecontainer formatnamespace formatnamespace getprofile getformatingstrategy formatelement public string format collection iterator iter object namespace get display namespace return get profile get formating strategy format collection iter namespace formatcollection getdisplaynamespace getprofile getformatingstrategy formatcollection get the delete action return the delete action protected final action get delete action return action delete model elements get target follower getdeleteaction actiondeletemodelelements gettargetfollower check whether this element can be deleted currently it only checks whether we delete the main model argouml does not like that since 0 13 2 return whether this element can be deleted public boolean is removable element return get target null get target project manager get manager get current project get model isremovableelement gettarget gettarget projectmanager getmanager getcurrentproject getmodel public void target added target event e if listener list null listener list collect target listeners this set target e get new target if is visible fire target added e targetadded targetevent listenerlist listenerlist collecttargetlisteners settarget getnewtarget isvisible firetargetadded public void target removed target event e set target e get new target if is visible fire target removed e targetremoved targetevent settarget getnewtarget isvisible firetargetremoved public void target set target event e set target e get new target if is visible fire target set e targetset targetevent settarget getnewtarget isvisible firetargetset private void fire target set target event target event if listener list null listener list collect target listeners this guaranteed to return a non null array object listeners listener list get listener list for int i listeners length 2 i 0 i 2 if listeners i target listener class target listener listeners i 1 target set target event firetargetset targetevent targetevent listenerlist listenerlist collecttargetlisteners listenerlist getlistenerlist targetlistener targetlistener targetset targetevent private void fire target added target event target event if listener list null listener list collect target listeners this guaranteed to return a non null array object listeners listener list get listener list for int i listeners length 2 i 0 i 2 if listeners i target listener class target listener listeners i 1 target added target event firetargetadded targetevent targetevent listenerlist listenerlist collecttargetlisteners listenerlist getlistenerlist targetlistener targetlistener targetadded targetevent private void fire target removed target event target event if listener list null listener list collect target listeners this guaranteed to return a non null array object listeners listener list get listener list for int i listeners length 2 i 0 i 2 if listeners i target listener class target listener listeners i 1 target removed target event firetargetremoved targetevent targetevent listenerlist listenerlist collecttargetlisteners listenerlist getlistenerlist targetlistener targetlistener targetremoved targetevent param the title label the title of the panel shown at the top protected void set title label j label the title label title label the title label title label set font std font thetitlelabel settitlelabel jlabel thetitlelabel titlelabel thetitlelabel titlelabel setfont stdfont return the title of the panel shown at the top protected j label get title label return title label jlabel gettitlelabel titlelabel protected final j panel create border panel string title return new group panel translator localize title jpanel createborderpanel grouppanel public group panel string title super new grid layout2 titled border border new titled border translator localize title border set title font std font set border border grouppanel gridlayout2 titledborder titledborder settitlefont stdfont setborder public void set enabled boolean enabled super set enabled enabled for final component component get components component set enabled enabled setenabled setenabled getcomponents setenabled if there are no buttons to show in the toolbar then set the height to e g 18 so that the title is aligned right by the labelled layout param height the height protected void set button panel size int height set the minimum and preferred equal so that the size is fixed for the labelledlayout button panel set minimum size new dimension 0 height button panel set preferred size new dimension 0 height labelledlayout setbuttonpanelsize buttonpanel setminimumsize buttonpanel setpreferredsize look up an icon param name the resource name return an image icon corresponding to the given resource name protected static image icon lookup icon string name return resource loader wrapper lookup icon resource name imageicon imageicon lookupicon resourceloaderwrapper lookupiconresource see java awt event component listener component hidden java awt event component event public void component hidden component event e todo do we want to fire target removed here or is it enough to just stop updating the targets componentlistener componenthidden componentevent componenthidden componentevent targetremoved public void component shown component event e refresh the target for all our children which weren t getting while not visible fire target set new target event this target event target set null new object target componentshown componentevent firetargetset targetevent targetevent target_set see java awt event component listener component moved java awt event component event public void component moved component event e ignored componentlistener componentmoved componentevent componentmoved componentevent see java awt event component listener component resized java awt event component event public void component resized component event e ignored componentlistener componentresized componentevent componentresized componentevent create a single row scroll pane backed by a list model param model the list model to be used to back the scroll pane return a scrollpane with a single row protected uml single row selector get single row scroll list model model uml single row selector pane new uml single row selector model return pane listmodel listmodel umlsinglerowselector getsinglerowscroll listmodel umlsinglerowselector umlsinglerowselector constructor fig action state deprecated for 0 27 3 by mvw use link fig action state object rectangle diagram settings suppress warnings deprecation deprecated public fig action state initialize action state figactionstate figactionstate diagramsettings suppresswarnings figactionstate initializeactionstate constructor fig action state param gm ignored param node owner deprecated for 0 27 3 by mvw use link fig action state object rectangle diagram settings suppress warnings deprecation deprecated public fig action state suppress warnings unused graph model gm object node set owner node initialize action state figactionstate figactionstate diagramsettings suppresswarnings figactionstate suppresswarnings graphmodel setowner initializeactionstate constructor used by pgml parser param owner the owning uml element param bounds rectangle describing bounds param settings rendering settings public fig action state object owner rectangle bounds diagram settings settings super owner bounds settings initialize action state figactionstate diagramsettings initializeactionstate private void initialize action state set big port new figr rect x0 1 y0 1 state width 2 height 2 debug color debug color figr rect get big port set corner radius get big port get height 2 cover new figr rect x0 y0 state width height line color fill color cover set corner radius get height 2 overrule the single line name fig created by the parent rectangle bounds new rectangle x0 padding y0 state width padding 2 height set name fig new fig multi line text with bold get owner bounds get settings true get name fig set text place string get name fig set bot margin 7 make space for the clarifier get name fig set top margin 7 for vertical symmetry get name fig set right margin 4 margin between text and border get name fig set left margin 4 get name fig set justification fig text justify center get big port set line width 0 add figs to the fig node in back to front order add fig get big port add fig cover add fig get stereotype fig add fig get name fig set blink ports false make port invisible unless mouse enters rectangle r get bounds set bounds r x r y r width r height initializeactionstate setbigport figrrect state_width debug_color debug_color figrrect getbigport setcornerradius getbigport getheight figrrect state_width line_color fill_color setcornerradius getheight state_width setnamefig figmultilinetextwithbold getowner getsettings getnamefig settext placestring getnamefig setbotmargin getnamefig settopmargin getnamefig setrightmargin getnamefig setleftmargin getnamefig setjustification figtext justify_center getbigport setlinewidth fignode addfig getbigport addfig addfig getstereotypefig addfig getnamefig setblinkports getbounds setbounds override protected void init notation providers object own if notation provider null notation provider clean listener this own super init notation providers own notation name notation name notation find notation get notation settings get notation language if model get facade isa action state own notation provider notation provider factory2 get instance get notation provider get notation provider type own this notation name initnotationproviders notationprovider notationprovider cleanlistener initnotationproviders notationname notationname findnotation getnotationsettings getnotationlanguage getfacade isaactionstate notationprovider notationproviderfactory2 getinstance getnotationprovider getnotationprovidertype notationname overrule this for subclasses of the fig action state that need a different notation provider return the type of the notation provider override protected int get notation provider type return notation provider factory2 type actionstate figactionstate notationprovider getnotationprovidertype notationproviderfactory2 type_actionstate override public object clone fig action state fig clone fig action state super clone iterator it fig clone get figs iterator fig clone set big port figr rect it next fig clone cover figr rect it next fig clone set name fig fig text it next todo do we need to clone the stereotype s return fig clone figactionstate figclone figactionstate figclone getfigs figclone setbigport figrrect figclone figrrect figclone setnamefig figtext figclone override public dimension get minimum size dimension stereo dim get stereotype fig get minimum size dimension name dim get name fig get minimum size int w math max stereo dim width name dim width padding 2 the stereo dim has height 2 even if it is empty hence the 2 below int h stereo dim height 2 name dim height padding w math max w h 44 the width needs to be the height return new dimension w h getminimumsize stereodim getstereotypefig getminimumsize namedim getnamefig getminimumsize stereodim namedim stereodim stereodim namedim override protected void set standard bounds int x int y int w int h if get name fig null return rectangle old bounds get bounds dimension stereo dim get stereotype fig get minimum size dimension name dim get name fig get minimum size get name fig set bounds x padding y stereo dim height w padding 2 name dim height get stereotype fig set bounds x padding y w padding 2 stereo dim height get big port set bounds x 1 y 1 w 2 h 2 cover set bounds x y w h figr rect get big port set corner radius h cover set corner radius h calc bounds update edges fire prop change bounds old bounds get bounds setstandardbounds getnamefig oldbounds getbounds stereodim getstereotypefig getminimumsize namedim getnamefig getminimumsize getnamefig setbounds stereodim namedim getstereotypefig setbounds stereodim getbigport setbounds setbounds figrrect getbigport setcornerradius setcornerradius calcbounds updateedges firepropchange oldbounds getbounds see org tigris gef presentation fig set line color java awt color override public void set line color color col cover set line color col setlinecolor setlinecolor setlinecolor see org tigris gef presentation fig get line color override public color get line color return cover get line color getlinecolor getlinecolor getlinecolor see org tigris gef presentation fig set fill color java awt color override public void set fill color color col cover set fill color col setfillcolor setfillcolor setfillcolor see org tigris gef presentation fig get fill color override public color get fill color return cover get fill color getfillcolor getfillcolor getfillcolor see org tigris gef presentation fig set filled boolean override public void set filled boolean f cover set filled f setfilled setfilled setfilled override public boolean is filled return cover is filled isfilled isfilled see org tigris gef presentation fig set line width int override public void set line width int w cover set line width w setlinewidth setlinewidth setlinewidth see org tigris gef presentation fig get line width override public int get line width return cover get line width getlinewidth getlinewidth getlinewidth override protected void model changed property change event mee super model changed mee if mee instanceof add association event mee instanceof attribute change event rendering changed notation provider update listener this get owner mee damage modelchanged propertychangeevent modelchanged addassociationevent attributechangeevent renderingchanged notationprovider updatelistener getowner override public void remove from diagram impl if notation provider null notation provider clean listener this get owner super remove from diagram impl removefromdiagramimpl notationprovider notationprovider cleanlistener getowner removefromdiagramimpl override protected void update name text if notation provider null get name fig set text notation provider to string get owner get notation settings updatenametext notationprovider getnamefig settext notationprovider tostring getowner getnotationsettings see org argouml uml diagram ui fig node model element update stereotype text override protected void update stereotype text get stereotype fig set owner get owner fignodemodelelement updatestereotypetext updatestereotypetext getstereotypefig setowner getowner override protected void text edited fig text ft throws property veto exception notation provider parse get owner ft get text ft set text notation provider to string get owner get notation settings textedited figtext propertyvetoexception notationprovider getowner gettext settext notationprovider tostring getowner getnotationsettings override protected void text edit started fig text ft if ft get name fig show help notation provider get parsing help texteditstarted figtext getnamefig showhelp notationprovider getparsinghelp public collection get children object parent if model get facade isa behavioral feature parent collection col model get facade get behaviors parent set argo diagram ret new hash set argo diagram project p project manager get manager get current project for argo diagram diagram p get diagram list if diagram instanceof uml state diagram col contains uml state diagram diagram get state machine ret add diagram return ret return collections empty set getchildren getfacade isabehavioralfeature getfacade getbehaviors argodiagram hashset argodiagram projectmanager getmanager getcurrentproject argodiagram getdiagramlist umlstatediagram umlstatediagram getstatemachine empty_set see org argouml ui explorer rules perspective rule get dependencies java lang object public set get dependencies object parent todo what return collections empty set perspectiverule getdependencies getdependencies empty_set see org argouml ui explorer rules perspective rule get rule name public string get rule name return translator localize misc behavioral feature statechart diagram perspectiverule getrulename getrulename construct an uml version exception with the version string and a nested cause param message the message for the exception param cause what caused the exception public uml version exception string message throwable cause super message cause umlversionexception umlversionexception the constructor param action state the uml element public action state notation object action state if model get facade isa action state action state throw new illegal argument exception this is not an action state actionstate actionstatenotation actionstate getfacade isaactionstate actionstate illegalargumentexception actionstate public void initialise listener property change listener listener object model element add element listener listener model element new string entry remove stereotype object entry model get facade get entry model element if entry null add element listener listener entry script collection c model get facade get stereotypes model element iterator i c iterator while i has next object st i next add element listener listener st name initialiselistener propertychangelistener modelelement addelementlistener modelelement getfacade getentry modelelement addelementlistener getfacade getstereotypes modelelement hasnext addelementlistener construct a new selection node instance for the given fig param f the given fig selectionnodeinstance override protected icon get icons if model get model management helper is read only get content get owner return new icon 6 return icons geticons getmodelmanagementhelper isreadonly getcontent getowner override protected string get instructions int index return instructions index base getinstructions override protected object get new edge type int index return model get meta types get link getnewedgetype getmetatypes getlink override protected object get new node int index return model get common behavior factory create node instance getnewnode getcommonbehaviorfactory createnodeinstance override protected object get new node type int index return model get meta types get node instance getnewnodetype getmetatypes getnodeinstance override protected boolean is reverse edge int index if index bottom index left return true return false isreverseedge creates a new instance of attributes node param the parent the parent node public attributes node object the parent this parent the parent attributesnode theparent attributesnode theparent theparent return the parent public object get parent return parent getparent see java lang object to string public string to string return attributes tostring tostring see org argouml ui explorer weak explorer node subsumes java lang object public boolean subsumes object obj return obj instanceof attributes node weakexplorernode attributesnode the constructor public cr invalid pseudo state trigger setup head and desc add supported decision uml decision state machines add trigger trigger crinvalidpseudostatetrigger setupheadanddesc addsupporteddecision umldecision state_machines addtrigger public boolean predicate2 object dm designer dsgr if model get facade isa transition dm return no problem object tr dm object t model get facade get trigger tr object sv model get facade get source tr if model get facade isa pseudostate sv return no problem object k model get facade get kind sv forks have their own outgoing transitions critic if model get facade equals pseudostate kind k model get pseudostate kind get fork return no problem boolean has trigger t null model get facade get name t null model get facade get name t length 0 if has trigger return problem found return no problem getfacade isatransition no_problem getfacade gettrigger getfacade getsource getfacade isapseudostate no_problem getfacade getkind getfacade equalspseudostatekind getpseudostatekind getfork no_problem hastrigger getfacade getname getfacade getname hastrigger problem_found no_problem public set object get criticized design materials set object ret new hash set object ret add model get meta types get transition return ret getcriticizeddesignmaterials hashset getmetatypes gettransition private thread thread thread var thread t thread t threadvar synchronized thread get return thread synchronized void clear thread null get the value produced by the worker thread or null if it hasn t been constructed yet return the value produced by the worker thread protected synchronized object get value return value getvalue set the value produced by worker thread private synchronized void set value object x value x setvalue compute the value to be returned by the code get code method param progress monitor the progress monitor window class this class shall be registered as a progress listener return the value to be returned progressmonitor progressmonitorwindow instantiate and initialize an instance of progress monitor window return an instance of progress monitor window progressmonitorwindow progressmonitorwindow this method calls the construct return the value to be returned by the code get code method public object do construct activate glass pane pmw init progress monitor window argo frame get instance set cursor cursor get predefined cursor cursor wait cursor object ret val null create a timer timer new timer 25 new timer listener timer start try ret val construct pmw catch exception exc what should we do here log error error while loading project exc finally pmw close return ret val doconstruct activateglasspane initprogressmonitorwindow argoframe getinstance setcursor getpredefinedcursor wait_cursor retval timerlistener retval retval class timer listener implements action listener public void action performed action event evt if pmw is canceled thread var thread interrupt interrupt timer stop timerlistener actionlistener actionperformed actionevent iscanceled threadvar activate the capabilities of glasspane protected void activate glass pane mount the glasspane on the component window glass pane a pane glass pane mount argo frame get instance true keep track of the glasspane as an instance variable set glass pane a pane if get glass pane null start interception ui interactions get glass pane set visible true activateglasspane glasspane apane glasspane argoframe getinstance setglasspane apane getglasspane getglasspane setvisible deactivate the glasspane private void deactivate glass pane if get glass pane null stop ui interception get glass pane set visible false deactivateglasspane getglasspane getglasspane setvisible called on the event dispatching thread not on the worker thread after the code construct code method has returned public void finished deactivate glass pane argo frame get instance set cursor cursor get predefined cursor cursor default cursor deactivateglasspane argoframe getinstance setcursor getpredefinedcursor default_cursor getter method for the glass pange return glass pane the blocking glass pane protected glass pane get glass pane return glass pane glasspange glasspane glasspane glasspane getglasspane glasspane setter method param new glass pane glass pane protected void set glass pane glass pane new glass pane glass pane new glass pane newglasspane glasspane setglasspane glasspane newglasspane glasspane newglasspane a new method that interrupts the worker thread call this method to force the worker to stop what it s doing public void interrupt thread t thread var get if t null t interrupt thread var clear threadvar threadvar return the value created by the code construct code method returns null if either the constructing thread or the current thread was interrupted before a value was produced return the value created by the code construct code method public object get while true thread t thread var get if t null return get value try t join catch interrupted exception e thread current thread interrupt propagate return null threadvar getvalue interruptedexception currentthread construct a worker thread that will call the code construct code method and then exit public swing worker final runnable do finished new runnable public void run finished runnable do construct new runnable public void run try set value do construct finally thread var clear swing utilities invoke later do finished thread t new thread do construct thread var new thread var t swingworker dofinished doconstruct setvalue doconstruct threadvar swingutilities invokelater dofinished doconstruct threadvar threadvar public swing worker final runnable do finished new runnable public void run finished swingworker dofinished runnable do construct new runnable public void run try set value do construct finally thread var clear swing utilities invoke later do finished doconstruct setvalue doconstruct threadvar swingutilities invokelater dofinished public swing worker string thread name this thread var get set name thread name swingworker threadname threadvar setname threadname start the worker thread public void start thread t thread var get if t null t start threadvar java lang object protected object navigate to object source return model get facade get action source navigateto getfacade getaction pass this method an object and method equipped to perform application shutdown logic the method passed should return a boolean stating whether or not the quit should occur param target object containing the method param quit handler method to handle quit public static void set quit handler object target method quit handler set handler new osx adapter handle quit target quit handler quithandler setquithandler quithandler sethandler osxadapter handlequit quithandler set handler for about action it will be called when the about menu item is selected from the application menu param target object containing the method param about handler method to invoke to handle about menu item public static void set about handler object target method about handler boolean enable about menu target null about handler null if enable about menu set handler new osx adapter handle about target about handler if we re setting a handler enable the about menu item by calling com apple eawt application reflectively try method enable about method macosx application get class get declared method set enabled about menu new class boolean class enable about method invoke macosx application new object boolean value of enable about menu catch exception ex log error osx adapter could not access the about menu ex abouthandler setabouthandler abouthandler enableaboutmenu abouthandler enableaboutmenu sethandler osxadapter handleabout abouthandler enableaboutmethod macosxapplication getclass getdeclaredmethod setenabledaboutmenu enableaboutmethod macosxapplication valueof enableaboutmenu osxadapter set handler for mac preferences item it will be called when the preferences menu item is selected from the application menu param target object containing the method param prefs handler method to handle preferences action public static void set preferences handler object target method prefs handler boolean enable prefs menu target null prefs handler null if enable prefs menu set handler new osx adapter handle preferences target prefs handler if we re setting a handler enable the preferences menu item by calling com apple eawt application reflectively try method enable prefs method macosx application get class get declared method set enabled preferences menu new class boolean class enable prefs method invoke macosx application new object boolean value of enable prefs menu catch exception ex log error osx adapter could not access the about menu ex print stack trace prefshandler setpreferenceshandler prefshandler enableprefsmenu prefshandler enableprefsmenu sethandler osxadapter handlepreferences prefshandler enableprefsmethod macosxapplication getclass getdeclaredmethod setenabledpreferencesmenu enableprefsmethod macosxapplication valueof enableprefsmenu osxadapter printstacktrace pass this method an object and a method equipped to handle document events from the finder documents are registered with the finder via the cf bundle document types dictionary in the application bundle s info plist param target object containing method param file handler method to invoke to open a new file public static void set file handler object target method file handler set handler new osx adapter handle open file target file handler override osx adapter call target to send information on the file to be opened public boolean call target object apple event if apple event null try method get filename method apple event get class get declared method get filename class null string filename string get filename method invoke apple event object null this target method invoke this target object new object filename catch exception ex return true cfbundledocumenttypes filehandler setfilehandler filehandler sethandler osxadapter handleopenfile filehandler osxadapter calltarget calltarget appleevent appleevent getfilenamemethod appleevent getclass getdeclaredmethod getfilename getfilenamemethod appleevent targetmethod targetobject file to be opened public boolean call target object apple event if apple event null try method get filename method apple event get class get declared method get filename class null string filename string get filename method invoke apple event object null this target method invoke this target object new object filename catch exception ex return true calltarget appleevent appleevent getfilenamemethod appleevent getclass getdeclaredmethod getfilename getfilenamemethod appleevent targetmethod targetobject creates a proxy object from the passed osx adapter and adds it as an application listener param adapter an instance of this class public static void set handler osx adapter adapter try class application class class for name com apple eawt application if macosx application null macosx application application class get constructor class null new instance object null class application listener class class for name com apple eawt application listener method add listener method application class get declared method add application listener new class application listener class create a proxy object around this handler that can be reflectively added as an apple application listener object osx adapter proxy proxy new proxy instance osx adapter class get class loader new class application listener class adapter add listener method invoke macosx application new object osx adapter proxy catch class not found exception cnfe log error this version of mac os x does not support the apple eawt application event handling has been disabled cnfe catch exception ex likely a no such method exception or an illegal access exception loading invoking eawt application methods log error mac os x adapter could not talk to eawt ex print stack trace osxadapter applicationlistener sethandler osxadapter applicationclass forname macosxapplication macosxapplication applicationclass getconstructor newinstance applicationlistenerclass forname applicationlistener addlistenermethod applicationclass getdeclaredmethod addapplicationlistener applicationlistenerclass applicationlistener osxadapterproxy newproxyinstance osxadapter getclassloader applicationlistenerclass addlistenermethod macosxapplication osxadapterproxy classnotfoundexception applicationevent nosuchmethodexception illegalaccessexception printstacktrace each osx adapter has the name of the eawt method it intends to listen for handle about for example the object that will ultimately perform the task and the method to be called on that object param proxy signature param target param handler protected osx adapter string proxy signature object target method handler this proxy signature proxy signature this target object target this target method handler osxadapter handleabout proxysignature osxadapter proxysignature proxysignature proxysignature targetobject targetmethod override this method to perform any operations on the event that comes with the various callbacks see set file handler above for an example param apple event the apple event return boolean result of method invocation throws invocation target exception throws illegal access exception public boolean call target object apple event throws invocation target exception illegal access exception object result target method invoke target object object null if result null return true return boolean value of result to string boolean value setfilehandler appleevent appleevent invocationtargetexception illegalaccessexception calltarget appleevent invocationtargetexception illegalaccessexception targetmethod targetobject valueof tostring booleanvalue invocation handler implementation this is the entry point for our proxy object it is called every time an application listener method is invoked param proxy param method param args return null throws throwable see java lang reflect invocation handler invoke java lang object java lang reflect method java lang object public object invoke object proxy method method object args throws throwable if is correct method method args boolean handled call target args 0 set application event handled args 0 handled all of the application listener methods are void return null regardless of what happens return null invocationhandler applicationlistener invocationhandler iscorrectmethod calltarget setapplicationeventhandled applicationlistener compare the method that was called to the intended method when the osx adapter instance was created e g handle about handle quit handle open file etc param method method to be invoked param args argumnets return a boolean result of the method invocation protected boolean is correct method method method object args return target method null proxy signature equals method get name args length 1 osxadapter handleabout handlequit handleopenfile iscorrectmethod targetmethod proxysignature getname it is important to mark the application event as handled and cancel the default behavior this method checks for a boolean result from the proxy method and sets the event accordingly param event param handled protected void set application event handled object event boolean handled if event null try method set handled method event get class get declared method set handled new class boolean class if the target method returns a boolean use that as a hint set handled method invoke event new object boolean value of handled catch exception ex log error osx adapter was unable to handle an application event event ex applicationevent setapplicationeventhandled sethandledmethod getclass getdeclaredmethod sethandled sethandledmethod valueof osxadapter applicationevent param owner the owner object public fig create action message object owner super owner set dest arrow head new arrow head greater set dashed false figcreateactionmessage setdestarrowhead arrowheadgreater setdashed the constructor public fig create action message this null figcreateactionmessage see org argouml ui explorer rules perspective rule get rule name public string get rule name return translator localize misc state outgoing transitions perspectiverule getrulename getrulename public collection get children object parent if model get facade isa state vertex parent return model get facade get outgoings parent return collections empty set getchildren getfacade isastatevertex getfacade getoutgoings empty_set public set get dependencies object parent if model get facade isa state vertex parent set set new hash set set add parent return set return collections empty set getdependencies getfacade isastatevertex hashset empty_set public wiz too many super wiztoomany see org argouml cognitive ui wizard get num steps public int get num steps return 1 getnumsteps getnumsteps public j panel make panel int new step switch new step case 1 if step1 null to do item item to do item get to do item abstract cr too many critic abstract cr too many item get poster step1 new wiz step text field this instructions threshold integer to string critic get threshold return step1 return null jpanel makepanel newstep newstep todoitem todoitem gettodoitem abstractcrtoomany abstractcrtoomany getposter wizsteptextfield tostring getthreshold public boolean can finish if super can finish return false if get step 0 return true if get step 1 step1 null try integer parse int step1 get text return true catch number format exception ex intentional if there is nonsense in the field we return false return false canfinish canfinish getstep getstep parseint gettext numberformatexception public void do action int old step switch old step case 1 string new threshold to do item item to do item get to do item abstract cr too many critic abstract cr too many item get poster if step1 null new threshold step1 get text try critic set threshold integer parse int new threshold catch number format exception ex intentional if there is nonsense in the field we do not set the value break doaction oldstep oldstep newthreshold todoitem todoitem gettodoitem abstractcrtoomany abstractcrtoomany getposter newthreshold gettext setthreshold parseint newthreshold numberformatexception the constructor public tab constraints super tab constraints set icon new up arrow icon set layout new border layout 0 0 m ocle editor new ocl editor m ocle editor set option mask ocl editor optionmask typecheck removed to workaround problems with autosplit ocl editor optionmask autosplit m ocle editor set do auto split false set toolbar rollover true set toolbar floatable false get ocl toolbar set name misc toolbar constraints add m ocle editor add component listener this tabconstraints seticon uparrowicon setlayout borderlayout mocleeditor ocleditor mocleeditor setoptionmask ocleditor optionmask_typecheck ocleditor optionmask_autosplit mocleeditor setdoautosplit settoolbarrollover settoolbarfloatable getocltoolbar setname mocleeditor addcomponentlistener set the toolbar rollover style param enable if true then button borders do not become visible until mouse rolls over button private void set toolbar rollover boolean enable if tool bar manager always use standard rollover get ocl toolbar put client property j tool bar is rollover boolean true settoolbarrollover toolbarmanager alwaysusestandardrollover getocltoolbar putclientproperty jtoolbar isrollover set the toolbar floating style param enable if true then the toolbar can be floated and docked private void set toolbar floatable boolean enable get ocl toolbar set floatable false settoolbarfloatable getocltoolbar setfloatable get a reference to the toolbar object contained in the ocl editor component this is currently a nasty hack we really require an interface method on ocl editor bob tarling 8 feb 2003 return the toolbar private j tool bar get ocl toolbar return j tool bar m ocle editor get component 0 ocleditor ocleditor jtoolbar getocltoolbar jtoolbar mocleeditor getcomponent should this tab be activated for the current target element p argo only supports constraints for classes and features eg attributes and operations currently inherit doc public boolean should be enabled object target target target instanceof fig fig target get owner target return model get facade isa class target model get facade isa feature target inheritdoc shouldbeenabled getowner getfacade isaclass getfacade isafeature see org argouml ui tab target get target public object get target return m mmei target tabtarget gettarget gettarget mmmeitarget refresh the tab because the target has changed public void refresh set target m mmei target settarget mmmeitarget set the target element to be displayed in this tab only model elements will be accepted by the constraint tab inherit doc public void set target object o target o target o target instanceof fig fig o target get owner o target if model get facade isa model element o target m mmei target null return m mmei target o target if is visible set target internal m mmei target inheritdoc settarget otarget otarget otarget otarget getowner otarget getfacade isamodelelement otarget mmmeitarget mmmeitarget otarget isvisible settargetinternal mmmeitarget private void set target internal object o target set editor s model if o target null m ocle editor set model new constraint model o target settargetinternal otarget otarget mocleeditor setmodel constraintmodel otarget construct a new constraint model public constraint model object mmei target super them mmei target mmei target them al constraints new array list model get facade get constraints them mmei target constraintmodel constraintmodel mmeitarget themmmeitarget mmeitarget themalconstraints arraylist getfacade getconstraints themmmeitarget return the number of constraints in this model public int get constraint count return them al constraints size getconstraintcount themalconstraints return the constraint with the specified index param n idx the index of the constraint to be returned 0 n idx link get constraint count public constraint representation get constraint at int n idx return representation for n idx nidx nidx getconstraintcount constraintrepresentation getconstraintat nidx representationfor nidx remove the specified constraint from the model param n idx the index of the constraint to be removed 0 n idx link get constraint count public void remove constraint at int n idx if n idx 0 n idx them al constraints size return object mc them al constraints remove n idx if mc null model get core helper remove constraint them mmei target mc fire constraint removed mc n idx nidx nidx getconstraintcount removeconstraintat nidx nidx nidx themalconstraints themalconstraints nidx getcorehelper removeconstraint themmmeitarget fireconstraintremoved nidx add a fresh constraint to the model p there are 2 restrictions on what can be parsed given the current ocl grammar ol li class names must have a capital first letter li feature name must have a lower case first letter ol public void add constraint check ocl parsing constraints object mme context ocl util get inner most enclosing namespace them mmei target string context name model get facade get name mme context string target name model get facade get name them mmei target if context name null context name equals this is to fix issue 2056 target name null target name equals this is to fix issue 2056 character is upper case context name char at 0 model get facade isa class them mmei target character is upper case target name char at 0 model get facade isa feature them mmei target character is lower case target name char at 0 todo i18n j option pane show message dialog null the ocl toolkit requires that n n class names have a capital first letter and n attribute or operation names have a lower case first letter require correct name convention j option pane error message do not create a constraint return null elements represent new constraints which will be added to the target the first time any actual editing takes place this is done to ensure syntactical correctness of constraints stored with the target them al constraints add null fire constraint added addconstraint mmecontext oclutil getinnermostenclosingnamespace themmmeitarget contextname getfacade getname mmecontext targetname getfacade getname themmmeitarget contextname contextname targetname targetname isuppercase contextname charat getfacade isaclass themmmeitarget isuppercase targetname charat getfacade isafeature themmmeitarget islowercase targetname charat joptionpane showmessagedialog joptionpane error_message themalconstraints fireconstraintadded public cr object mc constraint int n idx super them mc constraint mc constraint themn idx n idx mcconstraint nidx themmcconstraint mcconstraint themnidx nidx public cr int n idx this null n idx nidx nidx get the name of the constraint public string get name if them mc constraint null return new constraint return model get facade get name them mc constraint getname themmcconstraint newconstraint getfacade getname themmcconstraint get the constraint s body public string get data if them mc constraint null return ocl util get context string them mmei target return string model get facade get body model get facade get body them mc constraint getdata themmcconstraint oclutil getcontextstring themmmeitarget getfacade getbody getfacade getbody themmcconstraint set the constraint s body text for the exceptions the detailed message must be human readable param s data the new body of the constraint exception illegal state exception if the constraint is not in a state to accept body changes exception ocl parser exception if the specified constraint is not syntactically correct exception ocl type exception if the specified constraint does not adhere by ocl type rules public void set data string s data editing utilities eu helper throws ocl parser exception ocl type exception parse and check specified constraint ocl tree tree null try object mme context ocl util get inner most enclosing namespace them mmei target try tree eu helper parse and check constraint s data new argo facade mme context catch io exception ioe ignored highly unlikely and what would we do anyway log it log error problem parsing and checking constraints ioe return split constraint body if user wants us to if eu helper get do auto split list l constraints eu helper split constraint tree if l constraints size 0 remove constraint at themn idx for iterator i l constraints iterator i has next ocl tree oclt current ocl tree i next object mc model get core factory create constraint model get core helper set name mc oclt current get constraint name model get core helper set body mc model get data types factory create boolean expression ocl oclt current get expression model get core helper add constraint them mmei target mc the constraint must be owned by a namespace if model get facade get namespace them mmei target null model get core helper add owned element model get facade get namespace them mmei target mc else if model get facade get namespace mme context null model get core helper add owned element model get facade get namespace mme context them mc constraint them al constraints add mc fire constraint added return store constraint body object mc old null if them mc constraint null new constraint first time set data is called them mc constraint model get core factory create constraint model get core helper set name them mc constraint new constraint model get core helper set body them mc constraint model get data types factory create boolean expression ocl s data model get core helper add constraint them mmei target them mc constraint the constraint must be owned by a namespace object target namespace model get facade get namespace them mmei target object context namespace model get facade get namespace mme context if target namespace null model get core helper add owned element target namespace them mc constraint else if context namespace null model get core helper add owned element context namespace them mc constraint them al constraints set themn idx them mc constraint else mc old model get core factory create constraint model get core helper set name mc old model get facade get name them mc constraint model get core helper set body mc old model get data types factory create boolean expression ocl string model get facade get body model get facade get body them mc constraint model get core helper set body them mc constraint model get data types factory create boolean expression ocl s data fire constraint data changed themn idx mc old them mc constraint catch ocl type exception pe log warn there was some sort of ocl type problem pe throw pe catch ocl parser exception pe1 log warn could not parse the constraint pe1 throw pe1 catch ocl exception ocl exc a runtime exception that occurs when some internal test fails log warn there was some unidentified problem throw ocl exc sdata illegalstateexception oclparserexception ocltypeexception setdata sdata editingutilities euhelper oclparserexception ocltypeexception ocltree mmecontext oclutil getinnermostenclosingnamespace themmmeitarget euhelper parseandcheckconstraint sdata argofacade mmecontext ioexception euhelper getdoautosplit lconstraints euhelper splitconstraint lconstraints removeconstraintat themnidx lconstraints hasnext ocltree ocltcurrent ocltree getcorefactory createconstraint getcorehelper setname ocltcurrent getconstraintname getcorehelper setbody getdatatypesfactory createbooleanexpression ocltcurrent getexpression getcorehelper addconstraint themmmeitarget _must_ getfacade getnamespace themmmeitarget getcorehelper addownedelement getfacade getnamespace themmmeitarget getfacade getnamespace mmecontext getcorehelper addownedelement getfacade getnamespace mmecontext themmcconstraint themalconstraints fireconstraintadded mcold themmcconstraint setdata themmcconstraint getcorefactory createconstraint getcorehelper setname themmcconstraint newconstraint getcorehelper setbody themmcconstraint getdatatypesfactory createbooleanexpression sdata getcorehelper addconstraint themmmeitarget themmcconstraint _must_ targetnamespace getfacade getnamespace themmmeitarget contextnamespace getfacade getnamespace mmecontext targetnamespace getcorehelper addownedelement targetnamespace themmcconstraint contextnamespace getcorehelper addownedelement contextnamespace themmcconstraint themalconstraints themnidx themmcconstraint mcold getcorefactory createconstraint getcorehelper setname mcold getfacade getname themmcconstraint getcorehelper setbody mcold getdatatypesfactory createbooleanexpression getfacade getbody getfacade getbody themmcconstraint getcorehelper setbody themmcconstraint getdatatypesfactory createbooleanexpression sdata fireconstraintdatachanged themnidx mcold themmcconstraint ocltypeexception oclparserexception oclexception oclexc oclexc set the constraint s name public void set name final string s name final editing utilities eu helper if them mc constraint null check name for consistency with spec if eu helper is valid constraint name s name throw new illegal argument exception please specify a valid name set name object mc old model get core factory create constraint model get core helper set name mc old model get facade get name them mc constraint object constraint body model get facade get body them mc constraint model get core helper set body mc old model get data types factory create boolean expression ocl string model get facade get body constraint body model get core helper set name them mc constraint s name fire constraint name changed themn idx mc old them mc constraint also set name in constraint body added 03 14 2001 try ocl tree tree null object mme context ocl util get inner most enclosing namespace them mmei target constraint body model get facade get body them mc constraint tree eu helper parse and check constraint string model get facade get body constraint body new argo facade mme context if tree null tree apply new depth first adapter private int nameid 0 public void casea constraint body a constraint body node replace name if nameid 0 node set name new t name s name else node set name new t name s name nameid nameid set data tree get expression eu helper catch throwable t ok so that didn t work out just ignore any problems and don t set the name in the constraint body better had log it log error some unidentified problem t else throw new illegal state exception please define and submit a constraint body first setname sname editingutilities euhelper themmcconstraint euhelper isvalidconstraintname sname illegalargumentexception mcold getcorefactory createconstraint getcorehelper setname mcold getfacade getname themmcconstraint constraintbody getfacade getbody themmcconstraint getcorehelper setbody mcold getdatatypesfactory createbooleanexpression getfacade getbody constraintbody getcorehelper setname themmcconstraint sname fireconstraintnamechanged themnidx mcold themmcconstraint ocltree mmecontext oclutil getinnermostenclosingnamespace themmmeitarget constraintbody getfacade getbody themmcconstraint euhelper parseandcheckconstraint getfacade getbody constraintbody argofacade mmecontext depthfirstadapter caseaconstraintbody aconstraintbody setname tname sname setname tname sname _ setdata getexpression euhelper illegalstateexception private int nameid 0 public void casea constraint body a constraint body node replace name if nameid 0 node set name new t name s name else node set name new t name s name nameid nameid caseaconstraintbody aconstraintbody setname tname sname setname tname sname _ create a representation adapter for the given constraint private cr representation for int n idx if n idx 0 n idx them al constraints size return null object mc them al constraints get n idx if mc null return new cr mc n idx return new cr n idx representationfor nidx nidx nidx themalconstraints themalconstraints nidx nidx nidx add a listener to be informed of changes in the model param ccl the new listener public void add constraint change listener constraint change listener ccl them ell listeners add constraint change listener class ccl addconstraintchangelistener constraintchangelistener themelllisteners constraintchangelistener remove a listener to be informed of changes in the model param ccl the listener to be removed public void remove constraint change listener constraint change listener ccl them ell listeners remove constraint change listener class ccl removeconstraintchangelistener constraintchangelistener themelllisteners constraintchangelistener protected void fire constraint removed object mc int n idx guaranteed to return a non null array object listeners them ell listeners get listener list constraint change event cce null process the listeners last to first notifying those that are interested in this event for int i listeners length 2 i 0 i 2 if listeners i constraint change listener class lazily create the event if cce null cce new constraint change event this n idx new cr mc n idx null constraint change listener listeners i 1 constraint removed cce fireconstraintremoved nidx themelllisteners getlistenerlist constraintchangeevent constraintchangelistener constraintchangeevent nidx nidx constraintchangelistener constraintremoved protected void fire constraint added guaranteed to return a non null array object listeners them ell listeners get listener list constraint change event cce null process the listeners last to first notifying those that are interested in this event for int i listeners length 2 i 0 i 2 if listeners i constraint change listener class lazily create the event if cce null int n idx them al constraints size 1 cce new constraint change event this n idx null representation for n idx constraint change listener listeners i 1 constraint added cce fireconstraintadded themelllisteners getlistenerlist constraintchangeevent constraintchangelistener nidx themalconstraints constraintchangeevent nidx representationfor nidx constraintchangelistener constraintadded protected void fire constraint data changed int n idx object mc old object mc new guaranteed to return a non null array object listeners them ell listeners get listener list constraint change event cce null process the listeners last to first notifying those that are interested in this event for int i listeners length 2 i 0 i 2 if listeners i constraint change listener class lazily create the event if cce null cce new constraint change event this n idx new cr mc old n idx new cr mc new n idx constraint change listener listeners i 1 constraint data changed cce fireconstraintdatachanged nidx mcold mcnew themelllisteners getlistenerlist constraintchangeevent constraintchangelistener constraintchangeevent nidx mcold nidx mcnew nidx constraintchangelistener constraintdatachanged protected void fire constraint name changed int n idx object mc old object mc new guaranteed to return a non null array object listeners them ell listeners get listener list constraint change event cce null process the listeners last to first notifying those that are interested in this event for int i listeners length 2 i 0 i 2 if listeners i constraint change listener class lazily create the event if cce null cce new constraint change event this n idx new cr mc old n idx new cr mc new n idx constraint change listener listeners i 1 constraint name changed cce fireconstraintnamechanged nidx mcold mcnew themelllisteners getlistenerlist constraintchangeevent constraintchangelistener constraintchangeevent nidx mcold nidx mcnew nidx constraintchangelistener constraintnamechanged org argouml ui targetmanager target event public void target added target event e todo why is this ignored tfm 20070110 targetevent targetadded targetevent org argouml ui targetmanager target event public void target removed target event e set target e get new target targetevent targetremoved targetevent settarget getnewtarget org argouml ui targetmanager target event public void target set target event e set target e get new target targetevent targetset targetevent settarget getnewtarget see java awt event component listener component shown java awt event component event public void component shown component event e update our model with our saved target set target internal m mmei target componentlistener componentshown componentevent componentshown componentevent settargetinternal mmmeitarget see java awt event component listener component hidden java awt event component event public void component hidden component event e we have no model event listeners so no need to do anything componentlistener componenthidden componentevent componenthidden componentevent public void component moved component event e ignored componentmoved componentevent public void component resized component event e ignored componentresized componentevent public prop panel create prop panel object object if object instanceof uml deployment diagram return new prop paneluml deployment diagram return null proppanel createproppanel umldeploymentdiagram proppanelumldeploymentdiagram the constructor public cr unconventional pack name setup head and desc add supported decision uml decision naming set knowledge types critic kt syntax add trigger name crunconventionalpackname setupheadanddesc addsupporteddecision umldecision setknowledgetypes kt_syntax addtrigger override public boolean predicate2 object dm designer dsgr if model get facade isa package dm return no problem string my name model get facade get name dm if my name null my name equals return no problem string name str my name if name str null name str length 0 return no problem int size name str length for int i 0 i size i char c name str char at i if character is lower case c return problem found return no problem getfacade isapackage no_problem myname getfacade getname myname myname no_problem namestr myname namestr namestr no_problem namestr namestr charat islowercase problem_found no_problem see org argouml cognitive poster get clarifier public icon get clarifier return cl class name get the instance getclarifier getclarifier clclassname gettheinstance override public void init wizard wizard w if w instanceof wizme name to do item item to do item w get to do item object me item get offenders get 0 string ins super get instructions string name str model get facade get name me string sug compute suggestion name str wizme name w set instructions ins wizme name w set suggestion sug initwizard wizmename todoitem todoitem gettodoitem getoffenders getinstructions namestr getfacade getname computesuggestion namestr wizmename setinstructions wizmename setsuggestion public string compute suggestion string name str string builder sug new string builder if name str null int size name str length for int i 0 i size i char c name str char at i if character is lower case c sug append c else if character is upper case c sug append character to lower case c if sug to string equals return package name return sug to string computesuggestion namestr stringbuilder stringbuilder namestr namestr namestr charat islowercase isuppercase tolowercase tostring packagename tostring public set object get criticized design materials set object ret new hash set object ret add model get meta types get package return ret getcriticizeddesignmaterials hashset getmetatypes getpackage see org argouml cognitive critics critic get wizard class org argouml cognitive to do item override public class get wizard class to do item item return wizme name class getwizardclass todoitem getwizardclass todoitem wizmename override protected final boolean is connection valid fig source fig dest if dest instanceof fig node model element object src owner source get owner object dst owner dest get owner if model get facade isa model element src owner model get facade isa model element dst owner return false if model get model management helper is read only src owner model get model management helper is read only dst owner return false return model get facade isa comment src owner model get facade isa comment dst owner else return true isconnectionvalid fignodemodelelement srcowner getowner dstowner getowner getfacade isamodelelement srcowner getfacade isamodelelement dstowner getmodelmanagementhelper isreadonly srcowner getmodelmanagementhelper isreadonly dstowner getfacade isacomment srcowner getfacade isacomment dstowner protected final object get meta type return comment edge class getmetatype commentedge constructor for uml transition trigger list param data model the model public uml signal event signal list uml model element list model2 data model super data model abstract action add model element2 null null null true set delete false set delete action null umltransitiontriggerlist datamodel umlsignaleventsignallist umlmodelelementlistmodel2 datamodel datamodel abstractactionaddmodelelement2 setdelete setdeleteaction public j popup menu get popup menu j popup menu menu new j popup menu action add signals to signal event singleton set target get target menu add action add signals to signal event singleton menu add new action new signal return menu jpopupmenu getpopupmenu jpopupmenu jpopupmenu actionaddsignalstosignalevent settarget gettarget actionaddsignalstosignalevent actionnewsignal build default listmodel with unlimited size and allowed elements classifier public uml instance classifier list model super classifier umlinstanceclassifierlistmodel see org argouml uml ui uml model element list model2 build model list protected void build model list if get target null set all elements model get facade get classifiers get target umlmodelelementlistmodel2 buildmodellist buildmodellist gettarget setallelements getfacade getclassifiers gettarget see org argouml uml ui uml model element list model2 is valid element object protected boolean is valid element object o return model get facade isa classifier o model get facade get classifiers get target contains o umlmodelelementlistmodel2 isvalidelement isvalidelement getfacade isaclassifier getfacade getclassifiers gettarget the constructor param transition the uml element public transition notation object transition if model get facade isa transition transition throw new illegal argument exception this is not a transition transitionnotation getfacade isatransition illegalargumentexception the constructor public style panel fig class super add to display pane attr check box add to display pane oper check box attr check box set selected false oper check box set selected false attr check box add item listener this oper check box add item listener this stylepanelfigclass addtodisplaypane attrcheckbox addtodisplaypane opercheckbox attrcheckbox setselected opercheckbox setselected attrcheckbox additemlistener opercheckbox additemlistener public void refresh property change event e string property name e get property name if property name equals bounds refresh propertychangeevent propertyname getpropertyname propertyname public void refresh refresh transaction true super refresh attributes compartment container ac attributes compartment container get panel target attr check box set selected ac is attributes visible operations compartment container oc operations compartment container get panel target oper check box set selected oc is operations visible refresh transaction false refreshtransaction attributescompartmentcontainer attributescompartmentcontainer getpaneltarget attrcheckbox setselected isattributesvisible operationscompartmentcontainer operationscompartmentcontainer getpaneltarget opercheckbox setselected isoperationsvisible refreshtransaction public void item state changed item event e if refresh transaction object src e get source if src attr check box attributes compartment container get panel target set attributes visible attr check box is selected else if src oper check box operations compartment container get panel target set operations visible oper check box is selected else super item state changed e itemstatechanged itemevent refreshtransaction getsource attrcheckbox attributescompartmentcontainer getpaneltarget setattributesvisible attrcheckbox isselected opercheckbox operationscompartmentcontainer getpaneltarget setoperationsvisible opercheckbox isselected itemstatechanged public class os util do not allow this class to be instantiated private os util osutil osutil check whether we deal with a windows operating system return true if this is windows public static boolean is win32 return system get property os name index of windows 1 iswin32 getproperty indexof check whether we deal with a macintosh return true if this is a mac public static boolean is mac return system get property mrj version null ismac getproperty check whether this is a mac running os x return true if this is a mac running os x public static boolean is macosx return system get property os name to lower case starts with mac os x ismacosx getproperty tolowercase startswith check whether we deal with a sun java return true if this is a sun java public static boolean is sun jdk return system get property java vendor equals sun microsystems inc issunjdk getproperty default constructor for action we cannot use uml change action as a parent for this class since it works with should be enabled etc which doesn t give enough control about enabling disabling this action public action paste super translator localize localize key icon icon resource loader wrapper lookup icon localize key if icon null put value action small icon icon put value action short description translator localize localize key set enabled globals clip board null globals clip board is empty is system clip board empty set enabled false umlchangeaction shouldbeenabled actionpaste localize_key resourceloaderwrapper lookupicon localize_key putvalue small_icon putvalue short_description localize_key setenabled clipboard clipboard isempty issystemclipboardempty setenabled singleton implementation return the singleton public static action paste get instance return instance actionpaste getinstance public void action performed action event ae if globals clip board null globals clip board is empty disable pasting as long as issue 594 is not solved cmd paste cmd new cmd paste cmd do it else if is system clip board empty text source null text source paste actionperformed actionevent clipboard clipboard isempty cmdpaste cmdpaste doit issystemclipboardempty textsource textsource check if there is a selection on the clipboard return code true code if there is private boolean is system clip board empty try object text toolkit get default toolkit get system clipboard get contents null get transfer data data flavor string flavor return text null catch io exception ignorable catch unsupported flavor exception ignorable return true issystemclipboardempty getdefaulttoolkit getsystemclipboard getcontents gettransferdata dataflavor stringflavor ioexception unsupportedflavorexception public void focus lost focus event e if e get source text source text source null focuslost focusevent getsource textsource textsource see javax swing event caret listener caret update javax swing event caret event public void caret update caret event e text source j text component e get source caretlistener caretupdate caretevent caretupdate caretevent textsource jtextcomponent getsource see java awt event focus listener focus gained java awt event focus event public void focus gained focus event e text source j text component e get source focuslistener focusgained focusevent focusgained focusevent textsource jtextcomponent getsource reply a java util enumeration of the children of the given object param o the object to return the children of return an enumeration of the children of the given object see org tigris gef util child generator gen java lang object deprecated for 0 25 4 by tfmorris only for use with legacy gef interfaces use link gen2 object for new applications deprecated public enumeration gen object o return new iterator enumeration gen2 o childgenerator iteratorenumeration return an iterator of the children of the given object param o object to return the children of return an iterator over the children of the given object see org tigris gef util child generator gen java lang object public iterator gen2 object o if log is debug enabled if o null log debug object is null else log debug finding children for o get class if o instanceof project project p project o collection result new array list result add all p get user defined model list result add all p get diagram list return result iterator if o instanceof diagram collection figs diagram o get layer get contents if figs null return figs iterator argument can be an instanceof a fig which we ignore if model get facade isa package o collection owned elements model get facade get owned elements o if owned elements null return owned elements iterator if model get facade isa element import o object me model get facade get model element o if me null return new single element iterator me todo associationclasses fit both of the next 2 cases if model get facade isa classifier o collection result new array list result add all model get facade get features o collection sms model get facade get behaviors o object sm null if sms null sms size 0 sm sms element at 0 if sm null res add sub new enumeration single sm if sms null result add all sms return result iterator if model get facade isa association o list assoc ends list model get facade get connections o if assoc ends null return assoc ends iterator todo association role needed if model get facade isa state machine o collection result new array list object top model get state machines helper get top o if top null result add top result add all model get facade get transitions o return result iterator needed if model get facade isa composite state o collection substates model get facade get subvertices o if substates null return substates iterator if model get facade isa operation o collection params model get facade get parameters o if params null return params iterator if model get facade isa model element o collection behavior model get facade get behaviors o if behavior null return behavior iterator todo we can probably use this instead of all of the above legacy uml 1 3 code tfm 20070915 if model get facade isauml element o collection result model get facade get model element contents o return result iterator return collections empty set iterator childgenerator isdebugenabled getclass arraylist addall getuserdefinedmodellist addall getdiagramlist getlayer getcontents getfacade isapackage ownedelements getfacade getownedelements ownedelements ownedelements getfacade isaelementimport getfacade getmodelelement singleelementiterator getfacade isaclassifier arraylist addall getfacade getfeatures getfacade getbehaviors elementat addsub enumerationsingle addall getfacade isaassociation assocends getfacade getconnections assocends assocends associationrole getfacade isastatemachine arraylist getstatemachineshelper gettop addall getfacade gettransitions getfacade isacompositestate getfacade getsubvertices getfacade isaoperation getfacade getparameters getfacade isamodelelement getfacade getbehaviors getfacade isaumlelement getfacade getmodelelementcontents emptyset constructor for action new return action protected action new return action super put value action name translator localize button new returnaction actionnewreturnaction actionnewreturnaction putvalue see org argouml uml ui behavior common behavior action new action create action protected object create action return model get common behavior factory create return action common_behavior actionnewaction createaction createaction getcommonbehaviorfactory createreturnaction return returns the singleton public static action new return action get instance return singleton actionnewreturnaction getinstance public static action new action get button instance action new action a new action new return action public void action performed action event e object target target manager get instance get model target if model get facade isa transition target return set target target super action performed e a put value short description a get value action name object icon resource loader wrapper lookup icon resource return action a put value small icon icon a put value role roles effect return a actionnewaction getbuttoninstance actionnewaction actionnewreturnaction actionperformed actionevent targetmanager getinstance getmodeltarget getfacade isatransition settarget actionperformed putvalue short_description getvalue resourceloaderwrapper lookupiconresource returnaction putvalue small_icon putvalue public void action performed action event e object target target manager get instance get model target if model get facade isa transition target return set target target super action performed e actionperformed actionevent targetmanager getinstance getmodeltarget getfacade isatransition settarget actionperformed constructor for uml state do activity list model public uml state do activity list model super do activity umlstatedoactivitylistmodel umlstatedoactivitylistmodel doactivity see org argouml uml ui uml model element list model2 build model list protected void build model list remove all elements add element model get facade get do activity get target umlmodelelementlistmodel2 buildmodellist buildmodellist removeallelements addelement getfacade getdoactivity gettarget see org argouml uml ui uml model element list model2 is valid element object protected boolean is valid element object element return element model get facade get do activity get target umlmodelelementlistmodel2 isvalidelement isvalidelement getfacade getdoactivity gettarget constructor param edge the edge to layout public classdiagram edge fig edge edge current edge edge underlying fig new fig poly underlying fig set line color edge get fig get line color dest fig node edge get dest fig node source fig node edge get source fig node classdiagramedge figedge currentedge underlyingfig figpoly underlyingfig setlinecolor getfig getlinecolor destfignode getdestfignode sourcefignode getsourcefignode abstract method to layout the edge see org argouml uml diagram layout layouted edge layout layoutededge public abstract void layout param h the horizontal gap public static void seth gap int h h gap h sethgap hgap public static void seth gap int h h gap h param v the vertical gap public static void setv gap int v v gap v sethgap hgap setvgap vgap public static void setv gap int v v gap v return the horizontal gap public static int geth gap return h gap setvgap vgap gethgap hgap public static int geth gap return h gap return the vertical gap public static int getv gap return v gap gethgap hgap getvgap vgap return returns the dest fig node fig get dest fig node return dest fig node destfignode getdestfignode destfignode return returns the source fig node fig get source fig node return source fig node sourcefignode getsourcefignode sourcefignode return returns the current edge protected fig edge get current edge return current edge currentedge figedge getcurrentedge currentedge return returns the underlying fig protected fig poly get underlying fig return underlying fig underlyingfig figpoly getunderlyingfig underlyingfig the constructor param x x param y y param w width param h height deprecated for 0 27 3 by tfmorris use link fig stereotypes group object rectangle diagram settings suppress warnings deprecation deprecated public fig stereotypes group int x int y int w int h super construct figs x y w h figstereotypesgroup diagramsettings suppresswarnings figstereotypesgroup constructfigs private void construct figs int x int y int w int h big port new fig rect x y w h line color fill color add fig big port do not show border line make transparent set line width 0 set filled false constructfigs bigport figrect line_color fill_color addfig bigport setlinewidth setfilled the constructor param owner owning uml element param bounds position and size param settings render settings public fig stereotypes group object owner rectangle bounds diagram settings settings super owner settings construct figs bounds x bounds y bounds width bounds height model get pump add model event listener this owner stereotype populate figstereotypesgroup diagramsettings constructfigs getpump addmodeleventlistener suppress warnings deprecation override deprecated public void set owner object own if own null super set owner own model get pump add model event listener this own stereotype populate suppresswarnings setowner setowner getpump addmodeleventlistener override public void remove from diagram remove all items in the group otherwise the model event listeners remain todo why does a fig group not do this for object f get figs fig f remove from diagram super remove from diagram model get pump remove model event listener this get owner stereotype removefromdiagram figgroup getfigs removefromdiagram removefromdiagram getpump removemodeleventlistener getowner return the bigport deprecated for 0 27 2 for backward compatibility only the visibility of this method will be changed to private in the next release when fig stereotypes compartment is removed deprecated protected fig get big port return big port figstereotypescompartment getbigport bigport override public void property change property change event event if event instanceof add association event add association event aae add association event event if event get property name equals stereotype object stereotype aae get changed value if find fig stereotype null fig text stereotype text fig new fig stereotype stereotype get bounds for next stereotype get settings stereotype count add fig stereotype text fig reorder stereotype figs damage else log warn unexpected property event get property name if event instanceof remove association event if event get property name equals stereotype remove association event rae remove association event event object stereotype rae get changed value fig f find fig stereotype if f null remove fig f f remove from diagram or vice versa stereotype count else log warn unexpected property event get property name propertychange propertychangeevent addassociationevent addassociationevent addassociationevent getpropertyname getchangedvalue findfig figtext stereotypetextfig figstereotype getboundsfornextstereotype getsettings stereotypecount addfig stereotypetextfig reorderstereotypefigs getpropertyname removeassociationevent getpropertyname removeassociationevent removeassociationevent getchangedvalue findfig removefig removefromdiagram stereotypecount getpropertyname keep the figs which are likely invisible at the end of the list private void reorder stereotype figs list fig all figs get figs list fig figs with icon new array list fig list fig figs with out icon new array list fig list fig others new array list fig todo this doesn t do anything special with keywords they should probably go first for fig f all figs if f instanceof fig stereotype fig stereotype s fig stereotype f if get icon for stereotype s null figs with icon add s else figs with out icon add s else others add f list fig n new array list fig n add all others n add all figs with out icon n add all figs with icon set figs n reorderstereotypefigs allfigs getfigs figswithicon arraylist figswithouticon arraylist arraylist allfigs figstereotype figstereotype figstereotype geticonforstereotype figswithicon figswithouticon arraylist addall addall figswithouticon addall figswithicon setfigs private fig stereotype find fig object stereotype for object f get figs if f instanceof fig stereotype fig stereotype fs fig stereotype f if fs get owner stereotype return fs return null figstereotype findfig getfigs figstereotype figstereotype figstereotype getowner get all the child figs that represent the individual stereotypes return a list of the stereotype figs private list fig stereotype get stereotype figs final list fig stereotype stereotype figs new array list fig stereotype for object f get figs if f instanceof fig stereotype fig stereotype fs fig stereotype f stereotype figs add fs return stereotype figs figstereotype getstereotypefigs figstereotype stereotypefigs arraylist figstereotype getfigs figstereotype figstereotype figstereotype stereotypefigs stereotypefigs private fig keyword find fig keyword for object f get figs if f instanceof fig keyword return fig keyword f return null figkeyword findfigkeyword getfigs figkeyword figkeyword todo this should become private and only called from constructor see org argouml uml diagram ui fig editable compartment populate public void populate stereotype count 0 object model element get owner if model element null todo this block can be removed after issue 4075 is tackled log debug cannot populate the stereotype compartment unless the parent has an owner return if log is debug enabled log debug populating stereotypes compartment for model get facade get name model element this will contain the figs that we do not need anymore collection fig remove collection new array list fig get figs there is one fig more in the group than stereotypes keyword if keyword null fig keyword keyword fig find fig keyword if keyword fig null the keyword fig does not exist yet let s create one keyword fig new fig keyword keyword get bounds for next stereotype get settings bounds not relevant here add fig keyword fig else the keyword fig already exists remove collection remove keyword fig stereotype count for object stereo model get facade get stereotypes model element fig stereotype stereotype text fig find fig stereo if stereotype text fig null stereotype text fig new fig stereotype stereo get bounds for next stereotype get settings bounds not relevant here add fig stereotype text fig else the stereotype fig already exists remove collection remove stereotype text fig stereotype count cleanup of unused fig text s for fig f remove collection if f instanceof fig stereotype f instanceof fig keyword remove fig f reorder stereotype figs remove all stereotypes that have a graphical icon update hidden stereotypes figeditablecompartment stereotypecount modelelement getowner modelelement isdebugenabled getfacade getname modelelement removecollection arraylist getfigs figkeyword keywordfig findfigkeyword keywordfig keywordfig figkeyword getboundsfornextstereotype getsettings addfig keywordfig removecollection keywordfig stereotypecount getfacade getstereotypes modelelement figstereotype stereotypetextfig findfig stereotypetextfig stereotypetextfig figstereotype getboundsfornextstereotype getsettings addfig stereotypetextfig removecollection stereotypetextfig stereotypecount figtext removecollection figstereotype figkeyword removefig reorderstereotypefigs updatehiddenstereotypes private rectangle get bounds for next stereotype return new rectangle big port getx 1 big port gety 1 stereotype count rowheight 0 rowheight 2 getboundsfornextstereotype bigport bigport stereotypecount private void update hidden stereotypes list fig figs get figs for fig f figs if f instanceof fig stereotype fig stereotype fs fig stereotype f fs set visible get icon for stereotype fs null is hiding stereotypes with icon updatehiddenstereotypes getfigs figstereotype figstereotype figstereotype setvisible geticonforstereotype ishidingstereotypeswithicon private image get icon for stereotype fig stereotype fs todo find a way to replace this dependency on project project project get project if project null log warn get project returned null return null object owner fs get owner if owner null keywords which look like a stereotype e g interface have no owner return null else return project get profile configuration get fig node strategy get icon for stereotype owner geticonforstereotype figstereotype getproject getproject getowner getprofileconfiguration getfignodestrategy geticonforstereotype override protected void set bounds impl int x int y int w int h rectangle old bounds get bounds int yy y for fig fig collection fig get figs if fig big port fig set bounds x 1 yy 1 w 2 fig get minimum size height yy fig get minimum size height big port set bounds x y w h calc bounds fire prop change bounds old bounds get bounds setboundsimpl oldbounds getbounds getfigs bigport setbounds getminimumsize getminimumsize bigport setbounds calcbounds firepropchange oldbounds getbounds allows a parent fig to specify some keyword text to display amongst the stereotypes an example of this usage is to display lt lt interface gt gt on fig interface param word the text of the pseudo stereotype public void set keyword string word keyword word populate figinterface setkeyword return true if textual stereotypes are being hidden in preference to displaying icon public boolean is hiding stereotypes with icon return hiding stereotypes with icon ishidingstereotypeswithicon hidingstereotypeswithicon turn on off textual stereotype display in preference to icon param hide stereotypes with icon true to hide textual stereotypes and show icon instead public void set hiding stereotypes with icon boolean hide stereotypes with icon this hiding stereotypes with icon hide stereotypes with icon update hidden stereotypes hidestereotypeswithicon sethidingstereotypeswithicon hidestereotypeswithicon hidingstereotypeswithicon hidestereotypeswithicon updatehiddenstereotypes override public dimension get minimum size if there are no stereotypes we return 0 0 preventing double lines in the class see issue 4939 dimension dim null object model element get owner if model element null list fig stereotype stereos get stereotype figs if stereos size 0 keyword null int min width 0 int min height 0 set new bounds for all included figs for fig fig collection fig get figs if fig is visible fig big port int fw fig get minimum size width if fw min width min width fw min height fig get minimum size height min height 2 2 pixel padding after compartment dim new dimension min width min height if dim null dim new dimension 0 0 return dim getminimumsize modelelement getowner modelelement figstereotype getstereotypefigs minwidth minheight getfigs isvisible bigport getminimumsize minwidth minwidth minheight getminimumsize minheight minwidth minheight constructor for a new progress event param source the source that generated this event param the position the position to which progress has reach as a proportion of length param the length the total length the progress is measuring public progress event object source long the position long the length super source this length the length this position the position progressevent theposition thelength progressevent theposition thelength thelength theposition return the position of progress as a proportion of length return progress position public long get position return position getposition return the length that progress is measuring typically this is the length of a file or 100 if percentage progress is being measured return progress length public long get length return length getlength see javax swing plaf metal metal theme get name public string get name return default metaltheme getname getname see javax swing plaf metal metal theme get primary1 protected colorui resource get primary1 return primary1 metaltheme getprimary1 coloruiresource getprimary1 see javax swing plaf metal metal theme get primary2 protected colorui resource get primary2 return primary2 metaltheme getprimary2 coloruiresource getprimary2 see javax swing plaf metal metal theme get primary3 protected colorui resource get primary3 return primary3 metaltheme getprimary3 coloruiresource getprimary3 see javax swing plaf metal metal theme get secondary1 protected colorui resource get secondary1 return secondary1 metaltheme getsecondary1 coloruiresource getsecondary1 see javax swing plaf metal metal theme get secondary2 protected colorui resource get secondary2 return secondary2 metaltheme getsecondary2 coloruiresource getsecondary2 see javax swing plaf metal metal theme get secondary3 protected colorui resource get secondary3 return secondary3 metaltheme getsecondary3 coloruiresource getsecondary3 see javax swing plaf metal metal theme get control text font public fontui resource get control text font return control font metaltheme getcontroltextfont fontuiresource getcontroltextfont controlfont see javax swing plaf metal metal theme get system text font public fontui resource get system text font return system font metaltheme getsystemtextfont fontuiresource getsystemtextfont systemfont see javax swing plaf metal metal theme get user text font public fontui resource get user text font return user font metaltheme getusertextfont fontuiresource getusertextfont userfont see javax swing plaf metal metal theme get menu text font public fontui resource get menu text font return control font metaltheme getmenutextfont fontuiresource getmenutextfont controlfont see javax swing plaf metal metal theme get sub text font public fontui resource get sub text font return small font metaltheme getsubtextfont fontuiresource getsubtextfont smallfont see javax swing plaf metal metal theme get window title font public fontui resource get window title font return window title font metaltheme getwindowtitlefont fontuiresource getwindowtitlefont windowtitlefont the constructor we currently support 2 scopes but this class is written in a way to easily extend that param settings scope the scope of the settings public settings tab notation int settings scope super scope settings scope set layout new border layout j panel top new j panel top set layout new border layout if settings scope argo scope application j panel warning new j panel warning set layout new box layout warning box layout page axis j label warning label new j label translator localize label warning warning label set alignmentx component right alignment warning add warning label j link button project settings new j link button project settings set action new action project settings project settings set text translator localize button project settings project settings set icon null project settings set alignmentx component right alignment warning add project settings top add warning border layout north j panel settings new j panel settings set layout new grid bag layout grid bag constraints constraints new grid bag constraints constraints anchor grid bag constraints west constraints fill grid bag constraints horizontal constraints gridy 0 constraints gridx 0 constraints gridwidth 1 constraints gridheight 1 constraints weightx 1 0 constraints insets new insets 0 30 0 4 constraints gridy grid bag constraints relative j panel notation language panel new j panel new flow layout flow layout left 5 0 j label notation language label create label label notation language notation language new notation combo box notation language label set label for notation language notation language panel add notation language label notation language panel add notation language settings add notation language panel constraints show bold names create check box label show bold names settings add show bold names constraints use guillemots create check box label use guillemots settings add use guillemots constraints 2002 07 31 jaap branderhorst from here made visibility etc configurable show association names create check box label show associationnames settings add show association names constraints show visibility create check box label show visibility settings add show visibility constraints show multiplicity create check box label show multiplicity settings add show multiplicity constraints show initial value create check box label show initialvalue settings add show initial value constraints show properties create check box label show properties settings add show properties constraints show types create check box label show types settings add show types constraints show stereotypes create check box label show stereotypes settings add show stereotypes constraints show singular multiplicities create check box label show singular multiplicities settings add show singular multiplicities constraints hide bidirectional arrows create check box label hide bidirectional arrows settings add hide bidirectional arrows constraints constraints insets new insets 5 30 0 4 j panel default shadow width panel new j panel new flow layout flow layout left 5 0 j label default shadow width label create label label default shadow width default shadow width new shadow combo box default shadow width label set label for default shadow width default shadow width panel add default shadow width label default shadow width panel add default shadow width settings add default shadow width panel constraints top add settings border layout center add top border layout north settingsscope settingstabnotation settingsscope settingsscope setlayout borderlayout jpanel jpanel setlayout borderlayout settingsscope scope_application jpanel jpanel setlayout boxlayout boxlayout page_axis jlabel warninglabel jlabel warninglabel setalignmentx right_alignment warninglabel jlinkbutton projectsettings jlinkbutton projectsettings setaction actionprojectsettings projectsettings settext projectsettings seticon projectsettings setalignmentx right_alignment projectsettings borderlayout jpanel jpanel setlayout gridbaglayout gridbagconstraints gridbagconstraints gridbagconstraints gridbagconstraints gridbagconstraints jpanel notationlanguagepanel jpanel flowlayout flowlayout jlabel notationlanguagelabel createlabel notationlanguage notationcombobox notationlanguagelabel setlabelfor notationlanguage notationlanguagepanel notationlanguagelabel notationlanguagepanel notationlanguage notationlanguagepanel showboldnames createcheckbox showboldnames useguillemots createcheckbox useguillemots showassociationnames createcheckbox showassociationnames showvisibility createcheckbox showvisibility showmultiplicity createcheckbox showmultiplicity showinitialvalue createcheckbox showinitialvalue showproperties createcheckbox showproperties showtypes createcheckbox showtypes showstereotypes createcheckbox showstereotypes showsingularmultiplicities createcheckbox showsingularmultiplicities hidebidirectionalarrows createcheckbox hidebidirectionalarrows jpanel defaultshadowwidthpanel jpanel flowlayout flowlayout jlabel defaultshadowwidthlabel createlabel defaultshadowwidth shadowcombobox defaultshadowwidthlabel setlabelfor defaultshadowwidth defaultshadowwidthpanel defaultshadowwidthlabel defaultshadowwidthpanel defaultshadowwidth defaultshadowwidthpanel borderlayout borderlayout public void handle settings tab refresh if scope argo scope application show bold names set selected get boolean notation key show bold names use guillemots set selected get boolean notation key use guillemots notation language set selected item notation get configured notation show association names set selected configuration get boolean notation key show association names true show visibility set selected get boolean notation key show visibility show initial value set selected get boolean notation key show initial value show properties set selected get boolean notation key show properties the next one defaults to true to stay compatible with older argouml versions that did not have this setting show types set selected configuration get boolean notation key show types true show multiplicity set selected get boolean notation key show multiplicity show stereotypes set selected get boolean notation key show stereotypes the next one defaults to true despite that this is not compatible with older argouml versions before 0 24 that did not have this setting see issue 1395 for the rationale show singular multiplicities set selected configuration get boolean notation key show singular multiplicities true the next one defaults to true despite that this is not compatible with older argouml versions before 0 28 that did not have this setting see issue 535 hide bidirectional arrows set selected configuration get boolean notation key hide bidirectional arrows true default shadow width set selected index configuration get integer notation key default shadow width 1 if scope argo scope project project p project manager get manager get current project project settings ps p get project settings notation language set selected item notation find notation ps get notation language show bold names set selected ps get show bold names value use guillemots set selected ps get use guillemots value show association names set selected ps get show association names value show visibility set selected ps get show visibility value show multiplicity set selected ps get show multiplicity value show initial value set selected ps get show initial value value show properties set selected ps get show properties value show types set selected ps get show types value show stereotypes set selected ps get show stereotypes value show singular multiplicities set selected ps get show singular multiplicities value hide bidirectional arrows set selected ps get hide bidirectional arrows value default shadow width set selected index ps get default shadow width value handlesettingstabrefresh scope_application showboldnames setselected getboolean key_show_bold_names useguillemots setselected getboolean key_use_guillemots notationlanguage setselecteditem getconfigurednotation showassociationnames setselected getboolean key_show_association_names showvisibility setselected getboolean key_show_visibility showinitialvalue setselected getboolean key_show_initial_value showproperties setselected getboolean key_show_properties showtypes setselected getboolean key_show_types showmultiplicity setselected getboolean key_show_multiplicity showstereotypes setselected getboolean key_show_stereotypes showsingularmultiplicities setselected getboolean key_show_singular_multiplicities hidebidirectionalarrows setselected getboolean key_hide_bidirectional_arrows defaultshadowwidth setselectedindex getinteger key_default_shadow_width scope_project projectmanager getmanager getcurrentproject projectsettings getprojectsettings notationlanguage setselecteditem findnotation getnotationlanguage showboldnames setselected getshowboldnamesvalue useguillemots setselected getuseguillemotsvalue showassociationnames setselected getshowassociationnamesvalue showvisibility setselected getshowvisibilityvalue showmultiplicity setselected getshowmultiplicityvalue showinitialvalue setselected getshowinitialvaluevalue showproperties setselected getshowpropertiesvalue showtypes setselected getshowtypesvalue showstereotypes setselected getshowstereotypesvalue showsingularmultiplicities setselected getshowsingularmultiplicitiesvalue hidebidirectionalarrows setselected gethidebidirectionalarrowsvalue defaultshadowwidth setselectedindex getdefaultshadowwidthvalue get a boolean from the configuration param key a notation key return a boolean protected static boolean get boolean configuration key key return configuration get boolean key false getboolean configurationkey getboolean public void handle settings tab save if scope argo scope application notation set default notation notation name notation language get selected item configuration set boolean notation key show bold names show bold names is selected configuration set boolean notation key use guillemots use guillemots is selected configuration set boolean notation key show association names show association names is selected configuration set boolean notation key show visibility show visibility is selected configuration set boolean notation key show multiplicity show multiplicity is selected configuration set boolean notation key show initial value show initial value is selected configuration set boolean notation key show properties show properties is selected configuration set boolean notation key show types show types is selected configuration set boolean notation key show stereotypes show stereotypes is selected configuration set boolean notation key show singular multiplicities show singular multiplicities is selected configuration set boolean notation key hide bidirectional arrows hide bidirectional arrows is selected configuration set integer notation key default shadow width default shadow width get selected index if scope argo scope project project p project manager get manager get current project project settings ps p get project settings notation name nn notation name notation language get selected item if nn null ps set notation language nn get configuration value ps set show bold names show bold names is selected ps set use guillemots use guillemots is selected ps set show association names show association names is selected ps set show visibility show visibility is selected ps set show multiplicity show multiplicity is selected ps set show initial value show initial value is selected ps set show properties show properties is selected ps set show types show types is selected ps set show stereotypes show stereotypes is selected ps set show singular multiplicities show singular multiplicities is selected ps set default shadow width default shadow width get selected index ps set hide bidirectional arrows hide bidirectional arrows is selected handlesettingstabsave scope_application setdefaultnotation notationname notationlanguage getselecteditem setboolean key_show_bold_names showboldnames isselected setboolean key_use_guillemots useguillemots isselected setboolean key_show_association_names showassociationnames isselected setboolean key_show_visibility showvisibility isselected setboolean key_show_multiplicity showmultiplicity isselected setboolean key_show_initial_value showinitialvalue isselected setboolean key_show_properties showproperties isselected setboolean key_show_types showtypes isselected setboolean key_show_stereotypes showstereotypes isselected setboolean key_show_singular_multiplicities showsingularmultiplicities isselected setboolean key_hide_bidirectional_arrows hidebidirectionalarrows isselected setinteger key_default_shadow_width defaultshadowwidth getselectedindex scope_project projectmanager getmanager getcurrentproject projectsettings getprojectsettings notationname notationname notationlanguage getselecteditem setnotationlanguage getconfigurationvalue setshowboldnames showboldnames isselected setuseguillemots useguillemots isselected setshowassociationnames showassociationnames isselected setshowvisibility showvisibility isselected setshowmultiplicity showmultiplicity isselected setshowinitialvalue showinitialvalue isselected setshowproperties showproperties isselected setshowtypes showtypes isselected setshowstereotypes showstereotypes isselected setshowsingularmultiplicities showsingularmultiplicities isselected setdefaultshadowwidth defaultshadowwidth getselectedindex sethidebidirectionalarrows hidebidirectionalarrows isselected see org argouml ui gui settings tab interface handle settings tab cancel public void handle settings tab cancel handle settings tab refresh guisettingstabinterface handlesettingstabcancel handlesettingstabcancel handlesettingstabrefresh public void handle reset to default if scope argo scope project notation language set selected item notation get configured notation show bold names set selected get boolean notation key show bold names use guillemots set selected get boolean notation key use guillemots show association names set selected configuration get boolean notation key show association names true show visibility set selected get boolean notation key show visibility show multiplicity set selected get boolean notation key show multiplicity show initial value set selected get boolean notation key show initial value show properties set selected configuration get boolean notation key show properties show types set selected configuration get boolean notation key show types true show stereotypes set selected configuration get boolean notation key show stereotypes show singular multiplicities set selected configuration get boolean notation key show singular multiplicities hide bidirectional arrows set selected configuration get boolean notation key hide bidirectional arrows true default shadow width set selected index configuration get integer notation key default shadow width 1 handleresettodefault scope_project notationlanguage setselecteditem getconfigurednotation showboldnames setselected getboolean key_show_bold_names useguillemots setselected getboolean key_use_guillemots showassociationnames setselected getboolean key_show_association_names showvisibility setselected getboolean key_show_visibility showmultiplicity setselected getboolean key_show_multiplicity showinitialvalue setselected getboolean key_show_initial_value showproperties setselected getboolean key_show_properties showtypes setselected getboolean key_show_types showstereotypes setselected getboolean key_show_stereotypes showsingularmultiplicities setselected getboolean key_show_singular_multiplicities hidebidirectionalarrows setselected getboolean key_hide_bidirectional_arrows defaultshadowwidth setselectedindex getinteger key_default_shadow_width see org argouml ui gui settings tab interface get tab key public string get tab key return tab notation guisettingstabinterface gettabkey gettabkey see org argouml ui gui settings tab interface get tab panel public j panel get tab panel return this guisettingstabinterface gettabpanel jpanel gettabpanel create a localized j check box param key the key for the string to be localized return a new checkbox with localized text protected j check box create check box string key j check box j new j check box translator localize key return j jcheckbox jcheckbox createcheckbox jcheckbox jcheckbox create a localized j label param key the key of the text for the label return a new label with a localized text for the given key protected j label create label string key return new j label translator localize key jlabel jlabel createlabel jlabel public void set visible boolean visible super set visible visible if visible handle settings tab refresh setvisible setvisible handlesettingstabrefresh the constructor public to do by poster super combobox todo perspective poster add sub tree model new go list to poster to item todobyposter addsubtreemodel golisttopostertoitem public void to do items changed to do list event tde log debug to do items changed list to do item items tde get to do item list object path new object 2 path 0 designer the designer get to do list list set poster all posters designer the designer get to do list get posters synchronized all posters for poster p all posters path 1 p int n matching items 0 for to do item item items poster post item get poster if post p continue n matching items if n matching items 0 continue int child indices new int n matching items object children new object n matching items n matching items 0 for to do item item items poster post item get poster if post p continue child indices n matching items get index of child p item children n matching items item n matching items fire tree nodes changed this path child indices children todoitemschanged todolistevent todoitemschanged todoitem gettodoitemlist thedesigner gettodolist listset allposters thedesigner gettodolist getposters allposters allposters nmatchingitems todoitem getposter nmatchingitems nmatchingitems childindices nmatchingitems nmatchingitems nmatchingitems todoitem getposter childindices nmatchingitems getindexofchild nmatchingitems nmatchingitems firetreenodeschanged childindices public void to do items added to do list event tde log debug to do item added list to do item items tde get to do item list object path new object 2 path 0 designer the designer get to do list list set poster all posters designer the designer get to do list get posters synchronized all posters for poster p all posters path 1 p int n matching items 0 for to do item item items poster post item get poster if post p continue n matching items if n matching items 0 continue int child indices new int n matching items object children new object n matching items n matching items 0 for to do item item items poster post item get poster if post p continue child indices n matching items get index of child p item children n matching items item n matching items fire tree nodes inserted this path child indices children todoitemsadded todolistevent todoitemadded todoitem gettodoitemlist thedesigner gettodolist listset allposters thedesigner gettodolist getposters allposters allposters nmatchingitems todoitem getposter nmatchingitems nmatchingitems childindices nmatchingitems nmatchingitems nmatchingitems todoitem getposter childindices nmatchingitems getindexofchild nmatchingitems nmatchingitems firetreenodesinserted childindices public void to do items removed to do list event tde log debug to do item removed list to do item items tde get to do item list object path new object 2 path 0 designer the designer get to do list list set poster all posters designer the designer get to do list get posters synchronized all posters for poster p all posters boolean any in poster false for to do item item items poster post item get poster if post p any in poster true break if any in poster continue path 1 p fire tree structure changed path todoitemsremoved todolistevent todoitemremoved todoitem gettodoitemlist thedesigner gettodolist listset allposters thedesigner gettodolist getposters allposters allposters anyinposter todoitem getposter anyinposter anyinposter firetreestructurechanged see org argouml cognitive to do list listener to do list changed org argouml cognitive to do list event public void to do list changed to do list event tde todolistlistener todolistchanged todolistevent todolistchanged todolistevent return returns the singleton public static child gen related get singleton return singleton childgenrelated getsingleton reply a java util enumeration of the children of the given object returns an enumeration or null if not possible to get the children see org tigris gef util child generator gen java lang object public enumeration gen object o this is carried over from previous implementation not sure why we don t want contents of package tfm 20060214 if model get facade isa package o return null if o instanceof diagram list res new array list diagram d diagram o res add d get graph model get nodes res add d get graph model get edges return collections enumeration res for all other model elements return any elements associated in any way if model get facade isauml element o return collections enumeration model get facade get model element associated o throw new illegal argument exception unknown element type o childgenerator getfacade isapackage arraylist getgraphmodel getnodes getgraphmodel getedges getfacade isaumlelement getfacade getmodelelementassociated illegalargumentexception construct a new action set add comment link mode p public action set add comment link mode super mode create comment edge class edge class comment edge class button new commentlink actionsetaddcommentlinkmode actionsetaddcommentlinkmode modecreatecommentedge edgeclass commentedge constructor for this action public action save graphics super translator localize action save graphics resource loader wrapper lookup icon action save graphics actionsavegraphics resourceloaderwrapper lookupicon see abstract action action performed action event public void action performed action event ae try save todo what to do with the return value abstractaction actionperformed actionevent actionperformed actionevent trysave method that does almost everything in this class p return true if all went well private boolean try save object target diagram utils get active diagram if target instanceof diagram return false string default name diagram target get name default name util strip junk default name project p project manager get manager get current project save graphics manager sgm save graphics manager get instance try j file chooser chooser null if p null p geturi null p geturi tourl get file length 0 chooser new j file chooser p geturi tourl get file if chooser null chooser new j file chooser object s default name chooser set dialog title translator message format filechooser save graphics s only specified format are allowed chooser set accept all file filter used false sgm set file chooser filters chooser default name string fn configuration get string save graphics manager key save graphics path if fn length 0 chooser set selected file new file fn int retval chooser show save dialog argo frame get instance if retval j file chooser approve option file the file chooser get selected file if the file null string path the file get path configuration set string save graphics manager key save graphics path path the file new file the file get parent file sgm fix extension the file get name string suffix sgm get filter from file name the file get name get suffix return do save the file suffix true catch out of memory error e exception dialog ed new exception dialog argo frame get instance you have run out of memory close down argouml and restart with a larger heap size e ed set modal true ed set visible true catch exception e exception dialog ed new exception dialog argo frame get instance e ed set modal true ed set visible true log error got some exception e return false trysave diagramutils getactivediagram defaultname getname defaultname stripjunk defaultname projectmanager getmanager getcurrentproject savegraphicsmanager savegraphicsmanager getinstance jfilechooser getfile jfilechooser getfile jfilechooser defaultname setdialogtitle messageformat setacceptallfilefilterused setfilechooserfilters defaultname getstring savegraphicsmanager key_save_graphics_path setselectedfile showsavedialog argoframe getinstance jfilechooser approve_option thefile getselectedfile thefile thefile getpath setstring savegraphicsmanager key_save_graphics_path thefile thefile getparentfile fixextension thefile getname getfilterfromfilename thefile getname getsuffix dosave thefile outofmemoryerror exceptiondialog exceptiondialog argoframe getinstance setmodal setvisible exceptiondialog exceptiondialog argoframe getinstance setmodal setvisible actually do the saving of the graphics file return true if it was successful param the file is the file that we are writing to param suffix is the suffix used for deciding what format the file shall have param useui is true if we are supposed to use the ui e g to warn the user that we are replacing an old file private boolean do save file the file string suffix boolean useui throws file not found exception io exception save graphics manager sgm save graphics manager get instance save graphics action cmd null cmd sgm get save action by suffix suffix if cmd null return false if useui update status translator localize statusmsg bar save graphics status writing new object the file if the file exists useui int response j option pane show confirm dialog argo frame get instance translator message format optionpane confirm overwrite new object the file translator localize optionpane confirm overwrite title j option pane yes no option if response j option pane yes option return false file output stream fo new file output stream the file cmd set stream fo cmd set scale configuration get integer save graphics manager key graphics resolution 1 try cmd action performed null finally fo close if useui update status translator localize statusmsg bar save graphics status wrote new object the file return true thefile dosave thefile filenotfoundexception ioexception savegraphicsmanager savegraphicsmanager getinstance savegraphicsaction getsaveactionbysuffix updatestatus thefile thefile joptionpane showconfirmdialog argoframe getinstance messageformat thefile joptionpane yes_no_option joptionpane yes_option fileoutputstream fileoutputstream thefile setstream setscale getinteger savegraphicsmanager key_graphics_resolution actionperformed updatestatus thefile private void update status string status argo event pump fire event new argo status event argo event types status text this status updatestatus argoeventpump fireevent argostatusevent argoeventtypes status_text execute this action from the command line todo the underlying gef library relies on acme that doesn t allow us to create these files unless there is a window showing for this reason i have had to split the performing of commands in link org argouml application main main string so that we can by not supplying the batch option run these commands with the window showing hopefully this can eventually be fixed see org argouml application api command line interface do command string param argument is the file name that we save to return true if it is ok public boolean do command string argument file file new file argument string suffix suffix filter get extension file if suffix null return false try return do save file suffix false catch file not found exception e log error file not found error when writing e catch io exception e log error io error when writing e return false commandlineinterface docommand docommand suffixfilter getextension dosave filenotfoundexception ioexception public class init notation implements init subsystem public void init notation provider factory2 get instance initnotation initsubsystem notationproviderfactory2 getinstance public list gui settings tab interface get project settings tabs return collections empty list guisettingstabinterface getprojectsettingstabs emptylist public list gui settings tab interface get settings tabs return collections empty list guisettingstabinterface getsettingstabs emptylist public list abstract argoj panel get details tabs return collections empty list abstractargojpanel getdetailstabs emptylist creates a new instance of associations node param p the parent public outgoing dependency node object p parent p associationsnode outgoingdependencynode return the parent public object get parent return parent getparent see java lang object to string public string to string return outgoing dependencies tostring tostring see org argouml ui explorer weak explorer node subsumes java lang object public boolean subsumes object obj return obj instanceof outgoing dependency node weakexplorernode outgoingdependencynode the constructor param w the wizard param instr the instructions param strings the strings public wiz step many text fields wizard w string instr list strings store wizard instructions set text instr instructions set wrap style word true instructions set line wrap true instructions set editable false instructions set border null instructions set background get main panel get background get main panel set border new etched border grid bag layout gb new grid bag layout get main panel set layout gb grid bag constraints c new grid bag constraints c ipadx 3 c ipady 3 c weightx 0 0 c weighty 0 0 c anchor grid bag constraints east j label image new j label image set margin new insets 0 0 0 0 image set icon get wizard icon image set border null c gridx 0 c gridheight grid bag constraints remainder c gridy 0 c anchor grid bag constraints north gb set constraints image c get main panel add image c weightx 0 0 c gridx 2 c gridheight 1 c gridwidth 3 c gridy 0 c fill grid bag constraints none gb set constraints instructions c get main panel add instructions c gridx 1 c gridy 1 c weightx 0 0 c gridwidth 1 c fill grid bag constraints none spacer panel spacer new spacer panel gb set constraints spacer c get main panel add spacer c gridx 2 c weightx 1 0 c anchor grid bag constraints west c gridwidth 1 int size strings size for int i 0 i size i c gridy 2 i string s string strings get i j text field tf new j text field s 50 tf set minimum size new dimension 200 20 tf get document add document listener this fields add tf gb set constraints tf c get main panel add tf c gridx 1 c gridy 3 strings size c weightx 0 0 c gridwidth 1 c fill grid bag constraints none spacer panel spacer2 new spacer panel gb set constraints spacer2 c get main panel add spacer2 wizstepmanytextfields settext setwrapstyleword setlinewrap seteditable setborder setbackground getmainpanel getbackground getmainpanel setborder etchedborder gridbaglayout gridbaglayout getmainpanel setlayout gridbagconstraints gridbagconstraints gridbagconstraints jlabel jlabel setmargin seticon getwizardicon setborder gridbagconstraints gridbagconstraints setconstraints getmainpanel gridbagconstraints setconstraints getmainpanel gridbagconstraints spacerpanel spacerpanel setconstraints getmainpanel gridbagconstraints jtextfield jtextfield setminimumsize getdocument adddocumentlistener setconstraints getmainpanel gridbagconstraints spacerpanel spacerpanel setconstraints getmainpanel return the strings public list string get string list list string result new array list string fields size for j text field tf fields result add tf get text return result getstringlist arraylist jtextfield gettext hide constructor for the uuid manager this is private to make sure that we are a utility uuidmanager return the uuid of the element param base a model element or a fig representing a model element return uuid public static string getuuid object base if base instanceof fig base fig base get owner if base null return null if base instanceof comment edge return string comment edge base getuuid return model get facade getuuid base getowner commentedge commentedge getfacade return a new uuid public static string get newuuid return org argouml model uuid manager get instance get newuuid getnewuuid uuidmanager getinstance getnewuuid constructor for popup menu new event p constructs a new popupmenu the given parameter role determines what the purpose is of the events that can be created via this popupmenu the parameter must comply to the interface roles defined on action new event param role the role param target the target public popup menu new event string role object target super build menu this role target popupmenunewevent actionnewevent popupmenunewevent buildmenu static void build menu j popup menu pmenu string role object target assert role null assert target null if role equals action new event roles deferrable event role equals action new event roles trigger j menu select new j menu translator localize action select select set text translator localize action select if role equals action new event roles deferrable event action add event as deferrable event singleton set target target j menu item menu item new j menu item action add event as deferrable event singleton select add action add event as deferrable event singleton select add menu item else if role equals action new event roles trigger action add event as trigger singleton set target target select add action add event as trigger singleton pmenu add select j menu new menu new j menu translator localize action new new menu set text translator localize action new new menu add action new call event get singleton action new call event get singleton set target target action new call event get singleton put value action new event role role new menu add action new change event get singleton action new change event get singleton set target target action new change event get singleton put value action new event role role new menu add action new signal event get singleton action new signal event get singleton set target target action new signal event get singleton put value action new event role role new menu add action new time event get singleton action new time event get singleton set target target action new time event get singleton put value action new event role role pmenu add new menu pmenu add separator action remove model element singleton set object to remove action new event get action role target action remove model element singleton put value action name translator localize action delete from model pmenu add action remove model element singleton buildmenu jpopupmenu actionnewevent deferrable_event actionnewevent jmenu jmenu settext actionnewevent deferrable_event actionaddeventasdeferrableevent settarget jmenuitem menuitem jmenuitem actionaddeventasdeferrableevent actionaddeventasdeferrableevent menuitem actionnewevent actionaddeventastrigger settarget actionaddeventastrigger jmenu newmenu jmenu newmenu settext newmenu actionnewcallevent getsingleton actionnewcallevent getsingleton settarget actionnewcallevent getsingleton putvalue actionnewevent newmenu actionnewchangeevent getsingleton actionnewchangeevent getsingleton settarget actionnewchangeevent getsingleton putvalue actionnewevent newmenu actionnewsignalevent getsingleton actionnewsignalevent getsingleton settarget actionnewsignalevent getsingleton putvalue actionnewevent newmenu actionnewtimeevent getsingleton actionnewtimeevent getsingleton settarget actionnewtimeevent getsingleton putvalue actionnewevent newmenu addseparator actionremovemodelelement setobjecttoremove actionnewevent getaction actionremovemodelelement putvalue actionremovemodelelement the default constructor for this class sets the default profiles as given by link org argouml profile profile manager as the profiles of the project param project the project that contains this configuration public profile configuration project project super extension project for profile p profile facade get manager get default profiles add profile p update strategies profilemanager profileconfiguration profilefacade getmanager getdefaultprofiles addprofile updatestrategies the constructor for pre defined profile configurations such as when a project is read from a saved file param project the project that contains this configuration param configured profiles the link profile s that will be the project profiles public profile configuration project project collection profile configured profiles super extension project for profile profile configured profiles add profile profile update strategies configuredprofiles profileconfiguration configuredprofiles configuredprofiles addprofile updatestrategies private void update strategies for profile profile profiles activate formating strategy profile activate default type strategy profile updatestrategies activateformatingstrategy activatedefaulttypestrategy return the current formating strategy public formating strategy get formating strategy return formating strategy formatingstrategy getformatingstrategy formatingstrategy return the current default type strategy public default type strategy get default type strategy return default type strategy defaulttypestrategy getdefaulttypestrategy defaulttypestrategy updates the current strategy to the strategy provided by the passed profile the profile should have been previously registered param profile the profile providing the current default type strategy public void activate default type strategy profile profile if profile null profile get default type strategy null get profiles contains profile this default type strategy profile get default type strategy activatedefaulttypestrategy getdefaulttypestrategy getprofiles defaulttypestrategy getdefaulttypestrategy updates the current strategy to the strategy provided by the passed profile the profile should have been previously registered param profile the profile providing the current formating strategy public void activate formating strategy profile profile if profile null profile get formating strategy null get profiles contains profile this formating strategy profile get formating strategy activateformatingstrategy getformatingstrategy getprofiles formatingstrategy getformatingstrategy return the list of applied profiles public list profile get profiles return profiles getprofiles applies a new profile to this configuration param p the profile to be applied suppress warnings unchecked public void add profile profile p if profiles contains p profiles add p try profile models add all p get profile packages catch profile exception e log warn error retrieving profile s p packages e fig node strategy fns p get figure strategy if fns null fig node strategies add fns for profile dependency p get dependencies add profile dependency update strategies argo event pump fire event new argo profile event argo event types profile added new property change event this profile null p suppresswarnings addprofile profilemodels addall getprofilepackages profileexception fignodestrategy getfigurestrategy fignodestrategies getdependencies addprofile updatestrategies argoeventpump fireevent argoprofileevent argoeventtypes profile_added propertychangeevent return the list of models of the currently applied profile private list get profile models return profile models getprofilemodels profilemodels removes the passed profile from the configuration param p the profile to be removed public void remove profile profile p profiles remove p try profile models remove all p get profile packages catch profile exception e log error exception e fig node strategy fns p get figure strategy if fns null fig node strategies remove fns if formating strategy p get formating strategy formating strategy null list profile mark for removal new array list profile for profile profile profiles if profile get dependencies contains p mark for removal add profile for profile profile mark for removal remove profile profile update strategies argo event pump fire event new argo profile event argo event types profile removed new property change event this profile p null removeprofile profilemodels removeall getprofilepackages profileexception fignodestrategy getfigurestrategy fignodestrategies formatingstrategy getformatingstrategy formatingstrategy markforremoval arraylist getdependencies markforremoval markforremoval removeprofile updatestrategies argoeventpump fireevent argoprofileevent argoeventtypes profile_removed propertychangeevent public image get icon for stereotype object element iterator it fig node strategies iterator while it has next fig node strategy strat fig node strategy it next image extra strat get icon for stereotype element if extra null return extra return null geticonforstereotype fignodestrategies hasnext fignodestrategy fignodestrategy geticonforstereotype return the current fig node strategy public fig node strategy get fig node strategy return composite fig node strategy fignodestrategy fignodestrategy getfignodestrategy compositefignodestrategy return the extension for this project member see org argouml kernel abstract project member get type public string get type return extension abstractprojectmember gettype gettype objects of this class are always consistent there s no need to repair them return the empty string see org argouml kernel project member repair public string repair return projectmember return the profile configuration string see java lang object to string override public string to string return profile configuration tostring tostring find a stereotype with the given name which is applicable to the given element param name name of stereotype to look for param element model element to which the stereotype must be applicable return the stereotype or null if none found public object find stereotype for object string name object element iterator iter null for object model profile models iter model get facade get owned elements model iterator while iter has next object stereo iter next if model get facade isa stereotype stereo name equals model get facade get name stereo continue if model get extension mechanisms helper is valid stereotype element stereo return stereo return null findstereotypeforobject profilemodels getfacade getownedelements hasnext getfacade isastereotype getfacade getname getextensionmechanismshelper isvalidstereotype search for the given type in all of the profile models param name name of type to be found return the type or null public object find type string name for object model get profile models object result find type in model name model if result null return result return null findtype getprofilemodels findtypeinmodel finds a type in a model by name fixme duplicated from the method with the same name in org argouml profile internal model utils param s the type name param model the model return the type or code null code if the type has not been found public static object find type in model string s object model if model get facade isa namespace model throw new illegal argument exception looking for the classifier s in a non namespace object of model a namespace was expected collection all classifiers model get model management helper get all model elements of kind model model get meta types get classifier object classifiers all classifiers to array object classifier null for int i 0 i classifiers length i classifier classifiers i if model get facade get name classifier null model get facade get name classifier equals s return classifier return null modelutils findtypeinmodel getfacade isanamespace illegalargumentexception allclassifiers getmodelmanagementhelper getallmodelelementsofkind getmetatypes getclassifier allclassifiers toarray getfacade getname getfacade getname find all the model elements in the configured link profile s of the given meta type param meta type the meta type of the model elements to find return a link collection containing the model elements that are of the given meta type suppress warnings unchecked public collection find by meta type object meta type set elements new hash set iterator it get profile models iterator while it has next object model it next elements add all model get model management helper get all model elements of kind model meta type return elements metatype suppresswarnings findbymetatype metatype hashset getprofilemodels hasnext addall getmodelmanagementhelper getallmodelelementsofkind metatype param model element model element for which find possible stereotypes return collection of stereotypes which are valid for the given model element public collection find all stereotypes for model element object model element return model get extension mechanisms helper get all possible stereotypes get profile models model element modelelement modelelement findallstereotypesformodelelement modelelement getextensionmechanismshelper getallpossiblestereotypes getprofilemodels modelelement see org argouml ui explorer rules perspective rule get rule name public string get rule name return translator localize misc collaboration interaction perspectiverule getrulename getrulename public collection get children object parent if model get facade isa collaboration parent return collections empty set return model get facade get interactions parent getchildren getfacade isacollaboration empty_set getfacade getinteractions public set get dependencies object parent if model get facade isa collaboration parent set set new hash set set add parent return set return collections empty set getdependencies getfacade isacollaboration hashset empty_set public final class ocl util ocl util shall not be instantiated private ocl util oclutil oclutil oclutil get the inner most enclosing namespace for the model element param me the modelelement return a namespace public static object get inner most enclosing namespace object me if model get facade isa feature me me model get facade get owner me if model get facade isa namespace me throw new illegal argument exception return me getinnermostenclosingnamespace getfacade isafeature getfacade getowner getfacade isanamespace illegalargumentexception return a context string for the given model element param me the model element for which to create a context string return the context string for the model element public static string get context string final object me todo do we want isauml element here if me null model get facade isa model element me return object mns context get inner most enclosing namespace me if model get facade isa behavioral feature me string buffer sb context new string buffer context sb context append model get facade get name mns context sb context append sb context append model get facade get name me sb context append collection l params model get facade get parameters me string s return type null boolean f first param true for iterator i l params iterator i has next object mp i next m parameter if model get facade is return mp s return type model get facade get name model get facade get type mp else if f first param f first param false else sb context append sb context append model get facade get type mp append sb context append model get facade get name model get facade get type mp sb context append the ocl toolkit does not like void return types if s return type null s return type equals ignore case void sb context append append s return type return sb context to string else return context model get facade get name mns context getcontextstring isaumlelement getfacade isamodelelement mnscontext getinnermostenclosingnamespace getfacade isabehavioralfeature stringbuffer sbcontext stringbuffer sbcontext getfacade getname mnscontext sbcontext sbcontext getfacade getname sbcontext lparams getfacade getparameters sreturntype ffirstparam lparams hasnext mparameter getfacade isreturn sreturntype getfacade getname getfacade gettype ffirstparam ffirstparam sbcontext sbcontext getfacade gettype sbcontext getfacade getname getfacade gettype sbcontext sreturntype sreturntype equalsignorecase sbcontext sreturntype sbcontext tostring getfacade getname mnscontext constructor for uml classifier parameter list model this is an ordered list 2nd parameter true public uml classifier parameter list model super parameter umlclassifierparameterlistmodel umlclassifierparameterlistmodel protected void build model list if get target null set all elements model get facade get parameters get target buildmodellist gettarget setallelements getfacade getparameters gettarget see org argouml uml ui uml model element list model2 is valid element object protected boolean is valid element object element return model get facade get parameters get target contains element umlmodelelementlistmodel2 isvalidelement isvalidelement getfacade getparameters gettarget protected void move down int index object clss get target collection c model get facade get parameters clss if c instanceof list index c size 1 object mem list c get index model get core helper remove parameter clss mem model get core helper add parameter clss index 1 mem movedown gettarget getfacade getparameters getcorehelper removeparameter getcorehelper addparameter see org argouml uml ui uml model element ordered list model2 move to bottom int override protected void move to bottom int index object clss get target collection c model get facade get parameters clss if c instanceof list index c size 1 object mem list c get index model get core helper remove parameter clss mem model get core helper add parameter clss c size 1 mem umlmodelelementorderedlistmodel2 movetobottom movetobottom gettarget getfacade getparameters getcorehelper removeparameter getcorehelper addparameter see org argouml uml ui uml model element ordered list model2 move to top int override protected void move to top int index object clss get target collection c model get facade get parameters clss if c instanceof list index 0 object mem list c get index model get core helper remove parameter clss mem model get core helper add parameter clss 0 mem umlmodelelementorderedlistmodel2 movetotop movetotop gettarget getfacade getparameters getcorehelper removeparameter getcorehelper addparameter constructor for uml association end changeability radio button panel param title the title for the panel param horizontal determines the orientation public uml model element visibility radio button panel string title boolean horizontal super title label texts and action commands visibility action set model element visibility get instance horizontal umlassociationendchangeabilityradiobuttonpanel umlmodelelementvisibilityradiobuttonpanel labeltextsandactioncommands actionsetmodelelementvisibility getinstance public void build model if get target null object target get target object kind model get facade get visibility target if kind null set selected null else if kind equals model get visibility kind get public set selected action set model element visibility public command else if kind equals model get visibility kind get package set selected action set model element visibility package command else if kind equals model get visibility kind get protected set selected action set model element visibility protected command else if kind equals model get visibility kind get private set selected action set model element visibility private command else set selected action set model element visibility public command buildmodel gettarget gettarget getfacade getvisibility setselected getvisibilitykind getpublic setselected actionsetmodelelementvisibility public_command getvisibilitykind getpackage setselected actionsetmodelelementvisibility package_command getvisibilitykind getprotected setselected actionsetmodelelementvisibility protected_command getvisibilitykind getprivate setselected actionsetmodelelementvisibility private_command setselected actionsetmodelelementvisibility public_command public void set enabled boolean enabled for final component component get components component set enabled enabled setenabled getcomponents setenabled construct the property panel public prop panel exception super label exception exception proppanelexception constructs a new uml radio button panel param is double buffered see link j panel param title the title of the titledborder around the buttons if the title is null there is no border shown param labeltexts actioncommands a map of keys containing the texts for the buttons and values containing the actioncommand that permits the set action to logically recognize the button param the property set name the name of the m event that is fired when the property that it shows changes value param set action the action that should be registered with the buttons and that s executed when one of the buttons is pressed param horizontal when true the buttons should be laid out horizontally public uml radio button panel boolean is double buffered string title list string labeltexts actioncommands string the property set name action set action boolean horizontal super is double buffered set layout horizontal new grid layout new grid layout 0 1 set double buffered true if translator localize title null titled border border new titled border translator localize title border set title font std font set border border set buttons labeltexts actioncommands set action set property set name the property set name umlradiobuttonpanel isdoublebuffered jpanel labeltextsactioncommands setaction thepropertysetname mevent setaction umlradiobuttonpanel isdoublebuffered labeltextsactioncommands thepropertysetname setaction isdoublebuffered setlayout gridlayout gridlayout setdoublebuffered titledborder titledborder settitlefont stdfont setborder setbuttons labeltextsactioncommands setaction setpropertysetname thepropertysetname constructs a new uml radio button panel param title the title of the titledborder around the buttons param labeltexts actioncommands a map of keys containing the texts for the buttons and values containing the actioncommand that permits the set action to logically recognize the button param the property set name the name of the m event that is fired when the property that is shown changes value param set action the action that should be registered with the buttons and that s executed when one of the buttons is pressed param horizontal when true the buttons should be laid out horizontally public uml radio button panel string title list string labeltexts actioncommands string the property set name action set action boolean horizontal this true title labeltexts actioncommands the property set name set action horizontal umlradiobuttonpanel labeltextsactioncommands setaction thepropertysetname mevent setaction umlradiobuttonpanel labeltextsactioncommands thepropertysetname setaction labeltextsactioncommands thepropertysetname setaction private static list string to list map string string map list string list new array list string for map entry string string entry map entry set list add new string entry get key entry get value return list tolist arraylist entryset getkey getvalue construct the buttons and place them in the panel as well as the button group param labeltexts actioncommands a list of string arrays containing a pair of strings with the texts for the buttons already localized and string value for the actioncommand that permits the set action to logically recognize the button param set action the action that should be registered with the buttons and that s executed when one of the buttons is pressed private void set buttons list string labeltexts actioncommands action set action enumeration en button group get elements while en has more elements abstract button button abstract button en next element button group remove button remove all add an invisible button to be used when everything is off button group add new j radio button for string key and labelx labeltexts actioncommands j radio button button new j radio button key and labelx 0 button add action listener set action string action command key and labelx 1 button set action command action command button set font look and feel mgr get instance get standard font button group add button add button labeltextsactioncommands setaction setaction setbuttons labeltextsactioncommands setaction buttongroup getelements hasmoreelements abstractbutton abstractbutton nextelement buttongroup removeall buttongroup jradiobutton keyandlabelx labeltextsactioncommands jradiobutton jradiobutton keyandlabelx addactionlistener setaction actioncommand keyandlabelx setactioncommand actioncommand setfont lookandfeelmgr getinstance getstandardfont buttongroup public void property change property change event e if e get property name equals property set name build model propertychange propertychangeevent getpropertyname propertysetname buildmodel returns the target return object public object get target return panel target gettarget paneltarget sets the target and removes adds this as a listener to the target param target the target to set public void set target object target target target instanceof fig fig target get owner target if model get facade isa model element panel target model get pump remove model event listener this panel target property set name panel target target if model get facade isa model element panel target model get pump add model event listener this panel target property set name if panel target null build model settarget getowner getfacade isamodelelement paneltarget getpump removemodeleventlistener paneltarget propertysetname paneltarget getfacade isamodelelement paneltarget getpump addmodeleventlistener paneltarget propertysetname paneltarget buildmodel returns the property set name return string public string get property set name return property set name propertysetname getpropertysetname propertysetname sets the property set name param name the property set name to set public void set property set name string name property set name name propertysetname propertysetname setpropertysetname propertysetname builds the model that is it selects the radiobutton showing the value of the attribute shown the name of this method is chosen to be compliant with for example uml model element list model2 umlmodelelementlistmodel2 selects the radiobutton with the given action command if a null parameter is passed all buttons in the group will be deselected param action command the action command of the button that should be selected or null to deselect all buttons public void set selected string action command enumeration abstract button en button group get elements if action command null our first button is invisible selecting it deselects all visible buttons en next element set selected true return while en has more elements abstract button b en next element if action command equals b get model get action command b set selected true break actioncommand actioncommand actioncommand setselected actioncommand abstractbutton buttongroup getelements actioncommand nextelement setselected hasmoreelements abstractbutton nextelement actioncommand getmodel getactioncommand setselected see org argouml ui targetmanager target listener target added org argouml ui targetmanager target event public void target added target event e set target e get new target targetlistener targetadded targetevent targetadded targetevent settarget getnewtarget see org argouml ui targetmanager target listener target removed org argouml ui targetmanager target event public void target removed target event e set target e get new target targetlistener targetremoved targetevent targetremoved targetevent settarget getnewtarget see org argouml ui targetmanager target listener target set org argouml ui targetmanager target event public void target set target event e set target e get new target targetlistener targetset targetevent targetset targetevent settarget getnewtarget constructs the multi editor pane this is the pane in which the tabs with the diagrams are drawn in argouml the multi editor pane is a j tabbed pane that holds 0 j panels that can show several editors but only show one editor at the moment argouml version 0 13 3 with this editor diagrams can be edited public multi editor pane log info making multi editor pane set layout new border layout add tabs border layout center for int i 0 i tab panels size i string title tab j panel t tab panels get i if t instanceof abstract argoj panel title abstract argoj panel t get title todo i18n tabs add tab as title t tabs set enabled at i false if t instanceof target listener target manager get instance add target listener target listener t tabs add change listener this tabs add mouse listener this set target null multieditorpane multieditorpane jtabbedpane jpanels multieditorpane multieditorpane setlayout borderlayout borderlayout tabpanels jpanel tabpanels abstractargojpanel abstractargojpanel gettitle addtab setenabledat targetlistener targetmanager getinstance addtargetlistener targetlistener addchangelistener addmouselistener settarget see java awt component get preferred size override public dimension get preferred size return new dimension 400 500 getpreferredsize getpreferredsize see java awt component get minimum size override public dimension get minimum size return new dimension 100 100 getminimumsize getminimumsize sets the target of the multieditorpane the multieditorpane can have several tabs if a tab is an instance of tabmodeltarget that is a tab that displays model elements that tab should display the target if the target is an argo diagram param t the target private void set target object t enable tabs t for int i 0 i tabs get tab count i component tab tabs get component at i if tab is enabled tabs set selected component tab break argodiagram settarget enabletabs gettabcount getcomponentat isenabled setselectedcomponent enables the tabs on the multi editor pane depending on the result of its should be enabled method param t the target for which the should be enabled test should hold true private void enable tabs object t for int i 0 i tabs get tab count i component tab tabs get component at i if tab instanceof tab target tab target target tab tab target tab boolean should be enabled target tab should be enabled t tabs set enabled at i should be enabled multieditorpane shouldbeenabled shouldbeenabled enabletabs gettabcount getcomponentat tabtarget tabtarget targettab tabtarget shouldbeenabled targettab shouldbeenabled setenabledat shouldbeenabled returns the index of a tab with a certain name in the j tabbed pane which is the component shown by the multieditorpane at the moment version 0 13 3 of argouml there is only 1 tab the diagram tab param tab name the given tab name return the index public int get index of named tab string tab name for int i 0 i tab panels size i string title tabs get title at i if title null title equals tab name return i return 1 jtabbedpane tabname getindexofnamedtab tabname tabpanels gettitleat tabname selects a certain tab and shows it at the moment version 0 13 3 of argouml there is only 1 tab the diagram tab param tab name the name of the tab public void select tab named string tab name int index get index of named tab tab name if index 1 tabs set selected index index tabname selecttabnamed tabname getindexofnamedtab tabname setselectedindex selects the next tab in the j tabbed pane at the moment version 0 13 3 of argouml there is only 1 tab the diagram tab public void select next tab int size tab panels size int current tab tabs get selected index for int i 1 i tab panels size i int new tab current tab i size if tabs is enabled at new tab tabs set selected index new tab return jtabbedpane selectnexttab tabpanels currenttab getselectedindex tabpanels newtab currenttab isenabledat newtab setselectedindex newtab public void state changed change event e todo should fire its own event and project browser should register a listener if last tab null last tab set visible false last tab tabs get selected component log debug multi editor pane state changed last tab get class get name last tab set visible true if last tab instanceof tab model target tab model target last tab refresh statechanged changeevent projectbrowser lasttab lasttab setvisible lasttab getselectedcomponent multieditorpane lasttab getclass getname lasttab setvisible lasttab tabmodeltarget tabmodeltarget lasttab see java awt event mouse listener mouse pressed java awt event mouse event public void mouse pressed mouse event me empty implementation we only handle mouse clicked mouselistener mousepressed mouseevent mousepressed mouseevent mouseclicked see java awt event mouse listener mouse released java awt event mouse event public void mouse released mouse event me empty implementation we only handle mouse clicked mouselistener mousereleased mouseevent mousereleased mouseevent mouseclicked see java awt event mouse listener mouse entered java awt event mouse event public void mouse entered mouse event me empty implementation we only handle mouse clicked mouselistener mouseentered mouseevent mouseentered mouseevent mouseclicked see java awt event mouse listener mouse exited java awt event mouse event public void mouse exited mouse event me empty implementation we only handle mouse clicked mouselistener mouseexited mouseevent mouseexited mouseevent mouseclicked public void mouse clicked mouse event me int tab tabs get selected index if tab 1 rectangle tab bounds tabs get bounds at tab if tab bounds contains me getx me gety return if me get click count 1 my single click tab me consume else if me get click count 2 my double click tab me consume mouseclicked mouseevent getselectedindex tabbounds getboundsat tabbounds getclickcount mysingleclick getclickcount mydoubleclick called when the user clicks once on a tab param tab the tab that was clicked on public void my single click int tab todo should fire its own event and project browser should register a listener log debug single tabs get component at tab to string mysingleclick projectbrowser getcomponentat tostring when the user double clicks on a tab this tab is spawned by this method if it is selected param tab the index of the tab public void my double click int tab todo should fire its own event and project browser should register a listener log debug double tabs get component at tab to string j panel t j panel tab panels element at tab currently this feature is disabled for argouml if t instanceof abstract argoj panel abstract argoj panel t spawn mydoubleclick projectbrowser getcomponentat tostring jpanel jpanel tabpanels elementat abstractargojpanel abstractargojpanel org argouml ui targetmanager target event public void target added target event e set target e get new target targetevent targetadded targetevent settarget getnewtarget public void target removed target event e how to handle empty target lists probably the multi editor pane should only show an empty pane in that case set target e get new target targetremoved targetevent multieditorpane settarget getnewtarget org argouml ui targetmanager target event public void target set target event e set target e get new target targetevent targetset targetevent settarget getnewtarget return returns the upper right panel tabs the diagram tabs protected j tabbed pane get tabs return tabs jtabbedpane gettabs constructs the proppanel including initializing all scrollpanes panels etc but excluding placing them on the proppanel itself param name name title of the property panel param icon the icon see org argouml uml ui prop panel prop panel string image icon protected prop panel association end string name image icon icon super name icon proppanel proppanel imageicon proppanelassociationend imageicon constructs the proppanel and places all scrollpanes etc on the canvas see java lang object object public prop panel association end super label association end lookup icon association end association label translator localize label association create controls position standard controls position controls proppanelassociationend lookupicon associationend associationlabel createcontrols positionstandardcontrols positioncontrols create the controls specific to an association end protected void create controls type combobox new uml combo box2 new uml association end type combo box model action set association end type get instance true association scroll new uml single row selector new uml association end association list model navigability check box new uml association end navigable check box ordering check box new uml association end ordering check box target scope check box new uml association end target scope checkbox aggregation radio buttonpanel new uml association end aggregation radio button panel label aggregation true changeability radio buttonpanel new uml association end changeability radio button panel label changeability true visibility radio button panel new uml model element visibility radio button panel label visibility true specification scroll new j scroll pane new uml mutable linked list new uml association end specification list model action add association specification get instance null null true qualifiers scroll new j scroll pane new uml linked list new uml association end qualifiers list model associationend createcontrols typecombobox umlcombobox2 umlassociationendtypecomboboxmodel actionsetassociationendtype getinstance associationscroll umlsinglerowselector umlassociationendassociationlistmodel navigabilitycheckbox umlassociationendnavigablecheckbox orderingcheckbox umlassociationendorderingcheckbox targetscopecheckbox umlassociationendtargetscopecheckbox aggregationradiobuttonpanel umlassociationendaggregationradiobuttonpanel changeabilityradiobuttonpanel umlassociationendchangeabilityradiobuttonpanel visibilityradiobuttonpanel umlmodelelementvisibilityradiobuttonpanel specificationscroll jscrollpane umlmutablelinkedlist umlassociationendspecificationlistmodel actionaddassociationspecification getinstance qualifiersscroll jscrollpane umllinkedlist umlassociationendqualifierslistmodel add the standard controls to the panel protected void position standard controls add field translator localize label name get name text field positionstandardcontrols addfield getnametextfield add the specific controls for an associationend to the panel protected void position controls add field association label association scroll add field label type type combobox add field label multiplicity get multiplicity combo box add separator j panel panel create border panel label modifiers panel add navigability check box panel add ordering check box panel add target scope check box panel set visible true add panel add field label specification specification scroll add field label qualifiers qualifiers scroll add separator add aggregation radio buttonpanel add changeability radio buttonpanel add visibility radio button panel add action new action navigate association add action new action navigate opposite assoc end add action new action add attribute translator localize button new qualifier add action new action new stereotype add action get delete action positioncontrols addfield associationlabel associationscroll addfield typecombobox addfield getmultiplicitycombobox addseparator jpanel createborderpanel navigabilitycheckbox orderingcheckbox targetscopecheckbox setvisible addfield specificationscroll addfield qualifiersscroll addseparator aggregationradiobuttonpanel changeabilityradiobuttonpanel visibilityradiobuttonpanel addaction actionnavigateassociation addaction actionnavigateoppositeassocend addaction actionaddattribute addaction actionnewstereotype addaction getdeleteaction param label the label protected void set association label string label association label label setassociationlabel associationlabel returns the multiplicity combo box return uml multiplicity combo box2 protected j panel get multiplicity combo box if multiplicity combo box null multiplicity combo box new uml multiplicity panel return multiplicity combo box multiplicitycombobox umlmultiplicitycombobox2 jpanel getmultiplicitycombobox multiplicitycombobox multiplicitycombobox umlmultiplicitypanel multiplicitycombobox constructor for uml constraint constrained element list model public uml constraint constrained element list model super constrained element umlconstraintconstrainedelementlistmodel umlconstraintconstrainedelementlistmodel constrainedelement protected void build model list if get target null set all elements model get facade get constrained elements get target buildmodellist gettarget setallelements getfacade getconstrainedelements gettarget protected boolean is valid element object element return model get facade isa model element element model get facade get constrained elements get target contains element isvalidelement getfacade isamodelelement getfacade getconstrainedelements gettarget the constructor public cr interface oper only setup head and desc add supported decision uml decision planned extensions set knowledge types critic kt syntax add trigger structural feature crinterfaceoperonly setupheadanddesc addsupporteddecision umldecision planned_extensions setknowledgetypes kt_syntax addtrigger structuralfeature public boolean predicate2 object dm designer dsgr if model get facade isa interface dm return no problem object inf dm collection sf model get facade get features inf if sf null return no problem for iterator iter sf iterator iter has next if model get facade isa structural feature iter next return problem found return no problem getfacade isainterface no_problem getfacade getfeatures no_problem hasnext getfacade isastructuralfeature problem_found no_problem public set object get criticized design materials set object ret new hash set object ret add model get meta types get interface return ret getcriticizeddesignmaterials hashset getmetatypes getinterface the constructor public action new stereotype super button new stereotype put value action name translator localize button new stereotype actionnewstereotype putvalue public void action performed action event e object t target manager get instance get target if t instanceof fig t fig t get owner project p project manager get manager get current project object model p get model collection models p get models object new stereo model get extension mechanisms factory build stereotype model get facade isa model element t t null string null model models if model get facade isa model element t object ns model get facade get namespace t if model get facade isa namespace ns model get core helper set namespace new stereo ns target manager get instance set target new stereo super action performed e actionperformed actionevent targetmanager getinstance gettarget getowner projectmanager getmanager getcurrentproject getmodel getmodels newstereo getextensionmechanismsfactory buildstereotype getfacade isamodelelement getfacade isamodelelement getfacade getnamespace getfacade isanamespace getcorehelper setnamespace newstereo targetmanager getinstance settarget newstereo actionperformed the constructor return the options public list string get options list string result new array list string object asc get model element object ae0 new array list model get facade get connections asc get 0 object ae1 new array list model get facade get connections asc get 1 object cls0 model get facade get type ae0 object cls1 model get facade get type ae1 if cls0 null equals model get facade get name cls0 option0 translator localize critics wiz navigable option4 model get facade get name cls0 if cls1 null equals model get facade get name cls1 option1 translator localize critics wiz navigable option5 model get facade get name cls1 result add option0 result add option1 result add option2 return result getoptions arraylist getmodelelement arraylist getfacade getconnections arraylist getfacade getconnections getfacade gettype getfacade gettype getfacade getname wiznavigable getfacade getname getfacade getname wiznavigable getfacade getname param s the instructions public void set instructions string s instructions s setinstructions public j panel make panel int new step switch new step case 1 if step1 null step1 new wiz step choice this instructions get options step1 set target get to do item return step1 return null jpanel makepanel newstep newstep wizstepchoice getoptions settarget gettodoitem public void do action int old step log debug do action old step switch old step case 1 int choice 1 if step1 null choice step1 get selected index if choice 1 throw new error nothing selected should not get here try object asc get model element object ae0 new array list model get facade get connections asc get 0 object ae1 new array list model get facade get connections asc get 1 model get core helper set navigable ae0 choice 0 choice 2 model get core helper set navigable ae1 choice 1 choice 2 catch exception pve log error could not set navigablity pve doaction oldstep doaction oldstep oldstep getselectedindex getmodelelement arraylist getfacade getconnections arraylist getfacade getconnections getcorehelper setnavigable getcorehelper setnavigable override public boolean can finish if super can finish return false if get step 0 return true if get step 1 step1 null step1 get selected index 1 return true return false canfinish canfinish getstep getstep getselectedindex public class action stereotype view big icon extends action stereotype view default constructor for this action param node the current node public action stereotype view big icon fig node model element node super node menu popup stereotype view big icon diagram appearance stereotype view big icon actionstereotypeviewbigicon actionstereotypeview actionstereotypeviewbigicon fignodemodelelement diagramappearance stereotype_view_big_icon see org argouml ui explorer rules perspective rule get rule name public string get rule name return translator localize misc package diagram perspectiverule getrulename getrulename public collection get children object namespace if model get facade isa namespace namespace list return list new array list project proj project manager get manager get current project for argo diagram diagram proj get diagram list sequence diagrams are not shown as children of the collaboration that they show but as children of the classifier operation the collaboration represents statediagrams and activitydiagrams are shown as children of the statemachine or activitygraph they belong to if diagram instanceof uml state diagram diagram instanceof uml activity diagram diagram instanceof uml sequence diagram continue if diagram get namespace namespace return list add diagram return return list return collections empty set getchildren getfacade isanamespace returnlist arraylist projectmanager getmanager getcurrentproject argodiagram getdiagramlist umlstatediagram umlactivitydiagram umlsequencediagram getnamespace returnlist returnlist empty_set see org argouml ui explorer rules perspective rule get dependencies java lang object public set get dependencies object parent todo what return collections empty set perspectiverule getdependencies getdependencies empty_set the constructor public cr merge classes setup head and desc set priority to do item low priority add supported decision uml decision class selection add trigger association end crmergeclasses setupheadanddesc setpriority todoitem low_priority addsupporteddecision umldecision class_selection addtrigger associationend public boolean predicate2 object dm designer dsgr if model get facade isa class dm return no problem object cls dm collection ends model get facade get association ends cls if ends null ends size 1 return no problem object my end ends iterator next object asc model get facade get association my end list conns new array list model get facade get connections asc do we have 2 connection ends if conns null conns size 2 return no problem object ae0 conns get 0 object ae1 conns get 1 both ends must be classes otherwise there is nothing to merge if model get facade isa class model get facade get type ae0 model get facade isa class model get facade get type ae1 return no problem both ends must be navigable otherwise there is nothing to merge if model get facade is navigable ae0 model get facade is navigable ae1 return no problem if model get facade get lower ae0 1 model get facade get upper ae0 1 model get facade get lower ae1 1 model get facade get upper ae1 1 return problem found return no problem getfacade isaclass no_problem getfacade getassociationends no_problem myend getfacade getassociation myend arraylist getfacade getconnections no_problem getfacade isaclass getfacade gettype getfacade isaclass getfacade gettype no_problem getfacade isnavigable getfacade isnavigable no_problem getfacade getlower getfacade getupper getfacade getlower getfacade getupper problem_found no_problem public set object get criticized design materials set object ret new hash set object ret add model get meta types getuml class return ret getcriticizeddesignmaterials hashset getmetatypes getumlclass see org argouml ui explorer rules perspective rule get rule name public string get rule name return translator localize misc transition effect perspectiverule getrulename getrulename public collection get children object parent if model get facade isa transition parent object effect model get facade get effect parent if effect null collection col new array list col add effect return col return collections empty set getchildren getfacade isatransition getfacade geteffect arraylist empty_set public set get dependencies object parent if model get facade isa transition parent set set new hash set set add parent return set return collections empty set getdependencies getfacade isatransition hashset empty_set public class checkbox table model extends abstract table model constructor param labels the labels to show in column 1 in the table param data the data connected to each line param col name1 the header of the first column param col name2 the header of the second column public checkbox table model object labels object data string col name1 string col name2 elements new object labels length 3 for int i 0 i elements length i elements i 0 labels i elements i 1 boolean true if data null i data length elements i 2 data i else elements i 2 null column name1 col name1 column name2 col name2 checkboxtablemodel abstracttablemodel colname1 colname2 checkboxtablemodel colname1 colname2 columnname1 colname1 columnname2 colname2 see javax swing table table model get column count public int get column count return 2 tablemodel getcolumncount getcolumncount public string get column name int col if col 0 return column name1 else if col 1 return column name2 return null getcolumnname columnname1 columnname2 see javax swing table table model get row count public int get row count return elements length tablemodel getrowcount getrowcount public object get value at int row int col if row elements length col 3 return elements row col else throw new illegal argument exception index out of bounds getvalueat illegalargumentexception java lang object int int public void set value at object ob int row int col elements row col ob setvalueat public class get column class int col if col 0 return string class else if col 1 return boolean class else if col 2 return object class return null getcolumnclass see javax swing table table model is cell editable int int public boolean is cell editable int row int col return col 1 row elements length tablemodel iscelleditable iscelleditable constructor for uml classifier powertype range list model public uml classifier powertype range list model super powertype range umlclassifierpowertyperangelistmodel umlclassifierpowertyperangelistmodel powertyperange protected void build model list if get target null set all elements model get facade get powertype ranges get target buildmodellist gettarget setallelements getfacade getpowertyperanges gettarget see org argouml uml ui uml model element list model2 is valid element object protected boolean is valid element object element return model get facade get powertype ranges get target contains element umlmodelelementlistmodel2 isvalidelement isvalidelement getfacade getpowertyperanges gettarget private static final child gen search instance new child gen search private child gen search super childgensearch childgensearch childgensearch reply a collection of the children of the given object ordering of the iterated elements is undefined and should not be relied upon inherit doc public iterator child iterator object parent list res new array list if parent instanceof project project p project parent res add all p get user defined model list res add all p get diagram list else if parent instanceof argo diagram argo diagram d argo diagram parent res add all d get graph model get nodes res add all d get graph model get edges else if model get facade isa model element parent res add all model get facade get model element contents parent return res iterator inheritdoc childiterator arraylist addall getuserdefinedmodellist addall getdiagramlist argodiagram argodiagram argodiagram addall getgraphmodel getnodes addall getgraphmodel getedges getfacade isamodelelement addall getfacade getmodelelementcontents return returns the singleton instance public static child gen search get instance return instance childgensearch getinstance creates a uml plain text document object that represents a tagged value of an model element object param tagged value the tagged value public uml model element tagged value proxy string tagged value tag name tagged value document new uml model element tagged value document umlplaintextdocument modelelement taggedvalue umlmodelelementtaggedvalueproxy taggedvalue tagname taggedvalue umlmodelelementtaggedvaluedocument public void property change property change event evt if evt instanceof add association event object tv evt get new value object td model get facade get tag definition tv string name string model get facade get type td if tag name null tag name equals name document set target tv else if evt instanceof remove association event object tv evt get old value object td model get facade get tag definition tv string name string model get facade get type td if tag name null tag name equals name document set target null else document property change evt propertychange propertychangeevent addassociationevent getnewvalue getfacade gettagdefinition getfacade gettype tagname tagname settarget removeassociationevent getoldvalue getfacade gettagdefinition getfacade gettype tagname tagname settarget propertychange sets the tagged value to given string param text the property protected void set property string text document set property text setproperty setproperty return the value of the tagged value protected string get property return document get property getproperty getproperty returns the target return object public final object get target return panel target gettarget paneltarget sets the target param target the target to set public final void set target object target target target instanceof fig fig target get owner target if model get facade isa model element target if target panel target model event pump event pump model get pump if panel target null event pump remove model event listener this panel target event name panel target target event pump add model event listener this panel target event name todo see if the new target has a tv that we can proxy document set target model get facade get tagged value panel target tag name settarget getowner getfacade isamodelelement paneltarget modeleventpump eventpump getpump paneltarget eventpump removemodeleventlistener paneltarget event_name paneltarget eventpump addmodeleventlistener paneltarget event_name settarget getfacade gettaggedvalue paneltarget tagname see org argouml ui targetmanager target listener target added org argouml ui targetmanager target event public void target added target event e set target e get new target targetlistener targetadded targetevent targetadded targetevent settarget getnewtarget see org argouml ui targetmanager target listener target removed org argouml ui targetmanager target event public void target removed target event e set target e get new target targetlistener targetremoved targetevent targetremoved targetevent settarget getnewtarget see org argouml ui targetmanager target listener target set org argouml ui targetmanager target event public void target set target event e set target e get new target targetlistener targetset targetevent targetset targetevent settarget getnewtarget int java lang string javax swing text attribute set public void insert string int offset string str attribute set a throws bad location exception document insert string offset str a attributeset insertstring attributeset badlocationexception insertstring see javax swing text document remove int int public void remove int offs int len throws bad location exception document remove offs len badlocationexception see javax swing text document get default root element public element get default root element return document get default root element getdefaultrootelement getdefaultrootelement getdefaultrootelement see javax swing text document get length public int get length return document get length getlength getlength getlength see javax swing text document render runnable r public void render runnable r document render r see javax swing text document get text int int public string get text int offset int length throws bad location exception return document get text offset length gettext gettext badlocationexception gettext public void add document listener document listener listener document add document listener listener adddocumentlistener documentlistener adddocumentlistener public void remove document listener document listener listener document remove document listener listener removedocumentlistener documentlistener removedocumentlistener public void add undoable edit listener undoable edit listener listener document add undoable edit listener listener addundoableeditlistener undoableeditlistener addundoableeditlistener public void remove undoable edit listener undoable edit listener listener document remove undoable edit listener listener removeundoableeditlistener undoableeditlistener removeundoableeditlistener public element get root elements return document get root elements getrootelements getrootelements public position get end position return document get end position getendposition getendposition public position get start position return document get start position getstartposition getstartposition public position create position int offs throws bad location exception return document create position offs createposition badlocationexception createposition public void get text int offset int length segment txt throws bad location exception document get text offset length txt gettext badlocationexception gettext public object get property object key return document get property key getproperty getproperty public void put property object key object value document put property key value putproperty putproperty public object get child object parent int index if parent instanceof to do list return priority node get priority list get index if parent instanceof priority node priority node pn priority node parent list to do item item list designer the designer get to do list get to do item list synchronized item list for to do item item item list if item get priority pn get priority if index 0 return item index throw new index out of bounds exception get child shouldnt get here go list to priority to item getchild todolist prioritynode getprioritylist prioritynode prioritynode prioritynode todoitem itemlist thedesigner gettodolist gettodoitemlist itemlist todoitem itemlist getpriority getpriority indexoutofboundsexception getchild golisttoprioritytoitem public int get child count object parent if parent instanceof to do list return priority node get priority list size if parent instanceof priority node priority node pn priority node parent int count 0 list to do item item list designer the designer get to do list get to do item list synchronized item list for to do item item item list if item get priority pn get priority count return count return 0 getchildcount todolist prioritynode getprioritylist prioritynode prioritynode prioritynode todoitem itemlist thedesigner gettodolist gettodoitemlist itemlist todoitem itemlist getpriority getpriority public int get index of child object parent object child if parent instanceof to do list return priority node get priority list index of child if parent instanceof priority node int index 0 priority node pn priority node parent list to do item item list designer the designer get to do list get to do item list synchronized item list for to do item item item list if item get priority pn get priority if item child return index index return 1 getindexofchild todolist prioritynode getprioritylist indexof prioritynode prioritynode prioritynode todoitem itemlist thedesigner gettodolist gettodoitemlist itemlist todoitem itemlist getpriority getpriority public boolean is leaf object node if node instanceof to do list return false if node instanceof priority node get child count node 0 return false return true isleaf todolist prioritynode getchildcount javax swing tree tree path java lang object public void value for path changed tree path path object new value treepath valueforpathchanged treepath newvalue see javax swing tree tree model add tree model listener javax swing event tree model listener public void add tree model listener tree model listener l treemodel addtreemodellistener treemodellistener addtreemodellistener treemodellistener see javax swing tree tree model remove tree model listener javax swing event tree model listener public void remove tree model listener tree model listener l treemodel removetreemodellistener treemodellistener removetreemodellistener treemodellistener constructor for uml text area2 param doc the plain text document public uml text area2 uml document doc super doc set font look and feel mgr get instance get standard font add caret listener action copy get instance add caret listener action cut get instance add caret listener action paste get instance add focus listener action paste get instance umltextarea2 umltextarea2 umldocument setfont lookandfeelmgr getinstance getstandardfont addcaretlistener actioncopy getinstance addcaretlistener actioncut getinstance addcaretlistener actionpaste getinstance addfocuslistener actionpaste getinstance see java beans property change listener property change java beans property change event public void property change property change event evt uml document get document property change evt propertychangelistener propertychange propertychangeevent propertychange propertychangeevent umldocument getdocument propertychange see org argouml ui targetmanager targettable model view get targettable model public target listener get targettable model return uml document get document targettablemodelview gettargettablemodel targetlistener gettargettablemodel umldocument getdocument constructor for uml parameter type combo box model public uml parameter type combo box model super umlparametertypecomboboxmodel umlparametertypecomboboxmodel protected object get selected model element if get target null return model get facade get type get target return null getselectedmodelelement gettarget getfacade gettype gettarget see javax swing abstract action abstract action public undoable action super abstractaction abstractaction undoableaction see javax swing abstract action abstract action java lang string public undoable action string name super name abstractaction abstractaction undoableaction java lang string javax swing icon public undoable action string name icon icon super name icon undoableaction public void action performed action event e final project p project manager get manager get current project p get undo manager start interaction string get value abstract action name actionperformed actionevent projectmanager getmanager getcurrentproject getundomanager startinteraction getvalue abstractaction param factory add the given factory public static void add prop panel factory prop panel factory factory ppfactories add 0 factory addproppanelfactory proppanelfactory for modules it would be usefule to be able to remove their factories p todo the effect of this method is not yet tested param factory the factory to remove public static void remove prop panel factory prop panel factory factory ppfactories remove factory removeproppanelfactory proppanelfactory this method is not public since it is meant to be used exclusively by tab props static collection prop panel factory get factories return ppfactories tabprops proppanelfactory getfactories constructor for uml state vertex incoming list model public uml state vertex container list model super container umlstatevertexincominglistmodel umlstatevertexcontainerlistmodel see org argouml uml ui uml model element list model2 build model list protected void build model list remove all elements add element model get facade get container get target umlmodelelementlistmodel2 buildmodellist buildmodellist removeallelements addelement getfacade getcontainer gettarget see org argouml uml ui uml model element list model2 is valid element object protected boolean is valid element object element return model get facade get container get target element umlmodelelementlistmodel2 isvalidelement isvalidelement getfacade getcontainer gettarget the constructor public goal model add goal goal get unspecified goal goalmodel addgoal getunspecifiedgoal return the list of goals public list goal get goal list return goals getgoallist param g the goal to be added public void add goal goal g goals add g addgoal param g the goal to be removed public void remove goal goal g goals remove g removegoal reply true iff the designer wants to achieve the given goal param goal name the given goal return true if the designer wants this public boolean has goal string goal name for goal g goals if g get name equals goal name return g get priority 0 return false goalname hasgoal goalname getname goalname getpriority param goal name the given goal param priority the new priority for the goal public synchronized void set goal priority string goal name int priority goal g new goal goal name priority goals remove g goals add g goalname setgoalpriority goalname goalname the designer wants to achieve the given goal param goal name the wanted goal public void start desiring string goal name add goal new goal goal name 1 goalname startdesiring goalname addgoal goalname the designer does not care about the given goal param goal name the unwanted goal public void stop desiring string goal name remove goal new goal goal name 0 goalname stopdesiring goalname removegoal goalname the constructor param title param icon name public import status screen frame frame string title string icon name super frame true if title null set title title dimension scr size toolkit get default toolkit get screen size get content pane set layout new border layout 4 4 container panel new j panel new grid bag layout parsing file x of z progress label new j label progress label set horizontal alignment swing constants right grid bag constraints gbc new grid bag constraints gbc anchor grid bag constraints north gbc fill grid bag constraints horizontal gbc gridwidth grid bag constraints remainder gbc gridheight 1 gbc gridx 0 gbc gridy 0 gbc weightx 0 1 panel add progress label gbc gbc gridy progress bar progress new j progress bar gbc anchor grid bag constraints center panel add progress gbc gbc gridy panel add new j label translator localize label import messages gbc gbc gridy error warning message area message area new j text area 10 50 gbc weighty 0 8 gbc gridheight 10 gbc fill grid bag constraints both panel add new j scroll pane message area gbc gbc gridy cancel close button cancel button new j button translator localize button cancel gbc fill grid bag constraints none gbc anchor grid bag constraints south gbc weighty 0 1 gbc gridheight grid bag constraints remainder panel add cancel button gbc gbc gridy cancel button add action listener new action listener public void action performed action event e if is complete close canceled true get content pane add panel pack dimension content pane size get content pane get preferred size set location scr size width 2 content pane size width 2 scr size height 2 content pane size height 2 set resizable true set default close operation do nothing on close add window listener this iconname importstatusscreen iconname settitle scrsize getdefaulttoolkit getscreensize getcontentpane setlayout borderlayout jpanel gridbaglayout progresslabel jlabel progresslabel sethorizontalalignment swingconstants gridbagconstraints gridbagconstraints gridbagconstraints gridbagconstraints gridbagconstraints progresslabel jprogressbar gridbagconstraints jlabel messagearea messagearea jtextarea gridbagconstraints jscrollpane messagearea cancelbutton jbutton gridbagconstraints gridbagconstraints gridbagconstraints cancelbutton cancelbutton addactionlistener actionlistener actionperformed actionevent iscomplete getcontentpane contentpanesize getcontentpane getpreferredsize setlocation scrsize contentpanesize scrsize contentpanesize setresizable setdefaultcloseoperation do_nothing_on_close addwindowlistener public void action performed action event e if is complete close canceled true actionperformed actionevent iscomplete public void set maximum progress final int i swing utilities invoke later new runnable public void run progress set maximum i set visible true setmaximumprogress swingutilities invokelater setmaximum setvisible public void set maximum progress final int i swing utilities invoke later new runnable public void run progress set maximum i set visible true setmaximumprogress swingutilities invokelater setmaximum setvisible public void update progress final int i swing utilities invoke later new runnable public void run progress set value i if is complete if has messages cancel button set text translator localize button close else close updateprogress swingutilities invokelater setvalue iscomplete hasmessages cancelbutton settext swing utilities invoke later new runnable public void run progress set value i if is complete if has messages cancel button set text translator localize button close else close swingutilities invokelater setvalue iscomplete hasmessages cancelbutton settext private boolean is complete return progress get value progress get maximum iscomplete getvalue getmaximum public void close swing utilities invoke later new runnable public void run set visible false dispose swingutilities invokelater setvisible public void close swing utilities invoke later new runnable public void run set visible false dispose swingutilities invokelater setvisible see org argouml application api progress monitor is canceled public boolean is canceled return canceled progressmonitor iscanceled iscanceled public void notify message final string title final string introduction final string message has messages true todo add filename message area set text message area get text title n introduction n message n n message area set caret position message area get text length notifymessage hasmessages messagearea settext messagearea gettext messagearea setcaretposition messagearea gettext see org argouml application api progress monitor notify null action public void notify null action string msg translator localize label import empty notify message msg msg msg progressmonitor notifynullaction notifynullaction notifymessage public void update main task final string name swing utilities invoke later new runnable public void run set title name updatemaintask swingutilities invokelater settitle public void update main task final string name swing utilities invoke later new runnable public void run set title name updatemaintask swingutilities invokelater settitle public void update sub task final string action swing utilities invoke later new runnable public void run progress label set text action updatesubtask swingutilities invokelater progresslabel settext public void update sub task final string action swing utilities invoke later new runnable public void run progress label set text action updatesubtask swingutilities invokelater progresslabel settext see org argouml persistence progress listener progress org argouml persistence progress event public void progress progress event event throws interrupted exception ignored progresslistener progressevent progressevent interruptedexception public void window closing window event e user closing the progress window is interpreted as cancel request canceled true close windowclosing windowevent public void window activated window event e windowactivated windowevent public void window activated window event e public void window closed window event e windowactivated windowevent windowclosed windowevent public void window activated window event e public void window closed window event e public void window deactivated window event e windowactivated windowevent windowclosed windowevent windowdeactivated windowevent public void window closed window event e public void window deactivated window event e public void window deiconified window event e windowclosed windowevent windowdeactivated windowevent windowdeiconified windowevent public void window deactivated window event e public void window deiconified window event e public void window iconified window event e windowdeactivated windowevent windowdeiconified windowevent windowiconified windowevent public void window deiconified window event e public void window iconified window event e public void window opened window event e windowdeiconified windowevent windowiconified windowevent windowopened windowevent the constructor public cr too many transitions setup head and desc add supported decision uml decision state machines set threshold transitions threshold add trigger incoming add trigger outgoing crtoomanytransitions setupheadanddesc addsupporteddecision umldecision state_machines setthreshold transitions_threshold addtrigger addtrigger public boolean predicate2 object dm designer dsgr if model get facade isa state vertex dm return no problem collection in model get facade get incomings dm collection out model get facade get outgoings dm int in size in null 0 in size int out size out null 0 out size if in size out size get threshold return no problem return problem found getfacade isastatevertex no_problem getfacade getincomings getfacade getoutgoings insize outsize insize outsize getthreshold no_problem problem_found public set object get criticized design materials set object ret new hash set object ret add model get meta types get state vertex return ret getcriticizeddesignmaterials hashset getmetatypes getstatevertex default constructor public profile good practices general critics add new cr empty package critics add new cr nodes overlap critics add new cr zero length edge critics add new cr circular composition critics add new cr missing attr name critics add cr missing class name critics add new cr missing state name critics add new cr missing oper name critics add new cr non agg data type critics add new cr subclass reference critics add new cr too many assoc critics add new cr too many attr critics add new cr too many oper critics add new cr too many transitions critics add new cr too many states critics add new cr too many classes critics add new cr wrong link ends critics add new cr utility violated this set critics critics profilegoodpractices cremptypackage crnodesoverlap crzerolengthedge crcircularcomposition crmissingattrname crmissingclassname crmissingstatename crmissingopername crnonaggdatatype crsubclassreference crtoomanyassoc crtoomanyattr crtoomanyoper crtoomanytransitions crtoomanystates crtoomanyclasses crwronglinkends crutilityviolated setcritics override public string get display name return critics for good practices getdisplayname see org argouml profile profile get profile identifier public string get profile identifier return good practices getprofileidentifier getprofileidentifier goodpractices return the missing class name critic public critic get cr missing class name return cr missing class name getcrmissingclassname crmissingclassname construct a property panel for an association role public prop panel association role super label association role title add field translator localize label name get name text field add field translator localize label namespace get namespace selector j combo box base combo box new uml combo box2 new uml association role base combo box model new action set association role base add field translator localize label base new uml combo box navigator translator localize label association navigate tooltip base combo box add separator j list assoc end list new uml linked list new uml association role association end role list model only binary associationroles are allowed assoc end list set visible row count 2 add field translator localize label associationrole ends new j scroll pane assoc end list j list message list new uml linked list new uml association role message list model add field translator localize label messages new j scroll pane message list add action new action navigate container element add action action add message get target follower add action get delete action associationrole proppanelassociationrole addfield getnametextfield addfield getnamespaceselector jcombobox basecombobox umlcombobox2 umlassociationrolebasecomboboxmodel actionsetassociationrolebase addfield umlcomboboxnavigator basecombobox addseparator jlist assocendlist umllinkedlist umlassociationroleassociationendrolelistmodel assocendlist setvisiblerowcount addfield jscrollpane assocendlist jlist messagelist umllinkedlist umlassociationrolemessagelistmodel addfield jscrollpane messagelist addaction actionnavigatecontainerelement addaction actionaddmessage gettargetfollower addaction getdeleteaction default constructor constructs the object rectangle the lifeline the name box and the stereotype box private fig classifier role super head fig new fig head get stereotype fig get name fig get stereotype fig set bounds min head width 2 rowheight rowdistance 0 0 get stereotype fig set filled false get stereotype fig set line width 0 get name fig set editable false get name fig set filled false get name fig set line width 0 life line fig new fig life line min head width 2 role width 2 min head height link positions add new message node this for int i 0 i life line fig get height sequence diagram layer link distance i link positions add new message node this todo why does this give loading problems add fig get big port add fig life line fig add fig head fig todo why does this give loading problems add fig get stereotype fig add fig get name fig figclassifierrole headfig fighead getstereotypefig getnamefig getstereotypefig setbounds min_head_width getstereotypefig setfilled getstereotypefig setlinewidth getnamefig seteditable getnamefig setfilled getnamefig setlinewidth lifelinefig figlifeline min_head_width role_width min_head_height linkpositions messagenode lifelinefig getheight sequencediagramlayer link_distance linkpositions messagenode addfig getbigport addfig lifelinefig addfig headfig addfig getstereotypefig addfig getnamefig construct a classifier role figure for the given model element param node the classifier role to own the fig param x x position param y y position param w width param h height public fig classifier role object node int x int y int w int h this set bounds x y w h set owner node classifierrole classifierrole figclassifierrole setbounds setowner construct a classifier role figure for the given model element param node the classifier role to own the fig public fig classifier role object node this set owner node classifierrole classifierrole figclassifierrole setowner override public void mouse released mouse event me super mouse released me layer lay globals cur editor get layer manager get active layer if lay instanceof sequence diagram layer sequence diagram layer lay put in position this mousereleased mouseevent mousereleased cureditor getlayermanager getactivelayer sequencediagramlayer sequencediagramlayer putinposition constructs the contents of the name text box and upates the name text box accordingly the contents of the name text box itself are not updated see org argouml uml diagram ui fig node model element update name text override protected void update name text string name text classifier role name base names trim get name fig set text name text calc bounds damage fignodemodelelement updatenametext updatenametext nametext classifierrolename basenames getnamefig settext nametext calcbounds return node of message nodes public int get node count return link positions size messagenodes getnodecount linkpositions change a node to point to an actual fig message port fig create fig message port object message temp fig temp fig fig fmp life line fig create fig message port message temp fig update node states return fmp figmessageport createfigmessageport tempfig tempfig lifelinefig createfigmessageport tempfig updatenodestates void add fig message port fig message port message port fig life line fig add fig message port fig addfigmessageport figmessageport messageportfig lifelinefig addfig messageportfig connect a fig message port with a message node by position void set matching node fig message port fmp while life line fig gety coordinate get node count 1 fmp gety1 grow to size get node count 10 int i 0 for iterator it link positions iterator it has next i message node node message node it next if life line fig gety coordinate i fmp gety1 node set fig message port fmp fmp set node node update node states break figmessageport messagenode setmatchingnode figmessageport lifelinefig getycoordinate getnodecount growtosize getnodecount linkpositions hasnext messagenode messagenode lifelinefig getycoordinate setfigmessageport setnode updatenodestates set the node s fig to a fig message port if one is available private void set matching fig message node message node if message node get fig message port null int y gety coordinate message node for iterator it life line fig get figs iterator it has next fig fig fig it next if fig instanceof fig message port fig message port message port fig fig message port fig if message port fig gety1 y message node set fig message port message port fig message port fig set node message node update node states figmessageport setmatchingfig messagenode messagenode messagenode getfigmessageport getycoordinate messagenode lifelinefig getfigs hasnext figmessageport figmessageport messageportfig figmessageport messageportfig messagenode setfigmessageport messageportfig messageportfig setnode messagenode updatenodestates override public void set standard bounds int x int y int w int h y 50 rectangle old bounds get bounds w head fig get minimum size width head fig set bounds x y w head fig get minimum size height life line fig set bounds x w 2 role width 2 y head fig get height role width h head fig get height this update edges grow to size life line fig get height sequence diagram layer link distance 2 calc bounds x x height y w w h h fire prop change bounds old bounds get bounds setstandardbounds oldbounds getbounds headfig getminimumsize headfig setbounds headfig getminimumsize lifelinefig setbounds role_width headfig getheight role_width headfig getheight updateedges growtosize lifelinefig getheight sequencediagramlayer link_distance calcbounds _x _height _w _h firepropchange oldbounds getbounds see org tigris gef presentation fig node super translate int int override public void super translate int dx int dy set bounds getx dx gety get width get height fignode supertranslate supertranslate setbounds getwidth getheight returns a beautified name to show in the name text box p param o is the object return a name private string get beautified name object o string name model get facade get name o if name null name equals name anon model get facade getuml class name o return name getbeautifiedname getfacade getname getfacade getumlclassname todo this helper should be private public static boolean is call message object message return model get facade isa call action model get facade get action message iscallmessage getfacade isacallaction getfacade getaction todo this helper should be private public static boolean is return message object message return model get facade isa return action model get facade get action message isreturnmessage getfacade isareturnaction getfacade getaction todo this helper should be private public static boolean is create message object message return model get facade isa create action model get facade get action message iscreatemessage getfacade isacreateaction getfacade getaction todo this helper should be private public static boolean is destroy message object message return model get facade isa destroy action model get facade get action message isdestroymessage getfacade isadestroyaction getfacade getaction private void set previous state int start int new state for int i start 1 i 0 i message node node link positions get i if node get fig message port null break node set state new state setpreviousstate newstate messagenode linkpositions getfigmessageport setstate newstate private int set from action node int last state int offset if last state message node initial last state message node done something no call set previous state offset last state else if last state message node implicit returned last state message node called set previous state offset last state else if last state message node implicit created last state message node created set previous state offset last state return last state setfromactionnode laststate laststate messagenode laststate messagenode done_something_no_call setpreviousstate laststate laststate messagenode implicit_returned laststate messagenode setpreviousstate laststate laststate messagenode implicit_created laststate messagenode setpreviousstate laststate laststate every classifier role has a state and a caller list the state is precreated before a node is created and destroyed after classifier role is destroyed the state is initial before anything happens after a classifier is created the state is created and the state for prior nodes is set to precreated if the classifier does something p if the state is initial the state for that and prior nodes becomes done something no call p else if the state is implicit returned the state for that and prior nodes becomes called p otherwise the state doesn t change p if the classifier is called p if the caller list is empty the state becomes called p the caller is added to the caller list p if the classifier returns the caller being returned to and any callers added to the list since that call are removed from the caller list if the caller list is empty the state becomes returned p if nothing happens on the node p if the previous state was called the state becomes implicit returned p otherwise the state is the same as the previous node s state p start or stop a rectangle when the state changes void update node states int last state message node initial array list callers null int node count link positions size for int i 0 i node count i message node node link positions get i fig message port fig message port node get fig message port if the node has a fig message port if fig message port null int fmpy life line fig gety coordinate i if fig message port gety fmpy fig message port set bounds life line fig getx fmpy role width 1 object message fig message port get owner boolean self message model get facade isa message message model get facade get sender message model get facade get receiver message boolean self receiving false if self message for int j i 1 j 0 j message node prev link positions get j fig message port prevmp prev get fig message port if prevmp null prevmp get owner message self receiving true if is call message message if model get facade get sender message get owner self receiving last state set from action node last state i node set state last state node set callers callers else if last state message node initial last state message node created last state message node implicit created last state message node implicit returned last state message node returned last state message node called if callers null callers new array list else callers new array list callers callers add model get facade get sender message node set state last state node set callers callers else if is return message message if last state message node implicit returned set previous state i message node called last state message node called if model get facade get sender message get owner self receiving if callers null callers new array list object caller model get facade get receiver message int caller index callers last index of caller if caller index 1 for int back node index i 1 back node index 0 link positions get back node index matching caller list caller caller index back node index skip if caller index 0 callers null if last state message node called last state message node returned else callers new array list callers sub list 0 caller index node set state last state node set callers callers else if is create message message if model get facade get sender message get owner last state set from action node last state i node set state last state node set callers callers else last state message node created set previous state i message node precreated node set state last state node set callers callers else if is destroy message message if model get facade get sender message get owner self receiving last state set from action node last state i node set state last state node set callers callers else last state message node destroyed callers null node set state last state node set callers callers else if last state message node called last state message node implicit returned if last state message node created last state message node implicit created node set state last state node set callers callers done_something_no_call implicit_returned implicit_returned updatenodestates laststate messagenode arraylist nodecount linkpositions nodecount messagenode linkpositions figmessageport figmessageport getfigmessageport figmessageport figmessageport lifelinefig getycoordinate figmessageport figmessageport setbounds lifelinefig role_width figmessageport getowner selfmessage getfacade isamessage getfacade getsender getfacade getreceiver selfreceiving selfmessage messagenode linkpositions figmessageport getfigmessageport getowner selfreceiving iscallmessage getfacade getsender getowner selfreceiving laststate setfromactionnode laststate setstate laststate setcallers laststate messagenode laststate messagenode laststate messagenode implicit_created laststate messagenode implicit_returned laststate messagenode laststate messagenode arraylist arraylist getfacade getsender setstate laststate setcallers isreturnmessage laststate messagenode implicit_returned setpreviousstate messagenode laststate messagenode getfacade getsender getowner selfreceiving arraylist getfacade getreceiver callerindex lastindexof callerindex backnodeindex backnodeindex linkpositions backnodeindex matchingcallerlist callerindex backnodeindex callerindex laststate messagenode laststate messagenode arraylist sublist callerindex setstate laststate setcallers iscreatemessage getfacade getsender getowner laststate setfromactionnode laststate setstate laststate setcallers laststate messagenode setpreviousstate messagenode setstate laststate setcallers isdestroymessage getfacade getsender getowner selfreceiving laststate setfromactionnode laststate setstate laststate setcallers laststate messagenode setstate laststate setcallers laststate messagenode laststate messagenode implicit_returned laststate messagenode laststate messagenode implicit_created setstate laststate setcallers private void add activations message node start activation node null message node end activation node null int last state message node initial boolean start full false boolean end full false int node count link positions size int x life line fig getx for int i 0 i node count i message node node link positions get i int next state node get state if last state next state next state message node created life line fig add activation fig new fig birth activation life line fig getx life line fig gety coordinate i sequence diagram layer link distance 4 if last state next state next state message node destroyed int y life line fig gety coordinate i sequence diagram layer link distance 2 life line fig add activation fig new fig line x y sequence diagram layer link distance 2 x role width y sequence diagram layer link distance line color life line fig add activation fig new fig line x y sequence diagram layer link distance x role width y sequence diagram layer link distance 2 line color if start activation node null switch next state case message node done something no call start activation node node start full true break case message node called case message node created start activation node node start full false break default else switch next state case message node destroyed case message node returned end activation node node end full false break case message node implicit returned case message node implicit created end activation node link positions get i 1 end full true break case message node called if last state message node created end activation node link positions get i 1 end full false i next state last state break default last state next state if start activation node null end activation node null if start activation node end activation node start full end full int y1 gety coordinate start activation node if start full y1 sequence diagram layer link distance 2 int y2 gety coordinate end activation node if end full y2 sequence diagram layer link distance 2 life line fig add activation fig new fig activation x y1 role width y2 y1 start activation node null end activation node null start full false end full false if start activation node null end activation node link positions get node count 1 end full true int y1 gety coordinate start activation node if start full y1 sequence diagram layer link distance 2 int y2 gety coordinate end activation node if end full y2 sequence diagram layer link distance 2 life line fig add activation fig new fig activation x y1 role width y2 y1 start activation node null end activation node null start full false end full false addactivations messagenode startactivationnode messagenode endactivationnode laststate messagenode startfull endfull nodecount linkpositions lifelinefig nodecount messagenode linkpositions nextstate getstate laststate nextstate nextstate messagenode lifelinefig addactivationfig figbirthactivation lifelinefig lifelinefig getycoordinate sequencediagramlayer link_distance laststate nextstate nextstate messagenode lifelinefig getycoordinate sequencediagramlayer link_distance lifelinefig addactivationfig figline sequencediagramlayer link_distance role_width sequencediagramlayer link_distance line_color lifelinefig addactivationfig figline sequencediagramlayer link_distance role_width sequencediagramlayer link_distance line_color startactivationnode nextstate messagenode done_something_no_call startactivationnode startfull messagenode messagenode startactivationnode startfull nextstate messagenode messagenode endactivationnode endfull messagenode implicit_returned messagenode implicit_created endactivationnode linkpositions endfull messagenode laststate messagenode endactivationnode linkpositions endfull nextstate laststate laststate nextstate startactivationnode endactivationnode startactivationnode endactivationnode startfull endfull getycoordinate startactivationnode startfull sequencediagramlayer link_distance getycoordinate endactivationnode endfull sequencediagramlayer link_distance lifelinefig addactivationfig figactivation role_width startactivationnode endactivationnode startfull endfull startactivationnode endactivationnode linkpositions nodecount endfull getycoordinate startactivationnode startfull sequencediagramlayer link_distance getycoordinate endactivationnode endfull sequencediagramlayer link_distance lifelinefig addactivationfig figactivation role_width startactivationnode endactivationnode startfull endfull first removes all current activation boxes then add new ones to the figobject depending on the state of the nodes public void update activations log debug updating activations life line fig remove activations add activations updateactivations lifelinefig removeactivations addactivations public default handler get handler handler stack stack object container string uri string localname string qname attributes attributes throws sax exception pgml stack parser parser pgml stack parser stack string tokenizer st new string tokenizer attributes get value description if st has more elements st next token string x str null string y str null string w str null string h str null if st has more elements x str st next token y str st next token w str st next token h str st next token if x str null x str equals int x integer parse int x str int y integer parse int y str int w integer parse int w str int h integer parse int h str set bounds x y w h pgml stack parser set common attrs this attributes parser register fig this attributes get value name container container add object this return new fig classifier role handler parser this defaulthandler gethandler handlerstack saxexception pgmlstackparser pgmlstackparser stringtokenizer stringtokenizer getvalue hasmoreelements nexttoken xstr ystr wstr hstr hasmoreelements xstr nexttoken ystr nexttoken wstr nexttoken hstr nexttoken xstr xstr parseint xstr parseint ystr parseint wstr parseint hstr setbounds pgmlstackparser setcommonattrs registerfig getvalue addobject figclassifierrolehandler the width of the fig classifier role should be equal to the width of the name or stereo text box p see org argouml uml diagram ui fig node model element update bounds override protected void update bounds rectangle bounds get bounds bounds width math max get name fig get width 2 margin get stereotype fig get width 2 margin set bounds bounds figclassifierrole fignodemodelelement updatebounds updatebounds getbounds getnamefig getwidth getstereotypefig getwidth setbounds set the line width only change the line width of the outerbox and the lifeline are changed values of zero are ignored param w width must be greater than zero public void set line width int w if head fig get line width w w 0 head fig set line width w life line fig set line width w damage setlinewidth headfig getlinewidth headfig setlinewidth lifelinefig setlinewidth override public void set fill color color col if col null col head fig get fill color head fig set fill color col damage setfillcolor headfig getfillcolor headfig setfillcolor override public void set filled boolean filled if head fig is filled filled head fig set filled filled damage setfilled headfig isfilled headfig setfilled see org tigris gef presentation fig get fill color override public color get fill color return head fig get fill color getfillcolor getfillcolor headfig getfillcolor override public boolean is filled return head fig is filled isfilled headfig isfilled see org tigris gef presentation fig get line color override public color get line color return head fig get line color getlinecolor getlinecolor headfig getlinecolor see org tigris gef presentation fig get line width override public int get line width return head fig get line width getlinewidth getlinewidth headfig getlinewidth private fig life line get life line fig return life line fig figlifeline getlifelinefig lifelinefig override protected void update listeners object old owner object new owner set object l new hash set object if new owner null l add new object new owner null iterator it model get facade get bases new owner iterator while it has next object base it next l add new object base name it model get facade get stereotypes new owner iterator while it has next object stereo it next l add new object stereo name update element listeners l todo the old implementation called the superclasses method do we really want to do that super update listeners old owner new owner updatelisteners oldowner newowner hashset newowner newowner getfacade getbases newowner hasnext getfacade getstereotypes newowner hasnext updateelementlisteners updatelisteners oldowner newowner void grow to size int node count grow link positions size node count link positions size growtosize nodecount linkpositions nodecount linkpositions add count link spaces before node position void grow int node position int count for int i 0 i count i link positions add node position new message node this if count 0 update node states rectangle r get bounds r height count sequence diagram layer link distance set bounds r update edges nodeposition nodeposition linkpositions nodeposition messagenode updatenodestates getbounds sequencediagramlayer link_distance setbounds updateedges override protected void model changed property change event mee if mee get property name equals name if mee get source get owner update classifier role name else if model get facade isa stereotype mee get source update stereotype text else update base names rendering changed else if mee get property name equals stereotype update stereotype text update listeners get owner get owner rendering changed else if mee get property name equals base update base names update listeners get owner get owner rendering changed modelchanged propertychangeevent getpropertyname getsource getowner updateclassifierrolename getfacade isastereotype getsource updatestereotypetext updatebasenames renderingchanged getpropertyname updatestereotypetext updatelisteners getowner getowner renderingchanged getpropertyname updatebasenames updatelisteners getowner getowner renderingchanged remove a fig message port that s associated with a removed fig message param fmp the fig message port void remove fig message port fig message port fmp fmp get node set fig message port null fmp set node null life line fig remove fig fmp figmessageport figmessage figmessageport removefigmessageport figmessageport getnode setfigmessageport setnode lifelinefig removefig update an array of booleans to set node indexes that have associated fig message port to false param start index of first node in array param empty nodes true where there is no fig message port at the node with the index in the array start at creation the entire array is set to true void update empty node array int start boolean empty nodes for int i 0 i empty nodes length i if link positions get i start get fig message port null empty nodes i false figmessageport emptynodes figmessageport updateemptynodearray emptynodes emptynodes linkpositions getfigmessageport emptynodes remove nodes according to the empty nodes array contract total height of fig param start index of first node in array param empty nodes true where there is no fig message port at the node with the index in the array start void contract nodes int start boolean empty nodes int contracted 0 for int i 0 i empty nodes length i if empty nodes i if link positions get i start contracted get fig message port null throw new illegal argument exception trying to contract non empty message node link positions remove i start contracted contracted if contracted 0 update node states rectangle r get bounds r height contracted sequence diagram layer link distance update edges set bounds r emptynodes emptynodes figmessageport contractnodes emptynodes emptynodes emptynodes linkpositions getfigmessageport illegalargumentexception messagenode linkpositions updatenodestates getbounds sequencediagramlayer link_distance updateedges setbounds private void update base names string buffer b new string buffer iterator it model get facade get bases get owner iterator while it has next b append get beautified name it next if it has next b append base names b to string updatebasenames stringbuffer stringbuffer getfacade getbases getowner hasnext getbeautifiedname hasnext basenames tostring private void update classifier role name classifier role name get beautified name get owner updateclassifierrolename classifierrolename getbeautifiedname getowner override public void rendering changed super rendering changed update base names update classifier role name renderingchanged renderingchanged updatebasenames updateclassifierrolename returns the port for a given coordinate pair normally deep hit port returns the owner of the fig in the fig group that is present at the given coordinate pair returning figs that are added later first in this case it returns a message port p inherit doc override public object deep hit port int x int y rectangle rect new rectangle getx y 16 get width 32 message node found node null if life line fig intersects rect for int i 0 i link positions size i message node node link positions get i int position life line fig gety coordinate i if i link positions size 1 int next position life line fig gety coordinate i 1 if next position y position y if y position next position y found node node else found node link positions get i 1 break else found node link positions get link positions size 1 message node next node next node new message node this link positions add next node int next position life line fig gety coordinate i 1 if y position next position y found node next node break else if head fig intersects rect found node get classifier role node else return null set matching fig found node return found node deephitport figgroup messageport inheritdoc deephitport getwidth messagenode foundnode lifelinefig linkpositions messagenode linkpositions lifelinefig getycoordinate linkpositions nextposition lifelinefig getycoordinate nextposition nextposition foundnode foundnode linkpositions foundnode linkpositions linkpositions messagenode nextnode nextnode messagenode linkpositions nextnode nextposition lifelinefig getycoordinate nextposition foundnode nextnode headfig foundnode getclassifierrolenode setmatchingfig foundnode foundnode param node message node to get y position of return y position of given node public int gety coordinate message node node return life line fig gety coordinate link positions index of node messagenode getycoordinate messagenode lifelinefig getycoordinate linkpositions indexof override public void set owner object own super set owner own bind port own head fig setowner setowner bindport headfig returns the index of a given node param node is the given node return the index public int get index of message node node return link positions index of node getindexof messagenode linkpositions indexof returns the node that s next to the given node param node is the given node return the node public message node next node message node node if get index of node link positions size return link positions get get index of node 1 return null messagenode nextnode messagenode getindexof linkpositions linkpositions getindexof returns the node that s before the given node in the nodes list param node is the given node return the node public message node previous node message node node if get index of node 0 return link positions get get index of node 1 return null messagenode previousnode messagenode getindexof linkpositions getindexof override public fig get port fig object message node if model get facade isa classifier role message node todo not sure of the meaning of the following message we will end up here any time a new fig classifier role is constructed during the set owner call tfm 20080905 log debug got a classifier role only legal on load return null if message node instanceof message node throw new illegal argument exception expecting a message node but got a message node get class get name set matching fig message node message node if message node message node get fig message port null return message node message node get fig message port return new temp fig message node life line fig getx gety coordinate message node message node life line fig getx role width getportfig messagenode getfacade isaclassifierrole messagenode figclassifierrole setowner classifierrole messagenode messagenode illegalargumentexception messagenode messagenode getclass getname setmatchingfig messagenode messagenode messagenode messagenode getfigmessageport messagenode messagenode getfigmessageport tempfig messagenode lifelinefig getycoordinate messagenode messagenode lifelinefig role_width returns the classifier role node this is the port that represents the object figrect return the classifier role node private message node get classifier role node return link positions get 0 classifierrolenode classifierrolenode messagenode getclassifierrolenode linkpositions adds a node at the given position param position the position in which the node will be added param node the node to be added public void add node int position message node node link positions add position node iterator it link positions sub list position 1 link positions size iterator while it has next object o it next if o instanceof message node fig message port fig message port message node o get fig message port if fig message port null fig message port sety fig message port gety sequence diagram layer link distance calc bounds addnode messagenode linkpositions linkpositions sublist linkpositions hasnext messagenode figmessageport figmessageport messagenode getfigmessageport figmessageport figmessageport figmessageport sequencediagramlayer link_distance calcbounds gets a node that has the given position creates new nodes if needed param position the position of the resulting node return the node with the given position public message node get node int position if position link positions size return link positions get position message node node null for int cnt position link positions size cnt 0 cnt node new message node this link positions add node calc bounds return node messagenode getnode linkpositions linkpositions messagenode linkpositions messagenode linkpositions calcbounds see org tigris gef presentation fig make selection override public selection make selection return new selection classifier role this makeselection makeselection selectionclassifierrole static class temp fig extends fig line constructor param owner param x param y param x2 temp fig object owner int x int y int x2 super x y x2 y set visible false set owner owner tempfig figline tempfig setvisible setowner static class fig classifier role handler extends fig group handler constructor param parser param classifier role fig classifier role handler pgml stack parser parser fig classifier role classifier role super parser classifier role figclassifierrolehandler figgrouphandler classifierrole figclassifierrolehandler pgmlstackparser figclassifierrole classifierrole classifierrole override protected default handler get element handler handler stack stack object container string uri string localname string qname attributes attributes throws sax exception default handler result null string description attributes get value description if qname equals group description null description starts with fig life line class get name fig classifier role fcr fig classifier role fig group handler container get fig group result new fig life line handler pgml stack parser stack fcr get life line fig else if qname equals group description null description starts with fig message port class get name todo this if else block exists in order to load sequence diagrams from 0 20 it must exist until http argouml tigris org issues show bug cgi id 4039 pgml stack parser parser pgml stack parser stack string owner ref attributes get value href object owner parser find owner owner ref fig message port fmp new fig message port owner fig classifier role fcr fig classifier role fig group handler container get fig group fcr get life line fig add fig fmp result new fig group handler pgml stack parser stack fmp pgml stack parser set common attrs fmp attributes parser register fig fmp attributes get value name else result pgml stack parser stack get handler stack container uri localname qname attributes return result defaulthandler getelementhandler handlerstack saxexception defaulthandler getvalue startswith figlifeline getname figclassifierrole figclassifierrole figgrouphandler getfiggroup figlifelinehandler pgmlstackparser getlifelinefig startswith figmessageport getname show_bug pgmlstackparser pgmlstackparser ownerref getvalue findowner ownerref figmessageport figmessageport figclassifierrole figclassifierrole figgrouphandler getfiggroup getlifelinefig addfig figgrouphandler pgmlstackparser pgmlstackparser setcommonattrs registerfig getvalue pgmlstackparser gethandler override protected void update stereotype text rectangle rect head fig get bounds get stereotype fig set owner get owner int min width head fig get minimum size width if min width rect width rect width min width int head height head fig get minimum size height head fig set bounds rect x rect y rect width head height if get layer null return int h min head height list figs get layer get contents for iterator i figs iterator i has next object o i next if o instanceof fig classifier role fig classifier role other fig classifier role o int other height other head fig get minimum height if other height h h other height int height head fig get height life line fig get height set bounds head fig getx head fig gety head fig get width height calc bounds set all other c lassifier roles to be the same height as this one now is layer layer get layer list layer figs layer get contents for iterator i layer figs iterator i has next object o i next if o instanceof fig classifier role o this fig classifier role other fig classifier role o other set height height updatestereotypetext headfig getbounds getstereotypefig setowner getowner minwidth headfig getminimumsize minwidth minwidth headheight headfig getminimumsize headfig setbounds headheight getlayer min_head_height getlayer getcontents hasnext figclassifierrole figclassifierrole figclassifierrole otherheight headfig getminimumheight otherheight otherheight headfig getheight lifelinefig getheight setbounds headfig headfig headfig getwidth calcbounds classifierroles getlayer layerfigs getcontents layerfigs hasnext figclassifierrole figclassifierrole figclassifierrole setheight return the fig which forms the top box of the composite fig fig head get head fig return head fig fighead getheadfig headfig constructor for uml generalizable element specialization list model public uml generalizable element specialization list model super specialization model get meta types get generalization true umlgeneralizableelementspecializationlistmodel umlgeneralizableelementspecializationlistmodel getmetatypes getgeneralization override protected void build model list if get target null model get facade isa generalizable element get target set all elements model get facade get specializations get target buildmodellist gettarget getfacade isageneralizableelement gettarget setallelements getfacade getspecializations gettarget override protected boolean is valid element object element return model get facade isa generalization element model get facade get specializations get target contains element isvalidelement getfacade isageneralization getfacade getspecializations gettarget construct a new fig fork state param owner owning uml element param bounds position and size param settings rendering settings public fig fork state object owner rectangle bounds diagram settings settings super owner bounds settings init figs figforkstate figforkstate diagramsettings initfigs the main constructor deprecated for 0 27 4 by tfmorris use link fig fork state object rectangle diagram settings suppress warnings deprecation deprecated public fig fork state super init figs figforkstate diagramsettings suppresswarnings figforkstate initfigs private void init figs set editable false set big port new fig rect x y state width height debug color debug color head new fig rect x y state width height line color solid fill color add figs to the fig node in back to front order add fig get big port add fig head set blink ports false make port invisible unless mouse enters initfigs seteditable setbigport figrect state_width debug_color debug_color figrect state_width line_color solid_fill_color fignode addfig getbigport addfig setblinkports the constructor which links the fig into the existing uml element param gm ignored param node the uml element deprecated for 0 27 4 by tfmorris use link fig fork state object rectangle diagram settings suppress warnings deprecation deprecated public fig fork state suppress warnings unused graph model gm object node this set owner node figforkstate diagramsettings suppresswarnings figforkstate suppresswarnings graphmodel setowner override public object clone fig fork state fig clone fig fork state super clone iterator it fig clone get figs iterator fig clone set big port fig rect it next fig clone head fig rect it next return fig clone figforkstate figclone figforkstate figclone getfigs figclone setbigport figrect figclone figrect figclone override protected void set standard bounds int x int y int w int h rectangle old bounds get bounds if w h h height else w height get big port set bounds x y w h head set bounds x y w h calc bounds update edges fire prop change bounds old bounds get bounds setstandardbounds oldbounds getbounds getbigport setbounds setbounds calcbounds updateedges firepropchange oldbounds getbounds see org tigris gef presentation fig set line color java awt color override public void set line color color col head set line color col setlinecolor setlinecolor setlinecolor see org tigris gef presentation fig get line color override public color get line color return head get line color getlinecolor getlinecolor getlinecolor see org tigris gef presentation fig set fill color java awt color override public void set fill color color col head set fill color col setfillcolor setfillcolor setfillcolor see org tigris gef presentation fig get fill color override public color get fill color return head get fill color getfillcolor getfillcolor getfillcolor see org tigris gef presentation fig set filled boolean override public void set filled boolean f noop fixed rendering setfilled setfilled override public boolean is filled return true isfilled see org tigris gef presentation fig set line width int override public void set line width int w head set line width w setlinewidth setlinewidth setlinewidth see org tigris gef presentation fig get line width override public int get line width return head get line width getlinewidth getlinewidth getlinewidth see java awt event mouse listener mouse clicked java awt event mouse event override public void mouse clicked mouse event me ignored mouselistener mouseclicked mouseevent mouseclicked mouseevent creates a new instance of explorer perspective param new name the to be localized name for the perspective public explorer perspective string new name name translator localize new name rules new array list perspective rule explorerperspective newname explorerperspective newname newname arraylist perspectiverule param rule the rule to add public void add rule perspective rule rule rules add rule addrule perspectiverule param rule the rule to remove public void remove rule perspective rule rule rules remove rule removerule perspectiverule return the array with all the rules public object get rules array return rules to array getrulesarray toarray return the list with all the rules public list perspective rule get list return rules perspectiverule getlist override public string to string return name tostring make a clone of this explorer perspective with a different given name param new name the given name return the new explorer perspective public explorer perspective make named clone string new name explorer perspective ep new explorer perspective new name ep rules add all rules return ep explorerperspective newname explorerperspective explorerperspective makenamedclone newname explorerperspective explorerperspective newname addall param the new name the new name for the explorer perspective protected void set name string the new name this name the new name thenewname explorerperspective setname thenewname thenewname constructor for uml searchable combo box param model the model param select action the action for selection param show icon true if we show an icon in the list public uml searchable combo box uml combo box model2 model action select action boolean show icon super model select action show icon umlsearchablecombobox selectaction showicon umlsearchablecombobox umlcomboboxmodel2 selectaction showicon selectaction showicon constructor for uml searchable combo box param arg0 the model param select action the action for selection public uml searchable combo box uml combo box model2 arg0 action select action this arg0 select action true umlsearchablecombobox selectaction umlsearchablecombobox umlcomboboxmodel2 selectaction selectaction searches amongst the modelelements the elements in the listmodel for an item that conforms to the parameter item if such an element is a model element the name should start with the item which is a string otherwise the text that is shown in the combobox should start with the text as the element is found this is made to the selected item inherit doc protected void do on edit object item object element search item if element null set selected item element modelelement inheritdoc doonedit setselecteditem does the actual searching returns the item found or null if there is no item found param item the string entered by the user return object the found object from the list or null if none found protected object search object item string text string item combo box model model get model for int i 0 i model get size i object element model get element at i if model get facade isa model element element if get renderer instanceof uml list cell renderer2 string label text uml list cell renderer2 get renderer make text element if label text null label text starts with text return element if model get facade isa model element element object m model element elem element string name model get facade get name elem if name null name starts with text return element return null comboboxmodel getmodel getsize getelementat getfacade isamodelelement getrenderer umllistcellrenderer2 labeltext umllistcellrenderer2 getrenderer maketext labeltext labeltext startswith getfacade isamodelelement mmodelelement getfacade getname startswith the constructor public cr empty package setup head and desc add supported decision uml decision modularity add trigger owned element cremptypackage setupheadanddesc addsupporteddecision umldecision addtrigger ownedelement override public boolean predicate2 object dm designer dsgr if model get facade isa package dm return no problem collection elems model get facade get owned elements dm if elems size 0 log debug found empty package model get facade to string dm return problem found return no problem getfacade isapackage no_problem getfacade getownedelements getfacade tostring problem_found no_problem override public set object get criticized design materials set object ret new hash set object ret add model get meta types get package return ret getcriticizeddesignmaterials hashset getmetatypes getpackage constructor for action new pseudo state protected action new simple state super put value action name translator localize button new simplestate actionnewpseudostate actionnewsimplestate putvalue see java awt event action listener action performed java awt event action event public void action performed action event e super action performed e model get state machines factory build simple state get target actionlistener actionperformed actionevent actionperformed actionevent actionperformed getstatemachinesfactory buildsimplestate gettarget return returns the singleton public static action new simple state get singleton return singleton actionnewsimplestate getsingleton public class model utils finds a type in a model by name param s the type name param model the model return the type or code null code if the type has not been found public static object find type in model string s object model if model get facade isa namespace model throw new illegal argument exception looking for the classifier s in a non namespace object of model a namespace was expected collection all classifiers model get model management helper get all model elements of kind model model get meta types get classifier for object classifier all classifiers if model get facade get name classifier null model get facade get name classifier equals s return classifier return null modelutils findtypeinmodel getfacade isanamespace illegalargumentexception allclassifiers getmodelmanagementhelper getallmodelelementsofkind getmetatypes getclassifier allclassifiers getfacade getname getfacade getname constructor public action settings super translator localize action settings resource loader wrapper lookup icon action settings actionsettings resourceloaderwrapper lookupicon public void action performed action event event if dialog null dialog new settings dialog dialog set visible true actionperformed actionevent settingsdialog setvisible construct a property panel for a call action element public prop panel call action super label call action lookup icon call action callaction proppanelcallaction lookupicon callaction override public void initialize super initialize uml searchable combo box operation combo box new uml call action operation combo box2 new uml call action operation combo box model add field before translator localize label operation new uml combo box navigator translator localize label operation navigate tooltip operation combo box arguments scroll umlsearchablecombobox operationcombobox umlcallactionoperationcombobox2 umlcallactionoperationcomboboxmodel addfieldbefore umlcomboboxnavigator operationcombobox argumentsscroll extends uml searchable combo box the constructor param arg0 the model public uml call action operation combo box2 uml combo box model2 arg0 super arg0 new set action operation action set editable false umlsearchablecombobox umlcallactionoperationcombobox2 umlcomboboxmodel2 setactionoperationaction seteditable the constructor public set action operation action super setactionoperationaction public void action performed action event e super action performed e object source e get source if source instanceof uml combo box2 object selected uml combo box2 source get selected item object target uml combo box2 source get target if model get facade isa call action target model get facade isa operation selected if model get facade get operation target selected model get common behavior helper set operation target selected actionperformed actionevent actionperformed getsource umlcombobox2 umlcombobox2 getselecteditem umlcombobox2 gettarget getfacade isacallaction getfacade isaoperation getfacade getoperation getcommonbehaviorhelper setoperation extends uml combo box model2 the constructor public uml call action operation combo box model super operation true umlcomboboxmodel2 umlcallactionoperationcomboboxmodel the list of operations shall contain all operations of all classifiers contained in the same package as the callaction itself p todo in fact we also should include operations of imported clasifiers see org argouml uml ui uml combo box model2 build model list protected void build model list object target target manager get instance get model target collection ops new array list if model get facade isa call action target object ns model get facade get model element container target while model get facade isa package ns ns model get facade get model element container ns if ns null break if model get facade isa namespace ns collection c model get model management helper get all model elements of kind ns model get meta types get classifier iterator i c iterator while i has next ops add all model get facade get operations i next to be really sure let s add the operation that is linked to the action in the model too if it is not listed yet we need this incase an operation is moved out of the package or maybe with imported xmi object current model get facade get operation target if model get facade isa operation current if ops contains current ops add current set elements ops umlcomboboxmodel2 buildmodellist buildmodellist targetmanager getinstance getmodeltarget arraylist getfacade isacallaction getfacade getmodelelementcontainer getfacade isapackage getfacade getmodelelementcontainer getfacade isanamespace getmodelmanagementhelper getallmodelelementsofkind getmetatypes getclassifier hasnext addall getfacade getoperations getfacade getoperation getfacade isaoperation setelements protected object get selected model element object target target manager get instance get model target if model get facade isa call action target return model get facade get operation target return null getselectedmodelelement targetmanager getinstance getmodeltarget getfacade isacallaction getfacade getoperation protected boolean is valid element object element object target target manager get instance get model target if model get facade isa call action target return element model get facade get operation target return false isvalidelement targetmanager getinstance getmodeltarget getfacade isacallaction getfacade getoperation the function in the parent removes items from the list when deselected we do not need that here p this function is only needed when another operation is connected to the action in the model to select it in the combo p it is e g not usefull to update the combo for removed operations since you can only remove operations by changing the target and selecting the action again re generates the complete list override public void model changed uml change event evt if evt instanceof attribute change event if evt get property name equals operation if evt get source get target get changed element evt null object elem get changed element evt set selected item elem modelchanged umlchangeevent attributechangeevent getpropertyname getsource gettarget getchangedelement getchangedelement setselecteditem public final class generator helper the constructor private generator helper generatorhelper generatorhelper generate code for one or more elements in a given language param lang the language to use param elements the elements to generate code for param deps whether to generate dependency too return a collection of source unit objects the collection may be empty if no file is generated public static collection generate language lang collection elements boolean deps code generator gen generator manager get instance get generator lang if gen null return gen generate elements deps return new array list empty list sourceunit codegenerator generatormanager getinstance getgenerator arraylist generate code for a single element param lang the language to use param elem the element to generate code for param deps whether to generate dependency too return a collection of source unit objects the collection may be empty if no file is generated public static collection generate language lang object elem boolean deps list list new array list list add elem return generate lang list deps sourceunit arraylist creates a new language only if one with the same name doesn t already exist in generator manager in which case that one is returned param the name the name of the language param the title a string representing the language for display param the icon an icon for the language return the language object found or created public static language make language string the name string the title icon the icon language lang lang generator manager get instance find language the name if lang null lang new language the name the title the icon return lang generatormanager thename thetitle theicon makelanguage thename thetitle theicon generatormanager getinstance findlanguage thename thename thetitle theicon creates a language with no icon see make language string string icon param the name the name of the language param the title a string representing the language for display return the language object found or created public static language make language string the name string the title return make language the name the title null makelanguage thename thetitle makelanguage thename thetitle makelanguage thename thetitle creates a language with title equal to the name see make language string string icon param the name the name of the language param the icon an icon for the language return the language object found or created public static language make language string the name icon the icon return make language the name the name the icon makelanguage thename theicon makelanguage thename theicon makelanguage thename thename theicon creates a language with title equal to the name and no icon see make language string string icon param the name the name of the language return the language object found or created public static language make language string the name return make language the name the name null makelanguage thename makelanguage thename makelanguage thename thename the constructor private notation provider factory2 super all languages new hash map notation name map integer class notationproviderfactory2 alllanguages hashmap notationname return returns the singleton instance public static notation provider factory2 get instance if instance null instance new notation provider factory2 return instance notationproviderfactory2 getinstance notationproviderfactory2 get a notation provider for the given language param type the provider type return the provider param object the constructor parameter deprecated for 0 27 2 by tfmorris use link get notation provider int object notation name deprecated public notation provider get notation provider int type object object notation name name notation find notation current language return get notation provider type object name notationprovider getnotationprovider notationname notationprovider getnotationprovider notationname findnotation currentlanguage getnotationprovider get a notation provider for the current project p if there is any reason for failure null is returned no exception is thrown the caller is supposed to deal with receiving null param type the provider type param object the constructor parameter param name the name of the notation language to use return the provider or null if there was any failure public notation provider get notation provider int type object object notation name name class clazz get notation provider class type name if clazz null try try class mp method m clazz get method get instance mp return notation provider m invoke null object mp catch exception e class cp object class constructor constructor clazz get constructor cp object params object return notation provider constructor new instance params catch security exception e todo why aren t we throwing an exception here returning null results in npe and no explanation why log error exception caught e catch no such method exception e todo why aren t we throwing an exception here returning null results in npe and no explanation why log error exception caught e catch illegal argument exception e todo why aren t we throwing an exception here returning null results in npe and no explanation why log error exception caught e catch instantiation exception e todo why aren t we throwing an exception here returning null results in npe and no explanation why log error exception caught e catch illegal access exception e todo why aren t we throwing an exception here returning null results in npe and no explanation why log error exception caught e catch invocation target exception e todo why aren t we throwing an exception here returning null results in npe and no explanation why log error exception caught e return null notationprovider notationprovider getnotationprovider notationname getnotationproviderclass getmethod getinstance notationprovider getconstructor notationprovider newinstance securityexception nosuchmethodexception illegalargumentexception instantiationexception illegalaccessexception invocationtargetexception create a new notation provider param type the provider type return the provider param object the constructor parameter param listener the fig that refreshes after the notation provider has changed deprecated for 0 27 2 by tfmorris use link get notation provider int object property change listener notation name deprecated public notation provider get notation provider int type object object property change listener listener notation name name notation find notation current language return get notation provider type object listener name notationprovider notationprovider getnotationprovider propertychangelistener notationname notationprovider getnotationprovider propertychangelistener notationname findnotation currentlanguage getnotationprovider get a notation provider for the current project param type the provider type param object the constructor parameter param listener the fig that refreshes after the notation provider has changed param name the name of the notation language to use return the provider public notation provider get notation provider int type object object property change listener listener notation name name notation provider p get notation provider type object name p initialise listener listener object return p notationprovider notationprovider notationprovider getnotationprovider propertychangelistener notationname notationprovider getnotationprovider initialiselistener this function looks for the requested notation provider type it is guaranteed to deliver ul li the requested type of the requested notation language li the requested type of the default notation or li code null code ul param type the provider type param name the context i e the notation name return the provider private class get notation provider class int type notation name name if all languages contains key name map integer class t all languages get name if t contains key integer value of type return t get integer value of type map integer class t all languages get default language if t null t contains key integer value of type return t get integer value of type return null getnotationproviderclass notationname alllanguages containskey alllanguages containskey valueof valueof alllanguages defaultlanguage containskey valueof valueof param type the provider type param notation name the name of the notation language param provider the provider public void add notation provider int type notation name notation name class provider if all languages contains key notation name map integer class t all languages get notation name t put integer value of type provider else map integer class t new hash map integer class t put integer value of type provider all languages put notation name t notationname addnotationprovider notationname notationname alllanguages containskey notationname alllanguages notationname valueof hashmap valueof alllanguages notationname param notation name the uml notation that is to be used as default if no other is found public void set default notation notation name notation name if all languages contains key notation name default language notation name notationname setdefaultnotation notationname notationname alllanguages containskey notationname defaultlanguage notationname we need this to remove modules param notation name the notation to be removed return true if the notation was removed public boolean remove notation notation name notation name if default language notation name return false if all languages contains key notation name return all languages remove notation name null notation remove notation notation name return false notationname removenotation notationname notationname defaultlanguage notationname alllanguages containskey notationname alllanguages notationname removenotation notationname set the default notation language for all users of this factory param the current language the current language to set deprecated for 0 27 2 by tfmorris callers should manage the language that they want explicitly deprecated public static void set current language string the current language notation provider factory2 current language the current language thecurrentlanguage currentlanguage setcurrentlanguage thecurrentlanguage notationproviderfactory2 currentlanguage thecurrentlanguage see org argouml uml ui abstract action navigate navigate to java lang object protected object navigate to object source return model get facade get context source abstractactionnavigate navigateto navigateto getfacade getcontext creates a new instance of depedency node param the parent the parent node public incoming dependency node object the parent this parent the parent depedencynode theparent incomingdependencynode theparent theparent return the parent public object get parent return parent getparent see java lang object to string public string to string return incoming dependencies tostring tostring see org argouml ui explorer weak explorer node subsumes java lang object public boolean subsumes object obj return obj instanceof incoming dependency node weakexplorernode incomingdependencynode the constructor public language combo box super set editable false set maximum row count 6 dimension d get preferred size d width 200 set maximum size d argo event pump add listener argo event types any generator event this refresh languagecombobox seteditable setmaximumrowcount getpreferredsize setmaximumsize argoeventpump addlistener argoeventtypes any_generator_event see java lang object finalize protected void finalize argo event pump remove listener this argoeventpump removelistener refresh the combobox contents public void refresh remove all items iterator iterator generator manager get instance get languages iterator while iterator has next try language ll language iterator next add item ll catch exception e log error unexpected exception e set visible true invalidate removeallitems generatormanager getinstance getlanguages hasnext additem setvisible see org argouml application events argo generator event listener generator changed org argouml application events argo generator event public void generator changed argo generator event e refresh argogeneratoreventlistener generatorchanged argogeneratorevent generatorchanged argogeneratorevent see org argouml application events argo generator event listener generator added org argouml application events argo generator event public void generator added argo generator event e refresh argogeneratoreventlistener generatoradded argogeneratorevent generatoradded argogeneratorevent see org argouml application events argo generator event listener generator removed org argouml application events argo generator event public void generator removed argo generator event e refresh argogeneratoreventlistener generatorremoved argogeneratorevent generatorremoved argogeneratorevent param size the size of the snap in pixels param name the name of the action public action adjust snap int size string name super guide size size put value action name name actionadjustsnap guidesize putvalue public void action performed action event e editor ce globals cur editor guide guide ce get guide if guide instanceof guide grid guide grid guide grid size guide size configuration set string argo key snap string get value id actionperformed actionevent cureditor getguide guidegrid guidegrid gridsize guidesize setstring key_snap getvalue static void set group button group group my group group setgroup buttongroup mygroup this executes one of the actions based on the stored argouml configuration this function is intended for the initial setting of the snap when argouml is started static void init string id configuration get string argo key snap default id list action actions create adjust snap actions for action a actions if a get value id equals id a action performed null if my group null for enumeration e my group get elements e has more elements abstract button ab abstract button e next element action action ab get action if action instanceof action adjust snap string currentid string action get value id if id equals currentid my group set selected ab get model true return return getstring key_snap default_id createadjustsnapactions getvalue actionperformed mygroup mygroup getelements hasmoreelements abstractbutton abstractbutton nextelement getaction actionadjustsnap getvalue mygroup setselected getmodel return a list of actions to adjust the size of the snap grid current values are 4 8 16 and 32 return list of actions which adjust the size of the snap grid static list action create adjust snap actions list action result new array list action action a string name name translator localize menu item snap 4 a new action adjust snap 4 name a put value id 4 a put value shortcut key stroke get key stroke key event vk 1 event alt mask event ctrl mask result add a name translator localize menu item snap 8 a new action adjust snap 8 name a put value id 8 this id is used as default id a put value shortcut key stroke get key stroke key event vk 2 event alt mask event ctrl mask result add a name translator localize menu item snap 16 a new action adjust snap 16 name a put value id 16 a put value shortcut key stroke get key stroke key event vk 3 event alt mask event ctrl mask result add a name translator localize menu item snap 32 a new action adjust snap 32 name a put value id 32 a put value shortcut key stroke get key stroke key event vk 4 event alt mask event ctrl mask result add a return result createadjustsnapactions arraylist actionadjustsnap putvalue putvalue keystroke getkeystroke keyevent vk_1 alt_mask ctrl_mask actionadjustsnap putvalue default_id putvalue keystroke getkeystroke keyevent vk_2 alt_mask ctrl_mask actionadjustsnap putvalue putvalue keystroke getkeystroke keyevent vk_3 alt_mask ctrl_mask actionadjustsnap putvalue putvalue keystroke getkeystroke keyevent vk_4 alt_mask ctrl_mask see org argouml ui explorer rules perspective rule get rule name public string get rule name return translator localize misc classifier specialized classifier perspectiverule getrulename getrulename public collection get children object parent if model get facade isa generalizable element parent return model get facade get children parent return collections empty set getchildren getfacade isageneralizableelement getfacade getchildren empty_set public set get dependencies object parent if model get facade isa generalizable element parent set set new hash set set add parent return set return collections empty set getdependencies getfacade isageneralizableelement hashset empty_set the constructor nothing to construct notation utility java notationutilityjava returns a visibility string either for a visibility kind but also for a model element because if it is a feature then the tag src visibility is to be taken into account for generating language dependent visibilities param o the object which may be a visibility kind or a model elelement return the generated visibility string static string generate visibility object o if model get facade isa feature o todo the src visibility tag doesn t appear to be created anywhere by argouml currently object tv model get facade get tagged value o src visibility if tv null object tv value model get facade get value tv not all taggedvalues are string see issue 4322 if tv value instanceof string string tagged string tv value if tagged null if tagged trim equals tagged trim to lower case equals package tagged trim to lower case equals default return return tagged if model get facade isa model element o if model get facade is public o return public if model get facade is private o return private if model get facade is protected o return protected if model get facade is package o return if model get facade isa visibility kind o if model get visibility kind get public equals o return public if model get visibility kind get private equals o return private if model get visibility kind get protected equals o return protected if model get visibility kind get package equals o return return visibilitykind src_visibility visibilitykind modelelelement generatevisibility getfacade isafeature src_visibility getfacade gettaggedvalue src_visibility tvvalue getfacade getvalue tvvalue tvvalue tolowercase tolowercase getfacade isamodelelement getfacade ispublic getfacade isprivate getfacade isprotected getfacade ispackage getfacade isavisibilitykind getvisibilitykind getpublic getvisibilitykind getprivate getvisibilitykind getprotected getvisibilitykind getpackage static string generate scope object f if model get facade is static f return static return generatescope getfacade isstatic generate final keyword for final operations or attributes static string generate changeability object obj if model get facade isa attribute obj if model get facade is read only obj return final else if model get facade isa operation obj if model get facade is leaf obj return final return generatechangeability getfacade isaattribute getfacade isreadonly getfacade isaoperation getfacade isleaf static string generate classifier ref object cls if cls null return return model get facade get name cls generateclassifierref getfacade getname static string generate expression object expr if model get facade isa expression expr return generate uninterpreted string model get facade get body expr else if model get facade isa constraint expr return generate expression model get facade get body expr return generateexpression getfacade isaexpression generateuninterpreted getfacade getbody getfacade isaconstraint generateexpression getfacade getbody static string generate uninterpreted string un if un null return return un generateuninterpreted static string generate parameter object parameter string buffer sb new string buffer 20 todo qualifiers e g const todo stereotypes sb append generate classifier ref model get facade get type parameter sb append sb append model get facade get name parameter todo initial value return sb to string generateparameter stringbuffer stringbuffer generateclassifierref getfacade gettype getfacade getname tostring param model element the uml element param args a set of arguments that may influence the generated notation return a string which represents abstractness deprecated for 0 27 3 by tfmorris use link generate abstract object deprecated static string generate abstract object model element suppress warnings unused map args return generate abstract model element modelelement generateabstract generateabstract modelelement suppresswarnings generateabstract modelelement param model element the uml element param args a set of arguments that may influence the generated notation return a string which represents abstractness static string generate abstract object model element if model get facade is abstract model element return abstract return modelelement generateabstract modelelement getfacade isabstract modelelement param model element the uml element param args a set of arguments that may influence the generated notation return a string which represents leaf deprecated for 0 27 3 by tfmorris use link generate leaf object deprecated static string generate leaf object model element suppress warnings unused map args return generate leaf model element modelelement generateleaf generateleaf modelelement suppresswarnings generateleaf modelelement param model element the uml element param args a set of arguments that may influence the generated notation return a string which represents leaf static string generate leaf object model element if model get facade is leaf model element return final return modelelement generateleaf modelelement getfacade isleaf modelelement param model element the uml element param args a set of arguments that may influence the generated notation return a string which represents the path static string generate path object model element map args if notation provider is value path visible args return generate path model element else return modelelement generatepath modelelement notationprovider isvalue pathvisible generatepath modelelement static string generate path object model element string builder s new string builder stack string stack new stack string object ns model get facade get namespace model element todo use model get model management helper get path list model element todo this will fail with nested models while ns null model get facade isa model ns stack push model get facade get name ns ns model get facade get namespace ns while stack is empty s append stack pop append if s length 0 s last index of s length 1 s append return s to string generatepath modelelement stringbuilder stringbuilder getfacade getnamespace modelelement getmodelmanagementhelper getpathlist modelelement getfacade isamodel getfacade getname getfacade getnamespace isempty lastindexof tostring param model element the uml element param args a set of arguments that may influence the generated notation return a string which represents the visibility deprecated for 0 27 3 by tfmorris use link generate visibility object or link generate visibility object org argouml notation notation settings deprecated static string generate visibility object model element map args string s if notation provider is value visibility visible args s notation utility java generate visibility model element return s modelelement generatevisibility generatevisibility notationsettings generatevisibility modelelement notationprovider isvalue visibilityvisible notationutilityjava generatevisibility modelelement the constructor param name the localised name public action remove from diagram string name super name resource loader wrapper lookup icon remove from diagram string local mnemonic translator localize action remove from diagram mnemonic if local mnemonic null local mnemonic length 1 put value action mnemonic key integer value of local mnemonic char at 0 set the tooltip string put value action short description name actionremovefromdiagram resourceloaderwrapper lookupicon removefromdiagram localmnemonic localmnemonic localmnemonic putvalue mnemonic_key valueof localmnemonic charat putvalue short_description public void action performed action event ae editor ce globals cur editor mutable graph support graph mutable graph support ce get graph model list fig figs ce get selection manager get figs for fig f figs if f get owner instanceof comment edge if f instanceof graph element f remove from diagram else graph remove fig f actionperformed actionevent cureditor mutablegraphsupport mutablegraphsupport getgraphmodel getselectionmanager getfigs getowner commentedge graphelement removefromdiagram removefig public prop panel create prop panel object object if object instanceof cruml return new prop panel critic else return null proppanel createproppanel proppanelcritic constructor for action new terminate action protected action new terminate action super put value action name translator localize button new terminateaction actionnewterminateaction actionnewterminateaction putvalue see org argouml uml ui behavior common behavior action new action create action protected object create action return model get common behavior factory create terminate action common_behavior actionnewaction createaction createaction getcommonbehaviorfactory createterminateaction return returns the singleton public static action new terminate action get instance return singleton actionnewterminateaction getinstance public static action new action get button instance action new action a new action new terminate action public void action performed action event e object target target manager get instance get model target if model get facade isa transition target return set target target super action performed e a put value short description a get value action name object icon resource loader wrapper lookup icon resource terminate action a put value small icon icon a put value role roles effect return a actionnewaction getbuttoninstance actionnewaction actionnewterminateaction actionperformed actionevent targetmanager getinstance getmodeltarget getfacade isatransition settarget actionperformed putvalue short_description getvalue resourceloaderwrapper lookupiconresource terminateaction putvalue small_icon putvalue public void action performed action event e object target target manager get instance get model target if model get facade isa transition target return set target target super action performed e actionperformed actionevent targetmanager getinstance getmodeltarget getfacade isatransition settarget actionperformed private static pred is start state the instance new pred is start state private pred is start state predisstartstate theinstance predisstartstate predisstartstate public boolean predicate object obj return model get facade isa pseudostate obj model get pseudostate kind get initial equals model get facade get kind obj getfacade isapseudostate getpseudostatekind getinitial getfacade getkind return the instance public static pred is start state get the instance return the instance predisstartstate gettheinstance theinstance the constructor param edge the fig of the edge public classdiagram association edge fig edge edge super edge classdiagramassociationedge figedge public void layout todo multiple associations between the same pair of elements need to be special cased so that they don t overlap tfm 20060228 self associations are special cases no need to let the maze runner find the way if get dest fig node get source fig node point center right get center right fig node get source fig node int yoffset get source fig node get height 2 yoffset java lang math min self size yoffset fig poly fig get underlying fig fig add point center right move more right fig add point center right x self size center right y move down fig add point center right x self size center right y yoffset move left fig add point center right x center right y yoffset fig set filled false fig set self loop true get current edge set fig fig else brute force rectangular layout point center source source fig node center point center dest dest fig node center underlying fig add point center source x center source y underlying fig add point center source x center dest x center source x 2 center source y underlying fig add point center source x center dest x center source x 2 center dest y underlying fig add point center dest x center dest y underlying fig set filled false underlying fig set self loop false current edge set fig underlying fig getdestfignode getsourcefignode centerright getcenterright fignode getsourcefignode getsourcefignode getheight self_size figpoly getunderlyingfig addpoint centerright addpoint centerright self_size centerright addpoint centerright self_size centerright addpoint centerright centerright setfilled setselfloop getcurrentedge setfig centersource sourcefignode centerdest destfignode underlyingfig addpoint centersource centersource underlyingfig addpoint centersource centerdest centersource centersource underlyingfig addpoint centersource centerdest centersource centerdest underlyingfig addpoint centerdest centerdest underlyingfig setfilled underlyingfig setselfloop currentedge setfig underlyingfig return a point which is centered vertically on the right hand edge of the figure param fig the fig return a point private point get center right fig node fig point center fig get center return new point center x fig get width 2 center y getcenterright fignode getcenter getwidth open an url in the system s default browser param url string containing the given url public static void open url string url try if os util is win32 runtime get runtime exec rundll32 url dll file protocol handler url else if os util is mac try class loader cl class loader get system class loader class c cl load class com apple mrj mrj file utils class argtypes string class method m c get method openurl argtypes object args url m invoke c new instance args catch exception cnfe log error cnfe log info trying a default browser netscape string commline netscape url runtime get runtime exec commline else runtime get runtime exec firefox url catch io exception ioe didn t work log error ioe openurl osutil iswin32 getruntime fileprotocolhandler osutil ismac classloader classloader getsystemclassloader loadclass mrjfileutils getmethod newinstance getruntime getruntime ioexception open an url in the system s default browser param url the url to open public static void open url url url open url url to string openurl openurl tostring see org argouml ui explorer rules perspective rule get rule name public string get rule name return translator localize misc classifier collaboration perspectiverule getrulename getrulename public collection get children object parent if model get facade isa classifier parent return model get facade get collaborations parent return collections empty set getchildren getfacade isaclassifier getfacade getcollaborations empty_set public set get dependencies object parent if model get facade isa classifier parent set set new hash set set add parent return set return collections empty set getdependencies getfacade isaclassifier hashset empty_set public prop panel create prop panel object object if object instanceof uml state diagram return new prop paneluml state diagram return null proppanel createproppanel umlstatediagram proppanelumlstatediagram see org argouml ui explorer rules perspective rule get rule name public string get rule name return translator localize signal reception perspectiverule getrulename getrulename public collection get children object parent if model get facade isa signal parent return model get facade get receptions parent return collections empty set getchildren getfacade isasignal getfacade getreceptions empty_set public set get dependencies object parent if model get facade isa signal parent set set new hash set set add parent return set return collections empty set getdependencies getfacade isasignal hashset empty_set the constructor public argo parser super argoparser param the project the project to populate param source the input source throws sax exception on error when parsing xml public void read project project the project input source source throws sax exception if source null throw new illegal argument exception an input source must be supplied pre read the project try parse source catch sax exception e log error source to string e throw e theproject saxexception readproject theproject inputsource saxexception illegalargumentexception inputsource preread theproject saxexception logerror tostring param the project the project to populate param reader the reader throws sax exception on error when parsing xml public void read project project the project reader reader throws sax exception if reader null throw new illegal argument exception a reader must be supplied pre read the project try parse reader catch sax exception e log error reader to string e throw e theproject saxexception readproject theproject saxexception illegalargumentexception preread theproject saxexception logerror tostring private void pre read project the project log info log info reading project the project project the project ps project get project settings diagram defaults ps get default diagram settings notation settings ps get notation settings preread theproject theproject theproject getprojectsettings diagramdefaults getdefaultdiagramsettings notationsettings getnotationsettings private void log error string project name sax exception e log error exception reading project e log error project name logerror projectname saxexception projectname get the project to which the uri is to be parsed return the project public project get project return project getproject set the project to which the uri is to be parsed param new proj the project public void set project project new proj project new proj ps project get project settings newproj setproject newproj newproj getprojectsettings public void handle start element xml element e throws sax exception if dbg log debug note argo parser handle start tag e get name switch tokens to token e get name true case argo token table token argo handle argo e break case argo token table token documentation handle documentation e break case argo token table token settings handle settings e break default if dbg log warn warning unknown tag e get name break handlestartelement xmlelement saxexception argoparser handlestarttag getname totoken getname argotokentable token_argo handleargo argotokentable token_documentation handledocumentation argotokentable token_settings handlesettings getname suppress warnings deprecation public void handle end element xml element e throws sax exception if dbg log debug note argo parser handle end tag e get name switch tokens to token e get name false case argo token table token member handle member e break case argo token table token authorname handle author name e break case argo token table token authoremail handle author email e break case argo token table token version handle version e break case argo token table token description handle description e break case argo token table token searchpath handle searchpath e break case argo token table token historyfile handle historyfile e break case argo token table token notationlanguage handle notation language e break case argo token table token showboldnames handle show bold names e break case argo token table token useguillemots handle use guillemots e break case argo token table token showvisibility handle show visibility e break case argo token table token showmultiplicity handle show multiplicity e break case argo token table token showinitialvalue handle show initial value e break case argo token table token showproperties handle show properties e break case argo token table token showtypes handle show types e break case argo token table token showstereotypes handle show stereotypes e break case argo token table token showsingularmultiplicities handle show singular multiplicities e break case argo token table token defaultshadowwidth handle default shadow width e break case argo token table token fontname handle font name e break case argo token table token fontsize handle font size e break case argo token table token generation output dir ignored it shouldn t have been in the project in the 1st place break case argo token table token showassociationnames handle show association names e break case argo token table token hidebidirectionalarrows handle hide bidirectional arrows e break case argo token table token active diagram handle active diagram e break default if dbg log warn warning unknown end tag e get name break suppresswarnings handleendelement xmlelement saxexception argoparser handleendtag getname totoken getname argotokentable token_member handlemember argotokentable token_authorname handleauthorname argotokentable token_authoremail handleauthoremail argotokentable token_version handleversion argotokentable token_description handledescription argotokentable token_searchpath handlesearchpath argotokentable token_historyfile handlehistoryfile argotokentable token_notationlanguage handlenotationlanguage argotokentable token_showboldnames handleshowboldnames argotokentable token_useguillemots handleuseguillemots argotokentable token_showvisibility handleshowvisibility argotokentable token_showmultiplicity handleshowmultiplicity argotokentable token_showinitialvalue handleshowinitialvalue argotokentable token_showproperties handleshowproperties argotokentable token_showtypes handleshowtypes argotokentable token_showstereotypes handleshowstereotypes argotokentable token_showsingularmultiplicities handleshowsingularmultiplicities argotokentable token_defaultshadowwidth handledefaultshadowwidth argotokentable token_fontname handlefontname argotokentable token_fontsize handlefontsize argotokentable token_generation_output_dir argotokentable token_showassociationnames handleshowassociationnames argotokentable token_hidebidirectionalarrows handlehidebidirectionalarrows argotokentable token_active_diagram handleactivediagram getname see org argouml persistence sax parser base is element of interest string override protected boolean is element of interest string name return tokens contains name saxparserbase iselementofinterest iselementofinterest param e the element protected void handle argo suppress warnings unused xml element e do nothing handleargo suppresswarnings xmlelement param e the element protected void handle documentation suppress warnings unused xml element e do nothing handledocumentation suppresswarnings xmlelement param e the element protected void handle settings suppress warnings unused xml element e do nothing handlesettings suppresswarnings xmlelement param e the element protected void handle author name xml element e string authorname e get text trim project set authorname authorname handleauthorname xmlelement gettext setauthorname param e the element protected void handle author email xml element e string authoremail e get text trim project set authoremail authoremail handleauthoremail xmlelement gettext setauthoremail param e the element protected void handle version xml element e string version e get text trim project set version version handleversion xmlelement gettext setversion param e the element protected void handle description xml element e string description e get text trim project set description description handledescription xmlelement gettext setdescription param e the element protected void handle searchpath xml element e string searchpath e get attribute href trim project add search path searchpath handlesearchpath xmlelement getattribute addsearchpath param e the element throws sax exception on any error parsing the member xml protected void handle member xml element e throws sax exception if e null throw new sax exception xml element is null string type e get attribute type member list add type saxexception handlemember xmlelement saxexception saxexception getattribute memberlist param e the element protected void handle historyfile xml element e if e get attribute name null return string historyfile e get attribute name trim project set history file historyfile handlehistoryfile xmlelement getattribute getattribute sethistoryfile param e the element protected void handle notation language xml element e string language e get text trim boolean success ps set notation language language todo here we should e g show the user a message that the loaded project was using a notation that is not currently available and a fall back on the default notation was done maybe this can be implemented in the persistence manager handlenotationlanguage xmlelement gettext setnotationlanguage persistencemanager param e the element protected void handle show bold names xml element e string ug e get text trim diagram defaults set show bold names boolean parse boolean ug handleshowboldnames xmlelement gettext diagramdefaults setshowboldnames parseboolean param e the element protected void handle use guillemots xml element e string ug e get text trim ps set use guillemots ug handleuseguillemots xmlelement gettext setuseguillemots param e the element protected void handle show visibility xml element e string show visibility e get text trim notation settings set show visibilities boolean parse boolean show visibility handleshowvisibility xmlelement showvisibility gettext notationsettings setshowvisibilities parseboolean showvisibility param e the element protected void handle show multiplicity xml element e string show multiplicity e get text trim notation settings set show multiplicities boolean parse boolean show multiplicity handleshowmultiplicity xmlelement showmultiplicity gettext notationsettings setshowmultiplicities parseboolean showmultiplicity param e the element protected void handle show initial value xml element e string show initial value e get text trim notation settings set show initial values boolean parse boolean show initial value handleshowinitialvalue xmlelement showinitialvalue gettext notationsettings setshowinitialvalues parseboolean showinitialvalue param e the element protected void handle show properties xml element e string showproperties e get text trim notation settings set show properties boolean parse boolean showproperties handleshowproperties xmlelement gettext notationsettings setshowproperties parseboolean param e the element protected void handle show types xml element e string show types e get text trim notation settings set show types boolean parse boolean show types handleshowtypes xmlelement showtypes gettext notationsettings setshowtypes parseboolean showtypes param e the element protected void handle show stereotypes xml element e string show stereotypes e get text trim ps set show stereotypes boolean parse boolean show stereotypes handleshowstereotypes xmlelement showstereotypes gettext setshowstereotypes parseboolean showstereotypes param e the element protected void handle show singular multiplicities xml element e string show singular multiplicities e get text trim notation settings set show singular multiplicities boolean parse boolean show singular multiplicities handleshowsingularmultiplicities xmlelement showsingularmultiplicities gettext notationsettings setshowsingularmultiplicities parseboolean showsingularmultiplicities param e the element protected void handle default shadow width xml element e string dsw e get text trim diagram defaults set default shadow width integer parse int dsw handledefaultshadowwidth xmlelement gettext diagramdefaults setdefaultshadowwidth parseint param e the element protected void handle font name xml element e string dsw e get text trim diagram defaults set font name dsw handlefontname xmlelement gettext diagramdefaults setfontname param e the element protected void handle font size xml element e string dsw e get text trim try diagram defaults set font size integer parse int dsw catch number format exception e1 log error number format exception while parsing font size e1 handlefontsize xmlelement gettext diagramdefaults setfontsize parseint numberformatexception numberformatexception param e the element protected void handle show association names xml element e string show association names e get text trim notation settings set show association names boolean parse boolean show association names handleshowassociationnames xmlelement showassociationnames gettext notationsettings setshowassociationnames parseboolean showassociationnames param e the element protected void handle hide bidirectional arrows xml element e string hide bidirectional arrows e get text trim note for historical reasons true hide so we need to invert the sense of this diagram defaults set show bidirectional arrows boolean parse boolean hide bidirectional arrows handlehidebidirectionalarrows xmlelement hidebidirectionalarrows gettext diagramdefaults setshowbidirectionalarrows parseboolean hidebidirectionalarrows protected void handle active diagram xml element e at this stage during loading the diagrams are not created yet so we have to store this name for later use project set saved diagram name e get text trim handleactivediagram xmlelement setsaveddiagramname gettext get the number of diagram members read return the number of diagram members read public list string get member list return member list getmemberlist memberlist the constructor param n the name for the knowledgetype public knowledge type node string n name n knowledgetypenode return a list of all the types public static list knowledge type node get type list if types null types new array list knowledge type node types add new knowledge type node critic kt designers types add new knowledge type node critic kt correctness types add new knowledge type node critic kt completeness types add new knowledge type node critic kt consistency types add new knowledge type node critic kt syntax types add new knowledge type node critic kt semantics types add new knowledge type node critic kt optimization types add new knowledge type node critic kt presentation types add new knowledge type node critic kt organizational types add new knowledge type node critic kt experiencial types add new knowledge type node critic kt tool return types knowledgetypenode gettypelist arraylist knowledgetypenode knowledgetypenode kt_designers knowledgetypenode kt_correctness knowledgetypenode kt_completeness knowledgetypenode kt_consistency knowledgetypenode kt_syntax knowledgetypenode kt_semantics knowledgetypenode kt_optimization knowledgetypenode kt_presentation knowledgetypenode kt_organizational knowledgetypenode kt_experiencial knowledgetypenode kt_tool return the name of the knowledgetype public string get name return name getname see java lang object to string public string to string return get name tostring tostring getname suppress warnings unchecked public object invoke feature map string object vt object subject string feature string type object parameters if subject null return null if subject instanceof collection if type equals set ns new hash set ns add subject subject ns if subject instanceof collection if type equals if feature to string trim equals select list string vars list string parameters 0 object exp parameters 1 lambda evaluator eval lambda evaluator parameters 2 collection col clone collection collection subject list remove new array list todo is it possible to use more than one variable string var name vars get 0 object old val vt get var name for object object col vt put var name object object res eval evaluate vt exp if res instanceof boolean boolean res do nothing else if test fails this element should not be in the result set remove add object col remove all remove vt put var name old val return col else if feature to string trim equals reject list string vars array list string parameters 0 object exp parameters 1 lambda evaluator eval lambda evaluator parameters 2 collection col clone collection collection subject list remove new array list todo is it possible to use more than one variable string var name vars get 0 object old val vt get var name for object object col vt put var name object object res eval evaluate vt exp if res instanceof boolean boolean res if test is ok this element should not be in the result set remove add object col remove all remove vt put var name old val return col else if feature to string trim equals for all list string vars array list string parameters 0 object exp parameters 1 lambda evaluator eval lambda evaluator parameters 2 return do for all vt collection subject vars exp eval else if feature to string trim equals collect list string vars array list string parameters 0 object exp parameters 1 lambda evaluator eval lambda evaluator parameters 2 collection col collection subject bag res new hash bag todo is it possible to use more than one variable string var name vars get 0 object old val vt get var name for object object col vt put var name object object val eval evaluate vt exp res add val vt put var name old val return res else if feature to string trim equals exists list string vars array list string parameters 0 object exp parameters 1 lambda evaluator eval lambda evaluator parameters 2 collection col collection subject todo is it possible to use more than one variable string var name vars get 0 object old val vt get var name for object object col vt put var name object object val eval evaluate vt exp if val instanceof boolean boolean val return true vt put var name old val return false else if feature to string trim equals is unique list string vars array list string parameters 0 object exp parameters 1 lambda evaluator eval lambda evaluator parameters 2 collection col collection subject bag object res new hash bag object todo is it possible to use more than one variable string var name vars get 0 object old val vt get var name for object object col vt put var name object object val eval evaluate vt exp res add val if res count val 1 return false vt put var name old val return true else if feature to string trim equals one todo this code is cloned over and over again tfm list string vars array list string parameters 0 object exp parameters 1 lambda evaluator eval lambda evaluator parameters 2 collection col collection subject todo is it possible to use more than one variable string var name vars get 0 object old val vt get var name boolean found false for object object col vt put var name object object val eval evaluate vt exp if val instanceof boolean boolean val if found found true else return false vt put var name old val return found else if feature to string trim equals any list string vars array list string parameters 0 object exp parameters 1 lambda evaluator eval lambda evaluator parameters 2 collection col collection subject todo is it possible to use more than one variable string var name vars get 0 object old val vt get var name for object object col vt put var name object object val eval evaluate vt exp if val instanceof boolean boolean val return object vt put var name old val return null todo implement iterate todo implement sorted by todo implement sub sequence these operations are ok for lists too if subject instanceof collection if type equals if feature equals size return collection subject size if feature equals includes return collection subject contains parameters 0 if feature equals excludes return collection subject contains parameters 0 if feature equals count return new hash bag object collection subject count parameters 0 if feature equals includes all collection col collection parameters 0 for object object col if collection subject contains object return false return true if feature equals excludes all collection col collection parameters 0 for object object col if collection subject contains object return false return true if feature equals is empty return collection subject is empty if feature equals not empty suppresswarnings invokefeature hashset tostring lambdaevaluator lambdaevaluator clonecollection arraylist varname oldval varname varname removeall varname oldval tostring arraylist lambdaevaluator lambdaevaluator clonecollection arraylist varname oldval varname varname removeall varname oldval tostring forall arraylist lambdaevaluator lambdaevaluator doforall tostring arraylist lambdaevaluator lambdaevaluator hashbag varname oldval varname varname varname oldval tostring arraylist lambdaevaluator lambdaevaluator varname oldval varname varname varname oldval tostring isunique arraylist lambdaevaluator lambdaevaluator hashbag varname oldval varname varname varname oldval tostring arraylist lambdaevaluator lambdaevaluator varname oldval varname varname varname oldval tostring arraylist lambdaevaluator lambdaevaluator varname oldval varname varname varname oldval sortedby subsequence hashbag includesall excludesall isempty isempty notempty private boolean do for all map string object vt collection collection list string vars object exp lambda evaluator eval if vars is empty return boolean eval evaluate vt exp else string var vars get 0 vars remove var object oldval vt get var for object element collection vt put var element boolean ret do for all vt collection vars exp eval if ret return false vt put var oldval return true doforall lambdaevaluator isempty doforall suppress warnings unchecked private collection clone collection collection col if col instanceof list return new array list col else if col instanceof bag return new hash bag col else if col instanceof set return new hash set col else throw new illegal argument exception suppresswarnings clonecollection arraylist hashbag hashset illegalargumentexception see org argouml profile internal ocl model interpreter get built in symbol java lang string public object get built in symbol string sym return null modelinterpreter getbuiltinsymbol getbuiltinsymbol construct a default component instance figure deprecated by for 0 27 4 by tfmorris use link fig component instance object rectangle diagram settings suppress warnings deprecation deprecated public fig component instance super get name fig set underline true componentinstance figcomponentinstance diagramsettings suppresswarnings figcomponentinstance getnamefig setunderline constructor that hooks the fig into an existing uml element param gm ignored param node the uml element deprecated by for 0 27 4 by tfmorris use link fig component instance object rectangle diagram settings suppress warnings deprecation deprecated public fig component instance graph model gm object node super gm node get name fig set underline true figcomponentinstance diagramsettings suppresswarnings figcomponentinstance graphmodel getnamefig setunderline construct a new fig component instance param owner owning uml element param bounds position and size param settings render settings public fig component instance object owner rectangle bounds diagram settings settings super owner bounds settings get name fig set underline true figcomponentinstance figcomponentinstance diagramsettings getnamefig setunderline override protected int get notation provider type return notation provider factory2 type componentinstance getnotationprovidertype notationproviderfactory2 type_componentinstance override public object clone fig component instance fig clone fig component instance super clone nothing extra to do currently return fig clone figcomponentinstance figclone figcomponentinstance figclone override protected void update listeners object old owner object new owner super update listeners old owner new owner if new owner null for object classifier model get facade get classifiers new owner add element listener classifier name updatelisteners oldowner newowner updatelisteners oldowner newowner newowner getfacade getclassifiers newowner addelementlistener see org tigris gef presentation fig make selection override public selection make selection return new selection component instance this makeselection makeselection selectioncomponentinstance override public void mouse clicked mouse event me super mouse clicked me todo what is this needed for tfm set line color line color mouseclicked mouseevent mouseclicked setlinecolor line_color override public void mouse pressed mouse event me super mouse pressed me editor ce globals cur editor selection sel ce get selection manager find selection for this if sel instanceof selection component instance selection component instance sel hide buttons mousepressed mouseevent mousepressed cureditor getselectionmanager findselectionfor selectioncomponentinstance selectioncomponentinstance hidebuttons override public void set enclosing fig fig encloser if get owner null object comp get owner if encloser null object node or comp encloser get owner if model get facade isa node instance node or comp if model get facade get node instance comp node or comp model get common behavior helper set node instance comp node or comp super set enclosing fig encloser else if model get facade isa component instance node or comp if model get facade get component instance comp node or comp model get common behavior helper set component instance comp node or comp super set enclosing fig encloser else if model get facade isa node node or comp super set enclosing fig encloser if get layer null element ordering figures list contents new array list get layer get contents iterator it contents iterator while it has next object o it next if o instanceof fig edge model element fig edge model element figedge fig edge model element o figedge get layer bring to front figedge else if is visible if we are not visible most likely we re being deleted todo this indicates a more fundamental problem that should be investigated tfm 20061230 encloser null get enclosing fig null if model get facade get node instance comp null model get common behavior helper set node instance comp null if model get facade get component instance comp null model get common behavior helper set component instance comp null super set enclosing fig encloser setenclosingfig getowner getowner nodeorcomp getowner getfacade isanodeinstance nodeorcomp getfacade getnodeinstance nodeorcomp getcommonbehaviorhelper setnodeinstance nodeorcomp setenclosingfig getfacade isacomponentinstance nodeorcomp getfacade getcomponentinstance nodeorcomp getcommonbehaviorhelper setcomponentinstance nodeorcomp setenclosingfig getfacade isanode nodeorcomp setenclosingfig getlayer elementordering arraylist getlayer getcontents hasnext figedgemodelelement figedgemodelelement figedgemodelelement getlayer bringtofront isvisible getenclosingfig getfacade getnodeinstance getcommonbehaviorhelper setnodeinstance getfacade getcomponentinstance getcommonbehaviorhelper setcomponentinstance setenclosingfig construct an xmi format exception with a nested cause param message the message param cause the underlying error cause public xmi format exception string message throwable cause super message cause xmiformatexception xmiformatexception construct an xmi format exception with a nested cause param cause the underlying error cause public xmi format exception throwable cause super cause xmiformatexception xmiformatexception the constructor public action new class super button new class put value action name translator localize button new class actionnewclass putvalue public void action performed action event e object target target manager get instance get model target if model get facade isa classifier target object classifier target object ns model get facade get namespace classifier if ns null object peer model get core factory build class ns target manager get instance set target peer super action performed e actionperformed actionevent targetmanager getinstance getmodeltarget getfacade isaclassifier getfacade getnamespace getcorefactory buildclass targetmanager getinstance settarget actionperformed constructor for action remove package import action remove package import super translator localize menu popup remove actionremovepackageimport actionremovepackageimport public void action performed action event e super action performed e model get model management helper remove imported element get target get object to remove actionperformed actionevent actionperformed getmodelmanagementhelper removeimportedelement gettarget getobjecttoremove creates a new todo parser public todo parser empty constructor todoparser todoparser reads an xml todo list from input stream is and enters any todo items into the current designer param is the stream containing todo list xml data throws sax exception on any error public synchronized void read todo list reader is throws sax exception log info log info reading to do list parse is inputstream todolist saxexception readtodolist saxexception called by the xml implementation to signal the start of an xml entity param e the entity being started public void handle start element xml element e cat debug note todo parser handle start tag e get name try switch tokens to token e get name true case todo token table token headline case todo token table token description case todo token table token priority case todo token table token moreinfourl case todo token table token poster case todo token table token offender nop break case todo token table token to do handle todo e break case todo token table token to do list handle todo list e break case todo token table token to do item handle todo item start e break case todo token table token resolvedcritics handle resolved critics e break case todo token table token issue handle issue start e break default log warn warning unknown tag e get name break catch exception ex log error exception in startelement ex handlestartelement xmlelement todoparser handlestarttag getname totoken getname todotokentable token_headline todotokentable token_description todotokentable token_priority todotokentable token_moreinfourl todotokentable token_poster todotokentable token_offender todotokentable token_to_do handletodo todotokentable token_to_do_list handletodolist todotokentable token_to_do_item handletodoitemstart todotokentable token_resolvedcritics handleresolvedcritics todotokentable token_issue handleissuestart getname called by the xml implementation to signal the end of an xml entity param e the xml entity that ends throws sax exception on any error public void handle end element xml element e throws sax exception try switch tokens to token e get name false case todo token table token to do case todo token table token resolvedcritics case todo token table token to do list nop break case todo token table token to do item handle todo item end e break case todo token table token headline handle headline e break case todo token table token description handle description e break case todo token table token priority handle priority e break case todo token table token moreinfourl handle more infourl e break case todo token table token issue handle issue end e break case todo token table token poster handle poster e break case todo token table token offender handle offender e break default log warn warning unknown end tag e get name break catch exception ex throw new sax exception ex saxexception handleendelement xmlelement saxexception totoken getname todotokentable token_to_do todotokentable token_resolvedcritics todotokentable token_to_do_list todotokentable token_to_do_item handletodoitemend todotokentable token_headline handleheadline todotokentable token_description handledescription todotokentable token_priority handlepriority todotokentable token_moreinfourl handlemoreinfourl todotokentable token_issue handleissueend todotokentable token_poster handleposter todotokentable token_offender handleoffender getname saxexception internal method param e the element protected void handle todo xml element e do nothing handletodo xmlelement internal method param e the element protected void handle todo list xml element e do nothing handletodolist xmlelement internal method param e the element protected void handle resolved critics xml element e do nothing handleresolvedcritics xmlelement internal method param e the element protected void handle todo item start xml element e headline priority to do item high priority moreinfourl description handletodoitemstart xmlelement todoitem high_priority internal method param e the element protected void handle todo item end xml element e to do item item designer dsgr this is expected to be safe don t add a try block here dsgr designer the designer item new to do item dsgr headline priority description moreinfourl new list set dsgr get to do list add element item cat debug added to do item headline handletodoitemend xmlelement todoitem thedesigner todoitem listset gettodolist addelement todoitem _headline internal method param e the element protected void handle headline xml element e headline decode e get text trim handleheadline xmlelement gettext internal method param e the element protected void handle priority xml element e string prio decode e get text trim int np try np integer parse int prio catch number format exception nfe np to do item high priority if todo token table string prio high equals ignore case prio np to do item high priority else if todo token table string prio med equals ignore case prio np to do item med priority else if todo token table string prio low equals ignore case prio np to do item low priority priority np handlepriority xmlelement gettext parseint numberformatexception todoitem high_priority todotokentable string_prio_high equalsignorecase todoitem high_priority todotokentable string_prio_med equalsignorecase todoitem med_priority todotokentable string_prio_low equalsignorecase todoitem low_priority internal method param e the element protected void handle more infourl xml element e moreinfourl decode e get text trim handlemoreinfourl xmlelement gettext internal method param e the element protected void handle description xml element e description decode e get text trim handledescription xmlelement gettext internal method param e the element protected void handle issue start xml element e critic null offenders null handleissuestart xmlelement internal method param e the element protected void handle issue end xml element e designer dsgr resolved critic item if critic null return item new resolved critic critic offenders dsgr designer the designer dsgr get to do list add resolved critic item handleissueend xmlelement resolvedcritic resolvedcritic thedesigner gettodolist addresolvedcritic internal method param e the element protected void handle poster xml element e critic decode e get text trim handleposter xmlelement gettext internal method param e the element protected void handle offender xml element e if offenders null offenders new array list offenders add decode e get text trim handleoffender xmlelement arraylist gettext utility method to decode a string filtering out any noise that an xml framework might have seen fit to add and thus regaining the original unmodified string param str the string to decode return a copy of the original string public static string decode string str if str null return null string buffer sb int i1 i2 char c sb new string buffer for i1 0 i2 0 i2 str length i2 c str char at i2 if c if i2 i1 sb append str substring i1 i2 for i1 i2 i2 str length i2 if str char at i2 break if i2 str length i1 i2 break if i2 i1 string ent str substring i1 i2 if proc equals ent sb append else try sb append char integer parse int ent catch number format exception nfe todo handle parse error i1 i2 1 if i2 i1 sb append str substring i1 i2 return sb to string stringbuffer stringbuffer charat charat parseint numberformatexception tostring utility method to encode a string in a way that allows it to be saved properly in an xml file and regained filtering out any noice that an xml framework might have seen fit to add todo why are we doing this ourselves surely encoding information for xml serialization is a well known task tfm i have never understood why this is being done i think we should remove any usage bob param str the string to encode return the encoded string public static string encode string str string buffer sb int i1 i2 char c if str null return null sb new string buffer for i1 0 i2 0 i2 str length i2 c str char at i2 if c if i2 i1 sb append str substring i1 i2 sb append proc i1 i2 1 else if c 0x28 c 0x3c c 0x40 c 0x3d c 0x3f c 0x5e c 0x60 c 0x5f c 0x7b if i2 i1 sb append str substring i1 i2 sb append integer to string c i1 i2 1 if i2 i1 sb append str substring i1 i2 cat debug encode n str n sb to string return sb to string stringbuffer stringbuffer charat tostring tostring tostring the constructor public cr class must be abstract setup head and desc add supported decision uml decision inheritance add supported decision uml decision methods set knowledge types critic kt semantics crclassmustbeabstract setupheadanddesc addsupporteddecision umldecision addsupporteddecision umldecision setknowledgetypes kt_semantics public boolean predicate2 object dm designer dsgr if model get facade isa class dm return no problem if model get facade is abstract dm return no problem iterator ops model get facade get operations dm iterator while ops has next if model get facade is abstract ops next return problem found return no problem getfacade isaclass no_problem getfacade isabstract no_problem getfacade getoperations hasnext getfacade isabstract problem_found no_problem public set object get criticized design materials set object ret new hash set object ret add model get meta types getuml class return ret getcriticizeddesignmaterials hashset getmetatypes getumlclass public list abstract argoj panel get details tabs list abstract argoj panel result new array list abstract argoj panel result add new tab checklist return result abstractargojpanel getdetailstabs abstractargojpanel arraylist abstractargojpanel tabchecklist public list gui settings tab interface get project settings tabs return collections empty list guisettingstabinterface getprojectsettingstabs emptylist public list gui settings tab interface get settings tabs return collections empty list guisettingstabinterface getsettingstabs emptylist public void init do nothing constructor param x param y deprecated fig life line int x int y super rect new fig rect x y width height line color fill color rect set filled false rect set line width 0 line new fig line x width 2 y x width 2 height line color line set line width line width line set dashed true add fig rect add fig line activation figs new hash set figlifeline figrect line_color fill_color setfilled setlinewidth figline line_color setlinewidth line_width setdashed addfig addfig activationfigs hashset see org tigris gef presentation fig get minimum size public dimension get minimum size return new dimension 20 100 getminimumsize getminimumsize public void set bounds impl int x int y int w int h rect set bounds x y width h line set location x w 2 y for iterator fig it get figs iterator fig it has next fig fig fig fig it next if activation figs contains fig fig set location getx y gety fig gety if fig instanceof fig message port fig set location getx y gety fig gety calc bounds setboundsimpl setbounds setlocation figit getfigs figit hasnext figit activationfigs setlocation figmessageport setlocation calcbounds public void calc bounds x rect getx y rect gety w rect get width h rect get height fire prop change bounds null null calcbounds _x _y _w getwidth _h getheight firepropchange final void remove activations list activations new array list activation figs activation figs clear for iterator it activations iterator it has next remove fig fig it next calc bounds removeactivations arraylist activationfigs activationfigs hasnext removefig calcbounds final void add activation fig fig f add fig f activation figs add f addactivationfig addfig activationfigs removes the fig from both the figs list as from the activation figs set this insures that removal will indeed remove all pointers to the object p see org tigris gef presentation fig group remove fig fig public final void remove fig fig f log info removing f get class get name super remove fig f activation figs remove f activationfigs figgroup removefig removefig getclass getname removefig activationfigs change a node to point to an actual fig message port final fig message port create fig message port object message temp fig temp fig final message node node message node temp fig get owner final fig message port fmp new fig message port message temp fig getx1 temp fig gety1 temp fig getx2 node set fig message port fmp fmp set node node add fig fmp return fmp figmessageport figmessageport createfigmessageport tempfig tempfig messagenode messagenode tempfig getowner figmessageport figmessageport tempfig tempfig tempfig setfigmessageport setnode addfig final int gety coordinate int node index return node index sequence diagram layer link distance gety sequence diagram layer link distance 2 getycoordinate nodeindex nodeindex sequencediagramlayer link_distance sequencediagramlayer link_distance public default handler get handler handler stack stack object container string uri string localname string qname attributes attributes throws sax exception pgml stack parser parser pgml stack parser stack string tokenizer st new string tokenizer attributes get value description if st has more elements st next token string x str null string y str null string w str null string h str null if st has more elements x str st next token y str st next token w str st next token h str st next token if x str null x str equals int x integer parse int x str int y integer parse int y str int w integer parse int w str int h integer parse int h str set bounds x y w h pgml stack parser set common attrs this attributes string owner ref attributes get value href if owner ref null object owner parser find owner owner ref if owner null set owner owner parser register fig this attributes get value name container container add object this return new fig life line handler parser this defaulthandler gethandler handlerstack saxexception pgmlstackparser pgmlstackparser stringtokenizer stringtokenizer getvalue hasmoreelements nexttoken xstr ystr wstr hstr hasmoreelements xstr nexttoken ystr nexttoken wstr nexttoken hstr nexttoken xstr xstr parseint xstr parseint ystr parseint wstr parseint hstr setbounds pgmlstackparser setcommonattrs ownerref getvalue ownerref findowner ownerref setowner registerfig getvalue addobject figlifelinehandler static class fig life line handler extends fig group handler constructor param parser fig life line handler pgml stack parser parser fig life line life line super parser life line figlifelinehandler figgrouphandler figlifelinehandler pgmlstackparser figlifeline lifeline lifeline protected default handler get element handler handler stack stack object container string uri string localname string qname attributes attributes throws sax exception default handler result null string description attributes get value description handle stereotype groups in figs if qname equals group description null description starts with fig message port class get name pgml stack parser parser pgml stack parser stack string owner ref attributes get value href object owner parser find owner owner ref fig message port fmp new fig message port owner fig group handler container get fig group add fig fmp result new fig group handler pgml stack parser stack fmp pgml stack parser set common attrs fmp attributes parser register fig fmp attributes get value name else result new unknown handler stack return result defaulthandler getelementhandler handlerstack saxexception defaulthandler getvalue startswith figmessageport getname pgmlstackparser pgmlstackparser ownerref getvalue findowner ownerref figmessageport figmessageport figgrouphandler getfiggroup addfig figgrouphandler pgmlstackparser pgmlstackparser setcommonattrs registerfig getvalue unknownhandler see org argouml ui explorer rules perspective rule get rule name public string get rule name return translator localize misc submachine state state machine perspectiverule getrulename getrulename public collection get children object parent if model get facade isa submachine state parent list list new array list list add model get facade get submachine parent return list return collections empty set getchildren getfacade isasubmachinestate arraylist getfacade getsubmachine empty_set public set get dependencies object parent if model get facade isa submachine state parent set set new hash set set add parent return set return collections empty set getdependencies getfacade isasubmachinestate hashset empty_set see org argouml ui explorer rules perspective rule get rule name public string get rule name return translator localize misc operation collaboration perspectiverule getrulename getrulename public collection get children object parent if model get facade isa operation parent return model get facade get collaborations parent return collections empty set getchildren getfacade isaoperation getfacade getcollaborations empty_set public set get dependencies object parent if model get facade isa operation parent set set new hash set set add parent if model get facade get owner parent null set add model get facade get owner parent return set return collections empty set getdependencies getfacade isaoperation hashset getfacade getowner getfacade getowner empty_set construct an action list which filters modifying actions when the readonly flag is set using initial list as the initial content param initial list initial contents to use for list param read only true if mutating actions should be filtered action list list extends e initial list boolean read only super initial list this readonly read only actionlist initiallist initiallist readonly actionlist initiallist readonly initiallist readonly override public boolean add e o if readonly if is uml mutator o return false else if o instanceof j menu o e trim menu j menu o if o null return super add o else return false isumlmutator jmenu trimmenu jmenu override public void add element e o if readonly if is uml mutator o return else if o instanceof j menu o e trim menu j menu o if o null super add element o addelement isumlmutator jmenu trimmenu jmenu addelement override public void add int index e o if readonly if is uml mutator o return else if o instanceof j menu o e trim menu j menu o if o null super add index o isumlmutator jmenu trimmenu jmenu override public void insert element at e o int index if readonly if is uml mutator o return else if o instanceof j menu o e trim menu j menu o if o null super insert element at o index insertelementat isumlmutator jmenu trimmenu jmenu insertelementat trim out any menu items that have a uml model mutating action param menu the menu to be filtered return the trimmed menu or null if all contents trimmed out private j menu trim menu j menu menu for int i menu get item count 1 i 0 i j menu item menu item menu get item i action action menu item get action if action null menu item get action listeners length 0 menu item get action listeners 0 instanceof action action action menu item get action listeners 0 if is uml mutator action menu remove i if menu get item count 0 return null return menu jmenu trimmenu jmenu getitemcount jmenuitem menuitem getitem menuitem getaction menuitem getactionlisteners menuitem getactionlisteners menuitem getactionlisteners isumlmutator getitemcount param a an object typically an action to test if its a uml model mutator return true if the given action mutates the uml model private boolean is uml mutator object a return a instanceof uml model mutator a get class is annotation present uml model mutator class isumlmutator umlmodelmutator getclass isannotationpresent umlmodelmutator the constructor param c the container of uml user interface components param name the name of the property public uml expression expression model uml user interface container c string name super c name umlexpressionexpressionmodel umluserinterfacecontainer see org argouml uml ui uml expression model2 get expression public object get expression return model get facade get expression target manager get instance get target umlexpressionmodel2 getexpression getexpression getfacade getexpression targetmanager getinstance gettarget see org argouml uml ui uml expression model2 set expression java lang object public void set expression object expr model get state machines helper set expression target manager get instance get target expr umlexpressionmodel2 setexpression setexpression getstatemachineshelper setexpression targetmanager getinstance gettarget see org argouml uml ui uml expression model2 new expression public object new expression return model get data types factory create boolean expression umlexpressionmodel2 newexpression newexpression getdatatypesfactory createbooleanexpression the constructor public to do by priority super combobox todo perspective priority add sub tree model new go list to priority to item todobypriority addsubtreemodel golisttoprioritytoitem public void to do items changed to do list event tde log debug to do item changed list to do item items tde get to do item list object path new object 2 path 0 designer the designer get to do list for priority node pn priority node get priority list path 1 pn int n matching items 0 synchronized items for to do item item items if item get priority pn get priority continue n matching items if n matching items 0 continue int child indices new int n matching items object children new object n matching items n matching items 0 synchronized items for to do item item items if item get priority pn get priority continue child indices n matching items get index of child pn item children n matching items item n matching items fire tree nodes changed this path child indices children todoitemschanged todolistevent todoitemchanged todoitem gettodoitemlist thedesigner gettodolist prioritynode prioritynode getprioritylist nmatchingitems todoitem getpriority getpriority nmatchingitems nmatchingitems childindices nmatchingitems nmatchingitems nmatchingitems todoitem getpriority getpriority childindices nmatchingitems getindexofchild nmatchingitems nmatchingitems firetreenodeschanged childindices public void to do items added to do list event tde log debug to do item added list to do item items tde get to do item list object path new object 2 path 0 designer the designer get to do list for priority node pn priority node get priority list path 1 pn int n matching items 0 synchronized items for to do item item items if item get priority pn get priority continue n matching items if n matching items 0 continue int child indices new int n matching items object children new object n matching items n matching items 0 synchronized items for to do item item items if item get priority pn get priority continue child indices n matching items get index of child pn item children n matching items item n matching items fire tree nodes inserted this path child indices children todoitemsadded todolistevent todoitemadded todoitem gettodoitemlist thedesigner gettodolist prioritynode prioritynode getprioritylist nmatchingitems todoitem getpriority getpriority nmatchingitems nmatchingitems childindices nmatchingitems nmatchingitems nmatchingitems todoitem getpriority getpriority childindices nmatchingitems getindexofchild nmatchingitems nmatchingitems firetreenodesinserted childindices public void to do items removed to do list event tde log debug to do item removed list to do item items tde get to do item list object path new object 2 path 0 designer the designer get to do list for priority node pn priority node get priority list int node priority pn get priority boolean any in pri false synchronized items for to do item item items int pri item get priority if pri node priority any in pri true if any in pri continue log debug to do item removed updating priority node path 1 pn fire tree nodes changed this path child indices children fire tree structure changed path todoitemsremoved todolistevent todoitemremoved todoitem gettodoitemlist thedesigner gettodolist prioritynode prioritynode getprioritylist nodepriority getpriority anyinpri todoitem getpriority nodepriority anyinpri anyinpri todoitemremoved prioritynode firetreenodeschanged childindices firetreestructurechanged see org argouml cognitive to do list listener to do list changed org argouml cognitive to do list event public void to do list changed to do list event tde todolistlistener todolistchanged todolistevent todolistchanged todolistevent constructor public cr no associations setup head and desc add supported decision uml decision relationships set knowledge types critic kt completeness add trigger association end crnoassociations setupheadanddesc addsupporteddecision umldecision setknowledgetypes kt_completeness addtrigger associationend decide whether the given design material causes a problem param dm the object to criticize the designer who decides the design process param dsgr the designer return code problem found code if there is a problem otherwise code no problem code override public boolean predicate2 object dm designer dsgr if model get facade isa classifier dm return no problem if model get facade is primary object dm return no problem if the classifier does not have a name then no problem the model is not finished anyhow if model get facade get name dm null equals model get facade get name dm return no problem abstract elements do not necessarily require associations if model get facade isa generalizable element dm model get facade is abstract dm return no problem types can probably have associations but we should not nag at them not having any utility is a namespace collection also not strictly required to have associations if model get facade is type dm return no problem if model get facade is utility dm return no problem see issue 1129 if the classifier has dependencies then mostly there is no problem if model get facade get client dependencies dm size 0 return no problem if model get facade get supplier dependencies dm size 0 return no problem special cases for use cases extending use cases and use case that are being included are not required to have associations if model get facade isa use case dm object usecase dm collection includes model get facade get includes usecase if includes null includes size 1 return no problem collection extend model get facade get extends usecase if extend null extend size 1 return no problem todo different critic or special message for classes that inherit all ops but define none of their own if find association dm 0 return no problem return problem found problem_found no_problem getfacade isaclassifier no_problem getfacade isprimaryobject no_problem getfacade getname getfacade getname no_problem getfacade isageneralizableelement getfacade isabstract no_problem getfacade istype no_problem getfacade isutility no_problem getfacade getclientdependencies no_problem getfacade getsupplierdependencies no_problem getfacade isausecase getfacade getincludes no_problem getfacade getextends no_problem findassociation no_problem problem_found param dm the classifier to examine param depth number of levels searched return true if an association can be found in this classifier or in any of its generalizations private boolean find association object dm int depth if model get facade get association ends dm iterator has next return true if depth 50 return false iterator iter model get facade get generalizations dm iterator while iter has next object parent model get facade get general iter next if parent dm continue if model get facade isa classifier parent if find association parent depth 1 return true if model get facade isa use case dm for use cases we need to check for extend includes actors cannot have them so no need to check iterator iter2 model get facade get extends dm iterator while iter2 has next object parent model get facade get extension iter2 next if parent dm continue if model get facade isa classifier parent if find association parent depth 1 return true iterator iter3 model get facade get includes dm iterator while iter3 has next object parent model get facade get base iter3 next if parent dm continue if model get facade isa classifier parent if find association parent depth 1 return true return false findassociation getfacade getassociationends hasnext getfacade getgeneralizations hasnext getfacade getgeneral getfacade isaclassifier findassociation getfacade isausecase getfacade getextends hasnext getfacade getextension getfacade isaclassifier findassociation getfacade getincludes hasnext getfacade getbase getfacade isaclassifier findassociation public set object get criticized design materials set object ret new hash set object ret add model get meta types getuml class ret add model get meta types get actor ret add model get meta types get use case return ret getcriticizeddesignmaterials hashset getmetatypes getumlclass getmetatypes getactor getmetatypes getusecase the constructor param name the modelelement public model element name notation java object name super name modelelementnamenotationjava public void parse object model element string text try parse model element model element text catch parse exception pe string msg statusmsg bar error parsing node modelelement object args pe get localized message integer value of pe get error offset argo event pump fire event new argo help event argo event types help changed this translator message format msg args modelelement parsemodelelement modelelement parseexception getlocalizedmessage valueof geterroroffset argoeventpump fireevent argohelpevent argoeventtypes help_changed messageformat param model element the uml modelelement param text the string to parse static void parse model element object model element string text throws parse exception my tokenizer st boolean abstrac false boolean fina false boolean publi false boolean privat false boolean protect false string token list string path null string name null try st new my tokenizer text abstract final public private protected while st has more tokens token st next token if equals token skip spaces else if abstract equals token abstrac true else if final equals token fina true else if public equals token publi true else if private equals token privat true else if protected equals token protect true else if equals token if name null name name trim if path null name null equals name string msg parsing error model element name anon qualifiers throw new parse exception translator localize msg st get token index if path null path new array list string if name null path add name name null else the name itself if name null string msg parsing error model element name twin names throw new parse exception translator localize msg st get token index name token catch no such element exception nsee string msg parsing error model element name unexpected name element throw new parse exception translator localize msg text length catch parse exception pre throw pre if name null name name trim if path null name null equals name string msg parsing error model element name must end with name throw new parse exception translator localize msg 0 check the name for validity if is valid java class name name throw new parse exception invalid class name for java name 0 if path null object nspe model get model management helper get element path model get facade get model model element if nspe null model get facade isa namespace nspe string msg parsing error model element name namespace unresolved throw new parse exception translator localize msg 0 object model project manager get manager get current project get root if model get core helper get all possible namespaces model element model contains nspe string msg parsing error model element name namespace invalid throw new parse exception translator localize msg 0 model get core helper add owned element nspe model element model get core helper set name model element name if abstrac model get core helper set abstract model element abstrac if fina model get core helper set leaf model element fina if publi model get core helper set visibility model element model get visibility kind get public if privat model get core helper set visibility model element model get visibility kind get private if protect model get core helper set visibility model element model get visibility kind get protected modelelement parsemodelelement modelelement parseexception mytokenizer mytokenizer hasmoretokens nexttoken parseexception gettokenindex arraylist parseexception gettokenindex nosuchelementexception parseexception parseexception parseexception isvalidjavaclassname parseexception getmodelmanagementhelper getelement getfacade getmodel modelelement getfacade isanamespace parseexception projectmanager getmanager getcurrentproject getroot getcorehelper getallpossiblenamespaces modelelement parseexception getcorehelper addownedelement modelelement getcorehelper setname modelelement getcorehelper setabstract modelelement getcorehelper setleaf modelelement getcorehelper setvisibility modelelement getvisibilitykind getpublic getcorehelper setvisibility modelelement getvisibilitykind getprivate getcorehelper setvisibility modelelement getvisibilitykind getprotected param name the name of the element return true if the given name is a valid name according java syntax private static boolean is valid java class name string name todo check the name for validity return true isvalidjavaclassname see org argouml notation providers notation provider get parsing help public string get parsing help return parsing help java fig nodemodelelement notationprovider getparsinghelp getparsinghelp suppress warnings deprecation deprecated public string to string object model element map args string name name model get facade get name model element if name null return return notation utility java generate leaf model element args notation utility java generate abstract model element args notation utility java generate visibility model element args notation utility java generate path model element args name suppresswarnings tostring modelelement getfacade getname modelelement notationutilityjava generateleaf modelelement notationutilityjava generateabstract modelelement notationutilityjava generatevisibility modelelement notationutilityjava generatepath modelelement public string to string object model element notation settings settings string name name model get facade get name model element if name null return string visibility if settings is show visibilities visibility notation utility java generate visibility model element string path if settings is show paths path notation utility java generate path model element return notation utility java generate leaf model element notation utility java generate abstract model element visibility path name tostring modelelement notationsettings getfacade getname modelelement isshowvisibilities notationutilityjava generatevisibility modelelement isshowpaths notationutilityjava generatepath modelelement notationutilityjava generateleaf modelelement notationutilityjava generateabstract modelelement constructor for uml interaction context list model public uml interaction context list model super context umlinteractioncontextlistmodel umlinteractioncontextlistmodel see org argouml uml ui uml model element list model2 build model list protected void build model list remove all elements add element model get facade get context get target umlmodelelementlistmodel2 buildmodellist buildmodellist removeallelements addelement getfacade getcontext gettarget see org argouml uml ui uml model element list model2 is valid element object protected boolean is valid element object elem return model get facade isa collaboration elem model get facade get interactions elem contains get target umlmodelelementlistmodel2 isvalidelement isvalidelement getfacade isacollaboration getfacade getinteractions gettarget the constructor protected attribute notation java super attributenotationjava return the singleton instance public static final attribute notation java get instance return instance attributenotationjava getinstance see org argouml notation providers notation provider get parsing help public string get parsing help return parsing java help attribute return parsing in java not yet supported notationprovider getparsinghelp getparsinghelp public void parse object model element string text argo event pump fire event new argo help event argo event types help changed this parsing in java not yet supported modelelement argoeventpump fireevent argohelpevent argoeventtypes help_changed suppress warnings deprecation deprecated public string to string object model element map args return to string model element suppresswarnings tostring modelelement tostring modelelement private string to string object model element string buffer sb new string buffer 80 sb append notation utility java generate visibility model element sb append notation utility java generate scope model element sb append notation utility java generate changeability model element object type model get facade get type model element object multi model get facade get multiplicity model element handle multiplicity here since we need the type actually the api of generator is buggy since to generate multiplicity correctly we need the attribute too if type null multi null if model get facade get upper multi 1 sb append notation utility java generate classifier ref type append else if model get facade isa data type type sb append notation utility java generate classifier ref type append else sb append java util vector sb append model get facade get name model element object init model get facade get initial value model element if init null string init str notation utility java generate expression init trim if init str length 0 sb append append init str return sb to string tostring modelelement stringbuffer stringbuffer notationutilityjava generatevisibility modelelement notationutilityjava generatescope modelelement notationutilityjava generatechangeability modelelement getfacade gettype modelelement getfacade getmultiplicity modelelement getfacade getupper notationutilityjava generateclassifierref getfacade isadatatype notationutilityjava generateclassifierref getfacade getname modelelement getfacade getinitialvalue modelelement initstr notationutilityjava generateexpression initstr initstr tostring override public string to string object model element notation settings settings return to string model element tostring modelelement notationsettings tostring modelelement construct a new selection object for the given fig param f the given fig public selection object fig f super f selectionobject selectionobject override protected icon get icons if model get model management helper is read only get content get owner return new icon 6 return icons geticons getmodelmanagementhelper isreadonly getcontent getowner override protected string get instructions int index return instructions index base getinstructions override protected object get new edge type int index return model get meta types get link getnewedgetype getmetatypes getlink override protected object get new node int index return model get common behavior factory create object getnewnode getcommonbehaviorfactory createobject override protected object get new node type int index return model get meta types get object getnewnodetype getmetatypes getobject override protected boolean is reverse edge int index if index bottom index left return true return false isreverseedge constructor for the wizard currently does nothing p public wiz assoc composite wizassoccomposite tries to identify the association that triggered the critic p the first time it is called it will initialise the trigger from the to do item if there it is assumed to be the first trigger of the to do item and to be an association if found the value is stored in the private field link trigger association p on all subsequent calls if a non null value is found in link trigger association that is returned p return the association that triggered the critic or code null code if there was none private object get trigger association if we don t have it find the trigger if this fails it will keep its default value of null if trigger association null get to do item null trigger association get model element return trigger association todoitem todoitem triggerassociation triggerassociation gettriggerassociation triggerassociation gettodoitem triggerassociation getmodelelement triggerassociation returns a list of options to be used in creating a link wiz step choice that will exercise the options p we provide five options shared aggregation in each direction composite aggregation in each direction and no aggregation at all p it is possible that a very malicious user could delete the triggering association just before we get to this point for now we don t bother to trap this it will raise an exception and then everything will carry on happily p return a link list of the options or code null code if the association that triggered the critic is no longer there private list string build options the association that triggered the critic its just possible the association is no longer there in which case we return null object asc get trigger association if asc null return null list string result new array list string get the ends from the association we know there are two and the types associated with them iterator iter model get facade get connections asc iterator object ae0 iter next object ae1 iter next object cls0 model get facade get type ae0 object cls1 model get facade get type ae1 get the names of the two ends if there are none i e they are currently anonymous use the argouml convention of anon for the names string start translator localize misc name anon string end translator localize misc name anon if cls0 null model get facade get name cls0 null model get facade get name cls0 equals start model get facade get name cls0 if cls1 null model get facade get name cls1 null model get facade get name cls1 equals end model get facade get name cls1 now create the five options result add start translator localize critics wiz assoc composite option1 end result add start translator localize critics wiz assoc composite option2 end result add end translator localize critics wiz assoc composite option1 start result add end translator localize critics wiz assoc composite option2 start result add translator localize critics wiz assoc composite option3 return result wizstepchoice buildoptions gettriggerassociation arraylist getfacade getconnections getfacade gettype getfacade gettype getfacade getname getfacade getname getfacade getname getfacade getname getfacade getname getfacade getname wizassoccomposite wizassoccomposite wizassoccomposite wizassoccomposite wizassoccomposite set the initial instruction string for the choice may be called by the creator of the wizard to override the default p param s the new instructions public void set instructions string s instructions s setinstructions create a link j panel for the given step p we use a link wiz step choice to handle the choice selection for the user we only create the panel once saving it in a private field code step1choice code for subsequent use p em note em if the association has been deleted then we may not be able to create a list of options under these circumstances we also return null p param new step the index of the step for which a panel is needed return the created link j panel or code null code if no options were available see org argouml cognitive critics wizard public j panel make panel int new step switch new step case 1 first step create the panel if not already done and options are available otherwise it retains its default value of null if step1 choice null list string opts build options if opts null step1 choice new wiz step choice this instructions opts step1 choice set target get to do item return step1 choice default default any other step is to return nothing return null jpanel wizstepchoice _step1choice newstep jpanel jpanel makepanel newstep newstep step1choice buildoptions step1choice wizstepchoice step1choice settarget gettodoitem step1choice take action at the completion of a step p the guideline for argouml non modal wizards is to act immediately not wait for the finish this method may also be invoked when finish is triggered for any steps whose panels didn t get created p the observation is that this seems to be trigged when there is any change on the panel e g choosing an option not just when next is pressed coded accordingly p we allow for the association that caused the problem having by now been deleted and hence an exception may be raised we catch this politely p param old step the index of the step just completed 0 for the first information panel see org argouml cognitive critics wizard public void do action int old step switch old step case 1 just completed the first step where we make our choices first see if we have a choice we always should so print a rude message if we don t int choice 1 if step1 choice null choice step1 choice get selected index if choice 1 log warn wiz assoc composite nothing selected should not get here return it is quite possible that the cause of the problem has by now been deleted in which case we will throw an exception if we try to change things catch this tidily try set the appropriate aggregation on each end iterator iter model get facade get connections get trigger association iterator object ae0 iter next object ae1 iter next switch choice case 0 start is a composite aggregation of end model get core helper set aggregation ae0 model get aggregation kind get composite model get core helper set aggregation ae1 model get aggregation kind get none break case 1 start is a shared aggregation of end model get core helper set aggregation ae0 model get aggregation kind get aggregate model get core helper set aggregation ae1 model get aggregation kind get none break case 2 end is a composite aggregation of start model get core helper set aggregation ae0 model get aggregation kind get none model get core helper set aggregation ae1 model get aggregation kind get composite break case 3 end is a shared aggregation of start model get core helper set aggregation ae0 model get aggregation kind get none model get core helper set aggregation ae1 model get aggregation kind get aggregate break case 4 no aggregation model get core helper set aggregation ae0 model get aggregation kind get none model get core helper set aggregation ae1 model get aggregation kind get none break default catch exception pve someone took our association away log error wiz assoc composite could not set aggregation pve default oldstep doaction oldstep oldstep step1choice step1choice getselectedindex wizassoccomposite getfacade getconnections gettriggerassociation getcorehelper setaggregation getaggregationkind getcomposite getcorehelper setaggregation getaggregationkind getnone getcorehelper setaggregation getaggregationkind getaggregate getcorehelper setaggregation getaggregationkind getnone getcorehelper setaggregation getaggregationkind getnone getcorehelper setaggregation getaggregationkind getcomposite getcorehelper setaggregation getaggregationkind getnone getcorehelper setaggregation getaggregationkind getaggregate getcorehelper setaggregation getaggregationkind getnone getcorehelper setaggregation getaggregationkind getnone wizassoccomposite determine if we have sufficient information to finish p we can t finish if our parent link org argouml cognitive critics wizard can t finish p we can finish if we re on step 0 p we can finish if we re on step 1 and have made a choice p return code true code if we can finish otherwise code false code see org argouml cognitive critics wizard override public boolean can finish can t finish if our parent can t if super can finish return false can finish if it s step 0 if get step 0 return true can finish if we re on step1 and have actually made a choice if get step 1 step1 choice null step1 choice get selected index 1 return true otherwise we can t finish return false canfinish canfinish getstep getstep step1choice step1choice getselectedindex the constructor param container the container of uml user interface components param property name the name of the property public uml recurrence expression model uml user interface container container string property name super container property name propertyname umlrecurrenceexpressionmodel umluserinterfacecontainer propertyname propertyname see org argouml uml ui uml expression model2 get expression public object get expression return model get facade get recurrence target manager get instance get target umlexpressionmodel2 getexpression getexpression getfacade getrecurrence targetmanager getinstance gettarget public void set expression object expression object target target manager get instance get target if target null throw new illegal state exception there is no target for get container model get common behavior helper set recurrence target expression setexpression targetmanager getinstance gettarget illegalstateexception getcontainer getcommonbehaviorhelper setrecurrence see org argouml uml ui uml expression model2 new expression public object new expression log debug new boolean expression return model get data types factory create iteration expression umlexpressionmodel2 newexpression newexpression getdatatypesfactory createiterationexpression the constructor public cr opp end conflict setup head and desc add supported decision uml decision inheritance add supported decision uml decision relationships add supported decision uml decision naming set knowledge types critic kt syntax add trigger association end croppendconflict setupheadanddesc addsupporteddecision umldecision addsupporteddecision umldecision addsupporteddecision umldecision setknowledgetypes kt_syntax addtrigger associationend public boolean predicate2 object dm designer dsgr boolean problem no problem if model get facade isa classifier dm collection col model get core helper get associations dm list names new array list iterator it col iterator string name null while it has next name model get facade get name it next if name null name equals continue if names contains name problem problem found break return problem no_problem getfacade isaclassifier getcorehelper getassociations arraylist hasnext getfacade getname problem_found public set object get criticized design materials set object ret new hash set object ret add model get meta types get association end return ret getcriticizeddesignmaterials hashset getmetatypes getassociationend constructor for a link fig class during file load p parent link org argouml uml diagram ui fig node model element will have created the main box link get big port and its name link get name fig and stereotype link get stereotype fig this constructor creates a box for the attributes and operations p the properties of all these graphic elements are adjusted appropriately the main boxes are all filled and have outlines p em warning em much of the graphics positioning is hard coded the overall figure is placed at location 10 10 the stereotype compartment is created 15 pixels high in the parent but we change it to 19 pixels 1 more than link stereoheight here the attribute and operations boxes are created at 19 pixels 2 more than link rowheight p param model element model element to be represented by this fig param x x position param y y position param w width param h height deprecated for 0 27 3 by tfmorris use link fig class object rectangle diagram settings deprecated public fig class object model element int x int y int w int h this null model element set bounds x y w h figclass fignodemodelelement getbigport getnamefig getstereotypefig modelelement figclass diagramsettings figclass modelelement modelelement setbounds constructor for a link fig class by diagram interaction p parent link org argouml uml diagram ui fig node model element will have created the main box link get big port and its name link get name fig and stereotype link get stereotype fig this constructor creates a box for the attributes and operations p the properties of all these graphic elements are adjusted appropriately the main boxes are all filled and have outlines p em warning em much of the graphics positioning is hard coded the overall figure is placed at location 10 10 the stereotype compartment is created 15 pixels high in the parent but we change it to 19 pixels 1 more than link stereoheight here the attribute and operations boxes are created at 19 pixels 2 more than link rowheight p param gm not actually used in the current implementation param node the uml object being placed deprecated for 0 27 3 by tfmorris use link fig class object rectangle diagram settings deprecated public fig class graph model gm object node super set owner node construct figs figclass fignodemodelelement getbigport getnamefig getstereotypefig figclass diagramsettings figclass graphmodel setowner constructfigs private void construct figs add fig get big port add fig get stereotype fig add fig get name fig add fig get operations fig add fig get attributes fig add fig border fig constructfigs addfig getbigport addfig getstereotypefig addfig getnamefig addfig getoperationsfig addfig getattributesfig addfig borderfig constructor for a link fig class during file load p parent link org argouml uml diagram ui fig node model element will have created the main box link get big port and its name link get name fig and stereotype link get stereotype fig this constructor creates a box for the attributes and operations p the properties of all these graphic elements are adjusted appropriately the main boxes are all filled and have outlines p em warning em much of the graphics positioning is hard coded the overall figure is placed at location 10 10 the stereotype compartment is created 15 pixels high in the parent but we change it to 19 pixels 1 more than link stereoheight here the attribute and operations boxes are created at 19 pixels 2 more than link rowheight p param element model element to be represented by this fig param bounds rectangle describing bounds param settings rendering settings public fig class object element rectangle bounds diagram settings settings super element bounds settings construct figs rectangle r get bounds set standard bounds r x r y r width r height figclass fignodemodelelement getbigport getnamefig getstereotypefig figclass diagramsettings constructfigs getbounds setstandardbounds override public object clone fig class fig clone fig class super clone iterator this iter this get figs iterator iterator clone iter fig clone get figs iterator while this iter has next fig this fig fig this iter next fig clone fig fig clone iter next if this fig border fig fig clone border fig this fig return fig clone figclass figclone figclass thisiter getfigs cloneiter figclone getfigs thisiter hasnext thisfig thisiter clonefig cloneiter thisfig borderfig figclone borderfig thisfig figclone see org tigris gef presentation fig make selection public selection make selection return new selection class this makeselection makeselection selectionclass protected object build modifier pop up return build modifier pop up abstract leaf root active buildmodifierpopup buildmodifierpopup see org tigris gef presentation fig get line width public int get line width return border fig get line width getlinewidth getlinewidth borderfig getlinewidth param fg vec the fig group param ft the figtext param i get the fig before fig i return the fig text protected fig text get previous visible feature fig group fg vec fig text ft int i if fg vec null i 1 return null fig text ft2 null list figs fg vec get figs if i figs size fig text figs get i is visible return null do i while i 1 if fg vec get attributes fig fg vec get operations fig else fg vec get attributes fig figs fg vec get figs i figs size 1 ft2 fig text figs get i if ft2 is visible ft2 null while ft2 null return ft2 fgvec figgroup figtext figtext getpreviousvisiblefeature figgroup fgvec figtext fgvec figtext fgvec getfigs figtext isvisible fgvec getattributesfig fgvec getoperationsfig fgvec getattributesfig fgvec getfigs figtext isvisible param fg vec the fig group param ft the figtext param i get the fig after fig i return the fig text protected fig text get next visible feature fig group fg vec fig text ft int i if fg vec null i 1 return null fig text ft2 null list v fg vec get figs if i v size fig text v get i is visible return null do i while i v size if fg vec get attributes fig fg vec get operations fig else fg vec get attributes fig v new array list fg vec get figs i 1 ft2 fig text v get i if ft2 is visible ft2 null while ft2 null return ft2 fgvec figgroup figtext figtext getnextvisiblefeature figgroup fgvec figtext fgvec figtext fgvec getfigs figtext isvisible fgvec getattributesfig fgvec getoperationsfig fgvec getattributesfig arraylist fgvec getfigs figtext isvisible public void set enclosing fig fig encloser if encloser get encloser return if encloser null encloser null model get facade isa instance encloser get owner super set enclosing fig encloser if model get facade isauml element get owner return if encloser null model get facade isa component encloser get owner move into component encloser super set enclosing fig encloser setenclosingfig getencloser getfacade isainstance getowner setenclosingfig getfacade isaumlelement getowner getfacade isacomponent getowner moveintocomponent setenclosingfig override protected void update name text super update name text calc bounds set bounds get bounds updatenametext updatenametext calcbounds setbounds getbounds the constructor public member list log info creating a member list memberlist public synchronized boolean add project member member if member instanceof project member model always put the model at the top model abstract project member member return true else if member instanceof project member todo list otherwise add the diagram at the start set todo list abstract project member member return true else if member instanceof profile configuration profile configuration abstract project member member return true else if member instanceof project member diagram otherwise add the diagram at the start return diagram members add project member diagram member return false projectmember projectmembermodel abstractprojectmember projectmembertodolist settodolist abstractprojectmember profileconfiguration profileconfiguration abstractprojectmember projectmemberdiagram diagrammembers projectmemberdiagram public synchronized boolean remove object member log info removing a member if member instanceof argo diagram return remove diagram argo diagram member abstract project member member remove if model member model null return true else if todo list member log info removing todo list set todo list null return true else if profile configuration member log info removing profile configuration profile configuration null return true else final boolean removed diagram members remove member if removed log warn failed to remove diagram member member return removed argodiagram removediagram argodiagram abstractprojectmember todolist settodolist profileconfiguration profileconfiguration diagrammembers public synchronized iterator project member iterator return build ordered member list iterator projectmember buildorderedmemberlist public synchronized list iterator project member list iterator return build ordered member list list iterator listiterator projectmember listiterator buildorderedmemberlist listiterator public synchronized list iterator project member list iterator int arg0 return build ordered member list list iterator arg0 listiterator projectmember listiterator buildorderedmemberlist listiterator return the list of members in the order that they need to be written out in private list project member build ordered member list list project member temp new array list project member size if profile configuration null temp add profile configuration if model null temp add model temp add all diagram members if todo list null temp add todo list return temp projectmember buildorderedmemberlist projectmember arraylist projectmember profileconfiguration profileconfiguration addall diagrammembers todolist todolist private boolean remove diagram argo diagram d for project member diagram pmd diagram members if pmd get diagram d pmd remove diagram members remove pmd return true log debug failed to remove diagram d return false removediagram argodiagram projectmemberdiagram diagrammembers getdiagram diagrammembers public synchronized int size int size diagram members size if model null size if todo list null size if profile configuration null size return size diagrammembers todolist profileconfiguration public synchronized boolean contains object member if todo list member return true if model member return true if profile configuration member return true return diagram members contains member todolist profileconfiguration diagrammembers public synchronized void clear log info clearing members if model null model remove if todo list null todo list remove if profile configuration null profile configuration remove iterator members it diagram members iterator while members it has next abstract project member members it next remove diagram members clear todolist todolist profileconfiguration profileconfiguration membersit diagrammembers membersit hasnext abstractprojectmember membersit diagrammembers public synchronized project member get int i if model null if i 0 return model i if i diagram members size if todo list null return todo list else return profile configuration if i diagram members size 1 return profile configuration return diagram members get i projectmember diagrammembers todolist todolist profileconfiguration diagrammembers profileconfiguration diagrammembers public synchronized boolean is empty return size 0 isempty public synchronized project member to array project member temp new project member size int pos 0 if model null temp pos model for project member diagram d diagram members temp pos d if todo list null temp pos todo list if profile configuration null temp pos profile configuration return temp projectmember toarray projectmember projectmember projectmemberdiagram diagrammembers todolist todolist profileconfiguration profileconfiguration private void set todo list abstract project member member log info setting todo list to member todo list member settodolist abstractprojectmember todolist todolist public t t to array t a throw new unsupported operation exception toarray unsupportedoperationexception public boolean contains all collection arg0 throw new unsupported operation exception containsall unsupportedoperationexception public boolean add all collection extends project member arg0 throw new unsupported operation exception addall projectmember unsupportedoperationexception public boolean add all int arg0 collection extends project member arg1 throw new unsupported operation exception addall projectmember unsupportedoperationexception public boolean remove all collection arg0 throw new unsupported operation exception removeall unsupportedoperationexception public boolean retain all collection arg0 throw new unsupported operation exception retainall unsupportedoperationexception public project member set int arg0 project member arg1 throw new unsupported operation exception projectmember projectmember unsupportedoperationexception public void add int arg0 project member arg1 throw new unsupported operation exception projectmember unsupportedoperationexception public project member remove int arg0 throw new unsupported operation exception projectmember unsupportedoperationexception public int index of object arg0 throw new unsupported operation exception indexof unsupportedoperationexception public int last index of object arg0 throw new unsupported operation exception lastindexof unsupportedoperationexception public list project member sub list int arg0 int arg1 throw new unsupported operation exception projectmember sublist unsupportedoperationexception constructor for uml association end type combo box model public uml association end type combo box model super umlassociationendtypecomboboxmodel umlassociationendtypecomboboxmodel protected object get selected model element if get target null return model get facade get type get target return null getselectedmodelelement gettarget getfacade gettype gettarget construct a panel which provides controls for populating a list of paths this can be used for a java classpath c include path etc param path list setting the settings object for this pathlist public import classpath dialog path list selection path list setting super setting path list setting set tool tip text setting get description set layout new border layout 0 0 j label label new j label setting get label add label border layout north paths model new default list model for string path setting get default path list paths model add element path paths new j list paths model paths set visible row count 5 paths set tool tip text setting get description j scroll pane list scroller new j scroll pane paths add list scroller border layout center panel for controls j panel controls panel new j panel controls panel set layout new grid layout 0 2 50 0 add button new j button translator localize button add controls panel add add button add button add action listener new add listener remove button new j button translator localize button remove controls panel add remove button remove button add action listener new remove listener todo add up down buttons to control the ordering of items add controls panel border layout south pathlistsetting importclasspathdialog pathlistselection pathlistsetting pathlistsetting settooltiptext getdescription setlayout borderlayout jlabel jlabel getlabel borderlayout pathsmodel defaultlistmodel getdefaultpathlist pathsmodel addelement jlist pathsmodel setvisiblerowcount settooltiptext getdescription jscrollpane listscroller jscrollpane listscroller borderlayout jpanel controlspanel jpanel controlspanel setlayout gridlayout addbutton jbutton controlspanel addbutton addbutton addactionlistener addlistener removebutton jbutton controlspanel removebutton removebutton addactionlistener removelistener controlspanel borderlayout private void update path list list string path list new array list string for int i 0 i paths model size i string path string paths model get element at i path list add path setting set path list path list updatepathlist pathlist arraylist pathsmodel pathsmodel getelementat pathlist setpathlist pathlist public void action performed action event e this method can be called only if there s a valid selection so go ahead and remove whatever s selected int index paths get selected index if index 0 return paths model remove index update path list int size paths model get size if size 0 nothings left disable firing remove button set enabled false else select an index if index paths model get size removed item in last position index paths set selected index index paths ensure index is visible index actionperformed actionevent getselectedindex pathsmodel updatepathlist pathsmodel getsize removebutton setenabled pathsmodel getsize setselectedindex ensureindexisvisible public void action performed action event e if chooser null chooser new j file chooser globals get last directory if chooser null chooser new j file chooser chooser set file selection mode j file chooser files and directories chooser set multi selection enabled true chooser add action listener new action listener public void action performed action event e1 if e1 get action command equals j file chooser approve selection file files chooser get selected files for file the file files if the file null paths model add element the file to string update path list else if e1 get action command equals j file chooser cancel selection just quit chooser show open dialog new frame actionperformed actionevent jfilechooser getlastdirectory jfilechooser setfileselectionmode jfilechooser files_and_directories setmultiselectionenabled addactionlistener actionlistener actionperformed actionevent getactioncommand jfilechooser approve_selection getselectedfiles thefile thefile pathsmodel addelement thefile tostring updatepathlist getactioncommand jfilechooser cancel_selection showopendialog chooser add action listener new action listener public void action performed action event e1 if e1 get action command equals j file chooser approve selection file files chooser get selected files for file the file files if the file null paths model add element the file to string update path list else if e1 get action command equals j file chooser cancel selection just quit addactionlistener actionlistener actionperformed actionevent getactioncommand jfilechooser approve_selection getselectedfiles thefile thefile pathsmodel addelement thefile tostring updatepathlist getactioncommand jfilechooser cancel_selection creates a new instance of this profile throws profile exception if something goes wrong suppress warnings unchecked public profile meta throws profile exception profile model loader profile model loader new resource model loader profile reference profile reference null try profile reference new core profile reference profile file catch malformedurl exception e throw new profile exception exception while creating profile reference e model profile model loader load model profile reference if model null model new array list model add model get model management factory create model load well formedness rules profileexception suppresswarnings profilemeta profileexception profilemodelloader profilemodelloader resourcemodelloader profilereference profilereference profilereference coreprofilereference profile_file malformedurlexception profileexception profilemodelloader loadmodel profilereference arraylist getmodelmanagementfactory createmodel loadwellformednessrules private void load well formedness rules set critic critics new hash set critic try critics add new crocl context model element inv self tagged value exists x x type name dependency implies self stereotype exists x x name profile the dependency tag definition should be applied only to profiles null to do item med priority null null http argouml tigris org catch invalid ocl exception e e print stack trace try critics add new crocl context model element inv self tagged value exists x x type name figure or exists x x type name description or exists x x type name i18n or exists x x type name knowledge type or exists x x type name more infourl or exists x x type name priority or exists x x type name description or exists x x type name supported decision or exists x x type name headline implies self stereotype exists x x name critic misuse of metaprofile tagged values the figure i18n knowledge type more infourl priority supported decision description and headline tag definitions should be applied only to ocl critics to do item med priority null null http argouml tigris org catch invalid ocl exception e e print stack trace try critics add new crocl context stereotype inv self namespace stereotype exists x x name profile stereotypes should be declared inside a profile please add the profile stereotype to the containing namespace to do item med priority null null http argouml tigris org catch invalid ocl exception e e print stack trace set critics critics loadwellformednessrules hashset modelelement taggedvalue todoitem med_priority invalidoclexception printstacktrace modelelement taggedvalue knowledgetype moreinfourl supporteddecision taggedvalues knowledgetype moreinfourl supporteddecision todoitem med_priority invalidoclexception printstacktrace todoitem med_priority invalidoclexception printstacktrace setcritics override public string get display name return meta profile getdisplayname metaprofile override public collection get profile packages throws profile exception return model getprofilepackages profileexception constructors constructor public action copy super translator localize localize key icon icon resource loader wrapper lookup icon localize key if icon null put value action small icon icon put value action short description translator localize localize key actioncopy localize_key resourceloaderwrapper lookupicon localize_key putvalue small_icon putvalue short_description localize_key return the singleton public static action copy get instance return instance actioncopy getinstance public void action performed action event ae if text source null text source copy globals clip board null else cmd copy cmd new cmd copy cmd do it if is system clip board empty globals clip board null globals clip board is empty action paste get instance set enabled false else action paste get instance set enabled true actionperformed actionevent textsource textsource clipboard cmdcopy cmdcopy doit issystemclipboardempty clipboard clipboard isempty actionpaste getinstance setenabled actionpaste getinstance setenabled public void caret update caret event e if e get mark e get dot there is a selection set enabled true text source j text component e get source else set enabled false text source null caretupdate caretevent getmark getdot setenabled textsource jtextcomponent getsource setenabled textsource private boolean is system clip board empty try object text toolkit get default toolkit get system clipboard get contents null get transfer data data flavor string flavor return text null catch io exception ignorable catch unsupported flavor exception ignorable return true issystemclipboardempty getdefaulttoolkit getsystemclipboard getcontents gettransferdata dataflavor stringflavor ioexception unsupportedflavorexception the main constructor deprecated for 0 27 3 by mvw use link fig transition object diagram settings suppress warnings deprecation deprecated public fig transition super initialize transition figtransition diagramsettings suppresswarnings figtransition initializetransition the constructor that hooks the fig into an existing uml element it also adapts the line to be dashed if the source or destination is an object flow state param edge the uml element param lay the layer deprecated for 0 27 3 by mvw use link fig transition object diagram settings deprecated public fig transition object edge layer lay this if model get facade isa transition edge init ports lay edge set layer lay set owner edge objectflowstate figtransition diagramsettings figtransition getfacade isatransition initports setlayer setowner constructor used by pgml parser param owner owning uml element param settings rendering settings public fig transition object owner diagram settings settings super owner settings initialize transition figtransition diagramsettings initializetransition private void initialize transition add path item get name fig new path item placement this get name fig 50 10 get fig set line color line color set dest arrow head end arrow allow remove from diagram false update dashed initializetransition addpathitem getnamefig pathitemplacement getnamefig getfig setlinecolor line_color setdestarrowhead endarrow allowremovefromdiagram updatedashed override public void set layer layer lay super set layer lay this presumes that the layer is set after the owner if get layer null get owner null init ports lay get owner setlayer setlayer getlayer getowner initports getowner deprecated suppress warnings deprecation override public void set owner object owner super set owner owner this presumes that the owner is set after the layer if get layer null get owner null init ports get layer owner suppresswarnings setowner setowner getlayer getowner initports getlayer set the owners of the associated fig nodes to be the state vertexes which are at either end of the transition p todo this needs documentation is this really needed why param lay diagram layer containing this fig param owner owning uml element deprecated in 0 28 by bob tarling the above todo is from michiel i also don t understand the purpose of this method the gef framework should be setting source dest or persistence should manage deprecated private void init ports layer lay object owner final object sourcesv model get facade get source owner final fig node sourcefn fig node lay presentation for sourcesv if sourcefn null the purpose of this method is not explained and it give give npe depending on z order of figs as they are read for now ignore if null but for future lets delete this set source port fig sourcefn set source fig node sourcefn final object destsv model get facade get target owner final fig node destfn fig node lay presentation for destsv if destfn null the purpose of this method is not explained and it give give npe depending on z order of figs as they are read for now ignore if null but for future lets delete this set dest port fig destfn set dest fig node destfn fignodes statevertexes initports getfacade getsource fignode fignode presentationfor setsourceportfig setsourcefignode getfacade gettarget fignode fignode presentationfor setdestportfig setdestfignode see org argouml uml diagram ui fig edge model element get notation provider type override protected int get notation provider type return notation provider factory2 type transition figedgemodelelement getnotationprovidertype getnotationprovidertype notationproviderfactory2 type_transition override public void rendering changed super rendering changed update dashed renderingchanged renderingchanged updatedashed the transition is dashed if connected to an object flow state only for an activity diagram this method updates the rendering of the transition on the diagram private void update dashed if model get facade isa transition get owner dashed model get facade isa object flow state model get facade get source get owner model get facade isa object flow state model get facade get target get owner get fig set dashed dashed objectflowstate updatedashed getfacade isatransition getowner getfacade isaobjectflowstate getfacade getsource getowner getfacade isaobjectflowstate getfacade gettarget getowner getfig setdashed override public vector get pop up actions mouse event me vector pop up actions super get pop up actions me check if multiple items are selected boolean ms target manager get instance get targets size 1 none of the menu items below apply when multiple modelelements are selected if ms return pop up actions action a argoj menu trigger menu new argoj menu menu popup trigger a new button action new call event a put value action name a get value action short description trigger menu add a a new button action new change event a put value action name a get value action short description trigger menu add a a new button action new signal event a put value action name a get value action short description trigger menu add a a new button action new time event a put value action name a get value action short description trigger menu add a pop up actions add pop up actions size get popup add offset trigger menu a new button action new guard a put value action name a get value action short description pop up actions add pop up actions size get popup add offset a argoj menu effect menu new argoj menu menu popup effect a action new call action get button instance a put value action name a get value action short description effect menu add a a action new create action get button instance a put value action name a get value action short description effect menu add a a action new destroy action get button instance a put value action name a get value action short description effect menu add a a action new return action get button instance a put value action name a get value action short description effect menu add a a action new send action get button instance a put value action name a get value action short description effect menu add a a action new terminate action get button instance a put value action name a get value action short description effect menu add a a action new uninterpreted action get button instance a put value action name a get value action short description effect menu add a a action new action sequence get button instance a put value action name a get value action short description effect menu add a pop up actions add pop up actions size get popup add offset effect menu return pop up actions getpopupactions mouseevent popupactions getpopupactions targetmanager getinstance gettargets popupactions argojmenu triggermenu argojmenu buttonactionnewcallevent putvalue getvalue short_description triggermenu buttonactionnewchangeevent putvalue getvalue short_description triggermenu buttonactionnewsignalevent putvalue getvalue short_description triggermenu buttonactionnewtimeevent putvalue getvalue short_description triggermenu popupactions popupactions getpopupaddoffset triggermenu buttonactionnewguard putvalue getvalue short_description popupactions popupactions getpopupaddoffset argojmenu effectmenu argojmenu actionnewcallaction getbuttoninstance putvalue getvalue short_description effectmenu actionnewcreateaction getbuttoninstance putvalue getvalue short_description effectmenu actionnewdestroyaction getbuttoninstance putvalue getvalue short_description effectmenu actionnewreturnaction getbuttoninstance putvalue getvalue short_description effectmenu actionnewsendaction getbuttoninstance putvalue getvalue short_description effectmenu actionnewterminateaction getbuttoninstance putvalue getvalue short_description effectmenu actionnewuninterpretedaction getbuttoninstance putvalue getvalue short_description effectmenu actionnewactionsequence getbuttoninstance putvalue getvalue short_description effectmenu popupactions popupactions getpopupaddoffset effectmenu popupactions override public void set fig fig f super set fig f get fig set dashed dashed setfig setfig getfig setdashed override protected object get destination if get owner null return model get state machines helper get destination get owner return null getdestination getowner getstatemachineshelper getdestination getowner override protected object get source if get owner null return model get state machines helper get source get owner return null getsource getowner getstatemachineshelper getsource getowner override public void paint graphics g end arrow set line color get line color super paint g endarrow setlinecolor getlinecolor override public void paint clarifiers graphics g indicate bounds get name fig g super paint clarifiers g paintclarifiers indicatebounds getnamefig paintclarifiers public prop panel create prop panel object element if model get facade isa element element a subsytem is a classifier also so it needs to come before the classifier check if model get facade isa subsystem element return new prop panel subsystem else if model get facade isa classifier element return get classifier prop panel element else if model get facade isa relationship element return get relationship prop panel element else if model get facade isa state vertex element return get state vertex prop panel element else if model get facade isa action sequence element this is not a subtype of prop panel action so it must come first return new prop panel action sequence else if model get facade isa action element return get action prop panel element todo this needs to be in type hierarchy order to work properly and create the most specific property panel properly everything which has been factored out of this method has been reviewed anything below this point still needs to be reviewed tfm else if model get facade isa activity graph element return new prop panel activity graph else if model get facade isa argument element return new prop panel argument else if model get facade isa association end role element return new prop panel association end role else if model get facade isa association end element return new prop panel association end else if model get facade isa attribute element return new prop panel attribute else if model get facade isa collaboration element return new prop panel collaboration else if model get facade isa comment element return new prop panel comment else if model get facade isa component instance element return new prop panel component instance else if model get facade isa constraint element return new prop panel constraint else if model get facade isa enumeration literal element return new prop panel enumeration literal else if model get facade isa extension point element return new prop panel extension point else if model get facade isa guard element return new prop panel guard else if model get facade isa interaction element return new prop panel interaction else if model get facade isa link element return new prop panel link else if model get facade isa link end element return new prop panel link end else if model get facade isa message element return new prop panel message else if model get facade isa method element return new prop panel method else if model get facade isa model element return new prop panel model else if model get facade isa node instance element return new prop panel node instance else if model get facade isa object element return new prop panel object else if model get facade isa operation element return new prop panel operation else if model get facade isa package element return new prop panel package else if model get facade isa parameter element return new prop panel parameter else if model get facade isa partition element return new prop panel partition else if model get facade isa reception element return new prop panel reception else if model get facade isa state machine element return new prop panel state machine else if model get facade isa stereotype element return new prop panel stereotype else if model get facade isa stimulus element return new prop panel stimulus else if model get facade isa tagged value element return new prop panel tagged value else if model get facade isa tag definition element return new prop panel tag definition else if model get facade isa transition element return new prop panel transition else if model get facade isa call event element return new prop panel call event else if model get facade isa change event element return new prop panel change event else if model get facade isa signal event element return new prop panel signal event else if model get facade isa time event element return new prop panel time event else if model get facade isa dependency element return new prop panel dependency throw new illegal argument exception unsupported element type return null proppanel createproppanel getfacade isaelement getfacade isasubsystem proppanelsubsystem getfacade isaclassifier getclassifierproppanel getfacade isarelationship getrelationshipproppanel getfacade isastatevertex getstatevertexproppanel getfacade isaactionsequence proppanelaction proppanelactionsequence getfacade isaaction getactionproppanel getfacade isaactivitygraph proppanelactivitygraph getfacade isaargument proppanelargument getfacade isaassociationendrole proppanelassociationendrole getfacade isaassociationend proppanelassociationend getfacade isaattribute proppanelattribute getfacade isacollaboration proppanelcollaboration getfacade isacomment proppanelcomment getfacade isacomponentinstance proppanelcomponentinstance getfacade isaconstraint proppanelconstraint getfacade isaenumerationliteral proppanelenumerationliteral getfacade isaextensionpoint proppanelextensionpoint getfacade isaguard proppanelguard getfacade isainteraction proppanelinteraction getfacade isalink proppanellink getfacade isalinkend proppanellinkend getfacade isamessage proppanelmessage getfacade isamethod proppanelmethod getfacade isamodel proppanelmodel getfacade isanodeinstance proppanelnodeinstance getfacade isaobject proppanelobject getfacade isaoperation proppaneloperation getfacade isapackage proppanelpackage getfacade isaparameter proppanelparameter getfacade isapartition proppanelpartition getfacade isareception proppanelreception getfacade isastatemachine proppanelstatemachine getfacade isastereotype proppanelstereotype getfacade isastimulus proppanelstimulus getfacade isataggedvalue proppaneltaggedvalue getfacade isatagdefinition proppaneltagdefinition getfacade isatransition proppaneltransition getfacade isacallevent proppanelcallevent getfacade isachangeevent proppanelchangeevent getfacade isasignalevent proppanelsignalevent getfacade isatimeevent proppaneltimeevent getfacade isadependency proppaneldependency illegalargumentexception private prop panel classifier get classifier prop panel object element if model get facade isa actor element return new prop panel actor else if model get facade isa association class element return new prop panel association class else if model get facade isa class element return new prop panel class else if model get facade isa classifier in state element return new prop panel classifier in state else if model get facade isa classifier role element return new prop panel classifier role else if model get facade isa component element return new prop panel component else if model get facade isa data type element if model get facade isa enumeration element return new prop panel enumeration else return new prop panel data type else if model get facade isa interface element return new prop panel interface else if model get facade isa node element return new prop panel node else if model get facade isa signal element if model get facade isa exception element return new prop panel exception else return new prop panel signal else if model get facade isa use case element return new prop panel use case todo a subsystem is a classifier but its prop panel is derived from prop panel package else if model get facade isa subsystem element return new prop panel subsystem todo in uml 2 x associations will fall through here because they are classifiers as well as relationships but we test for classifier first throw new illegal argument exception unsupported element type proppanelclassifier getclassifierproppanel getfacade isaactor proppanelactor getfacade isaassociationclass proppanelassociationclass getfacade isaclass proppanelclass getfacade isaclassifierinstate proppanelclassifierinstate getfacade isaclassifierrole proppanelclassifierrole getfacade isacomponent proppanelcomponent getfacade isadatatype getfacade isaenumeration proppanelenumeration proppaneldatatype getfacade isainterface proppanelinterface getfacade isanode proppanelnode getfacade isasignal getfacade isaexception proppanelexception proppanelsignal getfacade isausecase proppanelusecase proppanel proppanelpackage getfacade isasubsystem proppanelsubsystem illegalargumentexception private prop panel relationship get relationship prop panel object element if model get facade isa association element if model get facade isa association role element return new prop panel association role else return new prop panel association else if model get facade isa dependency element if model get facade isa abstraction element return new prop panel abstraction else if model get facade isa package import element return new prop panel permission else if model get facade isa usage element return new prop panel usage else if model get facade isa binding element return new prop panel binding else return new prop panel dependency else if model get facade isa extend element return new prop panel extend else if model get facade isa flow element return new prop panel flow else if model get facade isa generalization element return new prop panel generalization else if model get facade isa include element return new prop panel include throw new illegal argument exception unsupported relationship type proppanelrelationship getrelationshipproppanel getfacade isaassociation getfacade isaassociationrole proppanelassociationrole proppanelassociation getfacade isadependency getfacade isaabstraction proppanelabstraction getfacade isapackageimport proppanelpermission getfacade isausage proppanelusage getfacade isabinding proppanelbinding proppaneldependency getfacade isaextend proppanelextend getfacade isaflow proppanelflow getfacade isageneralization proppanelgeneralization getfacade isainclude proppanelinclude illegalargumentexception private prop panel action get action prop panel object action if model get facade isa call action action return new prop panel call action else if model get facade isa create action action return new prop panel create action else if model get facade isa destroy action action return new prop panel destroy action else if model get facade isa return action action return new prop panel return action else if model get facade isa send action action return new prop panel send action else if model get facade isa terminate action action return new prop panel terminate action else if model get facade isa uninterpreted action action return new prop panel uninterpreted action throw new illegal argument exception unsupported action type proppanelaction getactionproppanel getfacade isacallaction proppanelcallaction getfacade isacreateaction proppanelcreateaction getfacade isadestroyaction proppaneldestroyaction getfacade isareturnaction proppanelreturnaction getfacade isasendaction proppanelsendaction getfacade isaterminateaction proppanelterminateaction getfacade isauninterpretedaction proppaneluninterpretedaction illegalargumentexception private prop panel state vertex get state vertex prop panel object element if model get facade isa state element if model get facade isa call state element return new prop panel call state else if model get facade isa action state element return new prop panel action state else if model get facade isa composite state element if model get facade isa submachine state element if model get facade isa subactivity state element return new prop panel subactivity state else return new prop panel submachine state else return new prop panel composite state else if model get facade isa final state element return new prop panel final state else if model get facade isa object flow state element return new prop panel object flow state else if model get facade isa simple state element return new prop panel simple state else if model get facade isa pseudostate element return new prop panel pseudostate else if model get facade isa stub state element return new prop panel stub state else if model get facade isa synch state element return new prop panel synch state throw new illegal argument exception unsupported state type proppanelstatevertex getstatevertexproppanel getfacade isastate getfacade isacallstate proppanelcallstate getfacade isaactionstate proppanelactionstate getfacade isacompositestate getfacade isasubmachinestate getfacade isasubactivitystate proppanelsubactivitystate proppanelsubmachinestate proppanelcompositestate getfacade isafinalstate proppanelfinalstate getfacade isaobjectflowstate proppanelobjectflowstate getfacade isasimplestate proppanelsimplestate getfacade isapseudostate proppanelpseudostate getfacade isastubstate proppanelstubstate getfacade isasynchstate proppanelsynchstate illegalargumentexception the constructor public cr too many attr setup head and desc add supported decision uml decision storage set threshold attributes threshold add trigger structural feature crtoomanyattr setupheadanddesc addsupporteddecision umldecision setthreshold attributes_threshold addtrigger structuralfeature public boolean predicate2 object dm designer dsgr if model get facade isa classifier dm return no problem todo consider inherited attributes collection features model get facade get features dm if features null return no problem int n 0 for iterator iter features iterator iter has next if model get facade isa structural feature iter next n if n get threshold return no problem return problem found getfacade isaclassifier no_problem getfacade getfeatures no_problem hasnext getfacade isastructuralfeature getthreshold no_problem problem_found public set object get criticized design materials set object ret new hash set object ret add model get meta types getuml class return ret getcriticizeddesignmaterials hashset getmetatypes getumlclass public prop panel create prop panel object object if object instanceof uml class diagram return new prop paneluml class diagram return null proppanel createproppanel umlclassdiagram proppanelumlclassdiagram return a i18 key that represents a help string giving an explanation to the user of the syntax utility function to determine the presence of a key the default is false param key the string for the key param map the map to check for the presence and value of the key return true if the value for the key is true otherwise false public static boolean is value final string key final map map if map null return false object o map get key if o instanceof boolean return false return boolean o boolean value isvalue booleanvalue parses the given text and adapts the model element and maybe related elements accordingly param model element the modelelement to adapt param text the string given by the user to be parsed to adapt the model modelelement modelelement generates a string representation for the given model element param model element the base uml modelelement param args arguments that may determine the notation return the string written in the correct notation deprecated for 0 27 3 by tfmorris use link to string object notation settings deprecated modelelement tostring notationsettings generate a string representation for the given model element p em warning em all subclasses must implement this as if it were abstract it will become abstract in a future release after the deprecation period for to string object map expires param model element the base uml element param settings settings that control rendering of the text return the string written in the correct notation public string to string object model element notation settings settings return to string model element collections empty map tostring modelelement tostring modelelement notationsettings tostring modelelement emptymap initialise the appropriate model change listeners for the given modelelement to the given listener overrule this when you need more than listening to all events from the base modelelement param listener the given listener param model element the modelelement that we provide notation for public void initialise listener property change listener listener object model element add element listener listener model element modelelement initialiselistener propertychangelistener modelelement addelementlistener modelelement clean out the listeners registered before the default implementation is to remove all listeners that were remembered by the utility functions below param listener the given listener param model element the modelelement that we provide notation for public void clean listener final property change listener listener final object model element remove all element listeners listener modelelement cleanlistener propertychangelistener modelelement removeallelementlisteners update the set of listeners based on the given event p the default implementation just removes all listeners and then re initialises completely this is method 1 a more efficient way would be to dissect the property change event and only adapt the listeners that need to be adapted this is method 2 p method 2 is explained by the code below that is commented out method 1 is the easiest to implement since at every arrival of an event we just remove all old listeners and then inspect the current model and add listeners where we need them i e the advantage is that we only need to traverse the model structure in one location i e the initialise listener method param listener the given listener param model element the modelelement that we provide notation for param pce the received event that we base the changes on public void update listener final property change listener listener object model element property change event pce e g for an operation if pce get source model element event property name parameter if event instanceof add association event get the parameter instance from event new value call model to add listener on parameter on change of name type else if event instanceof remove association event get the parameter instance from event old value call model to remove listener on parameter on change of name type end if end if if model get uml factory is removed model element log warn encountered deleted object during delete of model element return clean listener listener model element initialise listener listener model element propertychangeevent initialiselistener modelelement updatelistener propertychangelistener modelelement propertychangeevent getsource modelelement propertyname addassociationevent newvalue removeassociationevent oldvalue getumlfactory isremoved modelelement modelelement cleanlistener modelelement initialiselistener modelelement protected final void add element listener property change listener listener object element if model get uml factory is removed element log warn encountered deleted object during delete of element return object entry new object element null if listeners contains entry listeners add entry model get pump add model event listener listener element else log warn attempted duplicate registration of event listener element element listener listener addelementlistener propertychangelistener getumlfactory isremoved getpump addmodeleventlistener protected final void add element listener property change listener listener object element string property if model get uml factory is removed element log warn encountered deleted object during delete of element return object entry new object element property if listeners contains entry listeners add entry model get pump add model event listener listener element property else log debug attempted duplicate registration of event listener element element listener listener addelementlistener propertychangelistener getumlfactory isremoved getpump addmodeleventlistener protected final void add element listener property change listener listener object element string property if model get uml factory is removed element log warn encountered deleted object during delete of element return object entry new object element property if listeners contains entry listeners add entry model get pump add model event listener listener element property else log debug attempted duplicate registration of event listener element element listener listener addelementlistener propertychangelistener getumlfactory isremoved getpump addmodeleventlistener protected final void remove element listener property change listener listener object element listeners remove new object element null model get pump remove model event listener listener element removeelementlistener propertychangelistener getpump removemodeleventlistener protected final void remove all element listeners property change listener listener for object lis listeners object property lis 1 if property null model get pump remove model event listener listener lis 0 else if property instanceof string model get pump remove model event listener listener lis 0 string property else if property instanceof string model get pump remove model event listener listener lis 0 string property else throw new runtime exception internal error in remove all element listeners listeners clear removeallelementlisteners propertychangelistener getpump removemodeleventlistener getpump removemodeleventlistener getpump removemodeleventlistener runtimeexception removeallelementlisteners protected string builder format name list collection model elements return format name list model elements list separator stringbuilder formatnamelist modelelements formatnamelist modelelements list_separator protected string builder format name list collection model elements string separator string builder result new string builder for object element model elements string name model get facade get name element todo any special handling for null names append will use null result append name append separator if result length separator length result delete result length separator length result length return result stringbuilder formatnamelist modelelements stringbuilder stringbuilder modelelements getfacade getname public collection load model profile reference reference throws profile exception log info loading profile from zip reference get path if reference get path ends with zip throw new profile exception profile could not be loaded input stream is null file model file new file reference get path todo this is in the wrong place it s not profile specific it needs to be moved to main xmi reading code tfm 20060326 string filename model file get name string extension filename substring filename index of filename last index of string path model file get parent add the path of the model to the search path so we can read dependent models if path null system set property org argouml model modules search path path try is open zip stream at model file touri tourl extension catch malformedurl exception e log error exception while loading profile reference get path e throw new profile exception e catch io exception e log error exception while loading profile reference get path e throw new profile exception e if is null throw new profile exception profile could not be loaded return super load model is reference get public reference loadmodel profilereference profileexception getpath getpath endswith profileexception inputstream modelfile getpath modelfile getname indexof lastindexof modelfile getparent setproperty modules_search_path openzipstreamat modelfile malformedurlexception getpath profileexception ioexception getpath profileexception profileexception loadmodel getpublicreference open a zip input stream to the first file found with a given extension todo remove since this is a duplicate of zip file persister method when we have refactored the persister subsystem param url the url of the zip file param ext the required extension return the zip stream positioned at the required location throws io exception if there is a problem opening the file private zip input stream open zip stream at url url string ext throws io exception zip input stream zis new zip input stream url open stream zip entry entry zis get next entry while entry null entry get name ends with ext entry zis get next entry return zis zipinputstream zipfilepersister ioexception zipinputstream openzipstreamat ioexception zipinputstream zipinputstream openstream zipentry getnextentry getname endswith getnextentry private static void get component version info string buffer sb string pn sb append translator localize label package append sb append pn sb append n package pkg package get package pn if pkg null sb append translator localize label no version else string in pkg get implementation title if in null sb append translator localize label component sb append sb append in in pkg get implementation vendor if in null sb append translator localize label by sb append sb append in in pkg get implementation version if in null sb append sb append translator localize label version sb append sb append in sb append n sb append n getcomponentversioninfo stringbuffer getpackage getimplementationtitle getimplementationvendor getimplementationversion return a string containing the version information public static string get version info try class preloading so packages are there class cls org tigris gef base editor class cls org xml sax attribute list class cls org apache log4j logger class todo the following is mdr specific we need something generic to all model subsystems tfm 20070716 try cls class for name org netbeans api mdr mdr manager catch class not found exception e ignore string buffer sb new string buffer string sax factory system get property javax xml parsers sax parser factory if sax factory null object msg args sax factory sb append translator message format label sax factory1 msg args object sax object null try sax object sax parser factory new instance object msg args sax object get class get name sb append translator message format label sax factory2 msg args sb append n catch exception ex sb append translator localize label error sax factory for int i 0 i packagelist length i get component version info sb packagelist i if sax object null get package can return null s so we have to cater for this package pckg sax object get class get package if pckg null get component version info sb pckg get name sb append n sb append translator localize label os sb append system get property os name unknown sb append n sb append translator localize label os version sb append system get property os version unknown sb append n sb append translator localize label language sb append locale get default get language sb append n sb append translator localize label country sb append locale get default get country sb append n sb append n return sb to string catch exception e return e to string getversioninfo attributelist forname mdrmanager classnotfoundexception stringbuffer stringbuffer saxfactory getproperty saxparserfactory saxfactory msgargs saxfactory messageformat msgargs saxobject saxobject saxparserfactory newinstance msgargs saxobject getclass getname messageformat msgargs getcomponentversioninfo saxobject getpackage saxobject getclass getpackage getcomponentversioninfo getname getproperty getproperty getdefault getlanguage getdefault getcountry tostring tostring print out some version info for debugging public static void log version info buffered reader r new buffered reader new string reader get version info try while true string s r read line if s null break log info s catch io exception ioe logversioninfo bufferedreader bufferedreader stringreader getversioninfo readline ioexception gets the file extension of a file param file the file to examine return extension including the dot or null public static string get file extension file file string ext null string s file get name int i s last index of if i 0 ext s substring i to lower case return ext getfileextension getname lastindexof tolowercase the constructor public tab props this tab properties ui prop panel tabprops proppanel the constructor param tab name the name of the tab param panel class base the panel class base public tab props string tab name string panel class base super tab name set icon new up arrow icon todo this should be managed by the details pane target listener tfm remove the following line target manager get instance add target listener this set orientation horizontal get instance panel class base name panel class base set layout new border layout tabname panelclassbase tabprops tabname panelclassbase tabname seticon uparrowicon detailspane targetlistener targetmanager getinstance addtargetlistener setorientation getinstance panelclassbasename panelclassbase setlayout borderlayout set the orientation of the property panel param orientation the new orientation for this property panel see org tigris swidgets orientable set orientation org tigris swidgets orientation override public void set orientation orientation orientation super set orientation orientation enumeration pps panels elements while pps has more elements object o pps next element if o instanceof orientable orientable orientable orientable o orientable set orientation orientation setorientation setorientation setorientation hasmoreelements nextelement setorientation adds a property panel to the internal list this allows a plugin to add register a new property panel at run time this property panel will then be displayed in the detatils pane whenever an element of the given metaclass is selected param clazz the metaclass whose details show be displayed in the property panel p param panel an instance of the property panel for the metaclass m public void add panel class clazz prop panel panel panels put clazz panel addpanel proppanel accessors sets the target of the property panel the given target t may either be a diagram or a modelelement if the target given is a fig a check is made if the fig has an owning modelelement and occurs on the current diagram if so that modelelement is the target deprecated as of argo uml version 0 13 5 the visibility of this method will change in the future replaced by link org argouml ui targetmanager target manager todo mvw i think this should not be deprecated param target the new target see org argouml ui tab target set target java lang object deprecated public void set target object target targets ought to be uml objects or diagrams log info set target there are target manager get instance get targets size targets target target instanceof fig fig target get owner target if target null model get facade isauml element target target instanceof argo diagram todo improve extensibility of this target instanceof critic target null if last panel null remove last panel if last panel instanceof target listener remove target listener target listener last panel todo no need to do anything if we re not visible if is visible return this target target if target null add blank panel border layout center validate repaint last panel blank panel else tab model target new panel null new panel find panel for target if new panel null add target listener new panel if new panel instanceof j panel add j panel new panel border layout center last panel j panel new panel else add blank panel border layout center validate repaint last panel blank panel argouml targetmanager tabtarget settarget settarget settarget targetmanager getinstance gettargets getowner getfacade isaumlelement argodiagram lastpanel lastpanel lastpanel targetlistener removetargetlistener targetlistener lastpanel isvisible blankpanel borderlayout lastpanel blankpanel tabmodeltarget newpanel newpanel findpanelfor newpanel addtargetlistener newpanel newpanel jpanel jpanel newpanel borderlayout lastpanel jpanel newpanel blankpanel borderlayout lastpanel blankpanel see org argouml ui tab target refresh public void refresh set target target manager get instance get target tabtarget settarget targetmanager getinstance gettarget find the correct properties panel for the target param trgt the target class return the tab panel private tab model target find panel for object trgt todo no test coverage for this or create prop panel tfm 1st attempt get a panel that we created before tab model target panel panels get trgt get class if panel null if log is debug enabled log debug getting prop panel for trgt get class get name found in cache panel return panel 2nd attempt if we didn t find the panel then use the factory to create a new one panel create prop panel trgt if panel null log debug factory created panel get class get name for trgt get class get name panels put trgt get class panel return panel log error failed to create a prop panel for trgt return null tabmodeltarget findpanelfor createproppanel tabmodeltarget getclass isdebugenabled getclass getname createproppanel getclass getname getclass getname getclass a factory method to create a prop panel for a particular target diagram uml element or gef fig param target object the target object return a new prop panel to display any model element of the given type private tab model target create prop panel object target object tab model target prop panel null for prop panel factory factory prop panel factory manager get factories prop panel factory create prop panel target object if prop panel null return prop panel this does not work anymore yet since we never have a fig text here if target object instanceof fig text prop panel new prop panel string if prop panel instanceof orientable orientable prop panel set orientation get orientation todo we shouldn t need this as well as the above if prop panel instanceof prop panel prop panel prop panel set orientation get orientation return prop panel proppanel targetobject tabmodeltarget createproppanel targetobject tabmodeltarget proppanel proppanelfactory proppanelfactorymanager getfactories proppanel createproppanel targetobject proppanel proppanel figtext targetobject figtext proppanel proppanelstring proppanel proppanel setorientation getorientation proppanel proppanel proppanel proppanel setorientation getorientation proppanel return the name protected string get class base name return panel class base name getclassbasename panelclassbasename returns the current target deprecated as of argo uml version 0 13 5 the visibility of this method will change in the future replaced by link org argouml ui targetmanager target manager get target target manager get instance get target todo mvw i think this should not be deprecated return the target see org argouml ui tab target get target deprecated public object get target return target argouml targetmanager gettarget targetmanager getinstance gettarget tabtarget gettarget gettarget determines if the property panel should be enabled the property panel should always be enabled if the target is an instance of a modelelement or an argodiagram if the target given is a fig a check is made if the fig has an owning modelelement and occurs on the current diagram if so that modelelement is the target param target the target return true if property panel should be enabled see org argouml ui tab target should be enabled object public boolean should be enabled object target if target instanceof fig target fig target get owner todo this should be more extensible may be only find panel for target if there is a panel why not show it return target instanceof diagram model get facade isauml element target target instanceof critic find panel for target null tabtarget shouldbeenabled shouldbeenabled getowner findpanelfor getfacade isaumlelement findpanelfor public void target added target event target event set target target manager get instance get single target fire target added target event if listener list get listener count 0 validate repaint targetadded targetevent targetevent settarget targetmanager getinstance getsingletarget firetargetadded targetevent listenerlist getlistenercount public void target removed target event target event set target target manager get instance get single target fire target removed target event validate repaint targetremoved targetevent targetevent settarget targetmanager getinstance getsingletarget firetargetremoved targetevent public void target set target event target event set target target manager get instance get single target fire target set target event validate repaint targetset targetevent targetevent settarget targetmanager getinstance getsingletarget firetargetset targetevent adds a listener param listener the listener to add private void add target listener target listener listener listener list add target listener class listener addtargetlistener targetlistener listenerlist targetlistener removes a target listener param listener the listener to remove private void remove target listener target listener listener listener list remove target listener class listener removetargetlistener targetlistener listenerlist targetlistener private void fire target set target event target event guaranteed to return a non null array object listeners listener list get listener list for int i listeners length 2 i 0 i 2 if listeners i target listener class lazily create the event target listener listeners i 1 target set target event firetargetset targetevent targetevent listenerlist getlistenerlist targetlistener targetlistener targetset targetevent private void fire target added target event target event guaranteed to return a non null array object listeners listener list get listener list for int i listeners length 2 i 0 i 2 if listeners i target listener class lazily create the event target listener listeners i 1 target added target event firetargetadded targetevent targetevent listenerlist getlistenerlist targetlistener targetlistener targetadded targetevent private void fire target removed target event target event guaranteed to return a non null array object listeners listener list get listener list for int i listeners length 2 i 0 i 2 if listeners i target listener class lazily create the event target listener listeners i 1 target removed target event firetargetremoved targetevent targetevent listenerlist getlistenerlist targetlistener targetlistener targetremoved targetevent constructor for action new final state protected action new submachine state super put value action name translator localize button new submachinestate actionnewfinalstate actionnewsubmachinestate putvalue see java awt event action listener action performed java awt event action event public void action performed action event e super action performed e model get state machines factory build submachine state get target actionlistener actionperformed actionevent actionperformed actionevent actionperformed getstatemachinesfactory buildsubmachinestate gettarget return returns the singleton public static action new submachine state get instance return singleton actionnewsubmachinestate getinstance the constructor public cr circular composition setup head and desc add supported decision uml decision containment set knowledge types critic kt syntax set priority to do item low priority no good trigger crcircularcomposition setupheadanddesc addsupporteddecision umldecision setknowledgetypes kt_syntax setpriority todoitem low_priority public boolean predicate2 object dm designer dsgr if model get facade isa classifier dm return no problem list set reach new list set dm reachable gen composite classes2 get instance if reach contains dm return problem found return no problem getfacade isaclassifier no_problem listset listset gencompositeclasses2 getinstance problem_found no_problem public to do item to do item object dm designer dsgr list set offs compute offenders dm return new uml to do item this offs dsgr todoitem todoitem listset computeoffenders umltodoitem param dm is the uml entity that is being checked return the list of offenders protected list set compute offenders object dm list set offs new list set dm list set above offs reachable gen composite classes2 get instance for object cls2 above list set trans new list set cls2 reachable gen composite classes2 get instance if trans contains dm offs add cls2 return offs listset computeoffenders listset listset listset gencompositeclasses2 getinstance listset listset gencompositeclasses2 getinstance public boolean still valid to do item i designer dsgr if is active return false list set offs i get offenders object dm offs get 0 if predicate dm dsgr return false list set new offs compute offenders dm boolean res offs equals new offs log debug offs offs to string new offs new offs to string res res return res stillvalid todoitem isactive listset getoffenders listset newoffs computeoffenders newoffs tostring newoffs newoffs tostring see org argouml cognitive critics critic get wizard class org argouml cognitive to do item public class get wizard class to do item item return wiz break circular comp class getwizardclass todoitem getwizardclass todoitem wizbreakcircularcomp public set object get criticized design materials set object ret new hash set object ret add model get meta types getuml class return ret getcriticizeddesignmaterials hashset getmetatypes getumlclass the constructor param operation the operation that is represented public operation notation uml object operation super operation operationnotationuml public void parse object model element string text try parse operation fig model get facade get owner model element model element text catch parse exception pe string msg statusmsg bar error parsing operation object args pe get localized message integer value of pe get error offset argo event pump fire event new argo help event argo event types help changed this translator message format msg args modelelement parseoperationfig getfacade getowner modelelement modelelement parseexception getlocalizedmessage valueof geterroroffset argoeventpump fireevent argohelpevent argoeventtypes help_changed messageformat parse a string representing one ore more separated operations the case that a string or char contains a e g in an initializer is handled but not other occurences of param classifier classifier the classifier the operation s belong to param operation operation the operation on which the editing happened param text the string to parse throws parse exception for invalid input public void parse operation fig object classifier object operation string text throws parse exception if classifier null operation null return parse exception pex null int start 0 int end notation utility uml index of next checked semicolon text start project current project project manager get manager get current project if end 1 no text remove op current project move to trash operation return string s text substring start end trim if s length 0 no non whitechars in text remove op current project move to trash operation return parse operation s operation int i model get facade get features classifier index of operation check for more operations separated start end 1 end notation utility uml index of next checked semicolon text start while end start end text length s text substring start end trim if s length 0 yes there are more object return type current project get default return type object new op model get core factory build operation classifier return type if new op null try parse operation s new op new op set owner scope op get owner scope not needed in case of operation if i 1 model get core helper add feature classifier i new op else model get core helper add feature classifier new op catch parse exception ex if pex null pex ex start end 1 end notation utility uml index of next checked semicolon text start if pex null throw pex parseexception parseoperationfig parseexception parseexception notationutilityuml indexofnextcheckedsemicolon currentproject projectmanager getmanager getcurrentproject currentproject movetotrash currentproject movetotrash parseoperation getfacade getfeatures indexof notationutilityuml indexofnextcheckedsemicolon returntype currentproject getdefaultreturntype newop getcorefactory buildoperation returntype newop parseoperation newop newop setownerscope getownerscope getcorehelper addfeature newop getcorehelper addfeature newop parseexception notationutilityuml indexofnextcheckedsemicolon parse a line of text and aligns the operation to the specification given the line should be on the following form ul li visibility name parameter list return type expression property string ul all elements are optional and if left unspecified will preserve their old values p em stereotypes em can be given between any element in the line on the form lt lt stereotype1 stereotype2 stereotype3 gt gt p the following properties are recognized to have special meaning abstract concurrency concurrent guarded leaf query root and sequential p this syntax is compatible with the uml 1 3 spec p formerly visibility name parameter list return type expression property string formerly 2nd visibility keywords returntype name params param s the string to parse param op the operation to adjust to the specification in s throws parse exception when it detects an error in the attribute string see also parse error get error offset public void parse operation string s object op throws parse exception my tokenizer st boolean has colon false string name null string parameterlist null string builder stereotype null string token string type null string visibility null list string properties null int param offset 0 s s trim if s length 0 notation utility uml visibilitychars index of s char at 0 0 visibility s substring 0 1 s s substring 1 try st new my tokenizer s t u00ab u00bb notation utility uml operation custom sep while st has more tokens token st next token if equals token t equals token equals token continue do nothing else if equals token u00ab equals token if stereotype null parse error operation stereotypes st get token index stereotype new string builder while true token st next token if equals token u00bb equals token break stereotype append token else if equals token properties token open brace st properties else if equals token has colon true else if equals token parse error operation default values st get token index else if token char at 0 has colon if parameterlist null parse error operation two parameter lists st get token index parameterlist token else if has colon if type null parse error operation two types st get token index if token length 0 token char at 0 token char at 0 parse error operation type quoted st get token index if token length 0 token char at 0 parse error operation type expr st get token index type token else if name null visibility null parse error operation extra text st get token index if token length 0 token char at 0 token char at 0 parse error operation name quoted st get token index if token length 0 token char at 0 parse error operation name expr st get token index if name null visibility null token length 1 notation utility uml visibilitychars index of token char at 0 0 visibility token substring 0 1 token token substring 1 if name null visibility name name token else name token end while loop catch no such element exception nsee parse error operation unexpected end operation s length catch parse exception pre throw pre if parameterlist null parameterlist is guaranteed to contain at least if parameterlist char at parameterlist length 1 parse error operation parameter list incomplete param offset parameterlist length 1 param offset parameterlist parameterlist substring 1 parameterlist length 1 notation utility uml parse param list op parameterlist param offset if visibility null model get core helper set visibility op notation utility uml get visibility visibility trim if name null model get core helper set name op name trim else if model get facade get name op null equals model get facade get name op model get core helper set name op anonymous if type null object ow model get facade get owner op object ns null if ow null model get facade get namespace ow null ns model get facade get namespace ow else ns model get facade get model op object mtype notation utility uml get type type trim ns set return parameter op mtype if properties null notation utility uml set properties op properties notation utility uml operation special strings don t create a stereotype for signal on a reception but create any other parsed stereotypes as needed if model get facade isa reception op reception keyword equals stereotype to string stereotype utility deal with stereotypes op stereotype true parseexception parseerror geterroroffset parseoperation parseexception mytokenizer hascolon stringbuilder paramoffset notationutilityuml indexof charat mytokenizer notationutilityuml operationcustomsep hasmoretokens nexttoken parseerror gettokenindex stringbuilder nexttoken tokenopenbrace hascolon parseerror gettokenindex charat hascolon parseerror gettokenindex hascolon parseerror gettokenindex charat charat parseerror gettokenindex charat parseerror gettokenindex parseerror gettokenindex charat charat parseerror gettokenindex charat parseerror gettokenindex notationutilityuml indexof charat nosuchelementexception parseerror parseexception charat parseerror paramoffset paramoffset notationutilityuml parseparamlist paramoffset getcorehelper setvisibility notationutilityuml getvisibility getcorehelper setname getfacade getname getfacade getname getcorehelper setname getfacade getowner getfacade getnamespace getfacade getnamespace getfacade getmodel notationutilityuml gettype setreturnparameter notationutilityuml setproperties notationutilityuml operationspecialstrings getfacade isareception reception_keyword tostring stereotypeutility dealwithstereotypes convenience method to signal a parser error param message string containing error message literal it will be appended to the base parser error and localized param offset offset to where error occurred throws parse exception private void parse error string message int offset throws parse exception throw new parse exception translator localize parsing error message offset parseexception parseerror parseexception parseexception parse tokens following an open brace properties param st tokenizer being used param properties current properties list return updated list of properties throws parse exception private list string token open brace my tokenizer st list string properties throws parse exception string token string builder propname new string builder string propvalue null if properties null properties new array list string while true token st next token if equals token equals token if propname length 0 properties add propname to string properties add propvalue propname new string builder propvalue null if equals token break else if equals token if propvalue null string msg parsing error operation prop stereotypes object args propname throw new parse exception translator localize msg args st get token index propvalue else if propvalue null propname append token else propvalue token if propname length 0 properties add propname to string properties add propvalue return properties parseexception tokenopenbrace mytokenizer parseexception stringbuilder stringbuilder arraylist nexttoken tostring stringbuilder parseexception gettokenindex tostring sets the return parameter of op to be of type type if there is none one is created if there are many all but one are removed param op the operation param type the type of the return parameter private void set return parameter object op object type object param null iterator it model get facade get parameters op iterator while it has next object p it next if model get facade is return p param p break while it has next object p it next if model get facade is return p project manager get manager get current project move to trash p if param null object return type project manager get manager get current project get default return type param model get core factory build parameter op return type model get core helper set type param type setreturnparameter getfacade getparameters hasnext getfacade isreturn hasnext getfacade isreturn projectmanager getmanager getcurrentproject movetotrash returntype projectmanager getmanager getcurrentproject getdefaultreturntype getcorefactory buildparameter returntype getcorehelper settype see org argouml notation providers notation provider get parsing help public string get parsing help return parsing help operation notationprovider getparsinghelp getparsinghelp generate an operation according to the uml notation pre stereotype visibility name parameter list return type expression property string pre for the return type expression only the types of the return parameters are shown depending on settings in notation visibility and properties are shown not shown param model element uml operation element param settings notation settings return a formatted text string see org argouml notation notation provider to string java lang object org argouml notation notation settings public string to string object model element notation settings settings return to string model element settings is use guillemets settings is show visibilities settings is show types settings is show properties modelelement notationprovider tostring notationsettings tostring modelelement notationsettings tostring modelelement isuseguillemets isshowvisibilities isshowtypes isshowproperties generate an operation according to the uml notation pre stereotype visibility name parameter list return type expression property string pre for the return type expression only the types of the return parameters are shown depending on settings in notation visibility and properties are shown not shown author jaap branderhorst xs4all nl inherit doc see org argouml notation notation provider to string java lang object java util map deprecated for 0 27 3 by tfmorris use link to string object notation settings suppress warnings deprecation deprecated public string to string object model element map args project p project manager get manager get current project project settings ps p get project settings return to string model element ps get use guillemots value ps get show visibility value ps get show types value ps get show properties value inheritdoc notationprovider tostring tostring notationsettings suppresswarnings tostring modelelement projectmanager getmanager getcurrentproject projectsettings getprojectsettings tostring modelelement getuseguillemotsvalue getshowvisibilityvalue getshowtypesvalue getshowpropertiesvalue generate an operation according to the uml notation pre stereotype visibility name parameter list return type expression property string pre for the return type expression only the types of the return parameters are shown depending on settings in notation visibility and properties are shown not shown author jaap branderhorst xs4all nl private string to string object model element boolean use guillemets boolean show visibility boolean show types boolean show properties try string stereo str notation utility uml generate stereotype model get facade get stereotypes model element use guillemets boolean is reception model get facade isa reception model element todo needs i18n if is reception stereo str notation utility uml generate stereotype reception keyword use guillemets stereo str unused currently string buffer tagged values sb get tagged values model element lets concatenate it to the resulting string gen str string buffer gen str new string buffer 30 if stereo str null stereo str length 0 gen str append stereo str append if show visibility string vis str notation utility uml generate visibility2 model element if vis str null gen str append vis str string name str model get facade get name model element if name str null name str length 0 gen str append name str the show types defaults to true to stay compatible with older argouml versions that did not have this setting if show types the parameters string buffer parameter str new string buffer parameter str append append get parameter list model element append the returnparameters string buffer return paras sb get return parameters model element is reception gen str append parameter str append if return paras sb null return paras sb length 0 gen str append return paras sb append else gen str append if show properties string buffer property sb get properties model element is reception if property sb length 0 gen str append property sb return gen str to string trim catch invalid element exception e the model element was deleted while we were working on it return tostring modelelement useguillemets showvisibility showtypes showproperties stereostr notationutilityuml generatestereotype getfacade getstereotypes modelelement useguillemets isreception getfacade isareception modelelement isreception stereostr notationutilityuml generatestereotype reception_keyword useguillemets stereostr stringbuffer taggedvaluessb gettaggedvalues modelelement genstr stringbuffer genstr stringbuffer stereostr stereostr genstr stereostr showvisibility visstr notationutilityuml generatevisibility2 modelelement visstr genstr visstr namestr getfacade getname modelelement namestr namestr genstr namestr showtypes stringbuffer parameterstr stringbuffer parameterstr getparameterlist modelelement stringbuffer returnparassb getreturnparameters modelelement isreception genstr parameterstr returnparassb returnparassb genstr returnparassb genstr showproperties stringbuffer propertysb getproperties modelelement isreception propertysb genstr propertysb genstr tostring invalidelementexception private string buffer get parameter list object model element string buffer parameter list buffer new string buffer collection coll model get facade get parameters model element iterator it coll iterator int counter 0 while it has next object parameter it next if model get facade has return parameter direction kind parameter counter parameter list buffer append notation utility uml generate parameter parameter parameter list buffer append if counter 0 parameter list buffer delete parameter list buffer length 1 parameter list buffer length return parameter list buffer stringbuffer getparameterlist modelelement stringbuffer parameterlistbuffer stringbuffer getfacade getparameters modelelement hasnext getfacade hasreturnparameterdirectionkind parameterlistbuffer notationutilityuml generateparameter parameterlistbuffer parameterlistbuffer parameterlistbuffer parameterlistbuffer parameterlistbuffer private string buffer get return parameters object model element boolean is reception string buffer return paras sb new string buffer if is reception collection coll model get core helper get return parameters model element if coll null coll size 0 return paras sb append iterator it2 coll iterator while it2 has next object type model get facade get type it2 next if type null return paras sb append model get facade get name type return paras sb append if we have only one return value and without type the return param string is we remove it if return paras sb length 3 return paras sb delete 0 return paras sb length else we remove only the extra else return paras sb delete return paras sb length 1 return paras sb length return return paras sb stringbuffer getreturnparameters modelelement isreception stringbuffer returnparassb stringbuffer isreception getcorehelper getreturnparameters modelelement returnparassb hasnext getfacade gettype returnparassb getfacade getname returnparassb returnparassb returnparassb returnparassb returnparassb returnparassb returnparassb returnparassb private string buffer get properties object model element boolean is reception string buffer property sb new string buffer append the query state if model get facade is query model element property sb append query although operation and signal are peers in the uml type hierarchy they share the attributes is root is leaf is abstract and specification concurrency is not shared and is specific to operation if model get facade is root model element property sb append root if model get facade is leaf model element property sb append leaf if is reception if model get facade get concurrency model element null property sb append model get facade get name model get facade get concurrency model element property sb append if property sb length 1 property sb delete property sb length 1 property sb length remove last property sb append else property sb new string buffer return property sb stringbuffer getproperties modelelement isreception stringbuffer propertysb stringbuffer getfacade isquery modelelement propertysb isroot isleaf isabstract getfacade isroot modelelement propertysb getfacade isleaf modelelement propertysb isreception getfacade getconcurrency modelelement propertysb getfacade getname getfacade getconcurrency modelelement propertysb propertysb propertysb propertysb propertysb propertysb propertysb stringbuffer propertysb private string buffer get tagged values object model element string buffer tagged values sb new string buffer iterator it3 model get facade get tagged values model element if it3 null it3 has next while it3 has next tagged values sb append notation utility uml generate tagged value it3 next tagged values sb append tagged values sb delete tagged values sb length 1 tagged values sb length return tagged values sb stringbuffer gettaggedvalues modelelement stringbuffer taggedvaluessb stringbuffer getfacade gettaggedvalues modelelement hasnext hasnext taggedvaluessb notationutilityuml generatetaggedvalue taggedvaluessb taggedvaluessb taggedvaluessb taggedvaluessb taggedvaluessb construct a default property panel for an action state public prop panel action state this label action state lookup icon action state proppanelactionstate lookupicon actionstate construct a property panel for an action state with the given params param name the name of the properties panel param icon the icon to be shown next to the name public prop panel action state string name image icon icon super name icon add field translator localize label name get name text field add field translator localize label container get container scroll add field translator localize label entry get entry scroll add field translator localize label deferrable get deferrable events scroll add separator add field translator localize label incoming get incoming scroll add field translator localize label outgoing get outgoing scroll proppanelactionstate imageicon addfield getnametextfield addfield getcontainerscroll addfield getentryscroll addfield getdeferrableeventsscroll addseparator addfield getincomingscroll addfield getoutgoingscroll constructs a new argoj menu with the key to localize param key the key to localize public argoj menu string key super localize this key argojmenu argojmenu sets a menu item s text and mnemonic values using the specified resource key param menu item the menu or menu item to localize param key the resource string to find public static final void localize j menu item menu item string key menu item set text translator localize key string local mnemonic translator localize key mnemonic if local mnemonic null local mnemonic length 1 menu item set mnemonic local mnemonic char at 0 menuitem jmenuitem menuitem menuitem settext localmnemonic localmnemonic localmnemonic menuitem setmnemonic localmnemonic charat creates a new checkbox menu item attached to the specified action object and appends it to the end of this menu param a the action for the checkbox menu item to be added return the new checkbox menu item public j check box menu item add check item action a string name string a get value action name icon icon icon a get value action small icon block added by bob tarling 8 jan 2002 set the checkbox on or off according to the selected value of the action if no selected value is found then this defaults to true in order to remain compatible with previous versions of this code boolean selected boolean a get value selected j check box menu item mi new j check box menu item name icon selected null selected boolean value end of block mi set horizontal text position swing constants right mi set vertical text position swing constants center mi set enabled a is enabled mi add action listener a add mi a add property change listener create action change listener mi return mi jcheckboxmenuitem addcheckitem getvalue getvalue small_icon bobtarling getvalue jcheckboxmenuitem jcheckboxmenuitem booleanvalue sethorizontaltextposition swingconstants setverticaltextposition swingconstants setenabled isenabled addactionlistener addpropertychangelistener createactionchangelistener creates a new radiobutton menu item attached to the specified action object and appends it to the end of this menu param a the action for the radiobutton menu item to be added return the new radiobutton menu item public j radio button menu item add radio item action a string name string a get value action name icon icon icon a get value action small icon set the checkbox on or off according to the selected value of the action if no selected value is found then this defaults to true boolean selected boolean a get value selected j radio button menu item mi new j radio button menu item name icon selected null selected boolean value mi set horizontal text position swing constants right mi set vertical text position swing constants center mi set enabled a is enabled mi add action listener a add mi a add property change listener create action change listener mi return mi jradiobuttonmenuitem addradioitem getvalue getvalue small_icon getvalue jradiobuttonmenuitem jradiobuttonmenuitem booleanvalue sethorizontaltextposition swingconstants setverticaltextposition swingconstants setenabled isenabled addactionlistener addpropertychangelistener createactionchangelistener constructor for action remove classifier role base protected action remove classifier role base super translator localize menu popup remove actionremoveclassifierrolebase actionremoveclassifierrolebase public void action performed action event e super action performed e model get collaborations helper remove base get target get object to remove actionperformed actionevent actionperformed getcollaborationshelper removebase gettarget getobjecttoremove return returns the singleton public static action remove classifier role base get instance return singleton actionremoveclassifierrolebase getinstance constructor for uml event parameter list model public uml event parameter list model super parameter umleventparameterlistmodel umleventparameterlistmodel see org argouml uml ui uml model element list model2 build model list protected void build model list set all elements m event get target get parameters set all elements model get facade get parameters get target umlmodelelementlistmodel2 buildmodellist buildmodellist setallelements mevent gettarget getparameters setallelements getfacade getparameters gettarget see org argouml uml ui uml model element list model2 is valid element object protected boolean is valid element object element return model get facade get parameters get target contains element umlmodelelementlistmodel2 isvalidelement isvalidelement getfacade getparameters gettarget the constructor param multiplicity owner the uml element that has a multiplicity public multiplicity notation object multiplicity owner if this fails then there is a problem dthompson 29 12 2008 it seems that the returned value is irrelevant here so i assume that the purpose of this call is just to throw an exception in case of a problem model get facade get multiplicity multiplicity owner multiplicityowner multiplicitynotation multiplicityowner getfacade getmultiplicity multiplicityowner constructor for the critic p sets up the resource name which will allow headline and description to found for the current locale provides a design issue category containment a knowledge type semantics and add triggers for end aggregation p public cr multiple agg setup head and desc add supported decision uml decision containment set knowledge types critic kt semantics these may not actually make any difference at present the code behind add trigger needs more work add trigger end aggregation end_aggregation crmultipleagg setupheadanddesc addsupporteddecision umldecision setknowledgetypes kt_semantics addtrigger addtrigger end_aggregation the trigger for the critic p check that the number of ends is two otherwise this should be handled by the critic for n way assocations see link org argouml uml cognitive critics crn way agg p we do not handle association roles which are a subclass of association an association role should be fine if its parent is ok since it must be more tightly constrained than its parent p em note em argouml does not currently have a constructor to check that an association role is more tightly constrained than its parent p then loop through the ends counting the number of aggregate ends note that we look for aggregation explicitly rather than just absence of no aggregation so we don t trigger if the aggregation is just undefined p param dm the link java lang object object to be checked against the critic param dsgr the link org argouml cognitive designer designer creating the model not used this is for future development of argouml return link problem found problem found if the critic is triggered otherwise link no problem no problem public boolean predicate2 object dm designer dsgr only for associations if model get facade isa association dm return no problem get the assocations and connections no problem there is a separate critic if this is not a binary association or is an association role object asc m association dm if model get facade isa association role asc return no problem collection conns model get facade get connections asc if conns null conns size 2 return no problem loop through the associations counting the ends with aggregations int agg count 0 iterator assoc ends conns iterator while assoc ends has next object ae m association end assoc ends next if model get facade is aggregate ae model get facade is composite ae agg count a problem if we found more than 1 aggregation if agg count 1 return problem found else return no problem crnwayagg problem_found problem_found no_problem no_problem getfacade isaassociation no_problem massociation getfacade isaassociationrole no_problem getfacade getconnections no_problem aggcount assocends assocends hasnext massociationend assocends getfacade isaggregate getfacade iscomposite aggcount aggcount problem_found no_problem find the class which will handle the wizard behaviour p param item the link to do item that triggered the critic return link class of the wizard public class get wizard class to do item item return wiz assoc composite class todoitem getwizardclass todoitem wizassoccomposite public set object get criticized design materials set object ret new hash set object ret add model get meta types get association class return ret getcriticizeddesignmaterials hashset getmetatypes getassociationclass param et reported by this event param src object that caused the event public argo profile event int et object src super et src argoprofileevent indicates the start of the 100 digit range for profile events return the first id reserved for events public final class mode create permission extends mode create dependency protected final object get meta type return model get meta types get package import modecreatepermission modecreatedependency getmetatype getmetatypes getpackageimport see javax swing tree tree model get child java lang object int public object get child object parent int index return get children list parent get index treemodel getchild getchild getchildrenlist see javax swing tree tree model get child count java lang object public int get child count object parent return get children list parent size treemodel getchildcount getchildcount getchildrenlist java lang object java lang object public int get index of child object parent object child return get children list parent index of child getindexofchild getchildrenlist indexof public boolean is leaf object node if node instanceof to do list return false if get child count node 0 return false return true isleaf todolist getchildcount get the children of the given parent unlike get children this never returns null instead returning an empty list if there are no children param parent the parent object to check for offspring return the children public list get children list object parent list set all posters designer the designer get to do list get posters if parent instanceof to do list return all posters otherwise parent must be an offending design material if all posters contains parent list to do item result new array list to do item list to do item item list designer the designer get to do list get to do item list synchronized item list for to do item item item list poster post item get poster if post parent result add item return result return collections empty list getchildren getchildrenlist listset allposters thedesigner gettodolist getposters todolist allposters allposters todoitem arraylist todoitem todoitem itemlist thedesigner gettodolist gettodoitemlist itemlist todoitem itemlist getposter emptylist javax swing tree tree path java lang object public void value for path changed tree path path object new value treepath valueforpathchanged treepath newvalue see javax swing tree tree model add tree model listener javax swing event tree model listener public void add tree model listener tree model listener l treemodel addtreemodellistener treemodellistener addtreemodellistener treemodellistener see javax swing tree tree model remove tree model listener javax swing event tree model listener public void remove tree model listener tree model listener l treemodel removetreemodellistener treemodellistener removetreemodellistener treemodellistener sets the label renderer line style angled enable tooltips sets row height to 18 pixels public display text tree super mvw we should use default font sizes as much as possible btw this impacts only the width and reduces readibility set font look and feel mgr get instance get small font set cell renderer new uml tree cell renderer set root visible false set shows root handles true this enables tooltips for tree this one won t be shown set tool tip text tree the default 16 puts the icons too close together set row height 18 expanded paths in model new hashtable tree model list tree path reexpanding false displaytexttree setfont lookandfeelmgr getinstance getsmallfont setcellrenderer umltreecellrenderer setrootvisible setshowsroothandles settooltiptext setrowheight expandedpathsinmodel treemodel treepath override the default j tree implementation to display the appropriate text for any object that will be displayed in the todo list p this is used for the todo list as well as the explorer list param value the given object param selected ignored param expanded ignored param leaf ignored param row ignored param has focus ignored return the value converted to text see javax swing j tree convert value to text java lang object boolean boolean boolean int boolean public string convert value to text object value boolean selected boolean expanded boolean leaf int row boolean has focus if value instanceof to do item return to do item value get headline if value instanceof to do list todo localize return to do list if model get facade isa model element value string name null try if model get facade isa transition value name format transition label value else if model get facade isa extension point value name format extension point value else if model get facade isa comment value name string model get facade get body value else if model get facade isa tagged value value name format tagged value label value else name get model element display name value if the name is too long or multi line e g for comments then we reduce to the first line or 80 chars todo localize if name null name index of n 80 name index of n 1 name name substring 0 name index of n else if name null name length 80 name name substring 0 80 look for stereotype if show stereotype collection object stereos model get facade get stereotypes value name generate stereotype stereos if name null name length 80 name name substring 0 80 catch invalid element exception e name translator localize misc name deleted return name todo this duplicates code in facade to string but this version is localized so we ll leave it for now if model get facade isa element import value try object me model get facade get imported element value string type name model get facade getuml class name me string elem name convert value to text me selected expanded leaf row has focus string alias model get facade get alias value if alias null alias length 0 object args type name elem name alias return translator localize misc name element import alias args else object args type name elem name return translator localize misc name element import args catch invalid element exception e return translator localize misc name deleted use default formatting for any other type of uml element if model get facade isauml element value try return model get facade to string value catch invalid element exception e return translator localize misc name deleted if value instanceof argo diagram return argo diagram value get name if value null return value to string return jtree hasfocus jtree convertvaluetotext convertvaluetotext hasfocus todoitem todoitem getheadline todolist todolist getfacade isamodelelement getfacade isatransition formattransitionlabel getfacade isaextensionpoint formatextensionpoint getfacade isacomment getfacade getbody getfacade isataggedvalue formattaggedvaluelabel getmodelelementdisplayname indexof indexof indexof showstereotype getfacade getstereotypes generatestereotype invalidelementexception tostring getfacade isaelementimport getfacade getimportedelement typename getfacade getumlclassname elemname convertvaluetotext hasfocus getfacade getalias typename elemname typename elemname invalidelementexception getfacade isaumlelement getfacade tostring invalidelementexception argodiagram argodiagram getname tostring private string format extension point object value notation settings settings get notation settings notation provider notation provider notation provider factory2 get instance get notation provider notation provider factory2 type extension point value notation find notation settings get notation language string name notation provider to string value settings return name formatextensionpoint notationsettings getnotationsettings notationprovider notationprovider notationproviderfactory2 getinstance getnotationprovider notationproviderfactory2 type_extension_point findnotation getnotationlanguage notationprovider tostring private static notation settings get notation settings project p project manager get manager get current project notation settings settings if p null settings p get project settings get notation settings else settings notation settings get default settings return settings notationsettings getnotationsettings projectmanager getmanager getcurrentproject notationsettings getprojectsettings getnotationsettings notationsettings getdefaultsettings private string format tagged value label object value string name string tag name model get facade get tag value if tag name null tag name equals name message format format translator localize misc unnamed new object model get facade getuml class name value collection reference values model get facade get reference value value collection data values model get facade get data value value iterator i if reference values size 0 i reference values iterator else i data values iterator string the value if i has next the value i next to string if i has next the value name tag name the value return name formattaggedvaluelabel tagname getfacade gettag tagname tagname messageformat getfacade getumlclassname referencevalues getfacade getreferencevalue datavalues getfacade getdatavalue referencevalues referencevalues datavalues thevalue hasnext thevalue tostring hasnext thevalue tagname thevalue private string format transition label object value string name name model get facade get name value notation provider notation provider notation provider factory2 get instance get notation provider notation provider factory2 type transition value string signature notation provider to string value notation settings get default settings if name null name length 0 name signature else name signature return name formattransitionlabel getfacade getname notationprovider notationprovider notationproviderfactory2 getinstance getnotationprovider notationproviderfactory2 type_transition notationprovider tostring notationsettings getdefaultsettings param st a collection of stereotypes return a string representing the given stereotype s public static string generate stereotype collection object st return notation utility uml generate stereotype st get notation settings is use guillemets generatestereotype notationutilityuml generatestereotype getnotationsettings isuseguillemets public static final string get model element display name object model element string name model get facade get name model element if name null name equals name message format format translator localize misc unnamed new object model get facade getuml class name model element return name getmodelelementdisplayname modelelement getfacade getname modelelement messageformat getfacade getumlclassname modelelement tree model expansion notification p param path a tree node insertion event public void fire tree expanded tree path path super fire tree expanded path log debug fire tree expanded if reexpanding path null return list tree path expanded get expanded paths expanded remove path expanded add path firetreeexpanded treepath firetreeexpanded firetreeexpanded treepath getexpandedpaths public void fire tree collapsed tree path path super fire tree collapsed path log debug fire tree collapsed if path null expanded paths in model null return list tree path expanded get expanded paths expanded remove path firetreecollapsed treepath firetreecollapsed firetreecollapsed expandedpathsinmodel treepath getexpandedpaths public void set model tree model new model log debug set model object r new model get root if r null super set model new model reexpand setmodel treemodel newmodel setmodel newmodel getroot setmodel newmodel called in reexpand return a list containing all expanded paths protected list tree path get expanded paths log debug get expanded paths tree model tm get model list tree path res expanded paths in model get tm if res null res new array list tree path expanded paths in model put tm res return res treepath getexpandedpaths getexpandedpaths treemodel getmodel treepath expandedpathsinmodel arraylist treepath expandedpathsinmodel we re expand the ones that were open before to maintain the same viewable tree called by do force update set model private void reexpand log debug reexpand if expanded paths in model null return reexpanding true for tree path path get expanded paths expand path path reexpanding false doforceupdate setmodel expandedpathsinmodel treepath getexpandedpaths expandpath param show true if stereotypes have to be shown protected void set show stereotype boolean show this show stereotype show setshowstereotype showstereotype the constructor public action system info super translator localize action system information resource loader wrapper lookup icon action system information set the tooltip string put value action short description translator localize action system information actionsysteminfo resourceloaderwrapper lookupicon putvalue short_description public void action performed action event ae j frame j frame argo frame get instance system info dialog sys info dialog new system info dialog true dimension si dim sys info dialog get size dimension pb dim j frame get size if si dim width pb dim width 2 sys info dialog set size pb dim width 2 si dim height 45 else sys info dialog set size si dim width si dim height 45 sys info dialog set location relative to j frame sys info dialog set visible true actionperformed actionevent jframe jframe argoframe getinstance systeminfodialog sysinfodialog systeminfodialog sidim sysinfodialog getsize pbdim jframe getsize sidim pbdim sysinfodialog setsize pbdim sidim sysinfodialog setsize sidim sidim sysinfodialog setlocationrelativeto jframe sysinfodialog setvisible create a single component configuration key param k1 key component public configuration key impl string k1 key argo k1 configurationkeyimpl create a sub component of an existing configuration key param ck configuration key param k1 additional key component public configuration key impl configuration key ck string k1 key ck get key k1 configurationkeyimpl configurationkey getkey create a two component configuration key param k1 key component 1 param k2 key component 2 public configuration key impl string k1 string k2 key argo k1 k2 configurationkeyimpl create a three component configuration key param k1 key component 1 param k2 key component 2 param k3 key component 3 public configuration key impl string k1 string k2 string k3 key argo k1 k2 k3 configurationkeyimpl create a four component configuration key param k1 key component 1 param k2 key component 2 param k3 key component 3 param k4 key component 4 public configuration key impl string k1 string k2 string k3 string k4 key argo k1 k2 k3 k4 configurationkeyimpl create a five component configuration key param k1 key component 1 param k2 key component 2 param k3 key component 3 param k4 key component 4 param k5 key component 5 public configuration key impl string k1 string k2 string k3 string k4 string k5 key argo k1 k2 k3 k4 k5 configurationkeyimpl return the actual key used to access the configuration return the key public final string get key return key getkey compare the configuration key to a string param pce property change event to check return true if the changed property is for the key public boolean is changed property property change event pce if pce null return false return pce get property name equals key propertychangeevent ischangedproperty propertychangeevent getpropertyname returns a formatted key return a formatted key string public string to string return configuration key impl key tostring configurationkeyimpl the constructor p two figs are added to this fig group the big port i e a box that encloses all compartments and a separator param x x param y y param w width param h height deprecated for 0 27 3 by tfmorris use link fig editable compartment object rectangle diagram settings suppress warnings deprecation deprecated public fig editable compartment int x int y int w int h super x y w h this adds big port i e number 1 construct figs figgroup bigport figeditablecompartment diagramsettings suppresswarnings figeditablecompartment bigport constructfigs private void construct figs compartment seperator new fig seperator x0 y0 11 add fig compartment seperator number 2 constructfigs compartmentseperator figseperator addfig compartmentseperator construct a new fig group containing a big port or rectangle which encloses the entire group for use in attaching edges etc and a separator p note subclasses should call populate when they are fully constructed param owner owning uml element param bounds bounding rectangle of fig param settings render settings public fig editable compartment object owner rectangle bounds diagram settings settings super owner bounds settings this adds big port i e number 1 construct figs we d like to call populate here but our subclasses might not be completely built yet so we defer this to them figgroup bigport figeditablecompartment diagramsettings bigport constructfigs return separator figure protected fig seperator get seperator fig return compartment seperator figseperator getseperatorfig compartmentseperator if a boxed compartment is set to invisible then remove all its children this is to save on resources and increase efficiency as multiple figs need not exist and be resized moved etc if they are not visible if a compartment is later made visible then its child figs are rebuilt from the model inherit doc override public void set visible boolean visible if is visible visible return super set visible visible if visible populate else for int i get figs size 1 i 0 i fig f get fig at i if f instanceof compartment fig text remove fig f inheritdoc setvisible isvisible setvisible getfigs getfigat compartmentfigtext removefig override public void add fig fig fig if fig get big port fig instanceof compartment fig text fig instanceof fig seperator log error illegal fig added to a fig editable compartment throw new illegal argument exception a fig editable compartment can only contain compartment fig texts received a fig get class get name super add fig fig addfig getbigport compartmentfigtext figseperator figeditablecompartment illegalargumentexception figeditablecompartment compartmentfigtexts getclass getname addfig return the collection of uml objects on which this compartment is based return the type of the notation provider used to handle the text in the compartment notationprovider fills the fig by adding all figs within public void populate if is visible return fig big port this get big port int xpos big port getx int ypos big port gety list fig figs get element figs we remove all of them for fig f figs remove fig f we are going to add the ones still valid new ones in the right sequence fig single line text with notation comp null try int acounter 1 for object uml object get uml collection comp find compartment fig figs uml object acounter todo some of these magic numbers probably assume a line width of 1 replace with appropriate constants variables if we don t have a fig for this uml object we ll need to add one we set the bounds but they will be reset later if comp null comp create fig text uml object new rectangle xpos 1 line width ypos 1 line width acounter rowheight 0 rowheight 2 2 line width get settings else this one is still usable so let s retain it but its position may have been changed rectangle b comp get bounds b y ypos 1 line width acounter rowheight bounds not relevant here but i am perfectionist comp set bounds b we need to set a new notationprovider since the notation language may have been changed comp init notation providers add fig comp add it again but now in the right sequence now put the text in we must handle the case where the text is null string ft text comp get notation provider to string uml object comp get notation settings if ft text null ft text comp set text ft text comp set bot margin 0 catch invalid element exception e todo it would be better here to continue the loop and try to build the rest of the compartment hence try catch should be internal to the loop log debug attempted to populate a fig editable compartment using a deleted model element aborting e if comp null comp set bot margin 6 the last one needs extra space below it isvisible bigport getbigport bigport bigport getelementfigs removefig figsinglelinetextwithnotation umlobject getumlcollection findcompartmentfig umlobject createfigtext umlobject line_width line_width line_width getsettings getbounds line_width setbounds initnotationproviders addfig fttext getnotationprovider tostring umlobject getnotationsettings fttext fttext settext fttext setbotmargin invalidelementexception figeditablecompartment setbotmargin find the compartment fig for this uml object private compartment fig text find compartment fig list fig figs object uml object for fig fig figs if fig instanceof compartment fig text compartment fig text candidate compartment fig text fig if candidate get owner uml object return candidate return null umlobject compartmentfigtext findcompartmentfig umlobject compartmentfigtext compartmentfigtext compartmentfigtext getowner umlobject private list fig get element figs list fig figs new array list fig get figs todo this is fragile and depends on the behavior of the super class not changing if figs size 1 ignore the first 2 figs figs remove 1 the separator figs remove 0 the big port return figs getelementfigs arraylist getfigs bigport return null deprecated for 0 27 3 by tfmorris subclasses must implement link create fig text object rectangle diagram settings notation provider which will become abstract in the future when this deprecated method is removed deprecated protected fig single line text with notation create fig text int x int y int w int h fig a fig notation provider np no longer abstract to allow subclasses to remove so we provide a null default implementation return null createfigtext diagramsettings notationprovider figsinglelinetextwithnotation createfigtext afig notationprovider factory method to create a fig single line text with notation which must be implemented by all subclasses it will become abstract after the release of 0 28 to enforce this requirement param owner owning uml element param bounds position and size param settings render settings param np notation provider return a fig single line text which can be used to display the text suppress warnings deprecation protected fig single line text with notation create fig text object owner rectangle bounds suppress warnings unused diagram settings settings notation provider np if this is not overridden it will revert to the old behavior all internal subclasses have been updated but this if for compatibility of non argouml extensions fig single line text with notation comp create fig text bounds x bounds y bounds width bounds height this get big port np comp set owner owner return comp figsinglelinetextwithnotation figsinglelinetext suppresswarnings figsinglelinetextwithnotation createfigtext suppresswarnings diagramsettings notationprovider figsinglelinetextwithnotation createfigtext getbigport setowner param owner owning uml element param bounds position and size param settings the render settings return a fig single line text with notation provider which can be used to display the text abstract fig single line text with notation create fig text object owner rectangle bounds figsinglelinetext figsinglelinetextwithnotation createfigtext returns the new size of the fig group either attributes or operations after calculation new bounds for all sub figs considering their minimal sizes fig group need not be displayed no update event is fired p this method has side effects that are sometimes used param x x param y y param w w param h h return the new dimension public dimension update fig group size int x int y int w int h boolean check size int row height return get minimum size figgroup figgroup updatefiggroupsize checksize rowheight getminimumsize the minimum width is the minimum width of the widest child element the minimum height is the total minimum height of all child figs but no less than minimum height pixels return the minimum width override public dimension get minimum size dimension d super get minimum size if d height min height d height min height return d minimum_height getminimumsize getminimumsize min_height min_height override protected void set bounds impl int x int y int w int h int neww w int newh h int fw int yy y int line width get line width for fig fig list fig get figs if fig is visible fig get big port if fig instanceof fig seperator fw w else fw fig get minimum size width fig set bounds x line width yy line width fw fig get minimum size height if neww fw 2 line width neww fw 2 line width yy fig get minimum size height get big port set bounds x line width y line width neww 2 line width newh 2 line width calc bounds setboundsimpl linewidth getlinewidth getfigs isvisible getbigport figseperator getminimumsize setbounds linewidth linewidth getminimumsize linewidth linewidth getminimumsize getbigport setbounds linewidth linewidth linewidth linewidth calcbounds protected static class fig seperator extends fig line constructor todo the line width is set by the containing group so no need to do that here also param x coordinate param y coordinate param len length of the line fig seperator int x int y int len super x y x len 1 y line color set line width line width figseperator figline figseperator line_color setlinewidth line_width see org tigris gef presentation fig get size override public dimension get size return new dimension x2 x1 1 get line width getsize getsize _x2 _x1 getlinewidth see org tigris gef presentation fig get minimum size override public dimension get minimum size return new dimension 0 get line width getminimumsize getminimumsize getlinewidth override public void set bounds impl int x int y int w int h setx1 x sety1 y setx2 x w 1 sety2 y setboundsimpl constructor for uml generalizable element root check box public uml class active check box super translator localize checkbox active lc action set class active get instance is active umlgeneralizableelementrootcheckbox umlclassactivecheckbox actionsetclassactive getinstance isactive public void build model if get target null set selected model get facade is active get target buildmodel gettarget setselected getfacade isactive gettarget construct a default panel for rounded rectancular elements public style panel figr rect super document rounding doc rounding field get document rounding doc add document listener this rounding label set label for rounding field add rounding label add rounding field stylepanelfigrrect roundingdoc roundingfield getdocument roundingdoc adddocumentlistener roundinglabel setlabelfor roundingfield roundinglabel roundingfield public void refresh super refresh string rounding str figr rect get panel target get corner radius rounding field set text rounding str roundingstr figrrect getpaneltarget getcornerradius roundingfield settext roundingstr set the corner rounding protected void set target rounding if get panel target null return string rounding str rounding field get text if rounding str length 0 return int r integer parse int rounding str figr rect get panel target set corner radius r get panel target end trans settargetrounding getpaneltarget roundingstr roundingfield gettext roundingstr parseint roundingstr figrrect getpaneltarget setcornerradius getpaneltarget endtrans react to changes in the rounding field text box inherit doc public void insert update document event e document rounding doc rounding field get document if e get document rounding doc set target rounding super insert update e inheritdoc insertupdate documentevent roundingdoc roundingfield getdocument getdocument roundingdoc settargetrounding insertupdate constructor for action new pseudo state public action new pseudo state super put value action name translator localize button new pseudostate actionnewpseudostate actionnewpseudostate putvalue the constructor param k the pseudostate kind param n the to be localized name for the pseudostate kind public action new pseudo state object k string n super kind k put value action name translator localize n actionnewpseudostate putvalue public void action performed action event e super action performed e object target target manager get instance get model target object ps model get state machines factory build pseudo state target if kind null model get core helper set kind ps kind actionperformed actionevent actionperformed targetmanager getinstance getmodeltarget getstatemachinesfactory buildpseudostate getcorehelper setkind public abstract class non undoable command implements command public abstract object execute nonundoablecommand public abstract object execute public void undo public boolean is undoable return false isundoable public boolean is redoable return false isredoable the constructor public cr disambig state name setup head and desc add supported decision uml decision naming set knowledge types critic kt syntax add trigger name add trigger parent crdisambigstatename setupheadanddesc addsupporteddecision umldecision setknowledgetypes kt_syntax addtrigger addtrigger public boolean predicate2 object dm designer dsgr if model get facade isa state dm return no problem string my name model get facade get name dm todo should define a compound critic if my name null my name equals return no problem string my name string my name if my name string length 0 return no problem collection pkgs model get facade get element imports2 dm if pkgs null return no problem for iterator iter pkgs iterator iter has next object imp iter next object ns model get facade get package imp if ns null return no problem collection oes model get facade get owned elements ns if oes null return no problem iterator elems oes iterator while elems has next object eo elems next object me model get facade get model element eo if model get facade isa classifier me continue if me dm continue string me name model get facade get name me if me name null me name equals continue if me name equals my name string return problem found return no problem getfacade isastate no_problem myname getfacade getname compoundcritic myname myname no_problem mynamestring myname mynamestring no_problem getfacade getelementimports2 no_problem hasnext getfacade getpackage no_problem getfacade getownedelements no_problem hasnext getfacade getmodelelement getfacade isaclassifier mename getfacade getname mename mename mename mynamestring problem_found no_problem see org argouml cognitive poster get clarifier public icon get clarifier return cl class name get the instance getclarifier getclarifier clclassname gettheinstance public set object get criticized design materials set object ret new hash set object ret add model get meta types get state return ret getcriticizeddesignmaterials hashset getmetatypes getstate the constructor deprecated for 0 27 4 by tfmorris use link fig concurrent region object rectangle diagram settings suppress warnings deprecation deprecated public fig concurrent region super initialize figconcurrentregion diagramsettings suppresswarnings figconcurrentregion private void initialize cover new fig rect get initialx get initialy get initial width get initial height invisible line color fill color dividerline new fig line get initialx get initialy get initial width get initialy get initial color dividerline set dashed true get big port set line width 0 cover set line width 0 add figs to the fig node in back to front order add fig get big port add fig cover add fig get name fig add fig dividerline add fig get internal set shadow size 0 figrect getinitialx getinitialy getinitialwidth getinitialheight invisible_line_color fill_color figline getinitialx getinitialy getinitialwidth getinitialy getinitialcolor setdashed getbigport setlinewidth setlinewidth fignode addfig getbigport addfig addfig getnamefig addfig addfig getinternal setshadowsize the constructor param gm not used param node the uml model element represented by this fig deprecated for 0 27 4 by tfmorris use link fig concurrent region object rectangle diagram settings suppress warnings deprecation deprecated public fig concurrent region graph model gm object node this set owner node figconcurrentregion diagramsettings suppresswarnings figconcurrentregion graphmodel setowner the constructor param gm not used param node the uml model element represented by this fig param col the line color param width the width param height the height deprecated for 0 27 4 by tfmorris use link fig concurrent region object rectangle diagram settings deprecated public fig concurrent region graph model gm object node color col int width int height this gm node set line color col rectangle r get bounds set bounds r x r y width height figconcurrentregion diagramsettings figconcurrentregion graphmodel setlinecolor getbounds setbounds construct a new concurrent region fig param node owning uml element param bounds position and size param settings render settings public fig concurrent region object node rectangle bounds diagram settings settings super node bounds settings initialize if bounds null we have to use the specific methods written for this fig this fixes issue 5070 set bounds bounds x x bounds y y bounds width bounds height h true update name text figconcurrentregion diagramsettings setbounds _x _y _h updatenametext the moment we add this fig to a layer especially during load it needs to be made aware that it is enclosed by a fig composite state this fixes issue 3736 param lay the layer see org argouml uml diagram ui fig node model element set layer org tigris gef base layer override public void set layer layer lay super set layer lay for fig f lay get contents if f instanceof fig composite state if f get owner model get facade get container get owner set enclosing fig f break there can only be one figcompositestate fignodemodelelement setlayer setlayer setlayer getcontents figcompositestate getowner getfacade getcontainer getowner setenclosingfig override public object clone fig concurrent region fig clone fig concurrent region super clone iterator it fig clone get figs iterator fig clone set big port fig rect it next fig clone cover fig rect it next fig clone set name fig fig text it next fig clone dividerline fig line it next fig clone set internal fig text it next return fig clone figconcurrentregion figclone figconcurrentregion figclone getfigs figclone setbigport figrect figclone figrect figclone setnamefig figtext figclone figline figclone setinternal figtext figclone override public vector get pop up actions mouse event me vector pop up actions super get pop up actions me pop up actions remove project actions get instance get remove from diagram action pop up actions add new j separator todo there s a cyclic dependency between fig concurrent region and the actions action add concurrent region pop up actions add element new action add concurrent region return pop up actions getpopupactions mouseevent popupactions getpopupactions popupactions projectactions getinstance getremovefromdiagramaction popupactions jseparator figconcurrentregion actionaddconcurrentregion popupactions addelement actionaddconcurrentregion popupactions override public dimension get minimum size dimension name dim get name fig get minimum size dimension internal dim get internal get minimum size int h name dim height 4 internal dim height int w name dim width 2 margin return new dimension w h getminimumsize namedim getnamefig getminimumsize internaldim getinternal getminimumsize namedim internaldim namedim see org tigris gef presentation fig get use trap rect override public boolean get use trap rect return true getusetraprect getusetraprect override set bounds to keep shapes looking right p when resized by this way it only changes the height and the adjacent region s height inherit doc override protected void set standard bounds int x int y int w int h if get name fig null return rectangle old bounds get bounds dimension name dim get name fig get minimum size int adjacentindex 1 list regions list null int index 0 if get enclosing fig null x old bounds x w old bounds width fig composite state f fig composite state get enclosing fig regions list f get enclosed figs index regions list index of this if cur handle index is 0 or 2 the adjacent region is the previous region but if it is 5 or 7 the adjacent region is the next region cur handle index show which corner of the bound we are dragging if cur handle index 0 cur handle index 2 index 0 adjacentindex index 1 if cur handle index 5 cur handle index 7 index regions list size 1 adjacentindex index 1 if h get minimum size height if h old bounds height h old bounds height y old bounds y we aren t able to resize neither the top bound from the first region nor the bottom bound from the last region if adjacentindex 1 x old bounds x y old bounds y h old bounds height the group must be resized if a text field exceed the bounds if w f get bounds width rectangle fr f get bounds f set bounds fr x fr y w 6 fr height else int h increment old bounds height h fig concurrent region adjacent fig fig concurrent region regions list get adjacentindex if adjacent fig get bounds height h increment adjacent fig get minimum size height y old bounds y h old bounds height else if cur handle index 0 cur handle index 2 fig concurrent region regions list get adjacentindex set bounds 0 h increment if cur handle index 5 cur handle index 7 fig concurrent region regions list get adjacentindex set bounds h increment h increment dividerline set shape x y x w y get name fig set bounds x margin y space top w 2 margin name dim height get internal set bounds x margin y name dim height space top space middle w 2 margin h name dim height space top space middle space bottom get big port set bounds x y w h cover set bounds x y w h calc bounds x x y y w w h h update edges fire prop change bounds old bounds get bounds setbounds inheritdoc setstandardbounds getnamefig oldbounds getbounds namedim getnamefig getminimumsize regionslist getenclosingfig oldbounds oldbounds figcompositestate figcompositestate getenclosingfig regionslist getenclosedfigs regionslist indexof curhandle curhandle curhandle curhandle curhandle curhandle regionslist getminimumsize oldbounds oldbounds oldbounds oldbounds oldbounds oldbounds getbounds getbounds setbounds hincrement oldbounds figconcurrentregion adjacentfig figconcurrentregion regionslist adjacentfig getbounds hincrement adjacentfig getminimumsize oldbounds oldbounds curhandle curhandle figconcurrentregion regionslist setbounds hincrement curhandle curhandle figconcurrentregion regionslist setbounds hincrement hincrement setshape getnamefig setbounds space_top namedim getinternal setbounds namedim space_top space_middle namedim space_top space_middle space_bottom getbigport setbounds setbounds calcbounds _x _y _w _h updateedges firepropchange oldbounds getbounds to resize with x and y increments absolute width and keeping the height param x inc the x increment param y inc the y increment param w the width param concurrency is concurrent public void set bounds int x inc int y inc int w boolean concurrency if get name fig null return rectangle old bounds get bounds dimension name dim get name fig get minimum size int x old bounds x x inc int y old bounds y y inc int h old bounds height dividerline set shape x y x w y get name fig set bounds x 2 y 2 w 4 name dim height get internal set bounds x 2 y name dim height 4 w 4 h name dim height 8 get big port set bounds x y w h cover set bounds x y w h calc bounds x x y y w w h h update edges fire prop change bounds old bounds get bounds xinc yinc setbounds xinc yinc getnamefig oldbounds getbounds namedim getnamefig getminimumsize oldbounds xinc oldbounds yinc oldbounds setshape getnamefig setbounds namedim getinternal setbounds namedim namedim getbigport setbounds setbounds calcbounds _x _y _w _h updateedges firepropchange oldbounds getbounds to resize with x y and height increments and absolute width the boolean parameter is added in order to override the method param x inc the x increment param y inc the y increment param w the width param concurrency is concurrent param h inc the height increment public void set bounds int x inc int y inc int w int h inc boolean concurrency if get name fig null return rectangle old bounds get bounds dimension name dim get name fig get minimum size int x old bounds x x inc int y old bounds y y inc int h old bounds height h inc dividerline set shape x y x w y get name fig set bounds x 2 y 2 w 4 name dim height get internal set bounds x 2 y name dim height 4 w 4 h name dim height 8 get big port set bounds x y w h cover set bounds x y w h calc bounds x x y y w w h h update edges fire prop change bounds old bounds get bounds xinc yinc hinc setbounds xinc yinc hinc getnamefig oldbounds getbounds namedim getnamefig getminimumsize oldbounds xinc oldbounds yinc oldbounds hinc setshape getnamefig setbounds namedim getinternal setbounds namedim namedim getbigport setbounds setbounds calcbounds _x _y _w _h updateedges firepropchange oldbounds getbounds to resize with y increments height increment and keeping the x and width param y inc the y increment param h inc the height increment public void set bounds int y inc int h inc if get name fig null return rectangle old bounds get bounds dimension name dim get name fig get minimum size int x old bounds x int y old bounds y y inc int w old bounds width int h old bounds height h inc dividerline set shape x y x w y get name fig set bounds x 2 y 2 w 4 name dim height get internal set bounds x 2 y name dim height 4 w 4 h name dim height 8 get big port set bounds x y w h cover set bounds x y w h calc bounds x x y y w w h h update edges fire prop change bounds old bounds get bounds yinc hinc setbounds yinc hinc getnamefig oldbounds getbounds namedim getnamefig getminimumsize oldbounds oldbounds yinc oldbounds oldbounds hinc setshape getnamefig setbounds namedim getinternal setbounds namedim namedim getbigport setbounds setbounds calcbounds _x _y _w _h updateedges firepropchange oldbounds getbounds override public void set line color color col cover set line color invisible line color dividerline set line color col setlinecolor setlinecolor invisible_line_color setlinecolor see org tigris gef presentation fig get line color override public color get line color return dividerline get line color getlinecolor getlinecolor getlinecolor see org tigris gef presentation fig set fill color java awt color override public void set fill color color col cover set fill color col setfillcolor setfillcolor setfillcolor see org tigris gef presentation fig get fill color override public color get fill color return cover get fill color getfillcolor getfillcolor getfillcolor override public void set filled boolean f cover set filled f get big port set filled f setfilled setfilled getbigport setfilled override public boolean is filled return cover is filled isfilled isfilled see org tigris gef presentation fig set line width int override public void set line width int w dividerline set line width w setlinewidth setlinewidth setlinewidth see org tigris gef presentation fig get line width override public int get line width return dividerline get line width getlinewidth getlinewidth getlinewidth protected void model changed property change event mee if container equals mee get property name is concurrent equals mee get property name subvertex equals mee get property name do nothing this only happens at creation time i hope else super model changed mee modelchanged propertychangeevent getpropertyname isconcurrent getpropertyname getpropertyname modelchanged override public selection make selection selection sel new selection state this selection state sel set incoming button enabled false selection state sel set outgoing button enabled false return sel makeselection selectionstate selectionstate setincomingbuttonenabled selectionstate setoutgoingbuttonenabled see org argouml uml diagram state ui fig state get initial height public int get initial height return 130 figstate getinitialheight getinitialheight see org argouml uml diagram state ui fig state get initial width protected int get initial width return 30 figstate getinitialwidth getinitialwidth see org argouml uml diagram state ui fig state get initialx protected int get initialx return 0 figstate getinitialx getinitialx see org argouml uml diagram state ui fig state get initialy protected int get initialy return 0 figstate getinitialy getinitialy return the initial color protected color get initial color return line color getinitialcolor line_color override protected void update layout uml change event event if container equals event get property name is concurrent equals event get property name super update layout event final string e name event get property name a concurrent region cannot have incoming or outgoing transitions so incoming or outgoing transitions are redirected to its concurrent composite state container todo this comparison is very suspect it should use equals method the code within the block is in fact never executed i hesitate to change this now as it will trigger code has never been used before and am not aware of any problems that it usage may introduce i do think that we need to be able to find a different way to implement the intent here which seems to be to correct edge drawings that should actually not be allowed bob if e name incoming e name outgoing final object owner get owner final collection transactions collection event get new value if transactions is empty final object transition transactions iterator next if e name incoming if model get facade isa transition transition model get common behavior helper set target transition model get facade get container owner else if model get facade isa transition transition model get state machines helper set source transition model get facade get container owner updatelayout umlchangeevent getpropertyname isconcurrent getpropertyname updatelayout ename getpropertyname ename ename getowner getnewvalue isempty ename getfacade isatransition getcommonbehaviorhelper settarget getfacade getcontainer getfacade isatransition getstatemachineshelper setsource getfacade getcontainer override public void mouse pressed mouse event e int x e getx int y e gety globals cur editor get selection manager hit handle new rectangle x 4 y 4 8 8 cur handle mousepressed mouseevent cureditor getselectionmanager hithandle curhandle see java awt event mouse listener mouse released java awt event mouse event override public void mouse released mouse event e cur handle index 1 mouselistener mousereleased mouseevent mousereleased mouseevent curhandle public void mouse dragged mouse event e if cur handle index 1 globals cur editor get selection manager select get enclosing fig mousedragged mouseevent curhandle cureditor getselectionmanager getenclosingfig see java awt event mouse motion listener mouse moved java awt event mouse event public void mouse moved mouse event e ignored mousemotionlistener mousemoved mouseevent mousemoved mouseevent the constructor public to do list event items null todolistevent the constructor make a copy of the list to guarantee that it remains stable throughout the lifetime of this event param to do items the list of to do items that were changed added removed public to do list event final list to do item to do items items collections unmodifiable list new array list to do item to do items todoitems todoitems todolistevent todoitem todoitems unmodifiablelist arraylist todoitem todoitems return the todo list events public list to do item get to do item list return items todoitem gettodoitemlist the constructor param call state the uml element public call state notation object call state if model get facade isa call state call state throw new illegal argument exception this is not an call state callstate callstatenotation callstate getfacade isacallstate callstate illegalargumentexception callstate public void initialise listener property change listener listener object model element register for events from all modelelements that change the name and body text i e when the call action is replaced add element listener listener model element new string entry name remove object entry action model get facade get entry model element if model get facade isa call action entry action and when the operation is replaced add element listener listener entry action operation object operation model get facade get operation entry action if operation null and when the owner is replaced unlikely for operations and when the operation changes name add element listener listener operation new string owner name object classifier model get facade get owner operation and when the class changes name add element listener listener classifier name initialiselistener propertychangelistener modelelement callaction addelementlistener modelelement entryaction getfacade getentry modelelement getfacade isacallaction entryaction addelementlistener entryaction getfacade getoperation entryaction addelementlistener getfacade getowner addelementlistener default constructor param ocl the invalid ocl expression public invalid ocl exception string ocl super ocl invalidoclexception the constructor public prop panel string super translator localize tab string grid bag layout gb new grid bag layout set layout gb grid bag constraints c new grid bag constraints c fill grid bag constraints both c weightx 0 0 c ipadx 3 c ipady 3 c gridx 0 c gridwidth 1 c gridy 0 gb set constraints name label c add name label c weightx 1 0 c gridx 1 c gridwidth grid bag constraints remainder c gridheight grid bag constraints remainder c gridy 0 gb set constraints name field c add name field name field get document add document listener this name field set editable true todo set font proppanelstring gridbaglayout gridbaglayout setlayout gridbagconstraints gridbagconstraints gridbagconstraints setconstraints namelabel namelabel gridbagconstraints gridbagconstraints setconstraints namefield namefield namefield getdocument adddocumentlistener namefield seteditable public void set target object t if target null target remove property change listener this if t instanceof fig text target fig text t to circumvent too many registered listeners target remove property change listener this if is visible target add property change listener this settarget removepropertychangelistener figtext figtext removepropertychangelistener isvisible addpropertychangelistener see org argouml ui tab target get target public object get target return target tabtarget gettarget gettarget see org argouml ui tab target refresh public void refresh set target target tabtarget settarget see org argouml ui tab target should be enabled java lang object public boolean should be enabled object the target return false tabtarget shouldbeenabled shouldbeenabled thetarget set the target name protected void set target name settargetname public void insert update document event e if e get document name field get document target null target set text name field get text target damage insertupdate documentevent getdocument namefield getdocument settext namefield gettext see javax swing event document listener remove update javax swing event document event public void remove update document event e insert update e documentlistener removeupdate documentevent removeupdate documentevent insertupdate see javax swing event document listener changed update javax swing event document event public void changed update document event e documentlistener changedupdate documentevent changedupdate documentevent public void property change property change event evt if evt get property name equals editing evt get new value equals boolean false ending editing name field set text target get text propertychange propertychangeevent getpropertyname getnewvalue namefield settext gettext see org argouml ui targetmanager target listener target added org argouml ui targetmanager target event public void target added target event e set target e get new target targetlistener targetadded targetevent targetadded targetevent settarget getnewtarget see org argouml ui targetmanager target listener target removed org argouml ui targetmanager target event public void target removed target event e set target e get new target targetlistener targetremoved targetevent targetremoved targetevent settarget getnewtarget see org argouml ui targetmanager target listener target set org argouml ui targetmanager target event public void target set target event e set target e get new target targetlistener targetset targetevent targetset targetevent settarget getnewtarget constructor for action remove model element protected action remove model element super actionremovemodelelement actionremovemodelelement public void action performed action event e super action performed e project p project manager get manager get current project if get object to remove null action delete model elements sure remove get object to remove p move to trash get object to remove set object to remove null actionperformed actionevent actionperformed projectmanager getmanager getcurrentproject getobjecttoremove actiondeletemodelelements sureremove getobjecttoremove movetotrash getobjecttoremove setobjecttoremove see javax swing action is enabled public boolean is enabled return get object to remove null isenabled isenabled getobjecttoremove constructor for uml association end ordering check box public uml association end ordering check box super translator localize label ordered action set association end ordering get instance ordering umlassociationendorderingcheckbox umlassociationendorderingcheckbox actionsetassociationendordering getinstance public void build model if get target null object association end get target set selected model get ordering kind get ordered equals model get facade get ordering association end buildmodel gettarget associationend gettarget setselected getorderingkind getordered getfacade getordering associationend constructor private pgml utility pgmlutility translate the visibility flag of a fig to the pgml visibility attribute value the pgml values are 0 hidden and 1 shown if not specified then 1 is the default so we return null for this to prevent redundent data being written to pgml todo remove on gef release after 0 11 9 as it will be provided there param f the fig return 0 hidden null shown public static string get visibility fig f if f is visible return null return 0 getvisibility isvisible return just the comment edges for a specific layer todo document diagram layer param diagram the diagram return a link list with the edges public static list get edges diagram diagram layer lay diagram get layer collection edges lay get contents edges only list return edges new array list edges size get edges diagram edges return edges return return edges getedges getlayer getcontentsedgesonly returnedges arraylist getedges returnedges returnedges return the diagram contents in the order to save to pgml nodes first then edges connecting nodes and lastly edges that connect edges to other edges param diagram the link diagram return a link list with the contents public static list get contents diagram diagram layer lay diagram get layer list contents lay get contents int size contents size list list new array list size for int i 0 i size i object o contents get i if o instanceof fig edge list add o get edges diagram lay get contents edges only list return list getcontents getlayer getcontents arraylist figedge getedges getcontentsedgesonly private static void get edges diagram diagram collection edges list return edges iterator it edges iterator while it has next object o it next if o instanceof fig edge note o instanceof fig edge association class return edges add o it edges iterator while it has next object o it next if o instanceof fig edge association class return edges add o it edges iterator while it has next object o it next if o instanceof fig edge note return edges add o getedges returnedges hasnext figedgenote figedgeassociationclass returnedges hasnext figedgeassociationclass returnedges hasnext figedgenote returnedges return the identifier for this fig which is the encloser of the given fig param f the fig to generate the id for return a unique string public static string get enclosing id fig f fig encloser f get enclosing fig if encloser null return null return get id encloser getenclosingid getenclosingfig getid generate an identifier for this fig which is unique within the diagram param f the fig to generate the id for return a unique string public static string get id fig f if f null throw new illegal argument exception a fig must be supplied if f get group null string group id f get group get id if f get group instanceof fig group fig group group fig group f get group return group id group get figs index of f else if f get group instanceof fig edge fig edge edge fig edge f get group return group id list edge get path item figs index of f 1 else return group id 0 layer layer f get layer if layer null return layer null list c layer get contents int index c index of f return fig index getid illegalargumentexception getgroup groupid getgroup getid getgroup figgroup figgroup figgroup getgroup groupid getfigs indexof getgroup figedge figedge figedge getgroup groupid getpathitemfigs indexof groupid getlayer layer_null getcontents indexof construct a new selection class for the given fig param f the given fig public selection exception fig f super f selectionclass selectionexception override protected object get new node int button code return model get common behavior factory create exception getnewnode buttoncode getcommonbehaviorfactory createexception override protected object get new node type int button code return model get meta types get exception getnewnodetype buttoncode getmetatypes getexception the main constructor deprecated for 0 27 4 by tfmorris suppress warnings deprecation deprecated public fig message super init figs init arrows rectangle r get bounds set bounds r x r y r width r height suppresswarnings figmessage initfigs initarrows getbounds setbounds private void init figs set shadow size 0 issue 2714 get name fig set line width 0 get name fig set return action fig text end editing get name fig set filled false dimension name min get name fig get minimum size get name fig set bounds x0 y0 90 name min height get big port set bounds x0 y0 90 name min height fig poly new fig poly line color solid fill color int xpoints 75 75 77 75 73 75 int ypoints 33 24 24 15 24 24 polygon polygon new polygon xpoints ypoints 6 fig poly set polygon polygon fig poly set bounds 100 10 5 18 get big port set filled false get big port set line width 0 add figs to the fig node in back to front order add fig get big port add fig get name fig add fig fig poly initfigs setshadowsize getnamefig setlinewidth getnamefig setreturnaction figtext end_editing getnamefig setfilled namemin getnamefig getminimumsize getnamefig setbounds namemin getbigport setbounds namemin figpoly figpoly line_color solid_fill_color figpoly setpolygon figpoly setbounds getbigport setfilled getbigport setlinewidth fignode addfig getbigport addfig getnamefig addfig figpoly private void init arrows if arrow directions null arrow directions new vector string 4 todo i18n arrow directions add south south arrow directions add east east arrow directions add west west arrow directions add north north initarrows arrowdirections arrowdirections arrowdirections arrowdirections arrowdirections arrowdirections construct a fig message param owner owning uml element param bounds position and size param settings render settings public fig message object owner rectangle bounds diagram settings settings super owner bounds settings init arrows init figs update name text figmessage figmessage diagramsettings initarrows initfigs updatenametext the constructor that hooks the fig into an existing uml element param gm ignored param lay the layer param node the uml element deprecated for 0 27 4 by tfmorris use link fig message object rectangle diagram settings suppress warnings deprecation deprecated public fig message suppress warnings unused graph model gm layer lay object node this set layer lay set owner node figmessage diagramsettings suppresswarnings figmessage suppresswarnings graphmodel setlayer setowner see org argouml uml diagram ui fig node model element get notation provider type override protected int get notation provider type return notation provider factory2 type message fignodemodelelement getnotationprovidertype getnotationprovidertype notationproviderfactory2 type_message override protected void update listeners object old owner object new owner if old owner null remove element listener old owner if new owner null add element listener new owner remove updatelisteners oldowner newowner oldowner removeelementlistener oldowner newowner addelementlistener newowner override public object clone fig message fig clone fig message super clone iterator it fig clone get figs iterator fig clone set name fig fig text it next fig clone fig poly fig poly it next fig clone polygon polygon polygon clone return fig clone figmessage figclone figmessage figclone getfigs figclone setnamefig figtext figclone figpoly figpoly figclone _polygon _polygon figclone override public void set line color color col fig poly set line color col get name fig set line color col setlinecolor figpoly setlinecolor getnamefig setlinecolor see org tigris gef presentation fig get line color override public color get line color return fig poly get line color getlinecolor getlinecolor figpoly getlinecolor override public void set fill color color col fig poly set fill color col get name fig set fill color col setfillcolor figpoly setfillcolor getnamefig setfillcolor see org tigris gef presentation fig get fill color override public color get fill color return get name fig get fill color getfillcolor getfillcolor getnamefig getfillcolor see org tigris gef presentation fig set filled boolean override public void set filled boolean f setfilled setfilled override public boolean is filled return true isfilled see org tigris gef presentation fig set line width int override public void set line width int w fig poly set line width w setlinewidth setlinewidth figpoly setlinewidth see org tigris gef presentation fig get line width override public int get line width return fig poly get line width getlinewidth getlinewidth figpoly getlinewidth param direction for the arrow fig message south fig message east fig message west fig message north public void set arrow int direction rectangle bbox get bounds if arrow direction direction return arrow direction direction switch direction case south int xpoints 75 75 77 75 73 75 int ypoints 15 24 24 33 24 24 polygon polygon new polygon xpoints ypoints 6 fig poly set polygon polygon break case east int xpoints 66 75 75 84 75 75 int ypoints 24 24 26 24 22 24 polygon polygon new polygon xpoints ypoints 6 fig poly set polygon polygon break case west int xpoints 84 75 75 66 75 75 int ypoints 24 24 26 24 22 24 polygon polygon new polygon xpoints ypoints 6 fig poly set polygon polygon break default north int xpoints 75 75 77 75 73 75 int ypoints 33 24 24 15 24 24 polygon polygon new polygon xpoints ypoints 6 fig poly set polygon polygon break set bounds bbox figmessage figmessage figmessage figmessage setarrow getbounds arrowdirection arrowdirection figpoly setpolygon figpoly setpolygon figpoly setpolygon figpoly setpolygon setbounds return the arrow direction public int get arrow return arrow direction getarrow arrowdirection override public dimension get minimum size dimension name min get name fig get minimum size dimension fig poly min fig poly get size int h math max fig poly min height name min height int w fig poly min width name min width return new dimension w h getminimumsize namemin getnamefig getminimumsize figpolymin figpoly getsize figpolymin namemin figpolymin namemin override protected void set standard bounds int x int y int w int h if get name fig null return rectangle old bounds get bounds dimension name min get name fig get minimum size int ht 0 if name min height fig poly get height ht name min height fig poly get height 2 get name fig set bounds x y w fig poly get width name min height get big port set bounds x y w fig poly get width name min height fig poly set bounds x get name fig get width y ht fig poly get width fig poly get height fire prop change bounds old bounds get bounds calc bounds x x y y w w h h update edges setstandardbounds getnamefig oldbounds getbounds namemin getnamefig getminimumsize namemin figpoly getheight namemin figpoly getheight getnamefig setbounds figpoly getwidth namemin getbigport setbounds figpoly getwidth namemin figpoly setbounds getnamefig getwidth figpoly getwidth figpoly getheight firepropchange oldbounds getbounds calcbounds _x _y _w _h updateedges override protected void model changed property change event mee super model changed mee do nothing until code is reviewed if true return if model get facade isa message get owner if model get facade isa parameter mee get source object par mee get source update arguments from parameter get owner par if mee null mee get source get owner model get facade isa action mee get source model get facade isa operation mee get source model get facade isa argument mee get source model get facade isa signal mee get source update listeners get owner needs to be updated for changes in notation subsystem tfm string name str notation generate this get owner trim get name fig set text name str update arrow damage modelchanged propertychangeevent modelchanged getfacade isamessage getowner getfacade isaparameter getsource getsource updateargumentsfromparameter getowner getsource getowner getfacade isaaction getsource getfacade isaoperation getsource getfacade isaargument getsource getfacade isasignal getsource updatelisteners getowner namestr getowner getnamefig settext namestr updatearrow todo the code implementing this method is from 2003 see issue 2171 mechanically integrated by tfmorris in may 2007 needs to be reviewed updated author decki endi yayan politechnic of bandung computer departement method for changing text of message param new owner param parameter protected void update arguments from parameter object new owner object parameter do nothing until code is reviewed if true return if new owner null object act model get facade get action new owner if model get facade isa call action act if model get facade get operation act null object operation model get facade get operation act if model get direction kind get in parameter equals model get facade get kind parameter update for changes in model subsystem tfm collection colpar model get facade get in parameters operation collection colarg model get facade get actual arguments act if colpar size colarg size iterator iter colarg iterator while iter has next object arg iter next if iter has next model get common behavior helper remove actual argument act arg object new argument model get common behavior factory create argument model get common behavior helper set value new argument model get data types factory create expression model get facade get name parameter model get core helper set name new argument model get facade get name parameter model get common behavior helper add actual argument act new argument model get pump remove model event listener this parameter model get pump add model event listener this parameter newowner updateargumentsfromparameter newowner newowner getfacade getaction newowner getfacade isacallaction getfacade getoperation getfacade getoperation getdirectionkind getinparameter getfacade getkind getfacade getinparameters getfacade getactualarguments hasnext hasnext getcommonbehaviorhelper removeactualargument newargument getcommonbehaviorfactory createargument getcommonbehaviorhelper setvalue newargument getdatatypesfactory createexpression getfacade getname getcorehelper setname newargument getfacade getname getcommonbehaviorhelper addactualargument newargument getpump removemodeleventlistener getpump addmodeleventlistener todo the code implementing this method is from 2003 see issue 2171 mechanically integrated by tfmorris in may 2007 needs to be reviewed updated author decki endi yayan politechnic of bandung computer departement method for changing text of message param new owner model element which should now be listened to protected void update listeners object new owner our superclass no longer has this method so perhaps this whole thing should be removed tfm super update listeners new owner todo do nothing until code is reviewed if true return if new owner null object act model get facade get action new owner if act null model get pump remove model event listener this act model get pump add model event listener this act iterator iter model get facade get actual arguments act iterator while iter has next object arg iter next model get pump remove model event listener this arg model get pump add model event listener this arg if model get facade isa call action act object oper model get facade get operation act if oper null model get pump remove model event listener this oper model get pump add model event listener this oper iterator it2 model get facade get parameters oper iterator while it2 has next object param it2 next model get pump remove model event listener this param model get pump add model event listener this param if model get facade isa send action act object sig model get facade get signal act if sig null model get pump remove model event listener this sig model get pump add model event listener this sig newowner updatelisteners newowner updatelisteners newowner newowner getfacade getaction newowner getpump removemodeleventlistener getpump addmodeleventlistener getfacade getactualarguments hasnext getpump removemodeleventlistener getpump addmodeleventlistener getfacade isacallaction getfacade getoperation getpump removemodeleventlistener getpump addmodeleventlistener getfacade getparameters hasnext getpump removemodeleventlistener getpump addmodeleventlistener getfacade isasendaction getfacade getsignal getpump removemodeleventlistener getpump addmodeleventlistener determines the direction of the message arrow determination of the type of arrow happens in model changed public void update arrow object mes get owner message if mes null get layer null return object sender model get facade get sender mes classifier role object receiver model get facade get receiver mes classifier role fig sender port get layer presentation for sender fig receiver port get layer presentation for receiver if sender port null receiver port null return int sx sender port getx int sy sender port gety int rx receiver port getx int ry receiver port gety if sx rx math abs sy ry math abs sx rx east set arrow east else if sx rx math abs sy ry math abs sx rx west set arrow west else if sy ry south set arrow south else set arrow north modelchanged updatearrow getowner getlayer getfacade getsender classifierrole getfacade getreceiver classifierrole senderport getlayer presentationfor receiverport getlayer presentationfor senderport receiverport senderport senderport receiverport receiverport setarrow setarrow setarrow setarrow add the fig message to the path items of its fig association role param lay the layer public void add path item to fig association role layer lay object association role model get facade get communication connection get owner if association role null lay null fig association role fig assoc role fig association role lay presentation for association role if fig assoc role null fig assoc role add message this lay bring to front this figmessage figassociationrole addpathitemtofigassociationrole associationrole getfacade getcommunicationconnection getowner associationrole figassociationrole figassocrole figassociationrole presentationfor associationrole figassocrole figassocrole addmessage bringtofront override public void rendering changed super rendering changed update arrow renderingchanged renderingchanged updatearrow return returns the arrow directions public static vector string get arrow directions return arrow directions arrowdirections getarrowdirections arrowdirections private static j frame top frame private argo frame prohibit instantiation jframe topframe argoframe get a top level frame which can be used as the parent for creating new dialogs the name is temporarily the same as the old project browser get instance usage for compatibility the implementation is just roughed out for experimentation return a top level j frame to use as parent for new dialogs public static j frame get instance if top frame null frame root frame j option pane get root frame if root frame instanceof j frame top frame j frame root frame else frame frames frame get frames for int i 0 i frames length i if frames i instanceof j frame if top frame null log warn found multiple j frames else top frame j frame frames i if top frame null log warn failed to find application j frame argo dialog set frame top frame return top frame projectbrowser getinstance jframe jframe getinstance topframe rootframe joptionpane getrootframe rootframe jframe topframe jframe rootframe getframes jframe topframe jframes topframe jframe topframe jframe argodialog setframe topframe topframe set the j frame to use as the main application frame param frame the main application frame public static void set instance j frame frame top frame frame jframe setinstance jframe topframe constructor for uml structural feature target scope check box public uml structural feature target scope check box super translator localize label classifier action set structural feature target scope get instance target scope umlstructuralfeaturetargetscopecheckbox umlstructuralfeaturetargetscopecheckbox actionsetstructuralfeaturetargetscope getinstance targetscope public void build model repair action for possible np after load if model get facade get target scope get target null model get core helper set target scope get target model get scope kind get instance set selected model get facade get target scope get target equals model get scope kind get classifier buildmodel getfacade gettargetscope gettarget getcorehelper settargetscope gettarget getscopekind getinstance setselected getfacade gettargetscope gettarget getscopekind getclassifier constructor param nodes the uml elements typically classifiers to generate public class generation dialog list object nodes this nodes false classgenerationdialog constructor param nodes the uml elements typically classifiers to generate param in model code true code if the path is in the model todo correct public class generation dialog list object nodes boolean in model super translator localize dialog title generate classes dialog ok cancel option true is path in model in model build languages j panel content panel new j panel new border layout 10 10 class table class table model new table model class checks class table model set target nodes class table new j table class table model class table set auto resize mode j table auto resize last column class table set show vertical lines false if languages size 1 class table set table header null set class table column widths class table set preferred scrollable viewport size new dimension 300 300 select buttons j button select all button new j button name button select all button button select all select all button add action listener new action listener see java awt event action listener action performed java awt event action event public void action performed action event e class table model set all checks true class table repaint j button select none button new j button name button select none button button select none select none button add action listener new action listener see java awt event action listener action performed java awt event action event public void action performed action event e class table model set all checks false class table repaint j panel select panel new j panel new flow layout flow layout right 0 0 select panel set border border factory create empty border 8 0 0 0 j panel select buttons new j panel new border layout 5 0 select buttons add select all button border layout center select buttons add select none button border layout east select panel add select buttons j panel center panel new j panel new border layout 0 2 center panel add new j label translator localize label available classes border layout north center panel add new j scroll pane class table border layout center center panel add select panel border layout south content panel add center panel border layout center output directory output directory combo box new j combo box get classpath entries to array j button browse button new j button name button browse button button browse browse button set text browse button get text browse button add action listener new action listener see java awt event action listener action performed java awt event action event public void action performed action event e do browse j panel south panel new j panel new border layout 0 2 if in model output directory combo box set editable true j panel output panel new j panel new border layout 5 0 output panel set border border factory create compound border border factory create titled border translator localize label output directory border factory create empty border 2 5 5 5 output panel add output directory combo box border layout center output panel add browse button border layout east south panel add output panel border layout north compile checkbox compilecheckbox new j check box name button compilecheckbox checkbox compile generated source todo implement the compile feature for now disable the checkbox compilecheckbox set enabled false south panel add compilecheckbox border layout south content panel add south panel border layout south set content content panel todo get saved default directory output directory combo box get model set selected item saved dir inmodel classgenerationdialog inmodel ok_cancel_option ispathinmodel inmodel buildlanguages jpanel contentpanel jpanel borderlayout classtablemodel tablemodelclasschecks classtablemodel settarget classtable jtable classtablemodel classtable setautoresizemode jtable auto_resize_last_column classtable setshowverticallines classtable settableheader setclasstablecolumnwidths classtable setpreferredscrollableviewportsize jbutton selectallbutton jbutton namebutton selectallbutton selectallbutton addactionlistener actionlistener actionlistener actionperformed actionevent actionperformed actionevent classtablemodel setallchecks classtable jbutton selectnonebutton jbutton namebutton selectnonebutton selectnonebutton addactionlistener actionlistener actionlistener actionperformed actionevent actionperformed actionevent classtablemodel setallchecks classtable jpanel selectpanel jpanel flowlayout flowlayout selectpanel setborder borderfactory createemptyborder jpanel selectbuttons jpanel borderlayout selectbuttons selectallbutton borderlayout selectbuttons selectnonebutton borderlayout selectpanel selectbuttons jpanel centerpanel jpanel borderlayout centerpanel jlabel borderlayout centerpanel jscrollpane classtable borderlayout centerpanel selectpanel borderlayout contentpanel centerpanel borderlayout outputdirectorycombobox jcombobox getclasspathentries toarray jbutton browsebutton jbutton namebutton browsebutton browsebutton settext browsebutton gettext browsebutton addactionlistener actionlistener actionlistener actionperformed actionevent actionperformed actionevent dobrowse jpanel southpanel jpanel borderlayout inmodel outputdirectorycombobox seteditable jpanel outputpanel jpanel borderlayout outputpanel setborder borderfactory createcompoundborder borderfactory createtitledborder borderfactory createemptyborder outputpanel outputdirectorycombobox borderlayout outputpanel browsebutton borderlayout southpanel outputpanel borderlayout _compilecheckbox jcheckbox namebutton _compilecheckbox _compilecheckbox setenabled southpanel _compilecheckbox borderlayout contentpanel southpanel borderlayout setcontent contentpanel outputdirectorycombobox getmodel setselecteditem saveddir see java awt event action listener action performed java awt event action event public void action performed action event e class table model set all checks true class table repaint actionlistener actionperformed actionevent actionperformed actionevent classtablemodel setallchecks classtable see java awt event action listener action performed java awt event action event public void action performed action event e class table model set all checks false class table repaint actionlistener actionperformed actionevent actionperformed actionevent classtablemodel setallchecks classtable see java awt event action listener action performed java awt event action event public void action performed action event e do browse actionlistener actionperformed actionevent actionperformed actionevent dobrowse override protected void name buttons super name buttons name button get ok button button generate namebuttons namebuttons namebutton getokbutton private void set class table column widths table column column null component c null int width 0 for int i 0 i class table get column count 1 i column class table get column model get column i width 30 j table header header class table get table header if header null c header get default renderer get table cell renderer component class table column get header value false false 0 0 width math max c get preferred size width 8 width column set preferred width width column set width width column set min width width column set max width width setclasstablecolumnwidths tablecolumn classtable getcolumncount classtable getcolumnmodel getcolumn jtableheader classtable gettableheader getdefaultrenderer gettablecellrenderercomponent classtable getheadervalue getpreferredsize setpreferredwidth setwidth setminwidth setmaxwidth private void build languages languages new array list language generator manager get instance get languages buildlanguages arraylist generatormanager getinstance getlanguages private static collection string get classpath entries string classpath system get property java class path collection string entries new tree set string todo what does the output directory have to do with the class path project p project manager get manager get current project entries add p get project settings get generation output dir final string path sep system get property path separator string tokenizer all entries new string tokenizer classpath path sep while all entries has more elements string entry all entries next token if entry to lower case ends with jar entry to lower case ends with zip entries add entry return entries getclasspathentries getproperty treeset projectmanager getmanager getcurrentproject getprojectsettings getgenerationoutputdir pathsep getproperty stringtokenizer allentries stringtokenizer pathsep allentries hasmoreelements allentries nexttoken tolowercase endswith tolowercase endswith override public void action performed action event e super action performed e generate button if e get source get ok button string path null todo get default output directory from user settings project p project manager get manager get current project p get project settings set generation output dir path list string file names new list languages size for int i 0 i languages size i file names i new array list string language language languages get i generator manager gen man generator manager get instance code generator generator gen man get generator language set nodes class table model get checked language if is path in model path string output directory combo box get model get selected item if path null path path trim if path length 0 collection string files generator generate files nodes path false for string filename files file names i add path code generator file separator filename else classify nodes by base path map string set object nodes per path new hash map string set object for object node nodes if model get facade isa classifier node continue path generator manager get code path node if path null object parent model get facade get namespace node while parent null path generator manager get code path parent if path null break parent model get facade get namespace parent if path null final string file sep code generator file separator if path ends with file sep remove trailing path path substring 0 path length file sep length set object np nodes per path get path if np null np new hash set object nodes per path put path np np add node save language node language end for all nodes generate the files for map entry entry nodes per path entry set string basepath string entry get key set node coll set entry get value todo the last argument recursive flag should be a selectable option collection string files generator generate files node coll basepath false for string filename files file names i add basepath code generator file separator filename end if is path in model else end for all languages todo do something with the generated list file names for example show it to the user in a dialog box actionperformed actionevent actionperformed getsource getokbutton projectmanager getmanager getcurrentproject getprojectsettings setgenerationoutputdir filenames filenames arraylist generatormanager genman generatormanager getinstance codegenerator genman getgenerator classtablemodel getchecked ispathinmodel outputdirectorycombobox getmodel getselecteditem generatefiles filenames codegenerator file_separator nodesperpath hashmap getfacade isaclassifier generatormanager getcodepath getfacade getnamespace generatormanager getcodepath getfacade getnamespace filesep codegenerator file_separator endswith filesep filesep nodesperpath hashset nodesperpath savelanguage nodesperpath entryset getkey nodecoll getvalue generatefiles nodecoll filenames codegenerator file_separator ispathinmodel filenames save the source language in the model todo support multiple languages now that we have uml 1 4 tagged values param node param language private void save language object node language language object tagged value model get facade get tagged value node source language tag if tagged value null string saved lang model get facade get value of tag tagged value if language get name equals saved lang model get extension mechanisms helper set value of tag tagged value language get name else tagged value model get extension mechanisms factory build tagged value source language tag language get name model get extension mechanisms helper add tagged value node tagged value savelanguage taggedvalue getfacade gettaggedvalue source_language_tag taggedvalue savedlang getfacade getvalueoftag taggedvalue getname savedlang getextensionmechanismshelper setvalueoftag taggedvalue getname taggedvalue getextensionmechanismsfactory buildtaggedvalue source_language_tag getname getextensionmechanismshelper addtaggedvalue taggedvalue private void do browse try show filechooser to select output directory j file chooser chooser new j file chooser string output directory combo box get model get selected item if chooser null chooser new j file chooser chooser set file hiding enabled true chooser set multi selection enabled false chooser set file selection mode j file chooser directories only chooser set dialog title translator localize dialog generation chooser choose output dir chooser show dialog this translator localize dialog generation chooser approve button text if equals chooser get selected file get path string path chooser get selected file get path output directory combo box add item path output directory combo box get model set selected item path else ignore catch exception user pressed cancel todo how does the pressed cancel become a java lang exception log info user pressed cancel dobrowse outputdirectory jfilechooser jfilechooser outputdirectorycombobox getmodel getselecteditem jfilechooser setfilehidingenabled setmultiselectionenabled setfileselectionmode jfilechooser directories_only setdialogtitle showdialog getselectedfile getpath getselectedfile getpath outputdirectorycombobox additem outputdirectorycombobox getmodel setselecteditem userpressedcancel constructor public table model class checks tablemodelclasschecks set the target param nodes list of classes public void set target list object nodes classes nodes checked new set get languages count for int j 0 j get languages count j doesn t really matter what set we use checked j new hash set object for object cls classes for int j 0 j get languages count j if is supposed to be generated as language languages get j cls checked j add cls else if languages get j get name equals notation get configured notation get configuration value checked j add cls fire table structure changed get ok button set enabled classes size 0 get checked size 0 settarget getlanguagescount getlanguagescount hashset getlanguagescount issupposedtobegeneratedaslanguage getname getconfigurednotation getconfigurationvalue firetablestructurechanged getokbutton setenabled getchecked private boolean is supposed to be generated as language language lang object cls if lang null cls null return false object tagged value model get facade get tagged value cls source language tag if tagged value null return false string saved lang model get facade get value of tag tagged value return lang get name equals saved lang issupposedtobegeneratedaslanguage taggedvalue getfacade gettaggedvalue source_language_tag taggedvalue savedlang getfacade getvalueoftag taggedvalue getname savedlang private int get languages count if languages null return 0 return languages size getlanguagescount return the set of elements which are selected for the given language param lang the language return a set of uml elements public set object get checked language lang int index languages index of lang if index 1 return collections empty set return checked index getchecked indexof emptyset all checked classes return the union of all languages as a link set public set object get checked set object union new hash set object for int i 0 i get languages count i union add all checked i return union getchecked hashset getlanguagescount addall see javax swing table table model get column count public int get column count return 1 get languages count tablemodel getcolumncount getcolumncount getlanguagescount override public string get column name int c if c 0 c get languages count return languages get c get name else if c get languages count return class name return xxx getcolumnname getlanguagescount getname getlanguagescount public class get column class int c if c 0 c get languages count return boolean class else if c get languages count return string class return string class getcolumnclass getlanguagescount getlanguagescount override public boolean is cell editable int row int col object cls classes get row if col get languages count return false if model get facade get name cls length 0 return false if col 0 col get languages count return true return false iscelleditable getlanguagescount getfacade getname getlanguagescount public int get row count if classes null return 0 return classes size getrowcount public object get value at int row int col object cls classes get row if col get languages count string name model get facade get name cls if name length 0 return name return anon else if col 0 col get languages count if checked col contains cls return boolean true return boolean false else return cc r row c col getvalueat getlanguagescount getfacade getname getlanguagescount override public void set value at object a value int row index int column index if column index get languages count return if column index get column count return if a value instanceof boolean return boolean val boolean a value boolean value object cls classes get row index if column index 0 column index get languages count if val checked column index add cls else checked column index remove cls if val get ok button is enabled get ok button set enabled true else if val get ok button is enabled get checked size 0 get ok button set enabled false setvalueat avalue rowindex columnindex columnindex getlanguagescount columnindex getcolumncount avalue avalue booleanvalue rowindex columnindex columnindex getlanguagescount columnindex columnindex getokbutton isenabled getokbutton setenabled getokbutton isenabled getchecked getokbutton setenabled sets or clears all checkmarks for the next language for all classes param value if false then all checkmarks are cleared for all languages if true then all are cleared except for one language column these are all set public void set all checks boolean value int rows get row count int checks get languages count if rows 0 return for int i 0 i rows i object cls classes get i for int j 0 j checks j if value j language history checked j add cls else checked j remove cls if value if language history checks language history 0 get ok button set enabled value setallchecks getrowcount getlanguagescount languagehistory languagehistory languagehistory getokbutton setenabled the constructor param name the name param p the project public project member todo list string name project p super name p projectmembertodolist see org argouml kernel abstract project member get type public string get type return todo abstractprojectmember gettype gettype see org argouml kernel abstract project member get zip file extension override public string get zip file extension return to do ext abstractprojectmember getzipfileextension getzipfileextension to_do_ext return a vector containing the to do list used by todo tee public vector to do itemxml helper get to do list vector to do itemxml helper out new vector to do itemxml helper list to do item tdi list designer the designer get to do list get to do item list synchronized tdi list for to do item tdi tdi list if tdi null tdi get poster instanceof designer out add element new to do itemxml helper tdi return out todoitemxmlhelper gettodolist todoitemxmlhelper todoitemxmlhelper todoitem tdilist thedesigner gettodolist gettodoitemlist tdilist todoitem tdilist getposter addelement todoitemxmlhelper return vector containing the resolved critics list used by todo tee public vector resolved criticxml helper get resolved critics list vector resolved criticxml helper out new vector resolved criticxml helper set resolved critic resolved set designer the designer get to do list get resolved items synchronized resolved set for resolved critic rci resolved set if rci null out add element new resolved criticxml helper rci return out resolvedcriticxmlhelper getresolvedcriticslist resolvedcriticxmlhelper resolvedcriticxmlhelper resolvedcritic resolvedset thedesigner gettodolist getresolveditems resolvedset resolvedcritic resolvedset addelement resolvedcriticxmlhelper there is not yet any repair task for the to do model but this is open to implement as and when any problems areas are discovered inherit doc public string repair return todo inheritdoc constructor for uml generalizable element generalization list model public uml generalizable element generalization list model super generalization model get meta types get generalization umlgeneralizableelementgeneralizationlistmodel umlgeneralizableelementgeneralizationlistmodel getmetatypes getgeneralization protected void build model list if get target null model get facade isa generalizable element get target set all elements model get facade get generalizations get target buildmodellist gettarget getfacade isageneralizableelement gettarget setallelements getfacade getgeneralizations gettarget protected boolean is valid element object element return model get facade isa generalization element model get facade get generalizations get target contains element isvalidelement getfacade isageneralization getfacade getgeneralizations gettarget the constructor param c the category param d the description the constructor param c the category param d the description param m the more info url param p the predicate deprecated for 0 27 3 by tfmorris use link uml check item string string string org argouml util predicate public uml check item string c string d string m org tigris gef util predicate p super c d m p umlcheckitem umlcheckitem the constructor param c the category param d the description param m the more info url param p the predicate public uml check item string c string d string m org argouml util predicate p super c d m p umlcheckitem override public string expand string res object dm int search pos 0 int match pos res index of ocl evaluator ocl start search pos replace all occurances of offender with the name of the first offender while match pos 1 int end expr res index of ocl evaluator ocl end match pos 1 string expr res substring match pos ocl evaluator ocl start length end expr string eval str null try eval str critic ocl evaluator get instance eval to string dm expr catch expansion exception e really ought to have a critic exception to throw here log error failed to evaluate critic expression e catch invalid element exception e the modelelement must have been deleted ignore this it will pass eval str translator localize misc name deleted log debug expr expr eval str res res substring 0 match pos eval str res substring end expr ocl evaluator ocl end length search pos end expr 1 match pos res index of ocl evaluator ocl start search pos return res searchpos matchpos indexof oclevaluator ocl_start searchpos matchpos endexpr indexof oclevaluator ocl_end matchpos matchpos oclevaluator ocl_start endexpr evalstr evalstr criticoclevaluator getinstance evaltostring expansionexception criticexception invalidelementexception evalstr evalstr matchpos evalstr endexpr oclevaluator ocl_end searchpos endexpr matchpos indexof oclevaluator ocl_start searchpos the constructor param o the target public action visibility public object o super checkbox visibility public uc false put value selected boolean value of model get visibility kind get public equals value of target o actionvisibilitypublic putvalue valueof getvisibilitykind getpublic valueoftarget see org argouml uml diagram ui abstract action radio menu item toggle value of target java lang object void toggle value of target object t model get core helper set visibility t model get visibility kind get public abstractactionradiomenuitem togglevalueoftarget togglevalueoftarget getcorehelper setvisibility getvisibilitykind getpublic make use of the default visibility which is public todo centralise this knowledge see org argouml uml diagram ui abstract action radio menu item value of target java lang object object value of target object t object v model get facade get visibility t return v null model get visibility kind get public v abstractactionradiomenuitem valueoftarget valueoftarget getfacade getvisibility getvisibilitykind getpublic the constructor public action new exception super button new exception put value action name translator localize button new exception actionnewexception putvalue public void action performed action event e object target target manager get instance get model target object ns null if model get facade isa namespace target ns target else ns model get facade get namespace target object new element model get common behavior factory create exception model get core helper set namespace new element ns target manager get instance set target new element super action performed e actionperformed actionevent targetmanager getinstance getmodeltarget getfacade isanamespace getfacade getnamespace newelement getcommonbehaviorfactory createexception getcorehelper setnamespace newelement targetmanager getinstance settarget newelement actionperformed the constructor public prop panel attribute super label attribute lookup icon attribute add field translator localize label name get name text field add field translator localize label type new uml combo box navigator translator localize label class navigate tooltip get type combo box add field translator localize label multiplicity get multiplicity combo box add field translator localize label owner get owner scroll add get visibility panel add separator add get changeability radio button panel j panel modifiers panel create border panel translator localize label modifiers modifiers panel add get owner scope checkbox add modifiers panel uml expression model2 initial model new uml initial value expression model this initial value j panel initial panel create border panel translator localize label initial value j scroll pane jsp new j scroll pane new uml expression body field initial model true jsp set horizontal scroll bar policy scroll pane constants horizontal scrollbar never jsp set vertical scroll bar policy scroll pane constants vertical scrollbar never initial panel add jsp initial panel add new uml expression language field initial model false add initial panel add action new action navigate container element add action new action navigate up previous down public list get family object parent if model get facade isa association end parent return model get facade get qualifiers parent return model get facade get attributes parent public object get parent object child return model get facade get model element container child add action new action navigate up next down public list get family object parent if model get facade isa association end parent return model get facade get qualifiers parent return model get facade get attributes parent public object get parent object child return model get facade get model element container child add action new action add attribute add action new action add data type add action new action add enumeration add action new action new stereotype add action get delete action proppanelattribute lookupicon addfield getnametextfield addfield umlcomboboxnavigator gettypecombobox addfield getmultiplicitycombobox addfield getownerscroll getvisibilitypanel addseparator getchangeabilityradiobuttonpanel jpanel modifierspanel createborderpanel modifierspanel getownerscopecheckbox modifierspanel umlexpressionmodel2 initialmodel umlinitialvalueexpressionmodel initialvalue jpanel initialpanel createborderpanel jscrollpane jscrollpane umlexpressionbodyfield initialmodel sethorizontalscrollbarpolicy scrollpaneconstants horizontal_scrollbar_never setverticalscrollbarpolicy scrollpaneconstants vertical_scrollbar_never initialpanel initialpanel umlexpressionlanguagefield initialmodel initialpanel addaction actionnavigatecontainerelement addaction actionnavigateuppreviousdown getfamily getfacade isaassociationend getfacade getqualifiers getfacade getattributes getparent getfacade getmodelelementcontainer addaction actionnavigateupnextdown getfamily getfacade isaassociationend getfacade getqualifiers getfacade getattributes getparent getfacade getmodelelementcontainer addaction actionaddattribute addaction actionadddatatype addaction actionaddenumeration addaction actionnewstereotype addaction getdeleteaction add action new action navigate up previous down public list get family object parent if model get facade isa association end parent return model get facade get qualifiers parent return model get facade get attributes parent addaction actionnavigateuppreviousdown getfamily getfacade isaassociationend getfacade getqualifiers getfacade getattributes public object get parent object child return model get facade get model element container child getparent getfacade getmodelelementcontainer add action new action navigate up next down public list get family object parent if model get facade isa association end parent return model get facade get qualifiers parent return model get facade get attributes parent addaction actionnavigateupnextdown getfamily getfacade isaassociationend getfacade getqualifiers getfacade getattributes public object get parent object child return model get facade get model element container child getparent getfacade getmodelelementcontainer the constructor param container the container of uml user interface components param property name the name of the property public uml initial value expression model uml user interface container container string property name super container property name propertyname umlinitialvalueexpressionmodel umluserinterfacecontainer propertyname propertyname public object get expression object target get target if target null return null return model get facade get initial value target getexpression gettarget getfacade getinitialvalue public void set expression object expression object target get target if target null throw new illegal state exception there is no target for get container model get core helper set initial value target expression setexpression gettarget illegalstateexception getcontainer getcorehelper setinitialvalue see org argouml uml ui uml expression model2 new expression public object new expression return model get data types factory create expression umlexpressionmodel2 newexpression newexpression getdatatypesfactory createexpression the constructor protected association end name notation associationendnamenotation public void initialise listener property change listener listener object model element add element listener listener model element new string name visibility stereotype collection stereotypes model get facade get stereotypes model element iterator iter stereotypes iterator while iter has next object o iter next add element listener listener o new string name remove initialiselistener propertychangelistener modelelement addelementlistener modelelement getfacade getstereotypes modelelement hasnext addelementlistener public void update listener property change listener listener object model element property change event pce object obj pce get source if obj model element stereotype equals pce get property name if pce instanceof add association event model get facade isa stereotype pce get new value new stereotype add element listener listener pce get new value new string name remove if pce instanceof remove association event model get facade isa stereotype pce get old value removed stereotype remove element listener listener pce get old value updatelistener propertychangelistener modelelement propertychangeevent getsource modelelement getpropertyname addassociationevent getfacade isastereotype getnewvalue addelementlistener getnewvalue removeassociationevent getfacade isastereotype getoldvalue removeelementlistener getoldvalue the constructor public cr node instance inside element setup head and desc add supported decision uml decision patterns crnodeinstanceinsideelement setupheadanddesc addsupporteddecision umldecision override public boolean predicate2 object dm designer dsgr if dm instanceof uml deployment diagram return no problem uml deployment diagram dd uml deployment diagram dm list set offs compute offenders dd if offs null return no problem return problem found umldeploymentdiagram no_problem umldeploymentdiagram umldeploymentdiagram listset computeoffenders no_problem problem_found override public to do item to do item object dm designer dsgr uml deployment diagram dd uml deployment diagram dm list set offs compute offenders dd return new uml to do item this offs dsgr todoitem todoitem umldeploymentdiagram umldeploymentdiagram listset computeoffenders umltodoitem override public boolean still valid to do item i designer dsgr if is active return false list set offs i get offenders uml deployment diagram dd uml deployment diagram offs get 0 if predicate dm dsgr return false list set new offs compute offenders dd boolean res offs equals new offs return res stillvalid todoitem isactive listset getoffenders umldeploymentdiagram umldeploymentdiagram listset newoffs computeoffenders newoffs if there are node instances that have an enclosing fig the returned vector set is not null then in the vector set are the uml deployment diagram and all figm node instances with an enclosing fig param dd the diagram to check return the set of offenders public list set compute offenders uml deployment diagram dd collection figs dd get layer get contents list set offs null for object obj figs if obj instanceof fig node instance continue fig node instance fn fig node instance obj if fn get enclosing fig null if offs null offs new list set offs add dd offs add fn return offs umldeploymentdiagram figmnodeinstances listset computeoffenders umldeploymentdiagram getlayer getcontents listset fignodeinstance fignodeinstance fignodeinstance getenclosingfig listset static initializer register all appropriate notations public void init notation provider factory2 npf notation provider factory2 get instance notation name name notation make notation uml 1 4 resource loader wrapper lookup icon resource uml notation npf add notation provider notation provider factory2 type name name model element name notation uml class npf add notation provider notation provider factory2 type transition name transition notation uml class npf add notation provider notation provider factory2 type statebody name state body notation uml class npf add notation provider notation provider factory2 type actionstate name action state notation uml class npf add notation provider notation provider factory2 type object name object notation uml class npf add notation provider notation provider factory2 type componentinstance name component instance notation uml class npf add notation provider notation provider factory2 type nodeinstance name node instance notation uml class npf add notation provider notation provider factory2 type objectflowstate type name object flow state type notation uml class npf add notation provider notation provider factory2 type objectflowstate state name object flow state state notation uml class npf add notation provider notation provider factory2 type callstate name call state notation uml class npf add notation provider notation provider factory2 type classifierrole name classifier role notation uml class npf add notation provider notation provider factory2 type message name message notation uml class npf add notation provider notation provider factory2 type attribute name attribute notation uml class npf add notation provider notation provider factory2 type operation name operation notation uml class npf add notation provider notation provider factory2 type extension point name extension point notation uml class npf add notation provider notation provider factory2 type association end name name association end name notation uml class npf add notation provider notation provider factory2 type association role name association role notation uml class npf add notation provider notation provider factory2 type association name name association name notation uml class npf add notation provider notation provider factory2 type multiplicity name multiplicity notation uml class npf add notation provider notation provider factory2 type enumeration literal name enumeration literal notation uml class notation provider factory2 get instance set default notation name initialise the notation utility uml new notation utility uml init notationproviderfactory2 notationproviderfactory2 getinstance notationname makenotation resourceloaderwrapper lookupiconresource umlnotation addnotationprovider notationproviderfactory2 type_name modelelementnamenotationuml addnotationprovider notationproviderfactory2 type_transition transitionnotationuml addnotationprovider notationproviderfactory2 type_statebody statebodynotationuml addnotationprovider notationproviderfactory2 type_actionstate actionstatenotationuml addnotationprovider notationproviderfactory2 type_object objectnotationuml addnotationprovider notationproviderfactory2 type_componentinstance componentinstancenotationuml addnotationprovider notationproviderfactory2 type_nodeinstance nodeinstancenotationuml addnotationprovider notationproviderfactory2 type_objectflowstate_type objectflowstatetypenotationuml addnotationprovider notationproviderfactory2 type_objectflowstate_state objectflowstatestatenotationuml addnotationprovider notationproviderfactory2 type_callstate callstatenotationuml addnotationprovider notationproviderfactory2 type_classifierrole classifierrolenotationuml addnotationprovider notationproviderfactory2 type_message messagenotationuml addnotationprovider notationproviderfactory2 type_attribute attributenotationuml addnotationprovider notationproviderfactory2 type_operation operationnotationuml addnotationprovider notationproviderfactory2 type_extension_point extensionpointnotationuml addnotationprovider notationproviderfactory2 type_association_end_name associationendnamenotationuml addnotationprovider notationproviderfactory2 type_association_role associationrolenotationuml addnotationprovider notationproviderfactory2 type_association_name associationnamenotationuml addnotationprovider notationproviderfactory2 type_multiplicity multiplicitynotationuml addnotationprovider notationproviderfactory2 type_enumeration_literal enumerationliteralnotationuml notationproviderfactory2 getinstance setdefaultnotation notationutilityuml notationutilityuml public list gui settings tab interface get project settings tabs return collections empty list guisettingstabinterface getprojectsettingstabs emptylist public list gui settings tab interface get settings tabs return collections empty list guisettingstabinterface getsettingstabs emptylist public list abstract argoj panel get details tabs return collections empty list abstractargojpanel getdetailstabs emptylist returns the number of components in this list p this method is identical to code size code which implements the code list code interface defined in the 1 2 collections framework this method exists in conjunction with code set size code so that code size code is identifiable as a java bean property return the number of components in this list see size public int get size return delegate size setsize javabean getsize returns the component at the specified index blockquote b note b although this method is not deprecated the preferred method to use is code get int code which implements the code list code interface defined in the 1 2 collections framework blockquote param index an index into this list return the component at the specified index exception array index out of bounds exception if the code index code is negative or greater than the current size of this list see get int public object get element at int index object result null todo if this turns out to be a performance bottleneck we can probably optimize the common case by caching our iterator and current position assuming that the next request will be for a greater index iterator it delegate iterator while index 0 if it has next result it next else throw new array index out of bounds exception index return result arrayindexoutofboundsexception getelementat hasnext arrayindexoutofboundsexception returns the component at the specified index param index an index into this list return the component at the specified index exception array index out of bounds exception if the code index code is negative or greater than the current size of this list public object get int index return get element at index arrayindexoutofboundsexception getelementat param o object to search for return index of object or 1 if not found see java util list index of object public int index of object o int index 0 iterator it delegate iterator if o null while it has next if o it next return index index else while it has next if o equals it next return index index return 1 indexof indexof hasnext hasnext public int size return get size getsize public boolean is empty return delegate is empty isempty isempty public boolean contains object elem return delegate contains elem public boolean add object obj boolean status delegate add obj int index index of obj fire interval added this index index return status indexof fireintervaladded public boolean add all collection c boolean status delegate add all c fire contents changed this 0 delegate size 1 return status addall addall firecontentschanged public boolean remove object obj int index index of obj boolean rv delegate remove obj if index 0 fire interval removed this index index return rv indexof fireintervalremoved public boolean remove all collection c boolean status false for object o c status status remove o return status removeall override public string to string return delegate to string tostring tostring public object to array return delegate to array toarray toarray public object to array object a return delegate to array a toarray toarray public void clear int index1 delegate size 1 delegate clear if index1 0 fire interval removed this 0 index1 fireintervalremoved public boolean contains all collection c return delegate contains all c containsall containsall public iterator iterator return delegate iterator public boolean retain all collection c int size delegate size boolean status delegate retain all c todo is this the right range here fire contents changed this 0 size 1 return status retainall retainall firecontentschanged constructor for a new classifier role p an invisible link fig rect as the point of contact for connections link fig node model element big port with matching rectangle providing the graphic rendering link cover stereotype and name are rendered centrally in the rectangle deprecated for 0 27 4 by mvw use link fig classifier role object rectangle diagram settings suppress warnings deprecation deprecated public fig classifier role init classifier role figs set our bounds to those we are given rectangle r get bounds set bounds r x r y r width r height figrect fignodemodelelement bigport figclassifierrole diagramsettings suppresswarnings figclassifierrole initclassifierrolefigs getbounds setbounds variant constructor that associates the classifier role with a particular model element p classifier role is constructed with link fig classifier role p param gm the graph model to use ignored in this implementation param lay the layer param node the model element object to associate with this fig deprecated for 0 27 4 by mvw use link fig classifier role object rectangle diagram settings suppress warnings deprecation deprecated public fig classifier role suppress warnings unused graph model gm layer lay object node this set layer lay set owner node figclassifierrole figclassifierrole diagramsettings suppresswarnings figclassifierrole suppresswarnings graphmodel setlayer setowner construct a fig classifier role param owner owning uml element param bounds position and size size is ignored param settings render settings public fig classifier role object owner rectangle bounds diagram settings settings super owner bounds settings init classifier role figs if bounds null set location bounds x bounds y figclassifierrole figclassifierrole diagramsettings initclassifierrolefigs setlocation there should be no size calculations here since not all attributes are set yet private void init classifier role figs the big port and cover color of the big port is irrelevant set big port new fig rect x0 y0 default width default height debug color debug color cover new fig rect x0 y0 default width default height line color fill color the stereotype width is the same as the cover height is its default since the font is not yet set the text should be centered get stereotype fig set line width 0 get stereotype fig set visible true get stereotype fig set filled false get stereotype fig set fill color debug color get stereotype fig set bounds x0 y0 default width get stereotype fig get height the name width is the same as the cover height is the default the text of the name will be centered by default in the same place as the stereotype since at this stage the stereotype is not displayed being a classifier role it is underlined get name fig set line width 0 get name fig set return action fig text end editing get name fig set filled false get name fig set underline true get name fig set bounds x0 y0 default width get stereotype fig get height add figs to the fig node in back to front order add fig get big port add fig cover add fig get stereotype fig add fig get name fig initclassifierrolefigs setbigport figrect default_width default_height debug_color debug_color figrect default_width default_height line_color fill_color getstereotypefig setlinewidth getstereotypefig setvisible getstereotypefig setfilled getstereotypefig setfillcolor debug_color getstereotypefig setbounds default_width getstereotypefig getheight getnamefig setlinewidth getnamefig setreturnaction figtext end_editing getnamefig setfilled getnamefig setunderline getnamefig setbounds default_width getstereotypefig getheight fignode addfig getbigport addfig addfig getstereotypefig addfig getnamefig this syntax is compatible with the uml 1 4 specification override protected int get notation provider type return notation provider factory2 type classifierrole getnotationprovidertype notationproviderfactory2 type_classifierrole version of the clone to ensure all sub figs are copied p uses the generic superclass clone which gives a list of all the figs then initialize our instance variables from this list p return a new copy of the the current fig override public object clone fig classifier role fig clone fig classifier role super clone iterator it fig clone get figs iterator fig clone set big port fig rect it next fig clone cover fig rect it next it next fig clone set name fig fig text it next return fig clone figclassifierrole figclone figclassifierrole figclone getfigs figclone setbigport figrect figclone figrect figclone setnamefig figtext figclone update the stereotype text p if the stereotype text is non existent we must make sure it is marked not displayed and update the display accordingly p similarly if there is text we must make sure it is marked displayed p override protected void update stereotype text rectangle rect get bounds int stereotype height 0 if get stereotype fig is visible stereotype height get stereotype fig get height int height without stereo get height stereotype height get stereotype fig populate stereotype height 0 if get stereotype fig is visible stereotype height get stereotype fig get height int min width this get minimum size width if min width rect width rect width min width set bounds rect x rect y rect width height without stereo stereotype height calc bounds updatestereotypetext getbounds stereotypeheight getstereotypefig isvisible stereotypeheight getstereotypefig getheight heightwithoutstereo getheight stereotypeheight getstereotypefig stereotypeheight getstereotypefig isvisible stereotypeheight getstereotypefig getheight minwidth getminimumsize minwidth minwidth setbounds heightwithoutstereo stereotypeheight calcbounds see org tigris gef presentation fig set line color java awt color override public void set line color color col cover set line color col setlinecolor setlinecolor setlinecolor see org tigris gef presentation fig get line color override public color get line color return cover get line color getlinecolor getlinecolor getlinecolor see org tigris gef presentation fig set fill color java awt color override public void set fill color color col cover set fill color col setfillcolor setfillcolor setfillcolor see org tigris gef presentation fig get fill color override public color get fill color return cover get fill color getfillcolor getfillcolor getfillcolor see org tigris gef presentation fig set filled boolean override public void set filled boolean f cover set filled f setfilled setfilled setfilled override public boolean is filled return cover is filled isfilled isfilled see org tigris gef presentation fig set line width int override public void set line width int w cover set line width w setlinewidth setlinewidth setlinewidth see org tigris gef presentation fig get line width override public int get line width return cover get line width getlinewidth getlinewidth getlinewidth work out the minimum size that this fig can be p this should be the size of the stereotype name padding however we allow for the possible case that the cover or big port could be bigger still p return the minimum size of this fig override public dimension get minimum size dimension stereo min get stereotype fig get minimum size dimension name min get name fig get minimum size dimension new min new dimension name min width name min height if stereo min height 0 stereo min width 0 new min width math max new min width stereo min width new min height stereo min height new min height padding return new min getminimumsize stereomin getstereotypefig getminimumsize namemin getnamefig getminimumsize newmin namemin namemin stereomin stereomin newmin newmin stereomin newmin stereomin newmin newmin override set bounds to keep shapes looking right p set the bounds of all components of the fig the stereotype if any and name are centred in the fig p we allow for the requested bounds being too small and impose our minimum size if necessary p param x x coordinate of upper left corner param y y coordinate of upper left corner param w width of bounding box param h height of bounding box author 10 apr 2002 jeremy bennett mail jeremybennett com patch to allow for stereotype as well override protected void set standard bounds int x int y int w int h in the rather unlikely case that we have no name we give up if get name fig null return remember where we are at present so we can tell gef later then check we are as big as the minimum size rectangle old bounds get bounds dimension min size get minimum size int neww min size width w min size width w int newh min size height h min size height h dimension stereo min get stereotype fig get minimum size dimension name min get name fig get minimum size work out the padding each side depending on whether the stereotype is displayed and set bounds accordingly int extra each newh name min height stereo min height 2 if stereo min height 0 stereo min width 0 at least one stereotype is visible get stereotype fig set bounds x y extra each neww get stereotype fig get height get name fig set bounds x y stereo min height extra each neww name min height set the bounds of the big port and cover get big port set bounds x y neww newh cover set bounds x y neww newh record the changes in the instance variables of our parent tell gef and trigger the edges to reconsider themselves x x y y w neww h newh fire prop change bounds old bounds get bounds update edges setbounds setstandardbounds getnamefig oldbounds getbounds minsize getminimumsize minsize minsize minsize minsize stereomin getstereotypefig getminimumsize namemin getnamefig getminimumsize extraeach namemin stereomin stereomin stereomin getstereotypefig setbounds extraeach getstereotypefig getheight getnamefig setbounds stereomin extraeach namemin bigport getbigport setbounds setbounds _x _y _w _h firepropchange oldbounds getbounds updateedges override protected void update layout uml change event event super update layout event if event instanceof add association event event instanceof attribute change event todo we need to be more specific here about what to build rendering changed todo is this really needed damage updatelayout umlchangeevent updatelayout addassociationevent attributechangeevent renderingchanged see org tigris gef presentation fig make selection override public selection make selection return new selection classifier role this makeselection makeselection selectionclassifierrole see org argouml ui explorer rules perspective rule get rule name public string get rule name return translator localize misc summary operation perspectiverule getrulename getrulename public collection get children object parent if parent instanceof operations node return model get facade get operations operations node parent get parent return collections empty set getchildren operationsnode getfacade getoperations operationsnode getparent empty_set public set get dependencies object parent if parent instanceof operations node set set new hash set set add operations node parent get parent return set return collections empty set getdependencies operationsnode hashset operationsnode getparent empty_set construct a selection generalizable element param f fig for which to construct the selection object public selection generalizable element fig f super f selectiongeneralizableelement selectiongeneralizableelement override protected icon get icons editor ce globals cur editor graph model gm ce get graph model no generalizations in deployment diagrams if gm instanceof deployment diagram graph model return null if model get model management helper is read only get content get owner return new icon null inherit null null null return icons geticons cureditor graphmodel getgraphmodel deploymentdiagramgraphmodel getmodelmanagementhelper isreadonly getcontent getowner override protected string get instructions int i return instructions i base getinstructions override protected object get new edge type int i if i top i bottom return model get meta types get generalization return null getnewedgetype getmetatypes getgeneralization override protected boolean is reverse edge int i if i bottom return true return false isreverseedge override protected boolean is edge post process requested return use composite isedgepostprocessrequested usecomposite override public void mouse entered mouse event me super mouse entered me use composite me is shift down mouseentered mouseevent mouseentered usecomposite isshiftdown private t target public single element iterator t o target o singleelementiterator public boolean has next if done return true return false hasnext public t next if done done true return target throw new no such element exception nosuchelementexception public void remove throw new unsupported operation exception unsupportedoperationexception default constructor registers itself to receive help status events from the argouml event pump public argo status bar super argo event pump add listener argo event types any help event this argo event pump add listener argo event types any status event this argostatusbar argoeventpump addlistener argoeventtypes any_help_event argoeventpump addlistener argoeventtypes any_status_event public void project loaded argo status event e string status message format format translator localize statusmsg bar open project status read new object e get text show status on swing thread status projectloaded argostatusevent messageformat gettext showstatusonswingthread public void project modified argo status event e string status message format format translator localize statusmsg bar project modified new object e get text show status on swing thread status projectmodified argostatusevent messageformat gettext showstatusonswingthread public void project saved argo status event e string status message format format translator localize statusmsg bar save project status wrote new object e get text show status on swing thread status projectsaved argostatusevent messageformat gettext showstatusonswingthread public void status cleared argo status event e show status on swing thread statuscleared argostatusevent showstatusonswingthread public void status text argo status event e show status on swing thread e get text statustext argostatusevent showstatusonswingthread gettext public void help changed argo help event e show status on swing thread e get help text helpchanged argohelpevent showstatusonswingthread gethelptext public void help removed argo help event e show status on swing thread helpremoved argohelpevent showstatusonswingthread we run swing methods on the swing thread private void show status on swing thread final string status swing utilities invoke later new runnable public void run show status status showstatusonswingthread swingutilities invokelater showstatus private void show status on swing thread final string status swing utilities invoke later new runnable public void run show status status showstatusonswingthread swingutilities invokelater showstatus the constructor param x x param y y param w width param h height deprecated for 0 27 2 by mvw use link fig stereotypes group fig stereotypes group object java awt rectangle org argouml uml diagram diagram settings suppress warnings deprecation deprecated public fig stereotypes compartment int x int y int w int h super x y w h figstereotypesgroup figstereotypesgroup diagramsettings suppresswarnings figstereotypescompartment deprecated protected void create model element createmodelelement public abstract class abstract cognitive translator param key the key to localize return the localized value abstractcognitivetranslator param key the key to localize param args the array of arguments to format into the value return the localized and formatted value the constructor public cr object without classifier setup head and desc add supported decision uml decision patterns crobjectwithoutclassifier setupheadanddesc addsupporteddecision umldecision override public boolean predicate2 object dm designer dsgr if dm instanceof uml deployment diagram return no problem uml deployment diagram dd uml deployment diagram dm list set offs compute offenders dd if offs null return no problem return problem found umldeploymentdiagram no_problem umldeploymentdiagram umldeploymentdiagram listset computeoffenders no_problem problem_found override public to do item to do item object dm designer dsgr uml deployment diagram dd uml deployment diagram dm list set offs compute offenders dd return new uml to do item this offs dsgr todoitem todoitem umldeploymentdiagram umldeploymentdiagram listset computeoffenders umltodoitem override public boolean still valid to do item i designer dsgr if is active return false list set offs i get offenders uml deployment diagram dd uml deployment diagram offs get 0 if predicate dm dsgr return false list set new offs compute offenders dd boolean res offs equals new offs return res stillvalid todoitem isactive listset getoffenders umldeploymentdiagram umldeploymentdiagram listset newoffs computeoffenders newoffs if there are objects that are not inside a component or a component instance the returned vector set is not null then in the vector set are the uml deployment diagram and all fig objects with no enclosing fig component or fig component instance param dd the diagram to check return the set of offenders public list set compute offenders uml deployment diagram dd collection figs dd get layer get contents list set offs null for object obj figs if obj instanceof fig object continue fig object fo fig object obj if fo null object mobj fo get owner if mobj null collection col model get facade get classifiers mobj if col size 0 continue if offs null offs new list set offs add dd offs add fo return offs umldeploymentdiagram figobjects figcomponent figcomponentinstance listset computeoffenders umldeploymentdiagram getlayer getcontents listset figobject figobject figobject getowner getfacade getclassifiers listset constructor for action new argument public action new argument super actionnewargument actionnewargument public void action performed action event e super action performed e object target get target if model get facade isa action target object argument model get common behavior factory create argument model get common behavior helper add actual argument target argument target manager get instance set target argument actionperformed actionevent actionperformed gettarget getfacade isaaction getcommonbehaviorfactory createargument getcommonbehaviorhelper addactualargument targetmanager getinstance settarget public class go use case to extension point extends abstract perspective rule give a name to this rule p return the name of the rule code use case extension point code public string get rule name return translator localize misc use case extension point gousecasetoextensionpoint abstractperspectiverule getrulename public collection get children object parent if model get facade isa use case parent return model get facade get extension points parent return collections empty set getchildren getfacade isausecase getfacade getextensionpoints empty_set public set get dependencies object parent if model get facade isa use case parent set set new hash set set add parent return set return collections empty set getdependencies getfacade isausecase hashset empty_set public prop panel create prop panel object object if object instanceof uml use case diagram return new prop paneluml use case diagram return null proppanel createproppanel umlusecasediagram proppanelumlusecasediagram the default constructor for this class throws profile exception suppress warnings unchecked profile java profile uml throws profile exception profile model loader new resource model loader profile reference profile reference null try profile reference new core profile reference profile file catch malformedurl exception e throw new profile exception exception while creating profile reference e model profile model loader load model profile reference if model null model new array list model add model get model management factory create model add profile dependency uml add profile dependency code generation profileexception suppresswarnings profilejava profileexception profilemodelloader resourcemodelloader profilereference profilereference profilereference coreprofilereference profile_file malformedurlexception profileexception profilemodelloader loadmodel profilereference arraylist getmodelmanagementfactory createmodel addprofiledependency addprofiledependency codegeneration profile java throws profile exception this profile facade get manager get profile for class profileuml class get name profilejava profileexception profilefacade getmanager getprofileforclass getname public string get display name return name getdisplayname override public collection get profile packages return model getprofilepackages override public default type strategy get default type strategy return new default type strategy public object get default attribute type return model utils find type in model int model iterator next public object get default parameter type return model utils find type in model int model iterator next public object get default return type return model utils find type in model void model iterator next defaulttypestrategy getdefaulttypestrategy defaulttypestrategy getdefaultattributetype modelutils findtypeinmodel getdefaultparametertype modelutils findtypeinmodel getdefaultreturntype modelutils findtypeinmodel public default type strategy get default type strategy return new default type strategy public object get default attribute type return model utils find type in model int model iterator next defaulttypestrategy getdefaulttypestrategy defaulttypestrategy getdefaultattributetype modelutils findtypeinmodel public object get default parameter type return model utils find type in model int model iterator next getdefaultparametertype modelutils findtypeinmodel public object get default return type return model utils find type in model void model iterator next getdefaultreturntype modelutils findtypeinmodel the constructor public goto dialog super translator localize dialog gotodiagram title argo dialog ok cancel option false project p project manager get manager get current project all diagrams set results p get diagram list p get diagram list tab results has really large preferred height so divide in half to reduce size of dialog which will be sized based on this preferred size all diagrams set preferred size new dimension all diagrams get preferred size width all diagrams get preferred size height 2 all diagrams select result 0 j panel main panel new j panel new border layout j tabbed pane tabs new j tabbed pane main panel add tabs border layout center tabs add tab all diagrams all diagrams main panel add all diagrams border layout center set content main panel todo tabs for class state usecase help gotodialog argodialog ok_cancel_option projectmanager getmanager getcurrentproject alldiagrams setresults getdiagramlist getdiagramlist tabresults alldiagrams setpreferredsize alldiagrams getpreferredsize alldiagrams getpreferredsize alldiagrams selectresult jpanel mainpanel jpanel borderlayout jtabbedpane jtabbedpane mainpanel borderlayout addtab alldiagrams mainpanel alldiagrams borderlayout setcontent mainpanel public void action performed action event e if e get source get ok button all diagrams do double click else super action performed e actionperformed actionevent getsource getokbutton alldiagrams dodoubleclick actionperformed protected void name buttons super name buttons name button get ok button button go to selection name button get cancel button button close namebuttons namebuttons namebutton getokbutton namebutton getcancelbutton the constructor public prop panel destroy action super label destroy action lookup icon destroy action proppaneldestroyaction lookupicon destroyaction the constructor param container the container of uml user interface components param property name the name of the property public uml time expression model uml user interface container container string property name super container property name propertyname umltimeexpressionmodel umluserinterfacecontainer propertyname propertyname see org argouml uml ui uml expression model2 get expression public object get expression return model get facade get when target manager get instance get target umlexpressionmodel2 getexpression getexpression getfacade getwhen targetmanager getinstance gettarget public void set expression object expression object target target manager get instance get target if target null throw new illegal state exception there is no target for get container model get state machines helper set when target expression setexpression targetmanager getinstance gettarget illegalstateexception getcontainer getstatemachineshelper setwhen see org argouml uml ui uml expression model2 new expression public object new expression log debug new time expression return model get data types factory create time expression umlexpressionmodel2 newexpression newexpression getdatatypesfactory createtimeexpression the constructor public design issues dialog super translator localize dialog title design issues false final int width 320 final int height 400 init main panel j scroll pane scroll new j scroll pane main panel scroll set preferred size new dimension width height set content scroll designissuesdialog initmainpanel jscrollpane jscrollpane mainpanel setpreferredsize setcontent private void init main panel decision model dm designer the designer get decision model list decision decs dm get decision list grid bag layout gb new grid bag layout main panel set layout gb main panel set border border factory create empty border 5 5 5 5 grid bag constraints c new grid bag constraints c fill grid bag constraints both c weightx 1 0 c weighty 0 0 c ipadx 3 c ipady 3 c gridy 0 c gridx 0 c gridwidth 1 j label dec title label new j label translator localize label decision gb set constraints dec title label c main panel add dec title label c gridy 0 c gridx 2 c gridwidth 8 j label pri label new j label translator localize label decision priority gb set constraints pri label c main panel add pri label c gridy 1 c gridx 2 c gridwidth 2 j label off label new j label translator localize label off gb set constraints off label c main panel add off label c gridy 1 c gridx 4 c gridwidth 2 j label low label new j label translator localize label low gb set constraints low label c main panel add low label c gridy 1 c gridx 6 c gridwidth 2 j label medium label new j label translator localize label medium gb set constraints medium label c main panel add medium label c gridy 1 c gridx 8 c gridwidth 2 j label high label new j label translator localize label high gb set constraints high label c main panel add high label c gridy 2 for decision d decs j label dec label new j label d get name j label value label new j label get value text d get priority j slider dec slide new j slider swing constants horizontal 1 4 d get priority 0 4 d get priority dec slide set inverted true dec slide set major tick spacing 1 dec slide set paint ticks true dec slide set snap to ticks true dec slide set paint labels true dec slide add change listener this dimension orig size dec slide get preferred size dimension small size new dimension orig size width 2 orig size height dec slide set size small size dec slide set preferred size small size sliders to decisions put dec slide d sliders to digits put dec slide value label c gridx 0 c gridwidth 1 c weightx 0 0 c ipadx 3 gb set constraints dec label c main panel add dec label c gridx 1 c gridwidth 1 c weightx 0 0 c ipadx 0 gb set constraints value label c main panel add value label c gridx 2 c gridwidth 8 c weightx 1 0 gb set constraints dec slide c main panel add dec slide c gridy initmainpanel decisionmodel thedesigner getdecisionmodel getdecisionlist gridbaglayout gridbaglayout mainpanel setlayout mainpanel setborder borderfactory createemptyborder gridbagconstraints gridbagconstraints gridbagconstraints jlabel dectitlelabel jlabel setconstraints dectitlelabel mainpanel dectitlelabel jlabel prilabel jlabel setconstraints prilabel mainpanel prilabel jlabel offlabel jlabel setconstraints offlabel mainpanel offlabel jlabel lowlabel jlabel setconstraints lowlabel mainpanel lowlabel jlabel mediumlabel jlabel setconstraints mediumlabel mainpanel mediumlabel jlabel highlabel jlabel setconstraints highlabel mainpanel highlabel jlabel declabel jlabel getname jlabel valuelabel jlabel getvaluetext getpriority jslider decslide jslider swingconstants getpriority getpriority decslide setinverted decslide setmajortickspacing decslide setpaintticks decslide setsnaptoticks decslide setpaintlabels decslide addchangelistener origsize decslide getpreferredsize smallsize origsize origsize decslide setsize smallsize decslide setpreferredsize smallsize sliderstodecisions decslide sliderstodigits decslide valuelabel setconstraints declabel mainpanel declabel setconstraints valuelabel mainpanel valuelabel setconstraints decslide mainpanel decslide public void state changed change event ce j slider src slider j slider ce get source decision d sliders to decisions get src slider j label val lab sliders to digits get src slider int pri src slider get value d set priority pri 4 0 pri val lab set text get value text pri statechanged changeevent jslider srcslider jslider getsource sliderstodecisions srcslider jlabel vallab sliderstodigits srcslider srcslider getvalue setpriority vallab settext getvaluetext private string get value text int priority string label switch priority case 1 label 1 break case 2 label 2 break case 3 label 3 break case 0 case 4 label translator localize label off break return label getvaluetext the constructor public action navigate opposite assoc end super button go opposite true put value action small icon resource loader wrapper lookup icon resource association end actionnavigateoppositeassocend putvalue small_icon resourceloaderwrapper lookupiconresource associationend see org argouml uml ui abstract action navigate navigate to java lang object protected object navigate to object source return model get facade get next end source abstractactionnavigate navigateto navigateto getfacade getnextend public boolean is enabled object o target manager get instance get target if o null model get facade isa association end o collection asc ends model get facade get connections model get facade get association o return asc ends size 2 return false isenabled targetmanager getinstance gettarget getfacade isaassociationend ascends getfacade getconnections getfacade getassociation ascends the constructor public style panel fig interface super add to display pane oper check box oper check box set selected false oper check box add item listener this stylepanelfiginterface addtodisplaypane opercheckbox opercheckbox setselected opercheckbox additemlistener public void refresh refresh transaction true super refresh fig interface ti fig interface get panel target oper check box set selected ti is operations visible refresh transaction false refreshtransaction figinterface figinterface getpaneltarget opercheckbox setselected isoperationsvisible refreshtransaction public void item state changed item event e if refresh transaction object src e get source if src oper check box fig interface get panel target set operations visible oper check box is selected else super item state changed e itemstatechanged itemevent refreshtransaction getsource opercheckbox figinterface getpaneltarget setoperationsvisible opercheckbox isselected itemstatechanged construct a new selection component instance instance for the given fig param f the given fig selectioncomponentinstanceinstance override protected icon get icons if model get model management helper is read only get content get owner return new icon null dep dep right null null return icons geticons getmodelmanagementhelper isreadonly getcontent getowner depright override protected string get instructions int index return instructions index base getinstructions override protected object get new edge type int index return model get meta types get dependency getnewedgetype getmetatypes getdependency override protected object get new node int index return model get common behavior factory create component instance getnewnode getcommonbehaviorfactory createcomponentinstance override protected object get new node type int index return model get meta types get component instance getnewnodetype getmetatypes getcomponentinstance override protected boolean is reverse edge int index if index bottom index left return true return false isreverseedge the constructor public wiz many names wizmanynames set the list of offending model elements param elements the list of offending model elements public void set model elements list elements int m size elements size for int i 0 i 3 i m size i if model get facade isa model element elements get i throw new illegal argument exception the list should contain model elements in the first 3 positions mes elements modelelements modelelements setmodelelements msize msize getfacade isamodelelement illegalargumentexception public j panel make panel int new step switch new step case 1 if step1 null list string names new array list string int size mes size for int i 0 i size i object me mes get i names add model get facade get name me step1 new wiz step many text fields this instructions names return step1 default return null jpanel makepanel newstep newstep arraylist getfacade getname wizstepmanytextfields public void do action int old step log debug do action old step switch old step case 1 list string new names null if step1 null new names step1 get string list try int size mes size for int i 0 i size i object me mes get i model get core helper set name me new names get i catch exception pve log error could not set name pve break default doaction oldstep doaction oldstep oldstep newnames newnames getstringlist getcorehelper setname newnames the constructor public goals dialog super translator localize dialog title design goals false init main panel j scroll pane scroll new j scroll pane main panel scroll set preferred size new dimension dialog width dialog height set content scroll goalsdialog initmainpanel jscrollpane jscrollpane mainpanel setpreferredsize dialog_width dialog_height setcontent private void init main panel goal model gm designer the designer get goal model list goal goals gm get goal list grid bag layout gb new grid bag layout main panel set layout gb main panel set border border factory create empty border 5 5 5 5 grid bag constraints c new grid bag constraints c fill grid bag constraints both c weightx 1 0 c weighty 0 0 c ipadx 3 c ipady 3 c gridy 0 c gridx 0 j label pri label new j label priority gb set constraints pri label c mainpanel add pri label c gridy 0 c gridx 1 j label off label new j label off gb set constraints off label c mainpanel add off label c gridy 0 c gridx 2 j label low label new j label low gb set constraints low label c mainpanel add low label c gridy 0 c gridx 3 j label two label new j label ad gb set constraints two label c mainpanel add two label c gridy 0 c gridx 4 j label three label new j label asd gb set constraints three label c mainpanel add three label c gridy 0 c gridx 5 j label four label new j label asd gb set constraints four label c mainpanel add four label c gridy 0 c gridx 6 j label high label new j label high gb set constraints high label c mainpanel add high label c gridy 1 for goal goal goals j label dec label new j label goal get name j label value label new j label goal get priority j slider dec slide new j slider swing constants horizontal 0 5 goal get priority dec slide set paint ticks true dec slide set paint labels true dec slide add change listener this dimension orig size dec slide get preferred size dimension small size new dimension orig size width 2 orig size height dec slide set size small size dec slide set preferred size small size sliders to goals put dec slide goal sliders to digits put dec slide value label c gridx 0 c gridwidth 1 c weightx 0 0 c ipadx 3 gb set constraints dec label c main panel add dec label c gridx 1 c gridwidth 1 c weightx 0 0 c ipadx 0 gb set constraints value label c main panel add value label c gridx 2 c gridwidth 6 c weightx 1 0 gb set constraints dec slide c main panel add dec slide c gridy initmainpanel goalmodel thedesigner getgoalmodel getgoallist gridbaglayout gridbaglayout mainpanel setlayout mainpanel setborder borderfactory createemptyborder gridbagconstraints gridbagconstraints gridbagconstraints jlabel prilabel jlabel setconstraints prilabel _mainpanel prilabel jlabel offlabel jlabel setconstraints offlabel _mainpanel offlabel jlabel lowlabel jlabel setconstraints lowlabel _mainpanel lowlabel jlabel twolabel jlabel setconstraints twolabel _mainpanel twolabel jlabel threelabel jlabel setconstraints threelabel _mainpanel threelabel jlabel fourlabel jlabel setconstraints fourlabel _mainpanel fourlabel jlabel highlabel jlabel setconstraints highlabel _mainpanel highlabel jlabel declabel jlabel getname jlabel valuelabel jlabel getpriority jslider decslide jslider swingconstants getpriority decslide setpaintticks decslide setpaintlabels decslide addchangelistener origsize decslide getpreferredsize smallsize origsize origsize decslide setsize smallsize decslide setpreferredsize smallsize sliderstogoals decslide sliderstodigits decslide valuelabel setconstraints declabel mainpanel declabel setconstraints valuelabel mainpanel valuelabel setconstraints decslide mainpanel decslide public void state changed change event ce j slider src slider j slider ce get source goal goal sliders to goals get src slider j label val lab sliders to digits get src slider int pri src slider get value goal set priority pri if pri 0 val lab set text translator localize label off else val lab set text pri statechanged changeevent jslider srcslider jslider getsource sliderstogoals srcslider jlabel vallab sliderstodigits srcslider srcslider getvalue setpriority vallab settext vallab settext construct a new selection action state for the given fig param f the given fig public selection action state fig f super f selectionactionstate selectionactionstate param b true if the button is enabled public void set outgoing button enabled boolean b set outgoing right button enabled b set outgoing below button enabled b setoutgoingbuttonenabled setoutgoingrightbuttonenabled setoutgoingbelowbuttonenabled param b true if the button is enabled public void set incoming button enabled boolean b set incoming above button enabled b set incoming left button enabled b setincomingbuttonenabled setincomingabovebuttonenabled setincomingleftbuttonenabled param b true if the button is enabled public void set incoming left button enabled boolean b show incoming left b setincomingleftbuttonenabled showincomingleft param b true if the button is enabled public void set outgoing right button enabled boolean b show outgoing right b setoutgoingrightbuttonenabled showoutgoingright param b true if the button is enabled public void set incoming above button enabled boolean b show incoming above b setincomingabovebuttonenabled showincomingabove param b true if the button is enabled public void set outgoing below button enabled boolean b show outgoing below b setoutgoingbelowbuttonenabled showoutgoingbelow override protected object get new node type int index return model get meta types get action state getnewnodetype getmetatypes getactionstate override protected object get new node int arg0 return model get activity graphs factory create action state getnewnode getactivitygraphsfactory createactionstate override protected icon get icons icon working icons new icon icons length system arraycopy icons 0 working icons 0 icons length if show outgoing below working icons bottom base null if show incoming above working icons top base null if show incoming left working icons left base null if show outgoing right working icons right base null return working icons geticons workingicons workingicons showoutgoingbelow workingicons showincomingabove workingicons showincomingleft workingicons showoutgoingright workingicons workingicons override protected string get instructions int index return instructions index base getinstructions override protected object get new edge type int index return model get meta types get transition getnewedgetype getmetatypes gettransition override protected boolean is reverse edge int index if index top index left return true return false isreverseedge see org argouml ui explorer rules perspective rule get rule name public string get rule name return translator localize misc model collaboration perspectiverule getrulename getrulename public collection get children object parent if model get facade isa model parent collection col model get model management helper get all model elements of kind parent model get meta types get collaboration list return list new array list iterator it col iterator while it has next object collab it next if model get facade get represented classifier collab null model get facade get represented operation collab null return list add collab return return list return collections empty set getchildren getfacade isamodel getmodelmanagementhelper getallmodelelementsofkind getmetatypes getcollaboration returnlist arraylist hasnext getfacade getrepresentedclassifier getfacade getrepresentedoperation returnlist returnlist empty_set see org argouml ui explorer rules perspective rule get dependencies java lang object public set get dependencies object parent todo what return collections empty set perspectiverule getdependencies getdependencies empty_set construct a new fig association class during load from pgml deprecated for 0 27 3 by tfmorris use link fig association class object diagram settings suppress warnings deprecation deprecated public fig association class super set between nearest points true fig poly get fig set rectilinear false set dashed false figassociationclass figassociationclass diagramsettings suppresswarnings figassociationclass setbetweennearestpoints figpoly getfig setrectilinear setdashed construct a new fig association class from user interaction param ed the edge param lay the layer deprecated for 0 27 3 by tfmorris use link fig association class object diagram settings suppress warnings deprecation deprecated public fig association class object ed layer lay this set layer lay set owner ed figassociationclass figassociationclass diagramsettings suppresswarnings figassociationclass setlayer setowner construct an association class figure for the given association class model element using the rendering settings param element model element param settings rendering settings public fig association class object element diagram settings settings super element settings set between nearest points true fig poly get fig set rectilinear false set dashed false associationclass figassociationclass diagramsettings setbetweennearestpoints figpoly getfig setrectilinear setdashed this overrides the parent class to do nothing here an association class has no name label but instead has the name and stereotype editable in the association classes class box param owner owning uml element param settings rendering settings protected void create name label object owner diagram settings settings createnamelabel diagramsettings remove entire composite fig from diagram discover the attached fig edge association class and the fig class association class attached to that remove them from the diagram before removing this override protected void remove from diagram impl fig edge association class fig edge link null list edges null fig edge port fig edge port get edge port if fig edge port null edges fig edge port get fig edges if edges null for iterator it edges iterator it has next fig edge link null object o it next if o instanceof fig edge association class fig edge link fig edge association class o if fig edge link null fig node fig class box fig edge link get dest fig node if fig class box instanceof fig class association class fig class box fig edge link get source fig node fig edge link remove from diagram impl fig class association class fig class box remove from diagram impl super remove from diagram impl figedgeassociationclass figclassassociationclass removefromdiagramimpl figedgeassociationclass figedgelink figedgeport figedgeport getedgeport figedgeport figedgeport getfigedges hasnext figedgelink figedgeassociationclass figedgelink figedgeassociationclass figedgelink fignode figclassbox figedgelink getdestfignode figclassbox figclassassociationclass figclassbox figedgelink getsourcefignode figedgelink removefromdiagramimpl figclassassociationclass figclassbox removefromdiagramimpl removefromdiagramimpl override public void set fig fig f super set fig f get fig set dashed false setfig setfig getfig setdashed see org argouml uml diagram ui fig edge model element get name fig override protected fig text get name fig return null figedgemodelelement getnamefig figtext getnamefig return the bounds of the operations compartment for the associated fig class association class see org argouml uml diagram attributes compartment container get attributes bounds public rectangle get attributes bounds if get association class null return get association class get attributes bounds else return new rectangle 0 0 0 0 figclassassociationclass attributescompartmentcontainer getattributesbounds getattributesbounds getassociationclass getassociationclass getattributesbounds public boolean is attributes visible if get association class null return get association class is attributes visible else return true isattributesvisible getassociationclass getassociationclass isattributesvisible public void set attributes visible boolean visible if get association class null get association class set attributes visible visible setattributesvisible getassociationclass getassociationclass setattributesvisible public boolean is path visible if get association class null return get association class is path visible else return false ispathvisible getassociationclass getassociationclass ispathvisible public void set path visible boolean visible if get association class null get association class set path visible visible setpathvisible getassociationclass getassociationclass setpathvisible public rectangle get operations bounds if get association class null return get association class get operations bounds else return new rectangle 0 0 0 0 getoperationsbounds getassociationclass getassociationclass getoperationsbounds public boolean is operations visible if get association class null return get association class is operations visible else return true isoperationsvisible getassociationclass getassociationclass isoperationsvisible public void set operations visible boolean visible if get association class null get association class set operations visible visible setoperationsvisible getassociationclass getassociationclass setoperationsvisible set fill color of contained fig class association class param color new fill color override public void set fill color color color if get association class null get association class set fill color color figclassassociationclass setfillcolor getassociationclass getassociationclass setfillcolor return fill color of contained fig class association class override public color get fill color if get association class null return get association class get fill color else return fill color figclassassociationclass getfillcolor getassociationclass getassociationclass getfillcolor fill_color set line color of contained fig class association class param arg0 new line color override public void set line color color arg0 super set line color arg0 if get association class null get association class set line color arg0 if get fig edge association class null get fig edge association class set line color arg0 figclassassociationclass setlinecolor setlinecolor getassociationclass getassociationclass setlinecolor getfigedgeassociationclass getfigedgeassociationclass setlinecolor gets fig class association class that is contained in this fig association class return fig class association class that is contained in this fig association class public fig class association class get association class fig edge association class fig edge link null list edges null fig edge port fig edge port this get edge port if fig edge port null edges fig edge port get fig edges if edges null for iterator it edges iterator it has next fig edge link null object o it next if o instanceof fig edge association class fig edge link fig edge association class o fig node fig class box null if fig edge link null fig class box fig edge link get dest fig node if fig class box instanceof fig class association class fig class box fig edge link get source fig node return fig class association class fig class box figclassassociationclass figassociationclass figclassassociationclass figassociationclass figclassassociationclass getassociationclass figedgeassociationclass figedgelink figedgeport figedgeport getedgeport figedgeport figedgeport getfigedges hasnext figedgelink figedgeassociationclass figedgelink figedgeassociationclass fignode figclassbox figedgelink figclassbox figedgelink getdestfignode figclassbox figclassassociationclass figclassbox figedgelink getsourcefignode figclassassociationclass figclassbox gets fig edge association class that is contained in this fig association class return fig edge association class that is contained in this fig association class public fig edge association class get fig edge association class fig edge association class fig edge link null list edges null fig edge port fig edge port this get edge port if fig edge port null edges fig edge port get fig edges if edges null for iterator it edges iterator it has next fig edge link null object o it next if o instanceof fig edge association class fig edge link fig edge association class o return fig edge link figedgeassociationclass figassociationclass figedgeassociationclass figassociationclass figedgeassociationclass getfigedgeassociationclass figedgeassociationclass figedgelink figedgeport figedgeport getedgeport figedgeport figedgeport getfigedges hasnext figedgelink figedgeassociationclass figedgelink figedgeassociationclass figedgelink the constructor param container the container of uml user interface components param property name the name of the property public uml script expression model uml user interface container container string property name super container property name propertyname umlscriptexpressionmodel umluserinterfacecontainer propertyname propertyname see org argouml uml ui uml expression model2 get expression public object get expression return model get facade get script target manager get instance get target umlexpressionmodel2 getexpression getexpression getfacade getscript targetmanager getinstance gettarget see org argouml uml ui uml expression model2 set expression java lang object public void set expression object expression model get common behavior helper set script target manager get instance get target expression umlexpressionmodel2 setexpression setexpression getcommonbehaviorhelper setscript targetmanager getinstance gettarget see org argouml uml ui uml expression model2 new expression public object new expression return model get data types factory create action expression umlexpressionmodel2 newexpression newexpression getdatatypesfactory createactionexpression see org argouml ui explorer rules perspective rule get rule name public string get rule name return translator localize misc operation sequence diagram perspectiverule getrulename getrulename public collection get children object parent if model get facade isa operation parent collection col model get facade get collaborations parent set argo diagram ret new hash set argo diagram project p project manager get manager get current project for argo diagram diagram p get diagram list if diagram instanceof uml sequence diagram col contains sequence diagram graph model uml sequence diagram diagram get graph model get collaboration ret add diagram return ret return collections empty set getchildren getfacade isaoperation getfacade getcollaborations argodiagram hashset argodiagram projectmanager getmanager getcurrentproject argodiagram getdiagramlist umlsequencediagram sequencediagramgraphmodel umlsequencediagram getgraphmodel getcollaboration empty_set see org argouml ui explorer rules perspective rule get dependencies java lang object public set get dependencies object parent todo what return collections empty set perspectiverule getdependencies getdependencies empty_set private diagram factory super todo use our extension registration mechanism for our internal classes as well so everything is treated the same diagram classes put diagram type class uml class diagram class diagram classes put diagram type use case uml use case diagram class diagram classes put diagram type state uml state diagram class diagram classes put diagram type deployment uml deployment diagram class diagram classes put diagram type collaboration uml collaboration diagram class diagram classes put diagram type activity uml activity diagram class diagram classes put diagram type sequence uml sequence diagram class diagramfactory diagramclasses diagramtype umlclassdiagram diagramclasses diagramtype usecase umlusecasediagram diagramclasses diagramtype umlstatediagram diagramclasses diagramtype umldeploymentdiagram diagramclasses diagramtype umlcollaborationdiagram diagramclasses diagramtype umlactivitydiagram diagramclasses diagramtype umlsequencediagram return the singleton public static diagram factory get instance return diagram factory diagramfactory getinstance diagramfactory factory method to create a new default instance of an argo diagram param namespace the namespace that in directly owns the elements on the diagram return the newly instantiated class diagram public argo diagram create default diagram object namespace return create diagram diagram type class namespace null argodiagram argodiagram createdefaultdiagram creatediagram diagramtype factory method to create a new instance of an argo diagram param type the class of rendering diagram to create param namespace the namespace that in directly owns the elements on the diagram param machine the state machine for the diagram only statemachine activitygraph return the newly instantiated class diagram deprecated for 0 27 3 by tfmorris use link create diagram type object diagram settings the owner argument should be the machine for a state diagram or activity diagram which can figure out the correct namespace from that and the namespace for all others deprecated public argo diagram create diagram final diagram type type final object namespace final object machine diagram settings settings project manager get manager get current project get project settings get default diagram settings return create internal type namespace machine settings argodiagram statemachine diagramtype diagramsettings argodiagram creatediagram diagramtype diagramsettings projectmanager getmanager getcurrentproject getprojectsettings getdefaultdiagramsettings createinternal factory method to create a new instance of an argo diagram param type the class of rendering diagram to create param owner the owning uml element for most diagrams this is a namespace but for the state diagram it is the state machine and for the activity diagram it is the context param settings default rendering settings for the diagram return the newly instantiated class diagram public argo diagram create final diagram type type final object owner final diagram settings settings return create internal type owner null settings argodiagram argodiagram diagramtype diagramsettings createinternal private argo diagram create internal final diagram type type final object namespace final object machine diagram settings settings final argo diagram diagram if settings null throw new illegal argument exception diagram settings may not be null object factory factories get type if factory null object owner if machine null owner machine else owner namespace if factory instanceof diagram factory interface2 diagram diagram factory interface2 factory create diagram owner string null settings else if factory instanceof diagram factory interface diagram diagram factory interface factory create diagram namespace machine diagram set diagram settings settings else this shouldn t be possible but just in case throw new illegal state exception unknown factory type registered else if type diagram type state type diagram type activity machine null diagram create diagram diagram classes get type null namespace else diagram create diagram diagram classes get type namespace machine diagram set diagram settings settings return diagram argodiagram createinternal diagramtype diagramsettings argodiagram illegalargumentexception diagramsettings diagramfactoryinterface2 diagramfactoryinterface2 creatediagram diagramfactoryinterface diagramfactoryinterface creatediagram setdiagramsettings illegalstateexception diagramtype diagramtype creatediagram diagramclasses creatediagram diagramclasses setdiagramsettings factory method to create a new instance of an argo diagram param type the class of rendering diagram to create param namespace the namespace that in directly owns the elements on the diagram param machine the state machine for the diagram only statemachine activitygraph return the newly instantiated class diagram deprecated for 0 25 4 by tfmorris use link create diagram type object diagram settings the owner argument should be the machine for a state diagram or activity diagram which can figure out the correct namespace from that and the namespace for all others deprecated public argo diagram create diagram class type object namespace object machine argo diagram diagram null class di type null todo convert all to use standard factory registration if type uml class diagram class diagram new uml class diagram namespace di type class diagram class else if type uml use case diagram class diagram new uml use case diagram namespace di type use case diagram class else if type uml state diagram class diagram new uml state diagram namespace machine di type state diagram class else if type uml deployment diagram class diagram new uml deployment diagram namespace di type deployment diagram class else if type uml collaboration diagram class diagram new uml collaboration diagram namespace di type collaboration diagram class else if type uml activity diagram class diagram new uml activity diagram namespace machine di type activity diagram class else if type uml sequence diagram class diagram new uml sequence diagram namespace di type sequence diagram class if diagram null throw new illegal argument exception unknown diagram type if model get diagram interchange model null todo this is never executed as ludos di work was never finished diagram get graph model add graph event listener graph change adapter get instance the diagram are always owned by the model in this first implementation di diagram dd graph change adapter get instance create diagram di type namespace uml mutable graph support diagram get graph model set di diagram dd return diagram argodiagram statemachine diagramtype diagramsettings argodiagram creatediagram argodiagram ditype umlclassdiagram umlclassdiagram ditype classdiagram umlusecasediagram umlusecasediagram ditype usecasediagram umlstatediagram umlstatediagram ditype statediagram umldeploymentdiagram umldeploymentdiagram ditype deploymentdiagram umlcollaborationdiagram umlcollaborationdiagram ditype collaborationdiagram umlactivitydiagram umlactivitydiagram ditype activitydiagram umlsequencediagram umlsequencediagram ditype sequencediagram illegalargumentexception getdiagraminterchangemodel getgraphmodel addgrapheventlistener graphchangeadapter getinstance didiagram graphchangeadapter getinstance creatediagram ditype umlmutablegraphsupport getgraphmodel setdidiagram factory method to remove a diagram param diagram the diagram return the diagram that was removed public argo diagram remove diagram argo diagram diagram di diagram dd uml mutable graph support diagram get graph model get di diagram if dd null graph change adapter get instance remove diagram dd return diagram argodiagram removediagram argodiagram didiagram umlmutablegraphsupport getgraphmodel getdidiagram graphchangeadapter getinstance removediagram deprecated for 0 27 2 by tfmorris undocumented and unused internally deprecated public object create rendering element object diagram object model graph node renderer rend diagram diagram get layer get graph node renderer object rendering element rend get fig node for model 0 0 no style properties return rendering element createrenderingelement graphnoderenderer getlayer getgraphnoderenderer renderingelement getfignodefor nostyleproperties renderingelement register a specific factory class to create diagram instances for a specific diagram type param type the diagram type param factory the factory instance deprecated for 0 27 3 by tfmorris use link register diagram factory diagram type diagram factory interface2 deprecated public void register diagram factory final diagram type type final diagram factory interface factory factories put type factory registerdiagramfactory diagramtype diagramfactoryinterface2 registerdiagramfactory diagramtype diagramfactoryinterface register a specific factory class to create diagram instances for a specific diagram type param type the diagram type param factory the factory instance public void register diagram factory final diagram type type final diagram factory interface2 factory factories put type factory registerdiagramfactory diagramtype diagramfactoryinterface2 the constructor public to do by goal super combobox todo perspective goal add sub tree model new go list to goals to items todobygoal addsubtreemodel golisttogoalstoitems public void to do items changed to do list event tde log debug to do items changed object path new object 2 path 0 designer the designer get to do list for goal g designer the designer get goal list path 1 g int n matching items 0 for to do item item tde get to do item list if item supports g continue n matching items if n matching items 0 continue int child indices new int n matching items object children new object n matching items n matching items 0 for to do item item tde get to do item list if item supports g continue child indices n matching items get index of child g item children n matching items item n matching items fire tree nodes changed this path child indices children todoitemschanged todolistevent todoitemschanged thedesigner gettodolist thedesigner getgoallist nmatchingitems todoitem gettodoitemlist nmatchingitems nmatchingitems childindices nmatchingitems nmatchingitems nmatchingitems todoitem gettodoitemlist childindices nmatchingitems getindexofchild nmatchingitems nmatchingitems firetreenodeschanged childindices public void to do items added to do list event tde log debug to do item added object path new object 2 path 0 designer the designer get to do list for goal g designer the designer get goal list path 1 g int n matching items 0 for to do item item tde get to do item list if item supports g continue n matching items if n matching items 0 continue int child indices new int n matching items object children new object n matching items n matching items 0 todo this shouldn t require two passes through the list tfm for to do item item tde get to do item list if item supports g continue child indices n matching items get index of child g item children n matching items item n matching items fire tree nodes inserted this path child indices children todoitemsadded todolistevent todoitemadded thedesigner gettodolist thedesigner getgoallist nmatchingitems todoitem gettodoitemlist nmatchingitems nmatchingitems childindices nmatchingitems nmatchingitems nmatchingitems todoitem gettodoitemlist childindices nmatchingitems getindexofchild nmatchingitems nmatchingitems firetreenodesinserted childindices public void to do items removed to do list event tde log debug to do item added object path new object 2 path 0 designer the designer get to do list for goal g designer the designer get goal list log debug to do item removed updating decision node boolean any in goal false for to do item item tde get to do item list if item supports g any in goal true if any in goal continue path 1 g fire tree nodes changed this path child indices children fire tree structure changed path todoitemsremoved todolistevent todoitemadded thedesigner gettodolist thedesigner getgoallist todoitemremoved anyingoal todoitem gettodoitemlist anyingoal anyingoal firetreenodeschanged childindices firetreestructurechanged see org argouml cognitive to do list listener to do list changed org argouml cognitive to do list event public void to do list changed to do list event tde todolistlistener todolistchanged todolistevent todolistchanged todolistevent construct a new action set add association end mode p param name the action description public action set add association end mode string name super mode create association end class edge class model get meta types get association end name actionsetaddassociationendmode actionsetaddassociationendmode modecreateassociationend edgeclass getmetatypes getassociationend constructor for uml association end qualifiers list model public uml association end qualifiers list model super qualifier umlassociationendqualifierslistmodel umlassociationendqualifierslistmodel protected void build model list if get target null set all elements model get facade get qualifiers get target buildmodellist gettarget setallelements getfacade getqualifiers gettarget see org argouml uml ui uml model element list model2 is valid element object protected boolean is valid element object o return model get facade isa attribute o model get facade get qualifiers get target contains o umlmodelelementlistmodel2 isvalidelement isvalidelement getfacade isaattribute getfacade getqualifiers gettarget protected void move down int index object assoc end get target list c model get facade get qualifiers assoc end if index c size 1 object mem c get index model get core helper remove qualifier assoc end mem model get core helper add qualifier assoc end index 1 mem movedown assocend gettarget getfacade getqualifiers assocend getcorehelper removequalifier assocend getcorehelper addqualifier assocend see org argouml uml ui uml model element ordered list model2 move to bottom int override protected void move to bottom int index object assoc end get target list c model get facade get qualifiers assoc end if index c size 1 object mem c get index model get core helper remove qualifier assoc end mem model get core helper add qualifier assoc end c size 1 mem umlmodelelementorderedlistmodel2 movetobottom movetobottom assocend gettarget getfacade getqualifiers assocend getcorehelper removequalifier assocend getcorehelper addqualifier assocend see org argouml uml ui uml model element ordered list model2 move to top int override protected void move to top int index object clss get target list c model get facade get qualifiers clss if index 0 object mem c get index model get core helper remove qualifier clss mem model get core helper add qualifier clss 0 mem umlmodelelementorderedlistmodel2 movetotop movetotop gettarget getfacade getqualifiers getcorehelper removequalifier getcorehelper addqualifier find the project that contains a given figure because we don t have a single reliable way to do this we try a bunch of different approaches param fig the fig to return the project of return the project containing the given fig public static project get project argo fig fig if fig instanceof fig fig f fig fig layer perspective layer layer perspective f get layer if layer null todo without this we fail to draw e g a class but is this a good solution why is the layer not set in the constructor editor editor globals cur editor if editor null todo the above doesn t work reliably in a constructor we need a better way of getting default fig settings for the owning project rather than using the project manager singleton tfm return project manager get manager get current project layer lay editor get layer manager get active layer if lay instanceof layer perspective layer layer perspective lay if layer null return project manager get manager get current project graph model gm layer get graph model if gm instanceof uml mutable graph support project project uml mutable graph support gm get project if project null return project return project manager get manager get current project return null getproject argofig layerperspective layerperspective getlayer cureditor projectmanager getmanager getcurrentproject getlayermanager getactivelayer layerperspective layerperspective projectmanager getmanager getcurrentproject graphmodel getgraphmodel umlmutablegraphsupport umlmutablegraphsupport getproject projectmanager getmanager getcurrentproject add pretty little markers for debugging purposes we use three markers so you can see the anchor the computed target position and how collision detection affects a largish box static void mark position fig edge fe int pct int delta int angle int offset color color set this to true on to enable debugging figs if false fig f f new fig circle 0 0 5 5 color color red anchor position fe add path item f new path item placement fe f pct delta angle 0 f new fig rect 0 0 100 20 color color red f set filled false fe add path item f new path item placement fe f pct delta angle offset f new fig circle 0 0 5 5 color color blue fe add path item f new path item placement fe f pct delta angle offset markposition figedge figcircle addpathitem pathitemplacement figrect setfilled addpathitem pathitemplacement figcircle addpathitem pathitemplacement construct a property panel for include model elements public prop panel include super label include lookup icon include add field label name get name text field add field label namespace get namespace selector add separator add field label usecase base get single row scroll new uml include base list model add field label addition get single row scroll new uml include addition list model add the toolbar buttons add action new action navigate namespace add action new action new stereotype add action get delete action proppanelinclude lookupicon addfield getnametextfield addfield getnamespaceselector addseparator addfield getsinglerowscroll umlincludebaselistmodel addfield getsinglerowscroll umlincludeadditionlistmodel addaction actionnavigatenamespace addaction actionnewstereotype addaction getdeleteaction get the current base use case of the include relationship p return the use case that is the base of this include relationship or code null code if there is none public object get base object base null object target get target if model get facade isa include target base model get facade get base target return base usecase getbase gettarget getfacade isainclude getfacade getbase set the base use case of the include relationship p param base the use case to set as the base of this include relationship public void set base object m use case base object target get target if model get facade isa include target model get use cases helper set base target base usecase setbase musecase gettarget getfacade isainclude getusecaseshelper setbase get the current addition use case of the include relationship p return the use case that is the addition of this include relationship or code null code if there is none public object get addition object addition null object target get target if model get facade isa include target addition model get facade get addition target return addition usecase getaddition gettarget getfacade isainclude getfacade getaddition set the addition use case of the include relationship p param addition the use case to set as the addition of this include relationship public void set addition object m use case addition object target get target if model get facade isa include target model get use cases helper set addition target addition usecase setaddition musecase gettarget getfacade isainclude getusecaseshelper setaddition predicate to test if a model element may appear in the list of potential use cases p em note em we don t try to prevent the user setting up circular include relationships this may be necessary temporarily for example while reversing a relationship it is up to a critic to track this p param mod elem the model element to test return code true code if mod elem is a use case code false code otherwise public boolean is acceptable use case object m model element mod elem return model get facade isa use case mod elem modelem modelelement modelem isacceptableusecase mmodelelement modelem getfacade isausecase modelem see org argouml ui explorer rules abstract perspective rule get rule name public string get rule name return translator localize misc model element contained lost elements abstractperspectiverule getrulename getrulename public collection get children object parent collection ret new array list if model get facade isa namespace parent collection col model get model management helper get all model elements of kind parent model get meta types get state machine iterator it col iterator while it has next object machine it next if model get facade get namespace machine parent object context model get facade get context machine if context null ret add machine return ret getchildren arraylist getfacade isanamespace getmodelmanagementhelper getallmodelelementsofkind getmetatypes getstatemachine hasnext getfacade getnamespace getfacade getcontext public set get dependencies object parent set set new hash set if model get facade isa namespace parent set add parent return set getdependencies hashset getfacade isanamespace see org argouml persistence abstract file persister get extension override public string get extension return xml abstractfilepersister getextension getextension returns false only argo specific files have an icon see org argouml persistence abstract file persister has an icon override public boolean has an icon return false abstractfilepersister hasanicon hasanicon constructor for uml state deferrable event list model public uml state deferrable event list model super deferrable event umlstatedeferrableeventlistmodel umlstatedeferrableeventlistmodel deferrableevent see org argouml uml ui uml model element list model2 build model list protected void build model list set all elements model get facade get deferrable events get target umlmodelelementlistmodel2 buildmodellist buildmodellist setallelements getfacade getdeferrableevents gettarget see org argouml uml ui uml model element list model2 is valid element object protected boolean is valid element object element return model get facade get deferrable events get target contains element umlmodelelementlistmodel2 isvalidelement isvalidelement getfacade getdeferrableevents gettarget override public boolean build popup j popup menu popup int index popup menu new event build menu popup action new event roles deferrable event get target return true buildpopup jpopupmenu popupmenunewevent buildmenu actionnewevent deferrable_event gettarget the constructor public cr invalid fork setup head and desc add supported decision uml decision state machines add trigger incoming crinvalidfork setupheadanddesc addsupporteddecision umldecision state_machines addtrigger public boolean predicate2 object dm designer dsgr if model get facade isa pseudostate dm return no problem object k model get facade get kind dm if model get facade equals pseudostate kind k model get pseudostate kind get fork return no problem collection outgoing model get facade get outgoings dm collection incoming model get facade get incomings dm int n outgoing outgoing null 0 outgoing size int n incoming incoming null 0 incoming size if n incoming 1 return problem found if n outgoing 1 return problem found return no problem getfacade isapseudostate no_problem getfacade getkind getfacade equalspseudostatekind getpseudostatekind getfork no_problem getfacade getoutgoings getfacade getincomings noutgoing nincoming nincoming problem_found noutgoing problem_found no_problem public set object get criticized design materials set object ret new hash set object ret add model get meta types get pseudostate return ret getcriticizeddesignmaterials hashset getmetatypes getpseudostate constructor for action new send action protected action new send action super put value action name translator localize button new sendaction actionnewsendaction actionnewsendaction putvalue see org argouml uml ui behavior common behavior action new action create action protected object create action return model get common behavior factory create send action common_behavior actionnewaction createaction createaction getcommonbehaviorfactory createsendaction return returns the singleton public static action new send action get instance return singleton actionnewsendaction getinstance public static action new action get button instance action new action a new action new send action public void action performed action event e object target target manager get instance get model target if model get facade isa transition target return set target target super action performed e a put value short description a get value action name object icon resource loader wrapper lookup icon resource send action a put value small icon icon a put value role roles effect return a actionnewaction getbuttoninstance actionnewaction actionnewsendaction actionperformed actionevent targetmanager getinstance getmodeltarget getfacade isatransition settarget actionperformed putvalue short_description getvalue resourceloaderwrapper lookupiconresource sendaction putvalue small_icon putvalue public void action performed action event e object target target manager get instance get model target if model get facade isa transition target return set target target super action performed e actionperformed actionevent targetmanager getinstance getmodeltarget getfacade isatransition settarget actionperformed deprecated for 0 27 3 by tfmorris use link fig text group object diagram settings suppress warnings deprecation deprecated public fig text group super figtextgroup diagramsettings suppresswarnings figtextgroup construct a fig group with the given render settings param owner owning uml element param settings rendering settings public fig text group object owner diagram settings settings super owner settings figgroup figtextgroup diagramsettings adds a fig text to the list with figs makes sure that the figtexts do not overlap inherit doc override public void add fig fig f super add fig f update fig texts calc bounds figtext inheritdoc addfig addfig updatefigtexts calcbounds updates the fig texts fig texts without text equals are not shown the rest of the figtexts are shown non overlapping the first figtext added via add fig is shown at the bottom of the fig text group private void update fig texts int height 0 for fig fig list fig get figs int fig height fig get minimum size height fig set bounds getx gety height fig get width fig height fig end trans height fig get height figtexts figtexts addfig figtextgroup updatefigtexts getfigs figheight getminimumsize setbounds getwidth figheight endtrans getheight override public void calc bounds update fig texts if supress calc bounds super calc bounds get the widest of all textfigs calculate the total height int max width 0 int height 0 for fig fig list fig get figs fig calc bounds if fig get width max width max width fig get width fig set height fig get minimum size height height fig get height w max width h height calcbounds updatefigtexts supresscalcbounds calcbounds maxwidth getfigs calcbounds getwidth maxwidth maxwidth getwidth setheight getminimumsize getheight _w maxwidth _h override public void remove from diagram for fig fig list fig get figs fig remove from diagram super remove from diagram removefromdiagram getfigs removefromdiagram removefromdiagram override public void delete from model for fig fig list fig get figs fig delete from model super delete from model deletefrommodel getfigs deletefrommodel deletefrommodel see java awt event mouse listener mouse pressed java awt event mouse event public void mouse pressed mouse event me ignored mouselistener mousepressed mouseevent mousepressed mouseevent see java awt event mouse listener mouse released java awt event mouse event public void mouse released mouse event me ignored mouselistener mousereleased mouseevent mousereleased mouseevent see java awt event mouse listener mouse entered java awt event mouse event public void mouse entered mouse event me ignored mouselistener mouseentered mouseevent mouseentered mouseevent see java awt event mouse listener mouse exited java awt event mouse event public void mouse exited mouse event me ignored mouselistener mouseexited mouseevent mouseexited mouseevent handle mouse click if the user double clicks on any part of this fig group pass it down to one of the internal figs this allows the user to initiate direct text editing inherit doc public void mouse clicked mouse event me if me is consumed return if me get click count 2 fig f hit fig new rectangle me getx 2 me gety 2 4 4 if f instanceof mouse listener mouse listener f mouse clicked me if me is consumed return if the mouse event hasn t been consumed it means that the user double clicked on an area that didn t contain an editable fig in this case scan through the list and start editing the first fig with editable text this allows us to remove the editable box clarifier outline and just outline the whole fig text group see issue 1048 for object o this get figs f fig o if f instanceof mouse listener f instanceof fig text if fig text f get editable mouse listener f mouse clicked me todo 21 12 2008 dthompson mouse clicked me above consumes the mouse event internally so i suspect that this line might not be necessary me consume figgroup inheritdoc mouseclicked mouseevent isconsumed getclickcount hitfig mouselistener mouselistener mouseclicked isconsumed figtextgroup getfigs mouselistener figtext figtext geteditable mouselistener mouseclicked mouseclicked checks to see if the given click point rectangle hits the fig text group this overrides the fig group implementation of hit where the hit rectangle must hit a sub fig now we count a hit if the user clicks anywhere within the outer bounds of the fig text group see issue 5620 this method is important for registering double clicks to edit text boxes in a fig text group param r the hit rectangle return true if the given hit rectangle intersects or is contained by the outer limits of this fig text group see org tigris gef presentation fig group hit java awt rectangle public boolean hit rectangle r return this intersects r figtextgroup figgroup figtextgroup figtextgroup figtextgroup figgroup returns true if the bounds of the group contain the given point used to check if a mouse click occurs within the fig text group overrides the fig group implementation of contains where the x y point must hit a sub fig now we count a hit if the user clicks anywhere within the outer bounds of the fig text group see issue 5620 this method is important for handling mouse pressed events including the start of mouse drags param x the x coordinate of the point to test param y the y coordinate of the point to test return true if the given point is within the outer limits of this fig text group see org tigris gef presentation fig group contains int int public boolean contains int x int y return x x x x w y y y y h figtextgroup figgroup figtextgroup mousepressed figtextgroup figgroup _x _x _w _y _y _h constructor for uml generalizable element root check box public uml generalizable element root check box super translator localize checkbox root lc action set generalizable element root get instance is root umlgeneralizableelementrootcheckbox umlgeneralizableelementrootcheckbox actionsetgeneralizableelementroot getinstance isroot public void build model object target get target if target null model get facade isauml element target set selected model get facade is root target else set selected false buildmodel gettarget getfacade isaumlelement setselected getfacade isroot setselected construct a property panel for node instance elements public prop panel node instance super label node instance lookup icon node instance add field translator localize label name get name text field add field translator localize label namespace get namespace selector add separator add field translator localize label stimili sent get stimuli sender scroll add field translator localize label stimili received get stimuli receiver scroll j list res list new uml linked list new uml container resident list model add field translator localize label residents new j scroll pane res list add separator abstract action add model element2 a new action add instance classifier model get meta types get node j scroll pane classifier scroll new j scroll pane new uml mutable linked list new uml instance classifier list model a null null true add field translator localize label classifiers classifier scroll add action new action navigate container element add action new action new stereotype add action get delete action proppanelnodeinstance lookupicon nodeinstance addfield getnametextfield addfield getnamespaceselector addseparator addfield getstimulisenderscroll addfield getstimulireceiverscroll jlist reslist umllinkedlist umlcontainerresidentlistmodel addfield jscrollpane reslist addseparator abstractactionaddmodelelement2 actionaddinstanceclassifier getmetatypes getnode jscrollpane classifierscroll jscrollpane umlmutablelinkedlist umlinstanceclassifierlistmodel addfield classifierscroll addaction actionnavigatecontainerelement addaction actionnewstereotype addaction getdeleteaction see org argouml ui explorer rules perspective rule get rule name public string get rule name return translator localize misc class attribute perspectiverule getrulename getrulename public collection get children object parent if model get facade isa classifier parent return model get facade get structural features parent return collections empty set getchildren getfacade isaclassifier getfacade getstructuralfeatures empty_set public set get dependencies object parent if model get facade isa classifier parent set set new hash set set add parent return set return collections empty set getdependencies getfacade isaclassifier hashset empty_set constructor for uml extension point use case list model public uml extension point use case list model super use case umlextensionpointusecaselistmodel umlextensionpointusecaselistmodel usecase see org argouml uml ui uml model element list model2 build model list protected void build model list add element model get facade get use case get target umlmodelelementlistmodel2 buildmodellist buildmodellist addelement getfacade getusecase gettarget see org argouml uml ui uml model element list model2 is valid element object protected boolean is valid element object o return model get facade isa use case o model get facade get use case get target o umlmodelelementlistmodel2 isvalidelement isvalidelement getfacade isausecase getfacade getusecase gettarget constructor for action new change event protected action new change event super put value name translator localize button new changeevent actionnewchangeevent actionnewchangeevent putvalue java lang object protected object create event object ns return model get state machines factory build change event ns createevent getstatemachinesfactory buildchangeevent return returns the singleton public static action new change event get singleton return singleton actionnewchangeevent getsingleton construct the exception the version information found param message the message public version exception string message super message versionexception constructor for action add classifier role base protected action add classifier role base super actionaddclassifierrolebase actionaddclassifierrolebase protected list get choices list vec new array list vec add all model get collaborations helper get all possible bases get target return vec getchoices arraylist addall getcollaborationshelper getallpossiblebases gettarget protected list get selected list vec new array list vec add all model get facade get bases get target return vec getselected arraylist addall getfacade getbases gettarget protected string get dialog title return translator localize dialog title add bases getdialogtitle protected void do it collection selected object role get target model get collaborations helper set bases role selected doit gettarget getcollaborationshelper setbases this class should only be used in a static context so make the constructor private private translator alternate initialization entry point for use by argo eclipse it leaves out telling gef about bundles that it won t be able to access p note this must be called before any other methods are called to work properly param locale the configured locale or or null public static void init for eclipse string locale init internal locale argoeclipse initforeclipse initinternal initialise the locale param locale a string with the locale public static void init string locale assert initialized gui test action open project fails over this initialized true retain the original one system default locale locale get default if equals locale locale null set locale locale else set locale new locale system get property user language en system get property user country todo this is using internal knowledge of gef it should handle this itself tfm mvw move into something like main initgef localizer add resource gef base org tigris gef base base resource bundle localizer add resource gef pres org tigris gef presentation presentation resource bundle guitestactionopenproject systemdefaultlocale getdefault setlocale setlocale getproperty getproperty addresource gefbase baseresourcebundle addresource gefpres presentationresourcebundle private static void init internal string s assert initialized initialized true retain the original one system default locale locale get default if equals s s null set locale s else set locale new locale system get property user language en system get property user country todo this is using internal knowledge of gef it should handle this itself tfm localizer add resource gef base org tigris gef base base resource bundle localizer add resource gef pres org tigris gef presentation presentation resource bundle initinternal systemdefaultlocale getdefault setlocale setlocale getproperty getproperty addresource gefbase baseresourcebundle addresource gefpres presentationresourcebundle for locale selection p todo detect the available locales from the available files return locales used in argouml public static locale get locales return new locale locale english locale french new locale es locale german locale italian new locale nb new locale pt new locale ru locale chinese locale uk getlocales change the current locale the string with the name follows this bnf format p language country p only use this before the gui is initialized param name the name of the new locale public static void set locale string name this is needed for the j unit tests otherwise a assert initialized would suffice if initialized init en string language name string country int i name index of if i 0 name length i 1 language name substring 0 i country name substring i 1 set locale new locale language country _ setlocale junit indexof _ setlocale change the current locale p only use this before the gui is initialized param locale the new locale public static void set locale locale locale locale set default locale bundles new hash map string resource bundle setlocale setdefault hashmap resourcebundle returns the original value of the default locale for this instance of the java virtual machine which is independent from the selected configuration return the original system default locale public static locale get system default locale return system default locale getsystemdefaultlocale systemdefaultlocale add another class loader that the resource bundle could be located through param cl the classloader to add public static void add class loader class loader cl class loaders add cl addclassloader classloader classloaders loads the bundle if not already loaded param name the name of the bundle to load private static void load bundle string name if bundles contains key name return string resource bundles path name resource bundle bundle null try log debug loading resource locale locale locale get default bundle resource bundle get bundle resource locale catch missing resource exception e1 log debug resource resource not found in the default class loader iterator iter class loaders iterator while iter has next class loader cl class loader iter next try log debug loading resource from cl bundle resource bundle get bundle resource locale get default cl break catch missing resource exception e2 log debug resource resource not found in cl bundles put name bundle loadbundle containskey bundles_path resourcebundle getdefault resourcebundle getbundle missingresourceexception classloaders hasnext classloader classloader resourcebundle getbundle getdefault missingresourceexception calculate the name from the key param key the key to look up return the name of the file or code null code if not possible private static string get name string key if key null return null int index of dot key index of if index of dot 0 return key substring 0 index of dot return null getname indexofdot indexof indexofdot indexofdot synonym for message format to encourage developers to convert existing uses of localize string concatentation to use this method instead see org argouml i18n translator message format string object param key the key to localize param args the arguments as objects to be inserted in string return string the localized string public static string localize string key object args return message format key args messageformat messageformat messageformat the main function of this class that localizes strings param key the key to localize return the localized string public static string localize string key this is needed for the j unit tests otherwise a assert initialized would suffice if initialized init en if key null throw new illegal argument exception null string name get name key if name null return localizer localize uml menu key load bundle name resource bundle bundle bundles get name if bundle null log debug bundle name for resource key not found return key try return bundle get string key catch missing resource exception e log debug resource key not found return key junit illegalargumentexception getname umlmenu loadbundle resourcebundle getstring missingresourceexception generates an localized string with arguments p the localized string is a pattern to be processed by link message format param key the key to localize param args the args as objects inserted in the localized string return the localized string with inserted arguments public static string message format string key object args return new message format localize key format args messageformat messageformat messageformat constructor for uml state machine top list model public uml transition guard list model super guard umlstatemachinetoplistmodel umltransitionguardlistmodel see org argouml uml ui uml model element list model2 build model list protected void build model list remove all elements add element model get facade get guard get target umlmodelelementlistmodel2 buildmodellist buildmodellist removeallelements addelement getfacade getguard gettarget see org argouml uml ui uml model element list model2 is valid element object protected boolean is valid element object element return element model get facade get guard get target umlmodelelementlistmodel2 isvalidelement isvalidelement getfacade getguard gettarget override public boolean build popup j popup menu popup int index abstract action new model element a action new guard get singleton a set target target manager get instance get target popup add a return true buildpopup jpopupmenu abstractactionnewmodelelement actionnewguard getsingleton settarget targetmanager getinstance gettarget override protected boolean has popup return true haspopup constructor for uml model element name document public uml discriminator name document super discriminator umlmodelelementnamedocument umldiscriminatornamedocument see org argouml uml ui uml plain text document set property java lang string protected void set property string text model get core helper set discriminator get target text umlplaintextdocument setproperty setproperty getcorehelper setdiscriminator gettarget see org argouml uml ui uml plain text document get property protected string get property return string model get facade get discriminator get target umlplaintextdocument getproperty getproperty getfacade getdiscriminator gettarget new ocl evaluator private critic ocl evaluator no instantiations oclevaluator criticoclevaluator return the singleton of critic ocl evaluator public static final critic ocl evaluator get instance return instance criticoclevaluator criticoclevaluator getinstance public synchronized string eval to string object self string expr throws expansion exception return evaluator eval to string self expr evaltostring expansionexception evaltostring public synchronized string eval to string object self string expr string sep throws expansion exception return evaluator eval to string self expr sep evaltostring expansionexception evaltostring public object get child object parent int index if parent instanceof to do list return knowledge type node get type list get index if parent instanceof knowledge type node knowledge type node ktn knowledge type node parent list to do item item list designer the designer get to do list get to do item list synchronized item list for to do item item item list if item contains knowledge type ktn get name if index 0 return item index throw new index out of bounds exception get child shouldnt get here go list to type to item getchild todolist knowledgetypenode gettypelist knowledgetypenode knowledgetypenode knowledgetypenode todoitem itemlist thedesigner gettodolist gettodoitemlist itemlist todoitem itemlist containsknowledgetype getname indexoutofboundsexception getchild golisttotypetoitem public int get child count object parent if parent instanceof to do list return knowledge type node get type list size if parent instanceof knowledge type node knowledge type node ktn knowledge type node parent int count 0 list to do item item list designer the designer get to do list get to do item list synchronized item list for to do item item item list if item contains knowledge type ktn get name count return count return 0 getchildcount todolist knowledgetypenode gettypelist knowledgetypenode knowledgetypenode knowledgetypenode todoitem itemlist thedesigner gettodolist gettodoitemlist itemlist todoitem itemlist containsknowledgetype getname public int get index of child object parent object child if parent instanceof to do list return knowledge type node get type list index of child if parent instanceof knowledge type node instead of making a new list decrement index return when found and index 0 list to do item candidates new array list to do item knowledge type node ktn knowledge type node parent list to do item item list designer the designer get to do list get to do item list synchronized item list for to do item item item list if item contains knowledge type ktn get name candidates add item return candidates index of child return 1 getindexofchild todolist knowledgetypenode gettypelist indexof knowledgetypenode todoitem arraylist todoitem knowledgetypenode knowledgetypenode todoitem itemlist thedesigner gettodolist gettodoitemlist itemlist todoitem itemlist containsknowledgetype getname indexof public boolean is leaf object node if node instanceof to do list return false if node instanceof knowledge type node knowledge type node ktn knowledge type node node list to do item item list designer the designer get to do list get to do item list synchronized item list for to do item item item list if item contains knowledge type ktn get name return false return true isleaf todolist knowledgetypenode knowledgetypenode knowledgetypenode todoitem itemlist thedesigner gettodolist gettodoitemlist itemlist todoitem itemlist containsknowledgetype getname javax swing tree tree path java lang object public void value for path changed tree path path object new value treepath valueforpathchanged treepath newvalue see javax swing tree tree model add tree model listener javax swing event tree model listener public void add tree model listener tree model listener l treemodel addtreemodellistener treemodellistener addtreemodellistener treemodellistener see javax swing tree tree model remove tree model listener javax swing event tree model listener public void remove tree model listener tree model listener l treemodel removetreemodellistener treemodellistener removetreemodellistener treemodellistener public class up arrow icon implements icon public void paint icon component c graphics g int x int y int w get icon width h get icon height g set color color black polygon p new polygon p add point x y h p add point x w 2 1 y p add point x w y h g fill polygon p uparrowicon painticon geticonwidth geticonheight setcolor addpoint addpoint addpoint fillpolygon g fill polygon p public int get icon width return 9 fillpolygon geticonwidth return 9 public int get icon height return 9 geticonheight construct an enumeration based on the given iterator param iterator the iterator to be wrapped public iterator enumeration iterator t iterator it iterator iteratorenumeration public boolean has more elements return it has next hasmoreelements hasnext public t next element return it next nextelement construct new stereotype tab public tab stereotype super translator localize tab stereotype image icon null set orientation orientation equals west orientation equals east vertical get instance horizontal get instance set icon new up arrow icon set layout new border layout remove get title label no title looks better panel make panel add panel tabstereotype imageicon setorientation getinstance getinstance seticon uparrowicon setlayout borderlayout gettitlelabel makepanel create a j panel with everything on it return a newly created j panel private j panel make panel make lists selected list model new uml model element stereotype list model selected list new uml linked list selected list model selected scroll new j scroll pane selected list selected scroll set border border factory create empty border inset px inset px inset px inset px selected scroll set column header view new j label translator localize label applied stereotypes available list model new uml model stereotype list model available list new uml linked list available list model available scroll new j scroll pane available list available scroll set border border factory create empty border inset px inset px inset px inset px available scroll set column header view new j label translator localize label available stereotypes make buttons add st button new j button add st button set tool tip text translator localize button add stereo remove st button new j button remove st button set tool tip text translator localize button remove stereo add st button set enabled false remove st button set enabled false add st button set margin new insets 2 15 2 15 remove st button set margin new insets 2 15 2 15 add st button set preferred size add st button get minimum size remove st button set preferred size remove st button get minimum size make buttons layout box layout box xfer buttons new j panel box new box layout xfer buttons box layout y axis xfer buttons set layout box xfer buttons add new spacer panel xfer buttons add add st button xfer buttons add new spacer panel xfer buttons add remove st button dimension dmax box maximum layout size xfer buttons dimension dmin box minimum layout size xfer buttons xfer buttons set maximum size new dimension dmin width dmax height make listeners add st button add action listener new add remove listener remove st button add action listener new add remove listener available list add list selection listener new available list selection listener selected list add list selection listener new selected list selection listener put everything together j panel the panel new j panel the panel set layout new box layout the panel box layout x axis the panel set border border factory create empty border inset px inset px inset px inset px the panel add available scroll the panel add xfer buttons the panel add box create rigid area new dimension 5 1 the panel add selected scroll return the panel jpanel jpanel jpanel makepanel selectedlistmodel umlmodelelementstereotypelistmodel selectedlist umllinkedlist selectedlistmodel selectedscroll jscrollpane selectedlist selectedscroll setborder borderfactory createemptyborder inset_px inset_px inset_px inset_px selectedscroll setcolumnheaderview jlabel availablelistmodel umlmodelstereotypelistmodel availablelist umllinkedlist availablelistmodel availablescroll jscrollpane availablelist availablescroll setborder borderfactory createemptyborder inset_px inset_px inset_px inset_px availablescroll setcolumnheaderview jlabel addstbutton jbutton addstbutton settooltiptext removestbutton jbutton removestbutton settooltiptext addstbutton setenabled removestbutton setenabled addstbutton setmargin removestbutton setmargin addstbutton setpreferredsize addstbutton getminimumsize removestbutton setpreferredsize removestbutton getminimumsize boxlayout xferbuttons jpanel boxlayout xferbuttons boxlayout y_axis xferbuttons setlayout xferbuttons spacerpanel xferbuttons addstbutton xferbuttons spacerpanel xferbuttons removestbutton maximumlayoutsize xferbuttons minimumlayoutsize xferbuttons xferbuttons setmaximumsize addstbutton addactionlistener addremovelistener removestbutton addactionlistener addremovelistener availablelist addlistselectionlistener availablelistselectionlistener selectedlist addlistselectionlistener selectedlistselectionlistener jpanel thepanel jpanel thepanel setlayout boxlayout thepanel boxlayout x_axis thepanel setborder borderfactory createemptyborder inset_px inset_px inset_px inset_px thepanel availablescroll thepanel xferbuttons thepanel createrigidarea thepanel selectedscroll thepanel checks if the tab should be enabled returns true if the target returned by get target is a modelelement or if that target shows up as fig on the active diagram and has a modelelement as owner return true if this tab should be enabled otherwise false public boolean should be enabled object target get target return should be enabled target gettarget shouldbeenabled gettarget shouldbeenabled override public boolean should be enabled object target if target instanceof fig target fig target get owner return model get facade isa model element target shouldbeenabled getowner getfacade isamodelelement override public void set target object the target super set target the target if is visible object me get model element if me null selected list model set target me validate settarget thetarget settarget thetarget isvisible getmodelelement selectedlistmodel settarget add the currently selected stereotype from the library to the modelelement private void do add stereotype object stereotype available list get selected value object model element target manager get instance get model target if model element null return model get core helper add stereotype model element stereotype doaddstereotype availablelist getselectedvalue modelelement targetmanager getinstance getmodeltarget modelelement getcorehelper addstereotype modelelement add the currently selected stereotype from the library to the modelelement private void do remove stereotype object stereotype selected list get selected value object model element target manager get instance get model target if model element null return if model get facade get stereotypes model element contains stereotype model get core helper remove stereotype model element stereotype doremovestereotype selectedlist getselectedvalue modelelement targetmanager getinstance getmodeltarget modelelement getfacade getstereotypes modelelement getcorehelper removestereotype modelelement constructor for uml model element namespace list model public uml model stereotype list model super stereotype umlmodelelementnamespacelistmodel umlmodelstereotypelistmodel protected void build model list remove all elements if model get facade isa model element get target collection s s stereotype utility get available stereotypes get target now remove the ones already applied s remove all model get facade get stereotypes get target add all s buildmodellist removeallelements getfacade isamodelelement gettarget stereotypeutility getavailablestereotypes gettarget removeall getfacade getstereotypes gettarget addall see org argouml uml ui uml model element list model2 is valid element object protected boolean is valid element object element return model get facade isa stereotype element umlmodelelementlistmodel2 isvalidelement isvalidelement getfacade isastereotype public void action performed action event e object src e get source if src add st button do add stereotype else if src remove st button do remove stereotype actionperformed actionevent getsource addstbutton doaddstereotype removestbutton doremovestereotype public void value changed list selection event lse if lse get value is adjusting return object sel rule available list get selected value add st button set enabled sel rule null valuechanged listselectionevent getvalueisadjusting selrule availablelist getselectedvalue addstbutton setenabled selrule public void value changed list selection event lse if lse get value is adjusting return object sel rule selected list get selected value remove st button set enabled sel rule null valuechanged listselectionevent getvalueisadjusting selrule selectedlist getselectedvalue removestbutton setenabled selrule public fig node get fig node for graph model gm layer lay object node map style attributes fig node result null assert lay instanceof layer perspective argo diagram diag argo diagram layer perspective lay get diagram diagram settings settings diag get diagram settings if model get facade isa classifier role node result new fig classifier role node result new fig classifier role node rectangle null settings else if model get facade isa comment node result new fig comment node rectangle null settings log debug sequence diagram renderer get fig node for result return result fignode getfignodefor graphmodel styleattributes fignode layerperspective argodiagram argodiagram layerperspective getdiagram diagramsettings getdiagramsettings getfacade isaclassifierrole figclassifierrole figclassifierrole getfacade isacomment figcomment sequencediagramrenderer getfignodefor public fig edge get fig edge for graph model gm layer lay object edge map style attributes fig edge fig edge null assert lay instanceof layer perspective argo diagram diag argo diagram layer perspective lay get diagram diagram settings settings diag get diagram settings if edge instanceof comment edge fig edge new fig edge note edge settings else fig edge get fig edge for edge style attributes lay add fig edge return fig edge figedge getfigedgefor graphmodel styleattributes figedge figedge layerperspective argodiagram argodiagram layerperspective getdiagram diagramsettings getdiagramsettings commentedge figedge figedgenote figedge getfigedgefor styleattributes figedge figedge override public fig edge get fig edge for object edge map style attributes if edge null throw new illegal argument exception a model edge must be supplied if model get facade isa message edge object action model get facade get action edge fig edge result null if model get facade isa call action action result new fig call action message edge else if model get facade isa return action action result new fig return action message edge else if model get facade isa destroy action action result new fig destroy action message edge else if model get facade isa create action action result new fig create action message edge return result throw new illegal argument exception failed to construct a fig edge for edge figedge getfigedgefor styleattributes illegalargumentexception getfacade isamessage getfacade getaction figedge getfacade isacallaction figcallactionmessage getfacade isareturnaction figreturnactionmessage getfacade isadestroyaction figdestroyactionmessage getfacade isacreateaction figcreateactionmessage illegalargumentexception figedge constructor for uml generalizable element root check box public uml generalizable element abstract check box super translator localize checkbox abstract lc action set generalizable element abstract get instance is abstract umlgeneralizableelementrootcheckbox umlgeneralizableelementabstractcheckbox actionsetgeneralizableelementabstract getinstance isabstract public void build model object target get target if target null model get facade isauml element target set selected model get facade is abstract target else set selected false buildmodel gettarget getfacade isaumlelement setselected getfacade isabstract setselected can t construct a utility private collection util collectionutil return the first item from a collection using the most efficient method possible param c the collection return the first element of a collection throws java util no such element exception if the collection is empty public static object get first item collection c if c instanceof list return list c get 0 return c iterator next nosuchelementexception getfirstitem return the first item from a collection using the most efficient method possible returns null for an empty collection param c the collection return the first element of a collection public static object get first item or null collection c if c size 0 return null return get first item c getfirstitemornull getfirstitem the constructor public cr circular inheritance setup head and desc set priority to do item high priority add supported decision uml decision inheritance set knowledge types critic kt syntax add trigger generalization no need for trigger on specialization crcircularinheritance setupheadanddesc setpriority todoitem high_priority addsupporteddecision umldecision setknowledgetypes kt_syntax addtrigger public boolean predicate2 object dm designer dsgr boolean problem no problem if model get facade isa generalizable element dm try model get core helper get children dm catch illegal state exception ex problem problem found log info problem found for this return problem no_problem getfacade isageneralizableelement getcorehelper getchildren illegalstateexception problem_found public set object get criticized design materials set object ret new hash set object ret add model get meta types get generalizable element return ret getcriticizeddesignmaterials hashset getmetatypes getgeneralizableelement the constructor public action new action for message super actionnewactionformessage java awt event action listener action performed java awt event action event public void action performed action event e super action performed e model get common behavior factory build action get target actionlistener actionperformed actionevent actionperformed actionevent actionperformed getcommonbehaviorfactory buildaction gettarget public boolean is enabled if get target null return model get facade get action get target null return false isenabled gettarget getfacade getaction gettarget return returns the singleton public static action new action for message get instance return singleton actionnewactionformessage getinstance creates a new instance of associations node param the parent the parent object public associations node object the parent this parent the parent associationsnode theparent associationsnode theparent theparent return the parent public object get parent return parent getparent see java lang object to string public string to string return associations tostring tostring see org argouml ui explorer weak explorer node subsumes java lang object public boolean subsumes object obj return obj instanceof associations node weakexplorernode associationsnode constructor param is visible tt true tt if the path is visible public action set path boolean is visible super is path visible is visible string name if is visible name translator localize menu popup hide path else name translator localize menu popup show path put value action name name isvisible actionsetpath isvisible ispathvisible isvisible isvisible putvalue static function to return the path show and or hide actions needed for the selected figs return only returns the actions for the menu items that make sense for the current selection public static collection undoable action get actions collection undoable action actions new array list undoable action editor ce globals cur editor list fig figs ce get selection manager get figs for fig f figs if f instanceof path container object owner f get owner if model get facade isa model element owner object ns model get facade get namespace owner if ns null only show the path item when there is an owning namespace if path container f is path visible actions add hide path break for fig f figs if f instanceof path container object owner f get owner if model get facade isa model element owner object ns model get facade get namespace owner if ns null only show the path item when there is an owning namespace if path container f is path visible actions add show path break return actions undoableaction getactions undoableaction arraylist undoableaction cureditor getselectionmanager getfigs pathcontainer getowner getfacade isamodelelement getfacade getnamespace pathcontainer ispathvisible hide_path pathcontainer getowner getfacade isamodelelement getfacade getnamespace pathcontainer ispathvisible show_path see org tigris gef undo undoable action action performed java awt event action event override public void action performed action event e super action performed e enumerate all selected figures and update their path accordingly iterator i globals cur editor get selection manager selections iterator while i has next selection sel selection i next fig f sel get content if f instanceof path container path container f set path visible is path visible undoableaction actionperformed actionevent actionperformed actionevent actionperformed cureditor getselectionmanager hasnext getcontent pathcontainer pathcontainer setpathvisible ispathvisible constructor for prop paneluml collaboration diagram public prop paneluml collaboration diagram super translator localize label collaboration diagram lookup icon collaboration diagram proppanelumlcollaborationdiagram proppanelumlcollaborationdiagram lookupicon collaborationdiagram private project actions super undo action new action undo translator localize action undo resource loader wrapper lookup icon undo undo action set enabled false redo action new action redo translator localize action redo resource loader wrapper lookup icon redo redo action set enabled false target manager get instance add target listener this project manager get manager get current project get undo manager add property change listener this projectactions undoaction actionundo resourceloaderwrapper lookupicon undoaction setenabled redoaction actionredo resourceloaderwrapper lookupicon redoaction setenabled targetmanager getinstance addtargetlistener projectmanager getmanager getcurrentproject getundomanager addpropertychangelistener singleton retrieval method for the projectbrowser lazely instantiates the projectbrowser return the singleton instance of the projectbrowser public static synchronized project actions get instance if the instance null the instance new project actions return the instance projectactions getinstance theinstance theinstance projectactions theinstance get the action that can undo the last user interaction on this project return the undo action public abstract action get undo action return undo action abstractaction getundoaction undoaction get the action that can redo the last undone action return the redo action public abstract action get redo action return redo action abstractaction getredoaction redoaction get the action that removes selected figs from the diagram return the remove from diagram action public abstract action get remove from diagram action return remove from diagram abstractaction getremovefromdiagramaction removefromdiagram see org argouml ui targetmanager target listener target added org argouml ui targetmanager target event public void target added target event e determine remove enabled targetlistener targetadded targetevent targetadded targetevent determineremoveenabled see org argouml ui targetmanager target listener target removed org argouml ui targetmanager target event public void target removed target event e determine remove enabled targetlistener targetremoved targetevent targetremoved targetevent determineremoveenabled see org argouml ui targetmanager target listener target set org argouml ui targetmanager target event public void target set target event e determine remove enabled targetlistener targetset targetevent targetset targetevent determineremoveenabled enabled the remove action if an item is selected in anything other then the activity or state diagrams private void determine remove enabled editor editor globals cur editor collection figs editor get selection manager get figs boolean remove enabled figs is empty graph model gm editor get graph model if gm instanceof uml mutable graph support remove enabled uml mutable graph support gm is remove from diagram allowed figs remove from diagram set enabled remove enabled determineremoveenabled cureditor getselectionmanager getfigs removeenabled isempty graphmodel getgraphmodel umlmutablegraphsupport removeenabled umlmutablegraphsupport isremovefromdiagramallowed removefromdiagram setenabled removeenabled display the diagram which contains the given list of targets and scroll to make them visible param targets collection of targets to show todo move to different class public static void jump to diagram showing list targets if targets null targets size 0 return object first targets get 0 if first instanceof argo diagram targets size 1 set target first set target targets get 1 return if first instanceof argo diagram targets size 1 set target first return todo this should get the containing project from the list of targets not from some global project project project manager get manager get current project if project null return list argo diagram diagrams project get diagram list object target target manager get instance get target if target instanceof argo diagram argo diagram target count contained targets targets size set target first return argo diagram best diagram null int best num contained 0 for argo diagram d diagrams int nc d count contained targets if nc best num contained best num contained nc best diagram d if nc targets size break if best diagram null if diagram utils get active diagram equals best diagram set target best diagram set target first making it possible to jump to the modelroots if project get roots contains first set target first and finally adjust the scrollbars to show the fig object f target manager get instance get fig target if f instanceof fig globals cur editor scroll to show fig f jumptodiagramshowing argodiagram settarget settarget argodiagram settarget projectmanager getmanager getcurrentproject argodiagram getdiagramlist targetmanager getinstance gettarget argodiagram argodiagram countcontained settarget argodiagram bestdiagram bestnumcontained argodiagram countcontained bestnumcontained bestnumcontained bestdiagram bestdiagram diagramutils getactivediagram bestdiagram settarget bestdiagram settarget getroots settarget targetmanager getinstance getfigtarget cureditor scrolltoshow private static void set target object o target manager get instance set target o settarget targetmanager getinstance settarget public void property change final property change event evt if evt get source instanceof undo manager swing utilities invoke later new runnable public void run if undo label equals evt get property name undo action put value abstract action name evt get new value if redo label equals evt get property name redo action put value abstract action name evt get new value if undoable equals evt get property name undo action set enabled boolean evt get new value if redoable equals evt get property name redo action set enabled boolean evt get new value propertychange propertychangeevent getsource undomanager swingutilities invokelater undolabel getpropertyname undoaction putvalue abstractaction getnewvalue redolabel getpropertyname redoaction putvalue abstractaction getnewvalue getpropertyname undoaction setenabled getnewvalue getpropertyname redoaction setenabled getnewvalue swing utilities invoke later new runnable public void run if undo label equals evt get property name undo action put value abstract action name evt get new value if redo label equals evt get property name redo action put value abstract action name evt get new value if undoable equals evt get property name undo action set enabled boolean evt get new value if redoable equals evt get property name redo action set enabled boolean evt get new value swingutilities invokelater undolabel getpropertyname undoaction putvalue abstractaction getnewvalue redolabel getpropertyname redoaction putvalue abstractaction getnewvalue getpropertyname undoaction setenabled getnewvalue getpropertyname redoaction setenabled getnewvalue the constructor public cr invalid synch setup head and desc add supported decision uml decision state machines add trigger incoming add trigger outgoing crinvalidsynch setupheadanddesc addsupporteddecision umldecision state_machines addtrigger addtrigger public boolean predicate2 object dm designer dsgr object destination region null object source region null object aux null object tr null if model get facade isa synch state dm return no problem iterator outgoing model get facade get outgoings dm iterator while outgoing has next tr outgoing next aux model get facade get container model get facade get target tr if destination region null destination region aux else if aux equals destination region return problem found iterator incoming model get facade get incomings dm iterator while incoming has next tr incoming next aux model get facade get container model get facade get source tr if source region null source region aux else if aux equals source region return problem found if destination region null model get facade isa concurrent region destination region return problem found if source region null model get facade isa concurrent region source region return problem found return no problem destinationregion sourceregion getfacade isasynchstate no_problem getfacade getoutgoings hasnext getfacade getcontainer getfacade gettarget destinationregion destinationregion destinationregion problem_found getfacade getincomings hasnext getfacade getcontainer getfacade getsource sourceregion sourceregion sourceregion problem_found destinationregion getfacade isaconcurrentregion destinationregion problem_found sourceregion getfacade isaconcurrentregion sourceregion problem_found no_problem public set object get criticized design materials set object ret new hash set object ret add model get meta types get synch state return ret getcriticizeddesignmaterials hashset getmetatypes getsynchstate the constructor param role the given association role public association role notation uml object role super role associationrolenotationuml see org argouml notation providers notation provider get parsing help public string get parsing help return parsing help fig association role notationprovider getparsinghelp getparsinghelp public void parse object model element string text try parse role model element text catch parse exception pe string msg statusmsg bar error parsing association role object args pe get localized message integer value of pe get error offset argo event pump fire event new argo help event argo event types help changed this translator message format msg args modelelement parserole modelelement parseexception getlocalizedmessage valueof geterroroffset argoeventpump fireevent argohelpevent argoeventtypes help_changed messageformat parse the string that represents an association role pre name name of the base association pre param role the association role em text em describes param text a string on the above format throws parse exception when it detects an error in the role string see also parse error get error offset protected void parse role object role string text throws parse exception string token boolean has colon false boolean has slash false string rolestr null string basestr null my tokenizer st new my tokenizer text t while st has more tokens token st next token if equals token t equals token do nothing else if equals token has slash true has colon false else if equals token has colon true has slash false else if has colon if basestr null string msg parsing error association role association extra text throw new parse exception translator localize msg st get token index basestr token else if has slash if rolestr null string msg parsing error association role association extra text throw new parse exception translator localize msg st get token index rolestr token else string msg parsing error association role association extra text throw new parse exception translator localize msg st get token index if basestr null if no base was typed then only set the name if rolestr null model get core helper set name role rolestr trim return if the base was not changed then only set the name object current base model get facade get base role if current base null string current base str model get facade get name current base if current base str null todo is this needed current base str if current base str equals basestr if rolestr null model get core helper set name role rolestr trim return collection c model get collaborations helper get all possible bases role iterator i c iterator while i has next object candidate i next if basestr equals model get facade get name candidate if model get facade get base role candidate if the base is already set to this assoc then do not set it again this check is needed otherwise the setbase below gives an exception model get collaborations helper set base role candidate only set the name if the base was found if rolestr null model get core helper set name role rolestr trim return string msg parsing error association role base not found throw new parse exception translator localize msg 0 associationrole name_of_the_base_association associationrole parseexception parseerror geterroroffset parserole parseexception hascolon hasslash mytokenizer mytokenizer hasmoretokens nexttoken hasslash hascolon hascolon hasslash hascolon parseexception gettokenindex hasslash parseexception gettokenindex parseexception gettokenindex getcorehelper setname currentbase getfacade getbase currentbase currentbasestr getfacade getname currentbase currentbasestr currentbasestr currentbasestr getcorehelper setname getcollaborationshelper getallpossiblebases hasnext getfacade getname getfacade getbase getcollaborationshelper setbase getcorehelper setname parseexception generate the name of an association role of the form name name of the base association p remark so if both names are empty then nothing is shown see issue 2712 inherit doc deprecated suppress warnings deprecation deprecated public string to string object model element map args return to string model element name_of_the_base_association inheritdoc suppresswarnings tostring modelelement tostring modelelement private string to string final object model element get the association role name string name model get facade get name model element if name null name if name length 0 name name get the base association name object assoc model get facade get base model element if assoc null string base name model get facade get name assoc if base name null base name length 0 name name base name return name tostring modelelement associationrole getfacade getname modelelement getfacade getbase modelelement basename getfacade getname basename basename basename override public string to string final object model element final notation settings settings return to string model element tostring modelelement notationsettings tostring modelelement the constructor public to do by decision super combobox todo perspective decision add sub tree model new go list to decisions to items todobydecision addsubtreemodel golisttodecisionstoitems public void to do items changed to do list event tde log debug to do item changed list to do item items tde get to do item list object path new object 2 path 0 designer the designer get to do list for decision dec designer the designer get decision model get decision list int n matching items 0 path 1 dec for to do item item items if item supports dec continue n matching items if n matching items 0 continue int child indices new int n matching items object children new object n matching items n matching items 0 for to do item item items if item supports dec continue child indices n matching items get index of child dec item children n matching items item n matching items fire tree nodes changed this path child indices children todoitemschanged todolistevent todoitemchanged todoitem gettodoitemlist thedesigner gettodolist thedesigner getdecisionmodel getdecisionlist nmatchingitems todoitem nmatchingitems nmatchingitems childindices nmatchingitems nmatchingitems nmatchingitems todoitem childindices nmatchingitems getindexofchild nmatchingitems nmatchingitems firetreenodeschanged childindices public void to do items added to do list event tde log debug to do item added list to do item items tde get to do item list object path new object 2 path 0 designer the designer get to do list for decision dec designer the designer get decision model get decision list int n matching items 0 path 1 dec for to do item item items if item supports dec continue n matching items if n matching items 0 continue int child indices new int n matching items object children new object n matching items n matching items 0 for to do item item items if item supports dec continue child indices n matching items get index of child dec item children n matching items item n matching items fire tree nodes inserted this path child indices children todoitemsadded todolistevent todoitemadded todoitem gettodoitemlist thedesigner gettodolist thedesigner getdecisionmodel getdecisionlist nmatchingitems todoitem nmatchingitems nmatchingitems childindices nmatchingitems nmatchingitems nmatchingitems todoitem childindices nmatchingitems getindexofchild nmatchingitems nmatchingitems firetreenodesinserted childindices public void to do items removed to do list event tde log debug to do item removed list to do item items tde get to do item list object path new object 2 path 0 designer the designer get to do list for decision dec designer the designer get decision model get decision list log debug to do item removed updating decision node boolean any in dec false for to do item item items if item supports dec any in dec true if any in dec continue path 1 dec fire tree nodes changed this path child indices children fire tree structure changed path todoitemsremoved todolistevent todoitemremoved todoitem gettodoitemlist thedesigner gettodolist thedesigner getdecisionmodel getdecisionlist todoitemremoved anyindec todoitem anyindec anyindec firetreenodeschanged childindices firetreestructurechanged see org argouml cognitive to do list listener to do list changed org argouml cognitive to do list event public void to do list changed to do list event tde todolistlistener todolistchanged todolistevent todolistchanged todolistevent the constructor project settings tab properties set layout new border layout j panel top new j panel top set layout new grid bag layout grid bag constraints label constraints new grid bag constraints labels at the left label constraints anchor grid bag constraints line start label constraints gridy 0 label constraints gridx 0 label constraints gridwidth 1 label constraints gridheight 1 label constraints insets new insets 2 20 2 4 label constraints anchor grid bag constraints first line start grid bag constraints field constraints new grid bag constraints and fields at the right field constraints anchor grid bag constraints line end field constraints fill grid bag constraints both field constraints gridy 0 field constraints gridx 1 field constraints gridwidth 3 field constraints gridheight 1 field constraints weightx 1 0 field constraints insets new insets 2 4 2 20 the user s full name label constraints gridy 0 field constraints gridy 0 top add new j label translator localize label user label constraints user fullname new j text field top add user fullname field constraints the user s email label constraints gridy 1 field constraints gridy 1 top add new j label translator localize label email label constraints user email new j text field top add user email field constraints the project description label constraints gridy 2 field constraints gridy 2 field constraints weighty 1 0 label constraints weighty 1 0 j label lbl description new j label translator localize label project description lbl description set vertical alignment swing constants top top add lbl description label constraints description new j text area j scroll pane area new j scroll pane description area set vertical scroll bar policy j scroll pane vertical scrollbar as needed description set margin new insets 3 3 3 3 description set line wrap true description set wrap style word true top add area field constraints this non editable field shows the version of the argouml that last saved this project label constraints gridy 3 field constraints gridy 3 field constraints weighty 0 0 label constraints weighty 0 0 top add new j label translator localize label argouml version label constraints version new j text field version set editable false top add version field constraints we need to fill the whole pane so that the description field can take all available space add top border layout center projectsettingstabproperties setlayout borderlayout jpanel jpanel setlayout gridbaglayout gridbagconstraints labelconstraints gridbagconstraints labelconstraints gridbagconstraints line_start labelconstraints labelconstraints labelconstraints labelconstraints labelconstraints labelconstraints gridbagconstraints first_line_start gridbagconstraints fieldconstraints gridbagconstraints fieldconstraints gridbagconstraints line_end fieldconstraints gridbagconstraints fieldconstraints fieldconstraints fieldconstraints fieldconstraints fieldconstraints fieldconstraints labelconstraints fieldconstraints jlabel labelconstraints userfullname jtextfield userfullname fieldconstraints labelconstraints fieldconstraints jlabel labelconstraints useremail jtextfield useremail fieldconstraints labelconstraints fieldconstraints fieldconstraints labelconstraints jlabel lbldescription jlabel lbldescription setverticalalignment swingconstants lbldescription labelconstraints jtextarea jscrollpane jscrollpane setverticalscrollbarpolicy jscrollpane vertical_scrollbar_as_needed setmargin setlinewrap setwrapstyleword fieldconstraints labelconstraints fieldconstraints fieldconstraints labelconstraints jlabel labelconstraints jtextfield seteditable fieldconstraints borderlayout public void handle settings tab refresh project p project manager get manager get current project user fullname set text p get authorname user email set text p get authoremail description set text p get description description set caret position 0 version set text p get version handlesettingstabrefresh projectmanager getmanager getcurrentproject userfullname settext getauthorname useremail settext getauthoremail settext getdescription setcaretposition settext getversion public void handle settings tab save project p project manager get manager get current project p set authorname user fullname get text p set authoremail user email get text p set description description get text handlesettingstabsave projectmanager getmanager getcurrentproject setauthorname userfullname gettext setauthoremail useremail gettext setdescription gettext see org argouml ui gui settings tab interface handle settings tab cancel public void handle settings tab cancel handle settings tab refresh guisettingstabinterface handlesettingstabcancel handlesettingstabcancel handlesettingstabrefresh public void handle reset to default user fullname set text configuration get string argo key user fullname user email set text configuration get string argo key user email there is no default description handleresettodefault userfullname settext getstring key_user_fullname useremail settext getstring key_user_email see org argouml ui gui settings tab interface get tab key public string get tab key return tab user guisettingstabinterface gettabkey gettabkey see org argouml ui gui settings tab interface get tab panel public j panel get tab panel return this guisettingstabinterface gettabpanel jpanel gettabpanel public fig node get fig node for graph model gm layer lay object node map style attributes fig node fig node null assert node null although not generally true for gef for argo we know that the layer is a layer perspective which knows the associated diagram diagram diag layer perspective lay get diagram if diag instanceof uml diagram uml diagram diag does accept node fig node uml diagram diag drop node null else log error todo collab diagram renderer get fig node for throw new illegal argument exception node is not a recognised type received node get class get name lay add fig node return fig node fignode getfignodefor graphmodel styleattributes fignode fignode layerperspective layerperspective getdiagram umldiagram umldiagram doesaccept fignode umldiagram collabdiagramrenderer getfignodefor illegalargumentexception getclass getname fignode fignode return a fig that can be used to represent the given edge generally the same code as for the class diagram since its very related to it inherit doc public fig edge get fig edge for graph model gm layer lay object edge map style attributes if log is debug enabled log debug making figedge for edge if edge null throw new illegal argument exception a model edge must be supplied assert lay instanceof layer perspective argo diagram diag argo diagram layer perspective lay get diagram diagram settings settings diag get diagram settings fig edge new edge null if model get facade isa association role edge new edge new fig association role edge settings else if model get facade isa generalization edge new edge new fig generalization edge settings else if model get facade isa dependency edge new edge new fig dependency edge settings else if edge instanceof comment edge new edge new fig edge note edge settings todo settings if new edge null throw new illegal argument exception don t know how to create fig edge for model type edge get class get name set ports lay new edge assert new edge null there has been no fig edge created assert new edge get dest fig node null the fig edge has no dest node assert new edge get dest port fig null the fig edge has no dest port assert new edge get source fig node null the fig edge has no source node assert new edge get source port fig null the fig edge has no source port lay add new edge return new edge classdiagram inheritdoc figedge getfigedgefor graphmodel styleattributes isdebugenabled illegalargumentexception layerperspective argodiagram argodiagram layerperspective getdiagram diagramsettings getdiagramsettings figedge newedge getfacade isaassociationrole newedge figassociationrole getfacade isageneralization newedge figgeneralization getfacade isadependency newedge figdependency commentedge newedge figedgenote newedge illegalargumentexception figedge getclass getname setports newedge newedge figedge newedge getdestfignode figedge newedge getdestportfig figedge newedge getsourcefignode figedge newedge getsourceportfig figedge newedge newedge return the singleton instance of the importer manager public static importer manager get instance return instance importermanager getinstance the constructor private importer manager private constructor to enforce singleton importermanager register a new source language importer param importer the import interface object to register public void add importer import interface importer importers add importer argo event pump fire event new argo importer event argo event types importer added gen log debug added importer importer importinterface addimporter importinterface argoeventpump fireevent argoimporterevent argoeventtypes importer_added removes a importer param importer the importer to be removed return false if no matching importer had been registered public boolean remove importer import interface importer boolean status importers remove importer if status argo event pump fire event new argo importer event argo event types importer removed old log debug removed importer importer return status removeimporter importinterface argoeventpump fireevent argoimporterevent argoeventtypes importer_removed return a copy of the set of importers public set import interface get importers return collections unmodifiable set importers importinterface getimporters unmodifiableset return true if at least one importer exists public boolean has importers return importers is empty hasimporters isempty the constructor param data the collection of uml elements public transferable model elements collection data the model elements data transferablemodelelements themodelelements public object get transfer data data flavor data flavor throws unsupported flavor exception io exception if data flavor match uml collection flavor return the model elements todo we could also support other flavors here e g image then you can drag modelelements directly into your wordprocessor to be inserted as an image throw new unsupported flavor exception data flavor gettransferdata dataflavor dataflavor unsupportedflavorexception ioexception dataflavor uml_collection_flavor themodelelements unsupportedflavorexception dataflavor see java awt datatransfer transferable get transfer data flavors public data flavor get transfer data flavors return flavors gettransferdataflavors dataflavor gettransferdataflavors see java awt datatransfer transferable is data flavor supported java awt datatransfer data flavor public boolean is data flavor supported data flavor data flavor return data flavor match uml collection flavor isdataflavorsupported dataflavor isdataflavorsupported dataflavor dataflavor dataflavor uml_collection_flavor constructor the empty namespace with java token by default public string namespace stringnamespace empty namespace with given default token param the token the scope seperator to use public string namespace string the token this this token the token thetoken stringnamespace thetoken thetoken construct a namespace from an array of strings with default scope token param elements an array of strings which represent the namespace public string namespace string elements this elements java ns token stringnamespace java_ns_token construct a namespace from strings with given scope token param elements an array of strings which represent the namespace param the token scope token to use public string namespace string elements string the token this the token for int i 0 i elements length i push namespace element new string namespace element elements i thetoken stringnamespace thetoken thetoken pushnamespaceelement stringnamespaceelement construct a namespace from namespace elements with given scope token param elements array of namespace elements param the token scope token public string namespace namespace element elements string the token this the token for int i 0 i elements length i push namespace element new string namespace element elements i to string namespaceelements namespaceelements thetoken stringnamespace namespaceelement thetoken thetoken pushnamespaceelement stringnamespaceelement tostring construct a namespace from namespace elements with default scope token param elements array of namespace elements public string namespace namespace element elements this elements java ns token namespaceelements namespaceelements stringnamespace namespaceelement java_ns_token see namespace push namespace element namespace element public void push namespace element namespace element element ns push element pushnamespaceelement namespaceelement pushnamespaceelement namespaceelement see org argouml uml util namespace namespace peek namespace element public namespace element peek namespace element return namespace element ns peek peeknamespaceelement namespaceelement peeknamespaceelement namespaceelement store the next namespace element see org argouml uml util namespace namespace pop namespace element param element the element to store public void push namespace element string element ns push new string namespace element element popnamespaceelement pushnamespaceelement stringnamespaceelement see org argouml uml util namespace namespace pop namespace element public namespace element pop namespace element return namespace element ns pop popnamespaceelement namespaceelement popnamespaceelement namespaceelement public namespace get base namespace string namespace result null try result string namespace this clone catch clone not supported exception e log debug e return null result pop namespace element return result getbasenamespace stringnamespace stringnamespace clonenotsupportedexception popnamespaceelement public namespace get common namespace namespace namespace iterator i iterator iterator j namespace iterator string namespace result new string namespace token for i has next j has next namespace element elem1 namespace element i next namespace element elem2 namespace element j next if elem1 to string equals elem2 to string result push namespace element elem1 return result getcommonnamespace stringnamespace stringnamespace hasnext hasnext namespaceelement namespaceelement namespaceelement namespaceelement tostring tostring pushnamespaceelement see org argouml uml util namespace namespace iterator public iterator iterator return ns iterator see org argouml uml util namespace namespace is empty public boolean is empty return ns is empty isempty isempty isempty see org argouml uml util namespace namespace set default scope token java lang string public void set default scope token string the token this token the token setdefaultscopetoken setdefaultscopetoken thetoken thetoken parse a fully qualified namespace to create a namespace object param fqn string representation of namespace param token the token of the namespace return a namespace object public static namespace parse string fqn string token string my fqn fqn string namespace sns new string namespace token int i my fqn index of token while i 1 sns push namespace element my fqn substring 0 i my fqn my fqn substring i token length i my fqn index of token if my fqn length 0 sns push namespace element my fqn return sns myfqn stringnamespace stringnamespace myfqn indexof pushnamespaceelement myfqn myfqn myfqn myfqn indexof myfqn pushnamespaceelement myfqn parse the name of a java class param c the class return the namespace object public static namespace parse class c return parse c get name java ns token getname java_ns_token see java lang object hash code public int hash code return to string java ns token hash code hashcode hashcode tostring java_ns_token hashcode two namespaces are equal when they are namespaces and have the same string representation param namespace the namespace to compare with return true if equal see java lang object equals java lang object public boolean equals object namespace if namespace instanceof namespace string ns1 this to string java ns token string ns2 namespace namespace to string java ns token return ns1 equals ns2 return false tostring java_ns_token tostring java_ns_token public string to string string the token string buffer result new string buffer iterator i ns iterator while i has next result append i next if i has next result append the token return result to string tostring thetoken stringbuffer stringbuffer hasnext hasnext thetoken tostring see java lang object to string public string to string return to string token tostring tostring tostring public prop panel create prop panel object object if object instanceof uml collaboration diagram return new prop paneluml collaboration diagram return null proppanel createproppanel umlcollaborationdiagram proppanelumlcollaborationdiagram construct a new fig join state param owner owning uml element param bounds position and size param settings rendering settings public fig join state object owner rectangle bounds diagram settings settings super owner bounds settings init figs figjoinstate figjoinstate diagramsettings initfigs the main constructor deprecated for 0 27 4 by tfmorris use link fig join state object rectangle diagram settings suppress warnings deprecation deprecated public fig join state super init figs figjoinstate diagramsettings suppresswarnings figjoinstate initfigs private void init figs set editable false set big port new fig rect x y state width height debug color debug color head new fig rect x y state width height line color solid fill color add figs to the fig node in back to front order add fig get big port add fig head set blink ports false make port invisible unless mouse enters initfigs seteditable setbigport figrect state_width debug_color debug_color figrect state_width line_color solid_fill_color fignode addfig getbigport addfig setblinkports the constructor which links the fig into the existing uml element param gm ignored param node the uml element deprecated for 0 27 4 by tfmorris use link fig join state object rectangle diagram settings suppress warnings deprecation deprecated public fig join state suppress warnings unused graph model gm object node this set owner node figjoinstate diagramsettings suppresswarnings figjoinstate suppresswarnings graphmodel setowner override public object clone fig join state fig clone fig join state super clone iterator it fig clone get figs iterator fig clone set big port fig rect it next fig clone head fig rect it next return fig clone figjoinstate figclone figjoinstate figclone getfigs figclone setbigport figrect figclone figrect figclone override protected void set standard bounds int x int y int w int h rectangle old bounds get bounds if w h h height else w height get big port set bounds x y w h head set bounds x y w h calc bounds update edges fire prop change bounds old bounds get bounds setstandardbounds oldbounds getbounds getbigport setbounds setbounds calcbounds updateedges firepropchange oldbounds getbounds see org tigris gef presentation fig set line color java awt color override public void set line color color col head set line color col setlinecolor setlinecolor setlinecolor see org tigris gef presentation fig get line color override public color get line color return head get line color getlinecolor getlinecolor getlinecolor see org tigris gef presentation fig set fill color java awt color override public void set fill color color col head set fill color col setfillcolor setfillcolor setfillcolor see org tigris gef presentation fig get fill color override public color get fill color return head get fill color getfillcolor getfillcolor getfillcolor ignored figure has fixed rendering param f ignored override public void set filled boolean f ignored setfilled override public boolean is filled return true isfilled see org tigris gef presentation fig set line width int override public void set line width int w head set line width w setlinewidth setlinewidth setlinewidth see org tigris gef presentation fig get line width override public int get line width return head get line width getlinewidth getlinewidth getlinewidth see java awt event mouse listener mouse clicked java awt event mouse event override public void mouse clicked mouse event me ignored mouselistener mouseclicked mouseevent mouseclicked mouseevent construct a property panel for an event param name the name string of the properties panel param icon the icon to be shown next to the name public prop panel event string name image icon icon super name icon initialize proppanelevent imageicon initialize the panel with all fields and stuff protected void initialize param scroll get parameter scroll add field label name get name text field add field label namespace get namespace selector add separator add field label parameters get parameter scroll j list transition list new uml linked list new uml event transition list model transition list set visible row count 2 add field label transition new j scroll pane transition list add separator add action new action navigate container element add action new action new stereotype paramscroll getparameterscroll addfield getnametextfield addfield getnamespaceselector addseparator addfield getparameterscroll jlist transitionlist umllinkedlist umleventtransitionlistmodel transitionlist setvisiblerowcount addfield jscrollpane transitionlist addseparator addaction actionnavigatecontainerelement addaction actionnewstereotype return the parameter scroll protected j scroll pane get parameter scroll if param scroll null param list model new uml event parameter list model j list param list new uml mutable linked list param list model new action new parameter param list set visible row count 3 param scroll new j scroll pane param list return param scroll jscrollpane getparameterscroll paramscroll paramlistmodel umleventparameterlistmodel jlist paramlist umlmutablelinkedlist paramlistmodel actionnewparameter paramlist setvisiblerowcount paramscroll jscrollpane paramlist paramscroll constructor deprecated for 0 28 by tfmorris use link fig link object diagram settings suppress warnings deprecation deprecated public fig link middle group new fig text group initialize figlink diagramsettings suppresswarnings figlink middlegroup figtextgroup private void initialize middle group add fig get name fig add path item middle group new path item placement this middle group 50 25 get name fig set underline true get fig set line color line color set between nearest points true middlegroup addfig getnamefig addpathitem middlegroup pathitemplacement middlegroup getnamefig setunderline getfig setlinecolor line_color setbetweennearestpoints constructor that hooks the fig to a uml element param edge the uml element deprecated for 0 28 by tfmorris use link fig link object diagram settings deprecated public fig link object edge this set owner edge figlink diagramsettings figlink setowner create a fig representing a link param element owning uml element param settings render settings public fig link object element diagram settings settings super element settings middle group new fig text group element settings initialize figlink diagramsettings middlegroup figtextgroup org tigris gef presentation fig protected boolean can edit fig f return false canedit protected void update listeners object old owner object new owner if old owner null remove element listener old owner object old association model get facade get association old owner if old association null remove element listener old association if new owner null add element listener new owner new string remove name association object new association model get facade get association new owner if new association null add element listener new association name updatelisteners oldowner newowner oldowner removeelementlistener oldowner oldassociation getfacade getassociation oldowner oldassociation removeelementlistener oldassociation newowner addelementlistener newowner newassociation getfacade getassociation newowner newassociation addelementlistener newassociation generate the notation for the modelelement and stuff it into the text fig protected void update name text if get owner null return string name string object association model get facade get association get owner if association null name string model get facade get name association if name string null name string get name fig set text name string calc bounds set bounds get bounds updatenametext getowner namestring getfacade getassociation getowner namestring getfacade getname namestring namestring getnamefig settext namestring calcbounds setbounds getbounds protected object get destination if get owner null return model get common behavior helper get destination get owner return null getdestination getowner getcommonbehaviorhelper getdestination getowner protected object get source if get owner null return model get common behavior helper get source get owner return null getsource getowner getcommonbehaviorhelper getsource getowner the constructor public cr useless interface setup head and desc add supported decision uml decision inheritance add supported goal goal get unspecified goal set knowledge types critic kt completeness add trigger realization cruselessinterface setupheadanddesc addsupporteddecision umldecision addsupportedgoal getunspecifiedgoal setknowledgetypes kt_completeness addtrigger public boolean predicate2 object dm designer dsgr if model get facade isa interface dm return no problem if model get facade is primary object dm return no problem iterator iter model get facade get supplier dependencies dm iterator while iter has next if model get facade is realize iter next return no problem return problem found getfacade isainterface no_problem getfacade isprimaryobject no_problem getfacade getsupplierdependencies hasnext getfacade isrealize no_problem problem_found public set object get criticized design materials set object ret new hash set object ret add model get meta types get interface return ret getcriticizeddesignmaterials hashset getmetatypes getinterface the constructor for this dialog of settings with project scope public project settings dialog super translator localize dialog file properties argo dialog ok cancel option true tabs new j tabbed pane apply button new j button translator localize button apply string mnemonic translator localize button apply mnemonic if mnemonic null mnemonic length 0 apply button set mnemonic mnemonic char at 0 apply button add action listener new action listener public void action performed action event e handle save add button apply button reset to default button new j button translator localize button reset to default mnemonic translator localize button reset to default mnemonic if mnemonic null mnemonic length 0 reset to default button set mnemonic mnemonic char at 0 reset to default button add action listener new action listener public void action performed action event e handle reset to default add button reset to default button add settings from the settings registry iterator iter gui get instance get project settings tabs iterator while iter has next gui settings tab interface stp gui settings tab interface iter next tabs add tab translator localize stp get tab key stp get tab panel increase width to accommodate all tabs on one row final int minimum width 480 tabs set preferred size new dimension math max tabs get preferred size width minimum width tabs get preferred size height tabs set tab placement swing constants left set content tabs add window listener this projectsettingsdialog argodialog ok_cancel_option jtabbedpane applybutton jbutton applybutton setmnemonic charat applybutton addactionlistener actionlistener actionperformed actionevent handlesave addbutton applybutton resettodefaultbutton jbutton resettodefaultbutton setmnemonic charat resettodefaultbutton addactionlistener actionlistener actionperformed actionevent handleresettodefault addbutton resettodefaultbutton getinstance getprojectsettingstabs hasnext guisettingstabinterface guisettingstabinterface addtab gettabkey gettabpanel minimumwidth setpreferredsize getpreferredsize minimumwidth getpreferredsize settabplacement swingconstants setcontent addwindowlistener apply button add action listener new action listener public void action performed action event e handle save applybutton addactionlistener actionlistener actionperformed actionevent handlesave reset to default button add action listener new action listener public void action performed action event e handle reset to default resettodefaultbutton addactionlistener actionlistener actionperformed actionevent handleresettodefault replacement of link java awt component set visible boolean public void show dialog if a recursive call from set visible just return if doing show return doing show true handle refresh set visible true to front doing show false window open state will be changed when window is activated setvisible showdialog setvisible doingshow doingshow handlerefresh setvisible tofront doingshow windowopen public void action performed action event ev super action performed ev if ev get source get ok button handle save else if ev get source get cancel button handle cancel actionperformed actionevent actionperformed getsource getokbutton handlesave getsource getcancelbutton handlecancel private void handle save for int i 0 i tabs get component count i object o tabs get component i if o instanceof gui settings tab interface gui settings tab interface o handle settings tab save window open false handlesave getcomponentcount getcomponent guisettingstabinterface guisettingstabinterface handlesettingstabsave windowopen private void handle cancel for int i 0 i tabs get component count i object o tabs get component i if o instanceof gui settings tab interface gui settings tab interface o handle settings tab cancel window open false handlecancel getcomponentcount getcomponent guisettingstabinterface guisettingstabinterface handlesettingstabcancel windowopen perform refresh in all tabs private void handle refresh for int i 0 i tabs get component count i object o tabs get component i if o instanceof gui settings tab interface gui settings tab interface o handle settings tab refresh handlerefresh getcomponentcount getcomponent guisettingstabinterface guisettingstabinterface handlesettingstabrefresh private void handle open we only request focus the first time we become visible if window open get ok button request focus in window window open true handleopen windowopen getokbutton requestfocusinwindow windowopen private void handle reset to default for int i 0 i tabs get component count i object o tabs get component i if o instanceof gui settings tab interface gui settings tab interface o handle reset to default handleresettodefault getcomponentcount getcomponent guisettingstabinterface guisettingstabinterface handleresettodefault see java awt event window listener window activated java awt event window event public void window activated window event e handle open windowlistener windowactivated windowevent windowactivated windowevent handleopen see java awt event window listener window closed java awt event window event public void window closed window event e ignored we only care about open closing windowlistener windowclosed windowevent windowclosed windowevent see java awt event window listener window deactivated java awt event window event public void window deactivated window event e ignored we only care about open closing windowlistener windowdeactivated windowevent windowdeactivated windowevent see java awt event window listener window deiconified java awt event window event public void window deiconified window event e ignored we only care about open closing windowlistener windowdeiconified windowevent windowdeiconified windowevent see java awt event window listener window iconified java awt event window event public void window iconified window event e ignored we only care about open closing windowlistener windowiconified windowevent windowiconified windowevent see java awt event window listener window opened java awt event window event public void window opened window event e handle open windowlistener windowopened windowevent windowopened windowevent handleopen see java awt event window listener window closing java awt event window event public void window closing window event e handle the same as an explicit cancel handle cancel windowlistener windowclosing windowevent windowclosing windowevent handlecancel show the dialog with the tab as selected param tab tab to be selected public void show dialog j panel tab try tabs set selected component tab catch throwable t show dialog showdialog jpanel setselectedcomponent showdialog return the singleton public static notation combo box get instance only instantiate when we need it if singleton null singleton new notation combo box return singleton notationcombobox getinstance notationcombobox the constructor public notation combo box super set editable false set maximum row count 6 dimension d get preferred size d width 200 set maximum size d argo event pump add listener argo event types any notation event this refresh notationcombobox seteditable setmaximumrowcount getpreferredsize setmaximumsize argoeventpump addlistener argoeventtypes any_notation_event see org argouml application events argo notation event listener notation changed org argouml application events argo notation event public void notation changed argo notation event event argonotationeventlistener notationchanged argonotationevent notationchanged argonotationevent see org argouml application events argo notation event listener notation added org argouml application events argo notation event public void notation added argo notation event event refresh argonotationeventlistener notationadded argonotationevent notationadded argonotationevent see org argouml application events argo notation event listener notation removed org argouml application events argo notation event public void notation removed argo notation event event argonotationeventlistener notationremoved argonotationevent notationremoved argonotationevent see org argouml application events argo notation event listener notation provider added org argouml application events argo notation event public void notation provider added argo notation event event argonotationeventlistener notationprovideradded argonotationevent notationprovideradded argonotationevent see org argouml application events argo notation event listener notation provider removed org argouml application events argo notation event public void notation provider removed argo notation event event argonotationeventlistener notationproviderremoved argonotationevent notationproviderremoved argonotationevent refresh the combobox contents public void refresh remove all items list iterator iterator notation get available notations list iterator while iterator has next try notation name nn notation name iterator next add item nn catch exception e log error unexpected exception e set visible true invalidate removeallitems listiterator getavailablenotations listiterator hasnext notationname notationname additem setvisible creates a new instance of explorer tree public explorer tree super project p project manager get manager get current project this set model new explorer tree model p this project settings ps p get project settings set show stereotype ps get show stereotypes value this add mouse listener new explorer mouse listener this this add tree selection listener new explorer tree selection listener this add tree will expand listener new explorer tree will expand listener this add tree expansion listener new explorer tree expansion listener target manager get instance add target listener new explorer target listener explorertree explorertree projectmanager getmanager getcurrentproject setmodel explorertreemodel projectsettings getprojectsettings setshowstereotype getshowstereotypesvalue addmouselistener explorermouselistener addtreeselectionlistener explorertreeselectionlistener addtreewillexpandlistener explorertreewillexpandlistener addtreeexpansionlistener explorertreeexpansionlistener targetmanager getinstance addtargetlistener explorertargetlistener the constructor param newtree public explorer mouse listener j tree newtree super ml tree newtree explorermouselistener jtree mltree brings up the pop up menu see java awt event mouse listener mouse pressed java awt event mouse event override public void mouse pressed mouse event me if me is popup trigger me consume show popup menu me mouselistener mousepressed mouseevent mousepressed mouseevent ispopuptrigger showpopupmenu brings up the pop up menu on windows and motif platforms the user brings up a popup menu by releasing the right mouse button while the cursor is over a component that is popup enabled see java awt event mouse listener mouse released java awt event mouse event override public void mouse released mouse event me if me is popup trigger me consume show popup menu me mouselistener mousereleased mouseevent mousereleased mouseevent ispopuptrigger showpopupmenu brings up the pop up menu see java awt event mouse listener mouse clicked java awt event mouse event override public void mouse clicked mouse event me if me is popup trigger me consume show popup menu me if me get click count 2 my double click mouselistener mouseclicked mouseevent mouseclicked mouseevent ispopuptrigger showpopupmenu getclickcount mydoubleclick double clicking on an item attempts to show the item in a diagram private void my double click object target target manager get instance get target if target null list show new array list show add target project actions jump to diagram showing show mydoubleclick targetmanager getinstance gettarget arraylist projectactions jumptodiagramshowing builds a pop up menu for extra functionality for the tree param me the mouse event public void show popup menu mouse event me tree path path get path for location me getx me gety if path null return we preserve the current multiple selection if we are over part of it if is path selected path otherwise we select the item below the mousepointer get selection model set selection path path object selected item default mutable tree node path get last path component get user object j popup menu popup new explorer popup selected item me if popup get component count 0 popup show ml tree me getx me gety showpopupmenu mouseevent treepath getpathforlocation ispathselected getselectionmodel setselectionpath selecteditem defaultmutabletreenode getlastpathcomponent getuserobject jpopupmenu explorerpopup selecteditem getcomponentcount mltree see javax swing event tree will expand listener tree will collapse javax swing event tree expansion event public void tree will collapse tree expansion event tee unimplemented we only care about expanding treewillexpandlistener treewillcollapse treeexpansionevent treewillcollapse treeexpansionevent public void tree will expand tree expansion event tee todo this should not need to know about project settings tfm project p project manager get manager get current project project settings ps p get project settings set show stereotype ps get show stereotypes value if get model instanceof explorer tree model explorer tree model get model update children tee get path treewillexpand treeexpansionevent projectsettings projectmanager getmanager getcurrentproject projectsettings getprojectsettings setshowstereotype getshowstereotypesvalue getmodel explorertreemodel explorertreemodel getmodel updatechildren getpath javax swing event tree expansion event public void tree collapsed tree expansion event event does nothing treeexpansionevent treecollapsed treeexpansionevent public void tree expanded tree expansion event event need to update the selection state set selection target manager get instance get targets to array treeexpanded treeexpansionevent setselection targetmanager getinstance gettargets toarray refresh the selection of the tree nodes this does not cause new events to be fired to the target manager public void refresh selection collection targets target manager get instance get targets updating selection via tree selection true set selection targets to array updating selection via tree selection false targetmanager refreshselection targetmanager getinstance gettargets updatingselectionviatreeselection setselection toarray updatingselectionviatreeselection sets the selection state for a given set of targets param targets the targets private void set selection object targets updating selection via tree selection true this clear selection add targets internal targets updating selection via tree selection false setselection updatingselectionviatreeselection clearselection addtargetsinternal updatingselectionviatreeselection private void add targets internal object added targets if added targets length 1 return set targets new hash set for object t added targets if t instanceof fig targets add fig t get owner else targets add t todo the following can be removed if select all gets fixed select visible t todo this doesn t perform well enough with large models to have it enabled by default if the performance can t be improved perhaps we can introduce a manual find in explorer tree action select all targets int selected rows get selection rows if selected rows null selected rows length 0 todo this only works if the item is visible all its parents are expanded get expanded descendants make visible make visible get path for row selected rows 0 scroll row to visible selected rows 0 addtargetsinternal addedtargets addedtargets hashset addedtargets getowner selectall selectvisible selectall selectedrows getselectionrows selectedrows selectedrows getexpandeddescendants makevisible makevisible getpathforrow selectedrows scrollrowtovisible selectedrows select any targets which are visible in the explorer pane private void select visible object target for int j 0 j get row count j object row item default mutable tree node get path for row j get last path component get user object if row item target add selection row j selectvisible getrowcount rowitem defaultmutabletreenode getpathforrow getlastpathcomponent getuserobject rowitem addselectionrow search the entire tree and select all instances of targets found private void select all set targets explorer tree model model explorer tree model get model explorer tree node root explorer tree node model get root select children model root targets selectall explorertreemodel explorertreemodel getmodel explorertreenode explorertreenode getroot selectchildren private void select children explorer tree model model explorer tree node node set targets if targets is empty return object node object node get user object if node object null for object t targets if t node object add selection path new tree path node get path target may appear multiple places in the tree so we don t stop here but it s expensive to search the whole tree tfm 20070904 targets remove t break model update children new tree path node get path enumeration e node children while e has more elements select children model explorer tree node e next element targets selectchildren explorertreemodel explorertreenode isempty nodeobject getuserobject nodeobject nodeobject addselectionpath treepath getpath updatechildren treepath getpath hasmoreelements selectchildren explorertreenode nextelement see javax swing event tree selection listener value changed javax swing event tree selection event change in explorer tree selection set target in target manager public void value changed tree selection event e if updating selection via tree selection updating selection via tree selection true get the elements tree path added or removed paths e get paths tree path selected paths get selection paths list elements as list new array list for int i 0 selected paths null i selected paths length i object element default mutable tree node selected paths i get last path component get user object elements as list add element scan the visible rows for duplicates of this elem and select them int rows get row count for int row 0 row rows row object row item default mutable tree node get path for row row get last path component get user object if row item element is row selected row add selection row row check which targetmanager method to call boolean call set target true list added elements new array list for int i 0 i added or removed paths length i object element default mutable tree node added or removed paths i get last path component get user object if e is added path i call set target false break added elements add element if call set target added elements size elements as list size elements as list contains all added elements target manager get instance set targets elements as list else we must call the correct method on targetmanager for each added or removed target list removed targets new array list list added targets new array list for int i 0 i added or removed paths length i object element default mutable tree node added or removed paths i get last path component get user object if e is added path i added targets add element else removed targets add element we can t remove the targets in one go we have to do it one by one if removed targets is empty iterator it removed targets iterator while it has next target manager get instance remove target it next if added targets is empty iterator it added targets iterator while it has next target manager get instance add target it next updating selection via tree selection false treeselectionlistener valuechanged treeselectionevent valuechanged treeselectionevent updatingselectionviatreeselection updatingselectionviatreeselection treepath addedorremovedpaths getpaths treepath selectedpaths getselectionpaths elementsaslist arraylist selectedpaths selectedpaths defaultmutabletreenode selectedpaths getlastpathcomponent getuserobject elementsaslist getrowcount rowitem defaultmutabletreenode getpathforrow getlastpathcomponent getuserobject rowitem isrowselected addselectionrow callsettarget addedelements arraylist addedorremovedpaths defaultmutabletreenode addedorremovedpaths getlastpathcomponent getuserobject isaddedpath callsettarget addedelements callsettarget addedelements elementsaslist elementsaslist containsall addedelements targetmanager getinstance settargets elementsaslist removedtargets arraylist addedtargets arraylist addedorremovedpaths defaultmutabletreenode addedorremovedpaths getlastpathcomponent getuserobject isaddedpath addedtargets removedtargets removedtargets isempty removedtargets hasnext targetmanager getinstance removetarget addedtargets isempty addedtargets hasnext targetmanager getinstance addtarget updatingselectionviatreeselection actions a change in targets received from the target manager param targets the targets private void set targets object targets if updating selection updating selection true if targets length 0 clear selection else set selection targets updating selection false targetmanager settargets updatingselection updatingselection clearselection setselection updatingselection public void target added target event e if updating selection updating selection true object targets e get added targets updating selection via tree selection true add targets internal targets updating selection via tree selection false updating selection false set targets e get new targets targetadded targetevent updatingselection updatingselection getaddedtargets updatingselectionviatreeselection addtargetsinternal updatingselectionviatreeselection updatingselection settargets getnewtargets public void target removed target event e if updating selection updating selection true object targets e get removed targets int rows get row count for int i 0 i targets length i object target targets i if target instanceof fig target fig target get owner for int j 0 j rows j object row item default mutable tree node get path for row j get last path component get user object if row item target updating selection via tree selection true remove selection row j updating selection via tree selection false if get selection count 0 scroll row to visible get selection rows 0 updating selection false set targets e get new targets targetremoved targetevent updatingselection updatingselection getremovedtargets getrowcount getowner rowitem defaultmutabletreenode getpathforrow getlastpathcomponent getuserobject rowitem updatingselectionviatreeselection removeselectionrow updatingselectionviatreeselection getselectioncount scrollrowtovisible getselectionrows updatingselection settargets getnewtargets org argouml ui targetmanager target event public void target set target event e set targets e get new targets targetevent targetset targetevent settargets getnewtargets the constructor public uml file persister umlfilepersister see org argouml persistence abstract file persister get extension public string get extension return uml abstractfilepersister getextension getextension see org argouml persistence abstract file persister get desc protected string get desc return translator localize combobox filefilter uml abstractfilepersister getdesc getdesc it is being considered to save out individual xmi s from individuals diagrams to make it easier to modularize the output of argo param file the file to write param project the project to save throws save exception when anything goes wrong throws interrupted exception if the thread is interrupted see org argouml persistence project file persister save org argouml kernel project java io file public void do save project project file file throws save exception interrupted exception progress mgr progress mgr new progress mgr progress mgr set number of phases 4 progress mgr next phase file last archive file new file file get absolute path file temp file null try temp file create temp file file catch file not found exception e throw new save exception failed to archive the previous file version e catch io exception e throw new save exception failed to archive the previous file version e try project set file file project set version application version get version project set persistence version persistence version output stream stream new file output stream file write project project stream progress mgr stream close progress mgr next phase string path file get parent if log is info enabled log info dir path if save did not raise an exception and name exists move name to name this is the correct backup file if last archive file exists last archive file delete if temp file exists last archive file exists temp file rename to last archive file if temp file exists temp file delete progress mgr next phase catch exception e log error exception occured during save attempt e frank in case of exception delete name and mv name back to name if name exists this is the rollback to old file file delete temp file rename to file if e instanceof interrupted exception throw interrupted exception e else we have to give a message to user and set the system to unsaved throw new save exception e saveexception interruptedexception projectfilepersister dosave saveexception interruptedexception progressmgr progressmgr progressmgr progressmgr setnumberofphases progressmgr nextphase lastarchivefile getabsolutepath tempfile tempfile createtempfile filenotfoundexception saveexception ioexception saveexception setfile setversion applicationversion getversion setpersistenceversion persistence_version outputstream fileoutputstream writeproject progressmgr progressmgr nextphase getparent isinfoenabled lastarchivefile lastarchivefile tempfile lastarchivefile tempfile renameto lastarchivefile tempfile tempfile progressmgr nextphase tempfile renameto interruptedexception interruptedexception saveexception the uml save format is no longer available to save inherit doc override public boolean is save enabled return true inheritdoc issaveenabled write the output for a project on the given stream param project the project to output param stream the stream to write to throws save exception if something goes wrong throws interrupted exception if the thread is interrupted void write project project project output stream o stream progress mgr progress mgr throws save exception interrupted exception output stream writer output stream writer try output stream writer new output stream writer o stream argo get encoding catch unsupported encoding exception e throw new save exception e print writer writer new print writer new buffered writer output stream writer xml filter output stream filtered stream new xml filter output stream o stream argo get encoding try writer println xml version 1 0 encoding argo get encoding writer println uml version persistence version write out header section try hashtable templates template reader get instance read argo tee ocl expander expander new ocl expander templates expander expand writer project catch expansion exception e throw new save exception e writer flush if progress mgr null progress mgr next phase note we assume members are ordered correctly already for project member project member project get members if log is info enabled log info saving member project member member file persister persister get member file persister project member filtered stream start entry persister save project member filtered stream try filtered stream flush catch io exception e throw new save exception e writer println uml writer flush finally writer close try filtered stream really close catch io exception e throw new save exception e saveexception interruptedexception writeproject outputstream ostream progressmgr progressmgr saveexception interruptedexception outputstreamwriter outputstreamwriter outputstreamwriter outputstreamwriter ostream getencoding unsupportedencodingexception saveexception printwriter printwriter bufferedwriter outputstreamwriter xmlfilteroutputstream filteredstream xmlfilteroutputstream ostream getencoding getencoding persistence_version templatereader getinstance argo_tee oclexpander oclexpander expansionexception saveexception progressmgr progressmgr nextphase projectmember projectmember getmembers isinfoenabled projectmember memberfilepersister getmemberfilepersister projectmember filteredstream startentry projectmember filteredstream filteredstream ioexception saveexception filteredstream reallyclose ioexception saveexception public project do load file file throws open exception interrupted exception let s initialize the progress mgr progress mgr progress mgr new progress mgr progress mgr set number of phases uml phases load thread utils check if interrupted return do load file file progress mgr doload openexception interruptedexception progressmgr progressmgr progressmgr progressmgr progressmgr setnumberofphases uml_phases_load threadutils checkifinterrupted doload progressmgr protected project do load file original file file file progress mgr progress mgr throws open exception interrupted exception xml input stream input stream null try project p project factory get instance create project file touri run through any stylesheet upgrades int file version get persistence version from file file log info loading uml file of version file version if check version file version get release version from file file if we re about to upgrade the file lets take an archive of it first string release get release version from file file copy file original file new file original file get absolute path release progress mgr set number of phases progress mgr get number of phases persistence version file version while file version persistence version file version log info upgrading to version file version long start time system current time millis file transform file file version long end time system current time millis log info upgrading took end time start time 1000 seconds progress mgr next phase progress mgr next phase input stream new xml input stream file touri tourl open stream argo file length 100000 argo parser parser new argo parser reader reader new input stream reader input stream argo get encoding parser read project p reader list member list parser get member list log info member list size members for int i 0 i member list size i member file persister persister get member file persister string member list get i log info loading member with persister get class get name input stream reopen persister get main tag try persister load p input stream catch open exception e uml 2 x files don t have xmi as their outer tag try again with uml model if xmi equals persister get main tag e get cause instanceof uml exception e get cause get cause instanceof io exception input stream reopen uml model persister load p input stream else throw e let s update the progress progress mgr next phase thread utils check if interrupted input stream real close p post load return p catch interrupted exception e throw e catch open exception e throw e catch io exception e throw new open exception e catch sax exception e throw new open exception e doload originalfile progressmgr progressmgr openexception interruptedexception xmlinputstream inputstream projectfactory getinstance createproject fileversion getpersistenceversionfromfile fileversion checkversion fileversion getreleaseversionfromfile getreleaseversionfromfile copyfile originalfile originalfile getabsolutepath progressmgr setnumberofphases progressmgr getnumberofphases persistence_version fileversion fileversion persistence_version fileversion fileversion starttime currenttimemillis fileversion endtime currenttimemillis endtime starttime progressmgr nextphase progressmgr nextphase inputstream xmlinputstream openstream argoparser argoparser inputstreamreader inputstream getencoding readproject memberlist getmemberlist memberlist memberlist memberfilepersister getmemberfilepersister memberlist getclass getname inputstream getmaintag inputstream openexception getmaintag getcause umlexception getcause getcause ioexception inputstream inputstream progressmgr nextphase threadutils checkifinterrupted inputstream realclose postload interruptedexception openexception ioexception openexception saxexception openexception protected boolean check version int file version string release version throws open exception version exception if we re trying to load a file from a future version complain and refuse if file version persistence version throw new version exception the file selected is from a more up to date version of argouml it has been saved with argouml version release version please load with that or a more up to date release of argouml return file version persistence version checkversion fileversion releaseversion openexception versionexception fileversion persistence_version versionexception releaseversion fileversion persistence_version transform a string of xml data according to the service required param file the xml file to be transformed param version the version of the persistence format the xml is to be transformed to return the transformed xml file throws open exception on xslt transformation error or file read public final file transform file file int version throws open exception try string upgrade files path org argouml persistence upgrades string upgrade file upgrade version xsl string xslt file name upgrade files path upgrade file url xslt url uml file persister class get resource xslt file name log info resource is xslt url read xslt stream into a temporary file get url for temp file open stream from url and wrap in stream source stream source xslt stream source new stream source xslt url open stream xslt stream source set system id xslt url to external form transformer factory factory transformer factory new instance transformer transformer factory new transformer xslt stream source file transformed file file create temp file upgrade version uml transformed file delete on exit file output stream stream new file output stream transformed file writer writer new buffered writer new output stream writer stream argo get encoding result result new stream result writer stream source input stream source new stream source file input stream source set system id file transformer transform input stream source result writer close return transformed file catch io exception e throw new open exception e catch transformer exception e throw new open exception e openexception openexception upgradefilespath upgradefile xsltfilename upgradefilespath upgradefile xslturl umlfilepersister getresource xsltfilename xslturl xsltstream openstream streamsource streamsource xsltstreamsource streamsource xslturl openstream xsltstreamsource setsystemid xslturl toexternalform transformerfactory transformerfactory newinstance newtransformer xsltstreamsource transformedfile createtempfile upgrade_ _ transformedfile deleteonexit fileoutputstream fileoutputstream transformedfile bufferedwriter outputstreamwriter getencoding streamresult streamsource inputstreamsource streamsource inputstreamsource setsystemid inputstreamsource transformedfile ioexception openexception transformerexception openexception read stream in argo format and extracts the persistence version number from the root tag param file the xml file return the version number throws open exception on any error private int get persistence version from file file file throws open exception input stream stream null try stream new buffered input stream file touri tourl open stream int version get persistence version stream stream close return version catch malformedurl exception e throw new open exception e catch io exception e throw new open exception e finally if stream null try stream close catch io exception e ignore openexception getpersistenceversionfromfile openexception inputstream bufferedinputstream openstream getpersistenceversion malformedurlexception openexception ioexception openexception ioexception reads an xml file of uml format and extracts the persistence version number from the root tag param input stream stream pointing to file to read return the version number throws open exception on any error protected int get persistence version input stream input stream throws open exception buffered reader reader null try reader new buffered reader new input stream reader input stream argo get encoding string root line reader read line while root line null root line trim starts with argo root line reader read line if root line null return 1 return integer parse int get version root line catch io exception e throw new open exception e catch number format exception e throw new open exception e finally try if reader null reader close catch io exception e no more we can do here on failure inputstream openexception getpersistenceversion inputstream inputstream openexception bufferedreader bufferedreader inputstreamreader inputstream getencoding rootline readline rootline rootline startswith rootline readline rootline parseint getversion rootline ioexception openexception numberformatexception openexception ioexception reads an xml file of uml format and extracts the persistence version number from the root tag param file the xml file return the argouml release number throws open exception on any error private string get release version from file file file throws open exception input stream stream null try stream new buffered input stream file touri tourl open stream string version get release version stream stream close return version catch malformedurl exception e throw new open exception e catch io exception e throw new open exception e finally if stream null try stream close catch io exception e ignore openexception getreleaseversionfromfile openexception inputstream bufferedinputstream openstream getreleaseversion malformedurlexception openexception ioexception openexception ioexception reads an xml file of uml format and extracts the persistence version number from the root tag param input stream the stream point to the xml file return the argouml release number throws open exception on any error protected string get release version input stream input stream throws open exception buffered reader reader null try reader new buffered reader new input stream reader input stream argo get encoding string version line reader read line while version line trim starts with version version line reader read line if version line null throw new open exception failed to find the release version tag version line version line trim int end version line last index of version return version line trim substring 9 end catch io exception e throw new open exception e catch number format exception e throw new open exception e finally try if input stream null input stream close if reader null reader close catch io exception e no more we can do here on failure inputstream openexception getreleaseversion inputstream inputstream openexception bufferedreader bufferedreader inputstreamreader inputstream getencoding versionline readline versionline startswith versionline readline versionline openexception versionline versionline versionline lastindexof versionline ioexception openexception numberformatexception openexception inputstream inputstream ioexception get the version attribute value from a string of xml param root line the line return the version protected string get version string root line string version int version pos root line index of version if version pos 0 int start pos version pos 9 int end pos root line index of start pos version root line substring start pos end pos else version 1 return version rootline getversion rootline versionpos rootline indexof versionpos startpos versionpos endpos rootline indexof startpos rootline startpos endpos returns true all argo specific files have an icon inherit doc public boolean has an icon return true inheritdoc hasanicon construct a filtered output stream using the given character set name param output stream source output stream to filter param charset name name of character set to use for encoding public xml filter output stream output stream output stream string charset name this output stream charset for name charset name outputstream charsetname xmlfilteroutputstream outputstream outputstream charsetname outputstream forname charsetname construct a filtered output stream using the given character set param output stream source output stream to filter param charset character set to use for encoding public xml filter output stream output stream output stream charset charset super output stream decoder charset new decoder decoder on malformed input coding error action report decoder on unmappable character coding error action report start entry outputstream xmlfilteroutputstream outputstream outputstream outputstream newdecoder onmalformedinput codingerroraction onunmappablecharacter codingerroraction startentry reset processing for the beginning of an entry public void start entry header processed false reset buffers startentry headerprocessed resetbuffers private void reset buffers inbb limit 0 outbb position 0 outcb position 0 resetbuffers override public void write byte b int off int len throws io exception if off len b length len off off len 0 throw new index out of bounds exception if header processed out write b off len else todo make this more efficient for large i os for int i 0 i len i write b off i ioexception indexoutofboundsexception headerprocessed override public void write int b throws io exception if header processed out write b else outbb put byte b inbb limit outbb position convert from bytes back to characters coder result result decoder decode inbb outcb false if result is error throw new runtime exception unknown character decoding error this will have problems if the smallest possible data segment is smaller than the size of the buffer needed for regex matching if outcb position outcb limit process header ioexception headerprocessed coderresult iserror runtimeexception processheader private void process header throws io exception header processed true outcb position 0 rewind our character buffer matcher matcher xml declaration pattern matcher outcb remove anything that matches our pattern string header remainder matcher replace all int index header remainder length 1 if header remainder char at index 0 remove null characters at the end do index while index 0 header remainder char at index 0 header remainder header remainder substring 0 index 1 reencode the remaining characters as bytes again byte buffer bb decoder charset encode header remainder and write them to our output stream byte out bytes new byte bb limit bb get out bytes out write out bytes 0 out bytes length write any left over bytes in the input buffer perhaps from a partially decoded character if inbb remaining 0 out write inbb array inbb position inbb remaining inbb position 0 inbb limit 0 processheader ioexception headerprocessed xmldeclarationpattern headerremainder replaceall headerremainder headerremainder charat headerremainder charat headerremainder headerremainder bytebuffer headerremainder outbytes outbytes outbytes outbytes this method has no effect to keep sub writers from closing it accidently the master can use the method link really close to actually close the underlying stream override public void close throws io exception flush reallyclose ioexception close the stream throws io exception public void really close throws io exception out close ioexception reallyclose ioexception flush the stream if the stream is flushed before the header is completely processed whatever has been written so far will get processed before the flush override public void flush throws io exception if header processed process header out flush ioexception headerprocessed processheader construct a property panel for a synch state public prop panel synch state super label synch state lookup icon synch state add field label name get name text field add field label container get container scroll add field label bound new uml text field2 new uml synch state bound document add separator add field label incoming get incoming scroll add field label outgoing get outgoing scroll proppanelsynchstate lookupicon synchstate addfield getnametextfield addfield getcontainerscroll addfield umltextfield2 umlsynchstatebounddocument addseparator addfield getincomingscroll addfield getoutgoingscroll constructor includes initialization of built in default profiles public profile manager impl try disable configuration update true profileuml new profileuml profile java new profile java profileuml profile good practices new profile good practices profile code generation new profile code generation profile good practices register profile profileuml add to default profiles profileuml the uml profile is always present and default register the built in profiles register profile profile java register profile profile good practices register profile profile code generation register profile new profile meta catch profile exception e throw new runtime exception e finally disable configuration update false load directories from configuration refresh registered profiles load default profilesfrom configuration profilemanagerimpl disableconfigurationupdate profilejava profilejava profilegoodpractices profilegoodpractices profilecodegeneration profilecodegeneration profilegoodpractices registerprofile addtodefaultprofiles registerprofile profilejava registerprofile profilegoodpractices registerprofile profilecodegeneration registerprofile profilemeta profileexception runtimeexception disableconfigurationupdate loaddirectoriesfromconfiguration refreshregisteredprofiles loaddefaultprofilesfromconfiguration private void load default profilesfrom configuration if disable configuration update disable configuration update true string default profiles list configuration get string key default profiles if default profiles list equals if the list does not exist add the java profile and the code generation and good practices profiles as default add to default profiles profile java add to default profiles profile good practices add to default profiles profile code generation else string tokenizer tokenizer new string tokenizer default profiles list directory separator false while tokenizer has more tokens string desc tokenizer next token profile p null if desc char at 0 u string file name desc substring 1 file file try file new file new uri file name p find user defined profile file if p null try p new user defined profile file register profile p catch profile exception e log error error loading profile file e catch uri syntax exception e1 log error invalid path for profile file name e1 catch throwable e2 log error error loading profile file name e2 else if desc char at 0 c string profile identifier desc substring 1 p look for registered profile profile identifier if p null add to default profiles p disable configuration update false loaddefaultprofilesfromconfiguration disableconfigurationupdate disableconfigurationupdate defaultprofileslist getstring key_default_profiles defaultprofileslist addtodefaultprofiles profilejava addtodefaultprofiles profilegoodpractices addtodefaultprofiles profilecodegeneration stringtokenizer stringtokenizer defaultprofileslist directory_separator hasmoretokens nexttoken charat filename filename finduserdefinedprofile userdefinedprofile registerprofile profileexception urisyntaxexception filename filename charat profileidentifier lookforregisteredprofile profileidentifier addtodefaultprofiles disableconfigurationupdate private void update default profiles configuration if disable configuration update string buffer buf new string buffer for profile p default profiles if p instanceof user defined profile buf append u user defined profile p get model file touri toascii string else buf append c p get profile identifier buf append directory separator configuration set string key default profiles buf to string updatedefaultprofilesconfiguration disableconfigurationupdate stringbuffer stringbuffer defaultprofiles userdefinedprofile userdefinedprofile getmodelfile toasciistring getprofileidentifier directory_separator setstring key_default_profiles tostring private void load directories from configuration disable configuration update true string tokenizer tokenizer new string tokenizer configuration get string key default directories directory separator false while tokenizer has more tokens search directories add tokenizer next token disable configuration update false loaddirectoriesfromconfiguration disableconfigurationupdate stringtokenizer stringtokenizer getstring key_default_directories directory_separator hasmoretokens searchdirectories nexttoken disableconfigurationupdate private void update search directories configuration if disable configuration update string buffer buf new string buffer for string s search directories buf append s append directory separator configuration set string key default directories buf to string updatesearchdirectoriesconfiguration disableconfigurationupdate stringbuffer stringbuffer searchdirectories directory_separator setstring key_default_directories tostring public list profile get registered profiles return profiles getregisteredprofiles public void register profile profile p if p null profiles contains p if p instanceof user defined profile get profile for class p get class get name null profiles add p for critic critic p get critics for object meta critic get criticized design materials agency register critic meta critic set enabled false this profile could have not been loaded when the default profile configuration was loaded at first so we need to do it again load default profilesfrom configuration registerprofile userdefinedprofile getprofileforclass getclass getname getcritics getcriticizeddesignmaterials setenabled loaddefaultprofilesfromconfiguration public void remove profile profile p if p null p profileuml profiles remove p default profiles remove p try collection packages p get profile packages if packages null packages is empty we assume profile is contained in a single extent model get uml factory delete extent packages iterator next catch profile exception e nothing to delete if we couldn t get the packages removeprofile defaultprofiles getprofilepackages isempty getumlfactory deleteextent profileexception public profile get profile for class string profile class profile found null if we found an old style name update it to the new package name if profile class null profile class starts with old profile package profile class profile class replace old profile package new profile package make sure the names didn t change again assert profileuml get class get name starts with new profile package for profile p profiles if p get class get name equals profile class found p break return found getprofileforclass profileclass profileclass profileclass startswith old_profile_package profileclass profileclass old_profile_package new_profile_package getclass getname startswith new_profile_package getclass getname profileclass public void add to default profiles profile p if p null profiles contains p default profiles contains p default profiles add p update default profiles configuration addtodefaultprofiles defaultprofiles defaultprofiles updatedefaultprofilesconfiguration public list profile get default profiles return collections unmodifiable list default profiles getdefaultprofiles unmodifiablelist defaultprofiles public void remove from default profiles profile p if p null p profileuml profiles contains p default profiles remove p update default profiles configuration removefromdefaultprofiles defaultprofiles updatedefaultprofilesconfiguration public void add search path directory string path if path null search directories contains path search directories add path update search directories configuration try model get xmi reader add search path path catch uml exception e log error couldn t retrive xmi reader from model e addsearchpathdirectory searchdirectories searchdirectories updatesearchdirectoriesconfiguration getxmireader addsearchpath umlexception public list string get search path directories return collections unmodifiable list search directories getsearchpathdirectories unmodifiablelist searchdirectories public void remove search path directory string path if path null search directories remove path update search directories configuration try model get xmi reader remove search path path catch uml exception e log error couldn t retrive xmi reader from model e removesearchpathdirectory searchdirectories updatesearchdirectoriesconfiguration getxmireader removesearchpath umlexception public void refresh registered profiles array list file dirs new array list file for string dir name search directories file dir new file dir name if dir exists dirs add dir if dirs is empty todo allow zargo as profile as well file file array new file dirs size for int i 0 i dirs size i file array i dirs get i list file dir list user defined profile helper get file list file array for file file dir list boolean found find user defined profile file null if found user defined profile udp null try udp new user defined profile file register profile udp catch profile exception e if an exception is raised file is unusable log warn failed to load user defined profile file get absolute path e refreshregisteredprofiles arraylist arraylist dirname searchdirectories dirname isempty filearray filearray dirlist userdefinedprofilehelper getfilelist filearray dirlist finduserdefinedprofile userdefinedprofile userdefinedprofile registerprofile profileexception getabsolutepath private profile find user defined profile file file for profile p profiles if p instanceof user defined profile user defined profile udp user defined profile p if file equals udp get model file return udp return null finduserdefinedprofile userdefinedprofile userdefinedprofile userdefinedprofile getmodelfile public profile getuml profile return profileuml getumlprofile public profile look for registered profile string value list profile registered profiles get registered profiles for profile profile registered profiles if profile get profile identifier equals ignore case value return profile return null lookforregisteredprofile registeredprofiles getregisteredprofiles registeredprofiles getprofileidentifier equalsignorecase public void apply configuration profile configuration pc for profile p this profiles for critic c p get critics c set enabled false configuration set boolean c get critic key false for profile p pc get profiles for critic c p get critics c set enabled true configuration set boolean c get critic key true applyconfiguration profileconfiguration getcritics setenabled setboolean getcritickey getprofiles getcritics setenabled setboolean getcritickey the constructor public cr dup param name setup head and desc add supported decision uml decision containment set knowledge types critic kt syntax crdupparamname setupheadanddesc addsupporteddecision umldecision setknowledgetypes kt_syntax override public boolean predicate2 object dm designer dsgr if model get facade isa behavioral feature dm return no problem object bf dm collection string names seen new array list string iterator params model get facade get parameters bf iterator while params has next object p params next string p name model get facade get name p if p name null equals p name continue if names seen contains p name return problem found names seen add p name return no problem getfacade isabehavioralfeature no_problem namesseen arraylist getfacade getparameters hasnext pname getfacade getname pname pname namesseen pname problem_found namesseen pname no_problem public set object get criticized design materials set object ret new hash set object ret add model get meta types get operation return ret getcriticizeddesignmaterials hashset getmetatypes getoperation param rect the rectangle param direction the direction return the point on the perimeter public static point get point on perimeter rectangle rect int direction return get point on perimeter rect direction 0 0 getpointonperimeter getpointonperimeter param rect the rectangle param direction the direction param x off the x offset param y off the y offset return the point on the perimeter public static point get point on perimeter rectangle rect int direction double x off double y off double x 0 double y 0 if direction north direction northeast direction northwest y rect gety if direction south direction southwest direction southeast y rect gety rect get height if direction east direction west y rect gety rect get height 2 0 if direction northwest direction west direction southwest x rect getx if direction northeast direction east direction southeast x rect getx rect get width if direction north direction south x rect getx rect get width 2 0 x x off y y off return new point int x int y xoff yoff getpointonperimeter xoff yoff getheight getheight getwidth getwidth xoff yoff get a routing polygon for a straightline between two points param start start of the line param end end of the line return the routing polygon between start and end public static polygon get routing polygon straight line point start point end return get routing polygon straight line with offset start end 0 getroutingpolygonstraightline getroutingpolygonstraightlinewithoffset get a routing polygon with a horizontal offset from the two points param start start of the line param end end of the line param offset the given offset return the routing polygon between start and end public static polygon get routing polygon straight line with offset point start point end int offset polygon new poly new polygon new poly add point int start getx int start gety if offset 0 double newy 0 0 if offset 0 newy math min start gety offset end gety offset if offset 0 newy math max start gety offset end gety offset new poly add point int start getx int newy new poly add point int end getx int newy new poly add point int end getx int end gety return new poly getroutingpolygonstraightlinewithoffset newpoly newpoly addpoint newpoly addpoint newpoly addpoint newpoly addpoint newpoly the default constructor for this class public project settings tab profile set layout new box layout this box layout y axis j panel set def stereov new j panel set def stereov set layout new flow layout stereo label set label for stereo field set def stereov add stereo label set def stereov add stereo field default combo box model cmodel new default combo box model stereo field set model cmodel cmodel add element translator localize menu popup stereotype view textual cmodel add element translator localize menu popup stereotype view big icon cmodel add element translator localize menu popup stereotype view small icon stereo field add item listener new item listener public void item state changed item event e project settings ps project manager get manager get current project get project settings object src e get source if src stereo field object item e get item default combo box model model default combo box model stereo field get model int idx model get index of item switch idx case 0 ps set default stereotype view diagram appearance stereotype view textual break case 1 ps set default stereotype view diagram appearance stereotype view big icon break case 2 ps set default stereotype view diagram appearance stereotype view small icon break add set def stereov j panel config panel new j panel config panel set layout new box layout config panel box layout x axis available list set prototype cell value 12345678901234567890 used list set prototype cell value 12345678901234567890 available list set minimum size new dimension 50 50 used list set minimum size new dimension 50 50 j panel left list new j panel left list set layout new border layout left list add new j label translator localize tab profiles userdefined available border layout north left list add new j scroll pane available list border layout center config panel add left list j panel center buttons new j panel center buttons set layout new box layout center buttons box layout y axis center buttons add add button center buttons add remove button config panel add center buttons j panel right list new j panel right list set layout new border layout right list add new j label translator localize tab profiles userdefined active border layout north right list add new j scroll pane used list border layout center config panel add right list add button add action listener this remove button add action listener this add config panel j panel lff panel new j panel lff panel set layout new flow layout lff panel add unregister profile lff panel add load from file load from file add action listener this unregister profile add action listener this add lff panel projectsettingstabprofile setlayout boxlayout boxlayout y_axis jpanel setdefstereov jpanel setdefstereov setlayout flowlayout stereolabel setlabelfor stereofield setdefstereov stereolabel setdefstereov stereofield defaultcomboboxmodel defaultcomboboxmodel stereofield setmodel addelement addelement addelement stereofield additemlistener itemlistener itemstatechanged itemevent projectsettings projectmanager getmanager getcurrentproject getprojectsettings getsource stereofield getitem defaultcomboboxmodel defaultcomboboxmodel stereofield getmodel getindexof setdefaultstereotypeview diagramappearance stereotype_view_textual setdefaultstereotypeview diagramappearance stereotype_view_big_icon setdefaultstereotypeview diagramappearance stereotype_view_small_icon setdefstereov jpanel configpanel jpanel configpanel setlayout boxlayout configpanel boxlayout x_axis availablelist setprototypecellvalue usedlist setprototypecellvalue availablelist setminimumsize usedlist setminimumsize jpanel leftlist jpanel leftlist setlayout borderlayout leftlist jlabel borderlayout leftlist jscrollpane availablelist borderlayout configpanel leftlist jpanel centerbuttons jpanel centerbuttons setlayout boxlayout centerbuttons boxlayout y_axis centerbuttons addbutton centerbuttons removebutton configpanel centerbuttons jpanel rightlist jpanel rightlist setlayout borderlayout rightlist jlabel borderlayout rightlist jscrollpane usedlist borderlayout configpanel rightlist addbutton addactionlistener removebutton addactionlistener configpanel jpanel lffpanel jpanel lffpanel setlayout flowlayout lffpanel unregisterprofile lffpanel loadfromfile loadfromfile addactionlistener unregisterprofile addactionlistener lffpanel public void item state changed item event e project settings ps project manager get manager get current project get project settings object src e get source if src stereo field object item e get item default combo box model model default combo box model stereo field get model int idx model get index of item switch idx case 0 ps set default stereotype view diagram appearance stereotype view textual break case 1 ps set default stereotype view diagram appearance stereotype view big icon break case 2 ps set default stereotype view diagram appearance stereotype view small icon break itemstatechanged itemevent projectsettings projectmanager getmanager getcurrentproject getprojectsettings getsource stereofield getitem defaultcomboboxmodel defaultcomboboxmodel stereofield getmodel getindexof setdefaultstereotypeview diagramappearance stereotype_view_textual setdefaultstereotypeview diagramappearance stereotype_view_big_icon setdefaultstereotypeview diagramappearance stereotype_view_small_icon private void refresh lists available list set model new default combo box model get available profiles to array used list set model new default combo box model get used profiles to array refreshlists availablelist setmodel defaultcomboboxmodel getavailableprofiles toarray usedlist setmodel defaultcomboboxmodel getusedprofiles toarray private list profile get used profiles return new array list profile project manager get manager get current project get profile configuration get profiles getusedprofiles arraylist projectmanager getmanager getcurrentproject getprofileconfiguration getprofiles private list profile get available profiles list profile used get used profiles list profile ret new array list profile for profile profile profile facade get manager get registered profiles if used contains profile ret add profile return ret getavailableprofiles getusedprofiles arraylist profilefacade getmanager getregisteredprofiles public void action performed action event arg0 mutable combo box model model available mutable combo box model available list get model mutable combo box model model used mutable combo box model used list get model if arg0 get source add button if available list get selected index 1 profile selected profile model available get element at available list get selected index model used add element selected model available remove element selected for profile profile get available dependents selected model used add element profile model available remove element profile else if arg0 get source remove button if used list get selected index 1 profile selected profile model used get element at used list get selected index list profile dependents get active dependents selected boolean remove true if dependents is empty string message translator localize tab profiles confirmdeletewithdependencies new object dependents string title translator localize tab profiles confirmdeletewithdependencies title remove j option pane show confirm dialog this message title j option pane yes no option j option pane yes option if remove if profile facade get manager get registered profiles contains selected profile facade get manager get default profiles contains selected remove j option pane show confirm dialog this translator localize tab profiles confirmdeleteunregistered translator localize tab profiles confirmdeleteunregistered title j option pane yes no option j option pane yes option if remove model used remove element selected model available add element selected for profile profile dependents model used remove element profile model available add element profile else if arg0 get source unregister profile if available list get selected index 1 profile selected profile model available get element at available list get selected index if selected instanceof user defined profile profile facade get manager remove profile selected model available remove element selected else j option pane show message dialog this translator localize tab profiles cannotdelete else if arg0 get source load from file j file chooser file chooser new j file chooser file chooser set file filter new file filter public boolean accept file file return file is directory file is file file get name ends with xmi file get name ends with xml file get name to lower case ends with xmi zip file get name to lower case ends with xml zip public string get description return xmi xml xmi zip xml zip int ret file chooser show open dialog this if ret j file chooser approve option file file file chooser get selected file try user defined profile profile new user defined profile file profile facade get manager register profile profile model available add element profile catch profile exception e j option pane show message dialog this translator localize tab profiles userdefined errorloading available list validate used list validate actionperformed actionevent mutablecomboboxmodel modelavailable mutablecomboboxmodel availablelist getmodel mutablecomboboxmodel modelused mutablecomboboxmodel usedlist getmodel getsource addbutton availablelist getselectedindex modelavailable getelementat availablelist getselectedindex modelused addelement modelavailable removeelement getavailabledependents modelused addelement modelavailable removeelement getsource removebutton usedlist getselectedindex modelused getelementat usedlist getselectedindex getactivedependents isempty joptionpane showconfirmdialog joptionpane yes_no_option joptionpane yes_option profilefacade getmanager getregisteredprofiles profilefacade getmanager getdefaultprofiles joptionpane showconfirmdialog joptionpane yes_no_option joptionpane yes_option modelused removeelement modelavailable addelement modelused removeelement modelavailable addelement getsource unregisterprofile availablelist getselectedindex modelavailable getelementat availablelist getselectedindex userdefinedprofile profilefacade getmanager removeprofile modelavailable removeelement joptionpane showmessagedialog getsource loadfromfile jfilechooser filechooser jfilechooser filechooser setfilefilter filefilter isdirectory isfile getname endswith getname endswith getname tolowercase endswith getname tolowercase endswith getdescription filechooser showopendialog jfilechooser approve_option filechooser getselectedfile userdefinedprofile userdefinedprofile profilefacade getmanager registerprofile modelavailable addelement profileexception joptionpane showmessagedialog availablelist usedlist public boolean accept file file return file is directory file is file file get name ends with xmi file get name ends with xml file get name to lower case ends with xmi zip file get name to lower case ends with xml zip isdirectory isfile getname endswith getname endswith getname tolowercase endswith getname tolowercase endswith public string get description return xmi xml xmi zip xml zip getdescription private list profile get available dependents profile selected mutable combo box model model avl mutable combo box model available list get model list profile ret new array list profile for int i 0 i model avl get size i profile p profile model avl get element at i if p equals selected selected get dependencies contains p ret add p return ret getavailabledependents mutablecomboboxmodel modelavl mutablecomboboxmodel availablelist getmodel arraylist modelavl getsize modelavl getelementat getdependencies private list profile get active dependents profile selected mutable combo box model model usd mutable combo box model used list get model list profile ret new array list profile for int i 0 i model usd get size i profile p profile model usd get element at i if p equals selected p get dependencies contains selected ret add p return ret getactivedependents mutablecomboboxmodel modelusd mutablecomboboxmodel usedlist getmodel arraylist modelusd getsize modelusd getelementat getdependencies return the internationalization key that containing the name of this tab see org argouml application api gui settings tab interface get tab key public string get tab key return tab profiles guisettingstabinterface gettabkey gettabkey return the panel containing this tab see org argouml application api gui settings tab interface get tab panel public j panel get tab panel return this guisettingstabinterface gettabpanel jpanel gettabpanel public void handle reset to default refresh lists handleresettodefault refreshlists public void handle settings tab cancel handlesettingstabcancel public void handle settings tab refresh project settings ps project manager get manager get current project get project settings switch ps get default stereotype view value case diagram appearance stereotype view textual stereo field set selected index 0 break case diagram appearance stereotype view big icon stereo field set selected index 1 break case diagram appearance stereotype view small icon stereo field set selected index 2 break refresh lists handlesettingstabrefresh projectsettings projectmanager getmanager getcurrentproject getprojectsettings getdefaultstereotypeviewvalue diagramappearance stereotype_view_textual stereofield setselectedindex diagramappearance stereotype_view_big_icon stereofield setselectedindex diagramappearance stereotype_view_small_icon stereofield setselectedindex refreshlists public void handle settings tab save list profile to remove new array list profile project proj project manager get manager get current project profile configuration pc proj get profile configuration list profile used itens new array list profile mutable combo box model model usd mutable combo box model used list get model for int i 0 i model usd get size i used itens add profile model usd get element at i for profile profile pc get profiles if used itens contains profile to remove add profile for profile profile to remove pc remove profile profile for profile profile used itens if pc get profiles contains profile pc add profile profile proj set profile configuration pc handlesettingstabsave toremove arraylist projectmanager getmanager getcurrentproject profileconfiguration getprofileconfiguration useditens arraylist mutablecomboboxmodel modelusd mutablecomboboxmodel usedlist getmodel modelusd getsize useditens modelusd getelementat getprofiles useditens toremove toremove removeprofile useditens getprofiles addprofile setprofileconfiguration the constructor public action new parameter super button new parameter put value action name translator localize button new parameter actionnewparameter putvalue public void action performed action event e object target target manager get instance get model target if model get facade isa parameter target target model get facade get model element container target if target null super action performed e project current project project manager get manager get current project object param type current project get default parameter type target manager get instance set target model get core factory build parameter target param type actionperformed actionevent targetmanager getinstance getmodeltarget getfacade isaparameter getfacade getmodelelementcontainer actionperformed currentproject projectmanager getmanager getcurrentproject paramtype currentproject getdefaultparametertype targetmanager getinstance settarget getcorefactory buildparameter paramtype the constructor public prop panel activity graph super label activity graph title lookup icon activity graph proppanelactivitygraph lookupicon activitygraph override protected uml combo box model2 get context combo box model return new uml activity graph context combo box model umlcomboboxmodel2 getcontextcomboboxmodel umlactivitygraphcontextcomboboxmodel see org argouml uml ui behavior state machines prop panel state machine initialize override protected void initialize super initialize add separator j list partition list new uml linked list new uml activity graph partiition list model add field translator localize label partition new j scroll pane partition list state_machines proppanelstatemachine addseparator jlist partitionlist umllinkedlist umlactivitygraphpartiitionlistmodel addfield jscrollpane partitionlist constructor for uml activity graph partiition list model public uml activity graph partiition list model super partition umlactivitygraphpartiitionlistmodel umlactivitygraphpartiitionlistmodel see org argouml uml ui uml model element list model2 build model list protected void build model list set all elements model get facade get partitions get target umlmodelelementlistmodel2 buildmodellist buildmodellist setallelements getfacade getpartitions gettarget see org argouml uml ui uml model element list model2 is valid element object protected boolean is valid element object element return model get facade get partitions get target contains element umlmodelelementlistmodel2 isvalidelement isvalidelement getfacade getpartitions gettarget the constructor public cr assoc name conflict setup head and desc add supported decision uml decision naming set knowledge types critic kt syntax no good trigger crassocnameconflict setupheadanddesc addsupporteddecision umldecision setknowledgetypes kt_syntax java lang object org argouml cognitive designer public boolean predicate2 object dm designer dsgr return compute offenders dm size 1 computeoffenders org argouml cognitive designer public to do item to do item object dm designer dsgr list set offs compute offenders dm return new uml to do item this offs dsgr todoitem todoitem listset computeoffenders umltodoitem param dm the object to check return the set of offenders protected list set compute offenders object dm list set offender result new list set if model get facade isa namespace dm hash map string object names new hash map string object for object name1 object model get facade get owned elements dm if model get facade isa association name1 object continue string name model get facade get name name1 object collection typ1 get all types name1 object if name null equals name continue if names contains key name object offender names get name collection typ2 get all types offender if typ1 contains all typ2 typ2 contains all typ1 if offender result contains offender offender result add offender offender result add name1 object names put name name1 object return offender result listset computeoffenders listset offenderresult listset getfacade isanamespace hashmap hashmap name1object getfacade getownedelements getfacade isaassociation name1object getfacade getname name1object getalltypes name1object containskey getalltypes containsall containsall offenderresult offenderresult offenderresult name1object name1object offenderresult override public boolean still valid to do item i designer dsgr if is active return false list set offs i get offenders first element is e g the class but we need to have its namespace to recompute the offenders object f offs get 0 object ns model get facade get namespace f if predicate ns dsgr return false list set new offs compute offenders ns boolean res offs equals new offs return res stillvalid todoitem isactive listset getoffenders getfacade getnamespace listset newoffs computeoffenders newoffs public collection get all types object assoc set list new hash set if assoc null return list collection assoc ends model get facade get connections assoc if assoc ends null return list for object element assoc ends if model get facade isa association end element object type model get facade get type element list add type return list getalltypes hashset assocends getfacade getconnections assocends assocends getfacade isaassociationend getfacade gettype public set object get criticized design materials set object ret new hash set object ret add model get meta types get namespace return ret getcriticizeddesignmaterials hashset getmetatypes getnamespace constructor for uml state machine top list model public uml transition effect list model super effect umlstatemachinetoplistmodel umltransitioneffectlistmodel see org argouml uml ui uml model element list model2 build model list protected void build model list remove all elements add element model get facade get effect get target umlmodelelementlistmodel2 buildmodellist buildmodellist removeallelements addelement getfacade geteffect gettarget see org argouml uml ui uml model element list model2 is valid element object protected boolean is valid element object element return element model get facade get effect get target umlmodelelementlistmodel2 isvalidelement isvalidelement getfacade geteffect gettarget override public boolean build popup j popup menu popup int index popup menu new action build menu popup action new action roles effect get target return true buildpopup jpopupmenu popupmenunewaction buildmenu actionnewaction gettarget override protected boolean has popup return true haspopup private static final long serial versionuid 7249069222789301797l public object get meta type return model get meta types get association end serialversionuid getmetatype getmetatypes getassociationend create an edge of the given type and connect it to the given nodes param graph model the graph model in which to create the connection element param edge type the uml object type of the connection param source fig the fig node for the source element param dest fig the fig node for the destination element return the fig edge representing the newly created model element override protected fig edge build connection mutable graph model graph model object edge type fig source fig fig dest fig try the source of an association end should not be the classifier if it is the user has drawn the wrong way round so we swap here if source fig instanceof fig classifier box final fig temp fig source fig source fig dest fig dest fig temp fig object association end model get uml factory build connection edge type source fig get owner null dest fig get owner null null null final fig node source fig node convert to fig node source fig final fig node dest fig node convert to fig node dest fig graph model add edge association end set new edge association end calling connect will add the edge to the graph model and any layer persectives on that graph model will get a edge added event and will add an appropriate fig edge determined by the graph edge renderer if get new edge null source fig node damage dest fig node damage layer lay editor get layer manager get active layer fig edge fe fig edge lay presentation for get new edge newitem set line color color black fe set fig newitem fe set source port fig source fig node fe set source fig node source fig node fe set dest port fig dest fig node fe set dest fig node dest fig node return fe else return null catch illegal model element connection exception e we have already confirmed the connection is valid return null graphmodel edgetype sourcefig fignode destfig fignode figedge figedge buildconnection mutablegraphmodel graphmodel edgetype sourcefig destfig sourcefig figclassifierbox tempfig sourcefig sourcefig destfig destfig tempfig associationend getumlfactory buildconnection edgetype sourcefig getowner destfig getowner fignode sourcefignode converttofignode sourcefig fignode destfignode converttofignode destfig graphmodel addedge associationend setnewedge associationend graphmodel layerpersectives graphmodel edgeadded figedge graphedgerenderer getnewedge sourcefignode destfignode getlayermanager getactivelayer figedge figedge presentationfor getnewedge _newitem setlinecolor setfig _newitem setsourceportfig sourcefignode setsourcefignode sourcefignode setdestportfig destfignode setdestfignode destfignode illegalmodelelementconnectionexception if the selected fig is a fig association an edge then convert it to a fig node association param fig the select end fig return the fig converted to a fig node private fig node convert to fig node fig fig if fig instanceof fig edge port fig fig get group if fig instanceof fig association return fig node fig final fig association fig association fig association fig final int x fig association get edge port getx final int y fig association get edge port gety final object association fig get owner final fig node original edge port fig association get edge port fig class association class association class box null fig edge association class association class link null final layer perspective lay layer perspective editor get layer manager get active layer detach any edges such as comment edges already attached to the fig association before the fig association is removed they ll later be re attached to the new fig node association final collection fig edge existing edges original edge port get edges for fig edge edge existing edges if edge instanceof fig edge association class if there are bits of an association class then remember their location and path association class link fig edge association class edge fig node fig node edge get source fig node if fig node instanceof fig edge port fig node edge get dest fig node association class box fig class association class fig node original edge port remove fig edge edge lay remove edge lay remove association class box else original edge port remove fig edge edge list association figs lay presentations for association fig association remove from diagram association figs lay presentations for association create the new fig node association and locate it final mutable graph model gm mutable graph model editor get graph model gm add node association association figs lay presentations for association association figs remove fig association association figs lay presentations for association final fig node association fig node fig node association association figs get 0 fig node set location x fig node get width 2 y fig node get height 2 editor add fig node editor get selection manager deselect all add the association ends to the graph model final collection object association ends model get facade get connections association for object association end association ends gm add edge association end add the edges such as comment edges that were on the old fig association to our new fig node association and make sure they are positioned correctly for fig edge edge existing edges if edge get dest fig node original edge port edge set dest fig node fig node edge set dest port fig fig node if edge get source fig node original edge port edge set source fig node fig node edge set source port fig fig node fig node update edges if association class box null association figs lay presentations for association lay add association class box association class link set source fig node fig node lay add association class link association figs lay presentations for association return fig node figassociation fignodeassociation fignode fignode converttofignode figedgeport getgroup figassociation fignode figassociation figassociation figassociation figassociation getedgeport figassociation getedgeport getowner fignode originaledgeport figassociation getedgeport figclassassociationclass associationclassbox figedgeassociationclass associationclasslink layerperspective layerperspective getlayermanager getactivelayer figassociation figassociation fignodeassociation figedge existingedges originaledgeport getedges figedge existingedges figedgeassociationclass associationclasslink figedgeassociationclass fignode fignode getsourcefignode fignode figedgeport fignode getdestfignode associationclassbox figclassassociationclass fignode originaledgeport removefigedge associationclassbox originaledgeport removefigedge associationfigs presentationsfor figassociation removefromdiagram associationfigs presentationsfor fignodeassociation mutablegraphmodel mutablegraphmodel getgraphmodel addnode associationfigs presentationsfor associationfigs figassociation associationfigs presentationsfor fignodeassociation fignode fignodeassociation associationfigs fignode setlocation fignode getwidth fignode getheight fignode getselectionmanager deselectall associationends getfacade getconnections associationend associationends addedge associationend figassociation fignodeassociation figedge existingedges getdestfignode originaledgeport setdestfignode fignode setdestportfig fignode getsourcefignode originaledgeport setsourcefignode fignode setsourceportfig fignode fignode updateedges associationclassbox associationfigs presentationsfor associationclassbox associationclasslink setsourcefignode fignode associationclasslink associationfigs presentationsfor fignode constructor for uml state exit list model public uml state exit list model super exit umlstateexitlistmodel umlstateexitlistmodel see org argouml uml ui uml model element list model2 build model list protected void build model list remove all elements add element model get facade get exit get target umlmodelelementlistmodel2 buildmodellist buildmodellist removeallelements addelement getfacade getexit gettarget see org argouml uml ui uml model element list model2 is valid element object protected boolean is valid element object element return element model get facade get exit get target umlmodelelementlistmodel2 isvalidelement isvalidelement getfacade getexit gettarget see org argouml ui explorer rules perspective rule get rule name public string get rule name return translator localize misc summary attribute perspectiverule getrulename getrulename public collection get children object parent if parent instanceof attributes node return model get facade get attributes attributes node parent get parent return collections empty set getchildren attributesnode getfacade getattributes attributesnode getparent empty_set public set get dependencies object parent if parent instanceof attributes node set set new hash set set add attributes node parent get parent return set return collections empty set getdependencies attributesnode hashset attributesnode getparent empty_set the constructor param element name predicate predicate for the element name param package name predicate predicate for the package name param diagram name predicate predicate for the diagram name param type predicate predicate for the type public predicate search predicate element name predicate predicate package name predicate predicate diagram name predicate predicate type predicate element name element name predicate package name package name predicate diagram name diagram name predicate the type type predicate elementnamepredicate packagenamepredicate diagramnamepredicate typepredicate predicatesearch elementnamepredicate packagenamepredicate diagramnamepredicate typepredicate elementname elementnamepredicate packagename packagenamepredicate diagramname diagramnamepredicate thetype typepredicate param diagram the given diagram return true if the name of the given diagram equals public boolean match diagram argo diagram diagram return match diagram diagram get name matchdiagram argodiagram matchdiagram getname param name the name to match return true if the name of the given diagram equals public boolean match diagram string name return diagram name evaluate name matchdiagram diagramname param pkg the given package return true if the name of the given package is equal public boolean match package object pkg boolean res package name evaluate model get facade get name pkg return res matchpackage packagename getfacade getname public boolean evaluate object element if model get facade isauml element element return false object me element return the type evaluate me specific evaluate me element name evaluate model get facade get name me getfacade isaumlelement thetype elementname getfacade getname constructor for uml transition trigger list model public uml transition trigger list model super trigger umltransitiontriggerlistmodel umltransitiontriggerlistmodel see org argouml uml ui uml model element list model2 build model list protected void build model list remove all elements add element model get facade get trigger get target umlmodelelementlistmodel2 buildmodellist buildmodellist removeallelements addelement getfacade gettrigger gettarget see org argouml uml ui uml model element list model2 is valid element object protected boolean is valid element object element return element model get facade get trigger get target umlmodelelementlistmodel2 isvalidelement isvalidelement getfacade gettrigger gettarget override public boolean build popup j popup menu popup int index popup menu new event build menu popup action new event roles trigger get target return true buildpopup jpopupmenu popupmenunewevent buildmenu actionnewevent gettarget override protected boolean has popup return true haspopup constructor public uml operation specification document super specification umloperationspecificationdocument protected void set property string text if model get facade isa operation get target model get facade isa reception get target model get core helper set specification get target text setproperty getfacade isaoperation gettarget getfacade isareception gettarget getcorehelper setspecification gettarget protected string get property if model get facade isa operation get target model get facade isa reception get target return model get facade get specification get target return null getproperty getfacade isaoperation gettarget getfacade isareception gettarget getfacade getspecification gettarget the constructor param call state the uml call state public call state notation uml object call state super call state callstate callstate callstatenotationuml callstate callstate public void parse object model element string text try parse call state model element text catch parse exception pe string msg statusmsg bar error parsing callstate object args pe get localized message integer value of pe get error offset argo event pump fire event new argo help event argo event types help changed this translator message format msg args modelelement parsecallstate modelelement parseexception getlocalizedmessage valueof geterroroffset argoeventpump fireevent argohelpevent argoeventtypes help_changed messageformat protected object parse call state object call state string s1 throws parse exception string s s1 trim int a s index of int b s index of if a 0 b 0 b 0 a 0 b a throw new parse exception no matching brackets found 0 first we decode the string string new class name null string new operation name null string tokenizer tokenizer new string tokenizer s while tokenizer has more tokens string next token tokenizer next token trim if next token ends with new class name next token substring 0 next token length 1 else new operation name next token trim secondly we check the previous model structure string old operation name null string old class name null object entry model get facade get entry call state object operation null object clazz null if model get facade isa call action entry operation model get facade get operation entry if model get facade isa operation operation old operation name model get facade get name operation clazz model get facade get owner operation old class name model get facade get name clazz and 3rd we adapt the model boolean found false if new class name null new class name equals old class name new operation name null new operation name equals old operation name same class other operation for object op model get facade get operations clazz if new operation name equals model get facade get name op model get common behavior helper set operation entry op found true break if found throw new parse exception operation new operation name not found in new class name 0 else if new class name null new class name equals old class name new operation name null other class object model project manager get manager get current project get root collection c model get model management helper get all model elements of kind model model get meta types get classifier iterator i c iterator object classifier null while i has next object cl i next string cn model get facade get name cl if cn equals new class name classifier cl break if classifier null throw new parse exception classifier new class name not found 0 we found the classifier now go find the operation if classifier null collection ops model get facade get operations classifier iterator io ops iterator while io has next object op io next if new operation name equals model get facade get name op here we located the new classifier with its operation found true if model get facade isa call action entry entry model get common behavior factory build call action op ca model get state machines helper set entry call state entry else model get common behavior helper set operation entry op break if found throw new parse exception operation new operation name not found in new class name 0 if found throw new parse exception incompatible input found 0 return call state parsecallstate callstate parseexception indexof indexof parseexception newclassname newoperationname stringtokenizer stringtokenizer hasmoretokens nexttoken nexttoken nexttoken endswith newclassname nexttoken nexttoken newoperationname nexttoken oldoperationname oldclassname getfacade getentry callstate getfacade isacallaction getfacade getoperation getfacade isaoperation oldoperationname getfacade getname getfacade getowner oldclassname getfacade getname newclassname newclassname oldclassname newoperationname newoperationname oldoperationname getfacade getoperations newoperationname getfacade getname getcommonbehaviorhelper setoperation parseexception newoperationname newclassname newclassname newclassname oldclassname newoperationname projectmanager getmanager getcurrentproject getroot getmodelmanagementhelper getallmodelelementsofkind getmetatypes getclassifier hasnext getfacade getname newclassname parseexception newclassname getfacade getoperations hasnext newoperationname getfacade getname getfacade isacallaction getcommonbehaviorfactory buildcallaction getstatemachineshelper setentry callstate getcommonbehaviorhelper setoperation parseexception newoperationname newclassname parseexception callstate see org argouml notation providers notation provider get parsing help public string get parsing help return parsing help fig callstate notationprovider getparsinghelp getparsinghelp suppress warnings deprecation deprecated public string to string object model element map args return to string model element suppresswarnings tostring modelelement tostring modelelement private string to string object model element string ret object action model get facade get entry model element if model get facade isa call action action object operation model get facade get operation action if operation null object n model get facade get name operation if n null ret string n n model get facade get name model get facade get owner operation if n null n equals ret n string n if ret null return return ret tostring modelelement getfacade getentry modelelement getfacade isacallaction getfacade getoperation getfacade getname getfacade getname getfacade getowner override public string to string object model element notation settings settings return to string model element tostring modelelement notationsettings tostring modelelement the constructor public cr join incoming transition setup head and desc add supported decision uml decision state machines add trigger incoming crjoinincomingtransition setupheadanddesc addsupporteddecision umldecision state_machines addtrigger public boolean predicate2 object dm designer dsgr if model get facade isa transition dm return no problem object tr dm object target model get facade get target tr object source model get facade get source tr if model get facade isa pseudostate target return no problem if model get facade equals pseudostate kind model get facade get kind target model get pseudostate kind get join return no problem if model get facade isa state source return no problem return problem found getfacade isatransition no_problem getfacade gettarget getfacade getsource getfacade isapseudostate no_problem getfacade equalspseudostatekind getfacade getkind getpseudostatekind getjoin no_problem getfacade isastate no_problem problem_found public set object get criticized design materials set object ret new hash set object ret add model get meta types get transition return ret getcriticizeddesignmaterials hashset getmetatypes gettransition the constructor public prop panel uninterpreted action super label uninterpreted action lookup icon uninterpreted action proppaneluninterpretedaction lookupicon uninterpretedaction public collection get children object parent if model get facade isa package parent return model get facade get element imports parent return collections empty set getchildren getfacade isapackage getfacade getelementimports empty_set see org argouml ui explorer rules abstract perspective rule get rule name public string get rule name return translator localize misc package element import abstractperspectiverule getrulename getrulename see org argouml ui explorer rules perspective rule get dependencies java lang object public set get dependencies object parent return collections empty set perspectiverule getdependencies getdependencies empty_set constructor to be used if the subclass does not depend on the me lement listener methods and set target method implemented in this class public uml model element list model2 super melementlistener settarget umlmodelelementlistmodel2 constructor for uml model element list model2 param name the name of the event to listen to which triggers us to update the list model from the uml data public uml model element list model2 string name super event name name umlmodelelementlistmodel2 umlmodelelementlistmodel2 eventname constructor for uml model element list model2 param name the name of the event to listen to which triggers us to update the list model from the uml data param the meta type the type of model element that the list model is designed to contain public uml model element list model2 string name object the meta type super this meta type the meta type event name name umlmodelelementlistmodel2 themetatype umlmodelelementlistmodel2 themetatype metatype themetatype eventname constructor for uml model element list model2 param name the name of the event to listen to which triggers us to update the list model from the uml data param the meta type the type of model element that the list model is designed to contain param reverse the drop connection tells the j list to reverse the connection made and drop during dnd public uml model element list model2 string name object the meta type boolean reverse the drop connection super this meta type the meta type event name name this reverse drop connection reverse the drop connection umlmodelelementlistmodel2 themetatype reversethedropconnection jlist umlmodelelementlistmodel2 themetatype reversethedropconnection metatype themetatype eventname reversedropconnection reversethedropconnection get the type of objects that this list model is designed to contain return meta type the meta type public object get meta type return meta type metatype getmetatype metatype public boolean is reverse drop connection return reverse drop connection isreversedropconnection reversedropconnection param building the building model to set protected void set building model boolean building this building model building buildingmodel setbuildingmodel buildingmodel param t the list target to set protected void set list target object t this list target t setlisttarget listtarget public void property change property change event e if e instanceof attribute change event try if is valid event e rebuild model list catch invalid element exception iee return else if e instanceof add association event if is valid event e object o get changed element e if o instanceof collection array list temp list new array list collection o iterator it temp list iterator while it has next object o2 it next add element o2 else todo if this is an ordered list then you have to add in the right location add element o else if e instanceof remove association event boolean valid false if get changed element e instanceof collection valid contains get changed element e else collection col collection get changed element e iterator it col iterator valid true while it has next object o it next if contains o valid false break if valid object o get changed element e if o instanceof collection iterator it collection o iterator while it has next object o3 it next remove element o3 else remove element o propertychange propertychangeevent attributechangeevent isvalidevent rebuildmodellist invalidelementexception addassociationevent isvalidevent getchangedelement arraylist templist arraylist templist hasnext addelement addelement removeassociationevent getchangedelement getchangedelement getchangedelement hasnext getchangedelement hasnext removeelement removeelement delete and rebuild the model list from scratch private void rebuild model list remove all elements building model true try build model list catch invalid element exception exception this can throw an exception if the target has been deleted we don t want to try locking the repository because this is called from the event delivery thread and could cause a deadlock instead catch the exception and leave the model empty log debug build model list threw exception for target get target exception finally building model false if get size 0 fire interval added this 0 get size 1 rebuildmodellist removeallelements buildingmodel buildmodellist invalidelementexception buildmodellist gettarget buildingmodel getsize fireintervaladded getsize builds the list of elements called from target changed every time the target of the proppanel is changed usually the method set all elements is called with the result targetchanged setallelements utility method to set the elements of this list to the contents of the given collection param col the given collection protected void set all elements collection col if is empty remove all elements add all col setallelements isempty removeallelements addall utility method to add a collection of elements to the model param col the given collection protected void add all collection col if col size 0 return iterator it col iterator fire list events false int interval start get size 0 0 get size 1 while it has next object o it next add element o fire list events true fire interval added this interval start get size 1 addall firelistevents intervalstart getsize getsize hasnext addelement firelistevents fireintervaladded intervalstart getsize utility method to get the target sets the target if the target is null via the method set target return m model element public object get target return list target settarget mmodelelement gettarget listtarget utility method to get the changed element from some event e param e the event return object the changed element protected object get changed element property change event e if e instanceof association change event return association change event e get changed value if e instanceof attribute change event return attribute change event e get source return e get new value getchangedelement propertychangeevent associationchangeevent associationchangeevent getchangedvalue attributechangeevent attributechangeevent getsource getnewvalue public boolean contains object elem if super contains elem return true if elem instanceof collection iterator it collection elem iterator while it has next if super contains it next return false return true return false hasnext sets the target if the old target is a model element it also removes the model from the element listener list of the target if the new target is instanceof model element the model is added as element listener to the new target p this function is called when the user changes the target hence this shall not result in any uml model changes hence we block firing list events completely by setting building model to true for the duration of this function p this function looks a lot like the one in uml combo box model2 param the new target the new target public void set target object the new target the new target the new target instanceof fig fig the new target get owner the new target if model get facade isauml element the new target the new target instanceof diagram if model get facade isauml element list target model get pump remove model event listener this list target event name allow listening to other elements remove other model event listeners list target if model get facade isauml element the new target list target the new target model get pump add model event listener this list target event name allow listening to other elements add other model event listeners list target rebuild model list else list target null remove all elements modelelement modelelement buildingmodel umlcomboboxmodel2 thenewtarget settarget thenewtarget thenewtarget thenewtarget thenewtarget getowner thenewtarget getfacade isaumlelement thenewtarget thenewtarget getfacade isaumlelement listtarget getpump removemodeleventlistener listtarget eventname removeothermodeleventlisteners listtarget getfacade isaumlelement thenewtarget listtarget thenewtarget getpump addmodeleventlistener listtarget eventname addothermodeleventlisteners listtarget rebuildmodellist listtarget removeallelements this function allows subclasses to listen to more modelelements the given target is guaranteed to be a uml modelelement param old target the uml modelelement protected void remove other model event listeners object old target do nothing by default oldtarget removeothermodeleventlisteners oldtarget this function allows subclasses to listen to more modelelements the given target is guaranteed to be a uml modelelement param new target the uml modelelement protected void add other model event listeners object new target do nothing by default newtarget addothermodeleventlisteners newtarget returns true if the given element is valid i e it may be added to the list of elements param element the element to be tested return true if valid returns true if some event is valid an event is valid if the element changed in the event is valid this is determined via a call to is valid element this method can be overriden by subclasses if they cannot determine if it is a valid event just by checking the changed element param e the event return boolean true if valid protected boolean is valid event property change event e boolean valid false if get changed element e instanceof collection todo considering all delete events to be valid like below is going to cause lots of unecessary work and some problems if e get new value null e get old value null don t test changed element if it was deleted is valid element get changed element e valid true we tried to remove a value else collection col collection get changed element e iterator it col iterator if col is empty valid true while it has next object o it next if is valid element o valid false break else if e get old value instanceof collection collection e get old value is empty valid true return valid isvalidelement isvalidevent propertychangeevent getchangedelement getnewvalue getoldvalue isvalidelement getchangedelement getchangedelement isempty hasnext isvalidelement getoldvalue getoldvalue isempty public void add element object obj if obj null contains obj super add element obj addelement addelement returns the event name this method is only here for testing goals return string string get event name return event name eventname geteventname eventname sets the event name the event name is the name of the m element event to which the list should listen the list is registred with uml model event pump and only gets events that have a name like event name this method should be called in the constructor of every subclass param the event name the event name to set protected void set event name string the event name event name the event name eventname eventname melementevent umlmodeleventpump eventname theeventname eventname seteventname theeventname eventname theeventname see target listener target added target event public void target added target event e set target e get new target targetlistener targetadded targetevent targetadded targetevent settarget getnewtarget see target listener target removed target event public void target removed target event e set target e get new target targetlistener targetremoved targetevent targetremoved targetevent settarget getnewtarget see target listener target set target event public void target set target event e set target e get new target targetlistener targetset targetevent targetset targetevent settarget getnewtarget object int int protected void fire contents changed object source int index0 int index1 if fire list events building model super fire contents changed source index0 index1 firecontentschanged firelistevents buildingmodel firecontentschanged object int int protected void fire interval added object source int index0 int index1 if fire list events building model super fire interval added source index0 index1 fireintervaladded firelistevents buildingmodel fireintervaladded object int int protected void fire interval removed object source int index0 int index1 if fire list events building model super fire interval removed source index0 index1 fireintervalremoved firelistevents buildingmodel fireintervalremoved override this if you want a popup menu see for an example uml model element ordered list model2 param popup the popup menu param index the selected item in the list at the moment the mouse was clicked return true if a popup menu is created and needs to be shown public boolean build popup j popup menu popup int index return false umlmodelelementorderedlistmodel2 buildpopup jpopupmenu protected boolean has popup return false haspopup the constructor public zip file persister zipfilepersister see org argouml persistence abstract file persister get extension public string get extension return zip abstractfilepersister getextension getextension see org argouml persistence abstract file persister get desc protected string get desc return translator localize combobox filefilter zip abstractfilepersister getdesc getdesc see org argouml persistence xmi file persister is save enabled public boolean is save enabled return true xmifilepersister issaveenabled issaveenabled it is being considered to save out individual xmi s from individuals diagrams to make it easier to modularize the output of argo param file the file to write param project the project to save throws save exception when anything goes wrong see org argouml persistence project file persister save org argouml kernel project java io file public void do save project project file file throws save exception log info receiving file file get name file last archive file new file file get absolute path file temp file null try temp file create temp file file catch file not found exception e throw new save exception failed to archive the previous file version e catch io exception e throw new save exception failed to archive the previous file version e output stream buffered stream null try project set file file zip output stream stream new zip output stream new file output stream file string file name file get name zip entry xmi entry new zip entry file name substring 0 file name last index of stream put next entry xmi entry buffered stream new buffered output stream stream int size project get members size for int i 0 i size i project member project member project get members get i if project member get type equals ignore case xmi if log is info enabled log info saving member of type project get members get i get type member file persister persister new model member file persister persister save project member buffered stream stream close if save did not raise an exception and name exists move name to name this is the correct backup file if last archive file exists last archive file delete if temp file exists last archive file exists temp file rename to last archive file if temp file exists temp file delete catch exception e log error exception occured during save attempt e try buffered stream close catch io exception ex if we get a 2nd error just ignore it frank in case of exception delete name and mv name back to name if name exists this is the rollback to old file file delete temp file rename to file we have to give a message to user and set the system to unsaved throw new save exception e try buffered stream close catch io exception ex log error failed to close save output writer ex saveexception projectfilepersister dosave saveexception getname lastarchivefile getabsolutepath tempfile tempfile createtempfile filenotfoundexception saveexception ioexception saveexception outputstream bufferedstream setfile zipoutputstream zipoutputstream fileoutputstream filename getname zipentry xmientry zipentry filename filename lastindexof putnextentry xmientry bufferedstream bufferedoutputstream getmembers projectmember projectmember getmembers projectmember gettype equalsignorecase isinfoenabled getmembers gettype memberfilepersister modelmemberfilepersister projectmember bufferedstream lastarchivefile lastarchivefile tempfile lastarchivefile tempfile renameto lastarchivefile tempfile tempfile bufferedstream ioexception tempfile renameto saveexception bufferedstream ioexception public project do load file file throws open exception log info receiving file file get name try project p project factory get instance create project string file name file get name string extension file name substring file name index of file name last index of input stream stream open zip stream at file touri tourl extension todo what progress mgr is to be used here where does it come from input source is new input source new xmi input stream stream this 100000 null is set system id file touri tourl to external form model member file persister model persister new model member file persister model persister read models is object model model persister get cur model model get uml helper add listeners to model model p setuuid refs model persister getuuid refs p add member model parse xmi extensions p model persister register diagrams p p set root model p set roots model persister get elements read project manager get manager set save enabled false return p catch io exception e throw new open exception e doload openexception getname projectfactory getinstance createproject filename getname filename filename indexof filename lastindexof inputstream openzipstreamat progressmgr inputsource inputsource xmiinputstream setsystemid toexternalform modelmemberfilepersister modelpersister modelmemberfilepersister modelpersister readmodels modelpersister getcurmodel getumlhelper addlistenerstomodel setuuidrefs modelpersister getuuidrefs addmember parsexmiextensions modelpersister registerdiagrams setroot setroots modelpersister getelementsread projectmanager getmanager setsaveenabled ioexception openexception open a zip input stream to the first file found with a given extension param url the url of the zip file param ext the required extension return the zip stream positioned at the required location throws io exception if there is a problem opening the file private zip input stream open zip stream at url url string ext throws io exception zip input stream zis new zip input stream url open stream zip entry entry zis get next entry while entry null entry get name ends with ext entry zis get next entry return zis zipinputstream ioexception zipinputstream openzipstreamat ioexception zipinputstream zipinputstream openstream zipentry getnextentry getname endswith getnextentry returns false only argo specific files have an icon see org argouml persistence abstract file persister has an icon override public boolean has an icon return false abstractfilepersister hasanicon hasanicon constructor for action new composite state protected action new composite state super put value action name translator localize button new compositestate actionnewcompositestate actionnewcompositestate putvalue see java awt event action listener action performed java awt event action event public void action performed action event e super action performed e model get state machines factory build composite state get target actionlistener actionperformed actionevent actionperformed actionevent actionperformed getstatemachinesfactory buildcompositestate gettarget return returns the singleton public static action new composite state get singleton return singleton actionnewcompositestate getsingleton constructor for the critic p sets up the resource name which will allow headline and description to found for the current locale provides design issue categories methods naming sets a knowledge type syntax and adds triggers for metaclasses behavioural feature and feature name p public cr oper name conflict setup head and desc add supported decision uml decision methods add supported decision uml decision naming set knowledge types critic kt syntax these may not actually make any difference at present the code behind add trigger needs more work add trigger behavioral feature add trigger feature name behaviouralfeature feature_name cropernameconflict setupheadanddesc addsupporteddecision umldecision addsupporteddecision umldecision setknowledgetypes kt_syntax addtrigger addtrigger behavioralfeature addtrigger feature_name the trigger for the critic p finds all the operations for the given classifier takes each operation in turn and compares its signature with all earlier operations this version corrects an earlier bug which checked for matching names as well as types in the parameter list p em note em the signature ignores any return parameters in looking for a match this is in line with java c p we do not need to worry about signature clashes that are inherited overloading this is something encouraged in many oo environments to facilitate polymorphism p this algorithm is quadratic in the number of operations if this became a problem we would have to consider sorting the operations list and comparing only adjacent pairs potentially o n log n performance p param dm the link object to be checked against the critic param dsgr the link designer creating the model not used this is for future development of argouml return link problem found problem found if the critic is triggered otherwise link no problem no problem override public boolean predicate2 object dm designer dsgr only do this for classifiers if model get facade isa classifier dm return no problem get all the features giving up if there are none then loop through finding all operations each time we find one we compare its signature with all previous held in collection oper seen and then if it doesn t match add it to the collection collection oper seen new array list for object op model get facade get operations dm compare against all earlier operations if there s a match we ve found the problem for object o oper seen if signatures match op o return problem found add to the collection and round to look at the next one oper seen add op if we drop out here there was no match and we have no problem return no problem problem_found problem_found no_problem no_problem getfacade isaclassifier no_problem operseen operseen arraylist getfacade getoperations operseen signaturesmatch problem_found operseen no_problem return the icon to be used for the clarifier for this critic p a clarifier is the graphical highlight used to show the presence of a critique for example wavy colored underlines beneath operations p in this case it will be a wavy line under the second of the clashing operations p return the link javax swing icon icon to use override public icon get clarifier return cl operation compartment get the instance getclarifier cloperationcompartment gettheinstance sees if the signatures of two operations are the same p checks for matching operation name and list of parameter types the order of the parameters is significant this version also checks for the parameter kind since otherwise op int a and op int appear to have the same signature purists would probably suggest that the kind should match exactly however we only differentiate the return parameter s it is unlikely that any practical oo language would be able to distinguish instantiation of in from out from inout parameters p we ignore return parameters completely this is in line with java c which regard code int x int int code and code double x int int code as having the same signature p if you need to modify this method take care since there are numerous telegraph pole problems involved in working through pairs of mixed lists p param op1 the first operation whose signature is being compared param op2 the second operation whose signature is being compared return code true code if the signatures match code false code otherwise private boolean signatures match object op1 object op2 check that the names match string name1 model get facade get name op1 if name1 null return false string name2 model get facade get name op2 if name2 null return false if name1 equals name2 return false check that the parameter lists match iterator params1 model get facade get parameters op1 iterator iterator params2 model get facade get parameters op2 iterator while params1 has next params2 has next get the next non return parameter null if non left object p1 null while p1 null params1 has next p1 params1 next if model get facade is return p1 p1 null object p2 null while p2 null params1 has next p2 params1 next if model get facade is return p2 p2 null if p1 null p2 null return true both lists have the same length different lengths if p1 null p2 null return false compare the type of the parameters if any of the types is null then we have a match object p1type model get facade get type p1 if p1type null continue object p2type model get facade get type p2 if p2type null continue if p1type equals p2type return false this pair of params where the same lets check the next pair if params1 has next params2 has next both lists have the same length return true return false signaturesmatch getfacade getname getfacade getname getfacade getparameters getfacade getparameters hasnext hasnext hasnext getfacade isreturn hasnext getfacade isreturn getfacade gettype getfacade gettype hasnext hasnext public set object get criticized design materials set object ret new hash set object ret add model get meta types get classifier return ret getcriticizeddesignmaterials hashset getmetatypes getclassifier construct a new setting with the given label text param label text string to use as the label public setting string label text super label label text labeltext labeltext labeltext construct a new setting with the given label text and description param label text string to use as the label param description text string to use as description public setting string label text string description text this label text description description text labeltext descriptiontext labeltext descriptiontext labeltext descriptiontext public final string get label return label getlabel public string get description return description getdescription construct a new setting object which specifies a boolean selection param label text the string to use for the user visible label param initial value the default value true or false public boolean selection string label text boolean initial value super label text this default value initial value value initial value labeltext initialvalue booleanselection labeltext initialvalue labeltext defaultvalue initialvalue initialvalue see org argouml uml reveng settings types boolean selection is selected public final boolean is selected return value settingstypes booleanselection isselected isselected see org argouml uml reveng settings types boolean selection get default value public final boolean get default value return default value settingstypes booleanselection getdefaultvalue getdefaultvalue defaultvalue public final void set selected boolean selected this value selected setselected constructor param label the user visible string to associate with this setting param variants the list of string options param default variant the default selection or undefined selection public unique selection string label list string variants int default variant super label options variants if is option default variant default selection default variant defaultvariant undefined_selection uniqueselection defaultvariant isoption defaultvariant defaultselection defaultvariant tests if this is a valid option param opt the option to test return true if it s ok and false otherwise private boolean is option int opt if options null return false return opt 0 opt options size true false isoption see org argouml uml reveng import setting types unique selection get default selection public int get default selection return default selection importsettingtypes uniqueselection getdefaultselection getdefaultselection defaultselection see org argouml uml reveng settings types unique selection get options public list string get options return collections unmodifiable list options settingstypes uniqueselection getoptions getoptions unmodifiablelist public boolean set selection int sel if is option sel selection sel return true else return false setselection isoption this method package access determines the selected option return the 0 based index of the selected option or the default option if no other option was selected public int get selection if selection undefined selection return default selection else return selection getselection undefined_selection defaultselection construct a path selection with the given attributes param label text string to use for the label of the path list param description text longer description of the purpose of this pathlist appropriate for a tooltip param default value initial value of the path public path selection string label text string description text string default value super label text description text default path default value path default value pathselection labeltext descriptiontext defaultvalue pathselection labeltext descriptiontext defaultvalue labeltext descriptiontext defaultpath defaultvalue defaultvalue public string get default path return default path getdefaultpath defaultpath public string get path return path getpath set the path selection so that it is available to the importer param new path string representing the new path public void set path string new path path new path newpath setpath newpath newpath construct a new path list selection with the given attributes param label text string to use for the label of the path list param description text longer description of the purpose of this pathlist appropriate for a tooltip param default list inital values of the path list public path list selection string label text string description text list string default list super label text description text default path list default list path list default list pathlistselection labeltext descriptiontext defaultlist pathlistselection labeltext descriptiontext defaultlist labeltext descriptiontext defaultpathlist defaultlist pathlist defaultlist public list string get default path list return default path list getdefaultpathlist defaultpathlist public list string get path list return path list getpathlist pathlist public void set path list list string new path list path list new path list setpathlist newpathlist pathlist newpathlist construct a new default configuration extension panel public config panel extension config panel this config panel set layout new grid bag layout j label attribute label1 new j label translator localize action import java attr model config panel add attribute label1 create grid bag constraints true false false button group group1 new button group attribute new j radio button translator localize action import java uml attr group1 add attribute config panel add attribute create grid bag constraints false false false j radio button association new j radio button translator localize action import java uml assoc group1 add association config panel add association create grid bag constraints false true false string modelattr configuration get string key import extended model attr if 1 equals modelattr association set selected true else attribute set selected true j label attribute label2 new j label translator localize action import java array model config panel add attribute label2 create grid bag constraints true false false button group group2 new button group datatype new j radio button translator localize action import java array model datatype group2 add datatype config panel add datatype create grid bag constraints false false false j radio button multi new j radio button translator localize action import java array model multi group2 add multi config panel add multi create grid bag constraints false true false string modelarrays configuration get string key import extended model arrays if 1 equals modelarrays multi set selected true else datatype set selected true string s configuration get string key import extended collections flag boolean flag true equals s modelcollections new j check box translator localize action import option model collections flag config panel add modelcollections create grid bag constraints true false false s configuration get string key import extended collections list collectionlist new j text field s config panel add collectionlist create grid bag constraints false false true j label list label new j label translator localize action import comma separated names config panel add list label create grid bag constraints false true false s configuration get string key import extended orderedcolls flag flag true equals s modelorderedcollections new j check box translator localize action import option model ordered collections flag config panel add modelorderedcollections create grid bag constraints true false false s configuration get string key import extended orderedcolls list orderedcollectionlist new j text field s config panel add orderedcollectionlist create grid bag constraints false false true list label new j label translator localize action import comma separated names config panel add list label create grid bag constraints final todo get the list of extended settings from the current language importer and add those too configpanelextension configpanel configpanel setlayout gridbaglayout jlabel attributelabel1 jlabel configpanel attributelabel1 creategridbagconstraints buttongroup buttongroup jradiobutton configpanel creategridbagconstraints jradiobutton jradiobutton configpanel creategridbagconstraints getstring key_import_extended_model_attr setselected setselected jlabel attributelabel2 jlabel configpanel attributelabel2 creategridbagconstraints buttongroup buttongroup jradiobutton configpanel creategridbagconstraints jradiobutton jradiobutton configpanel creategridbagconstraints getstring key_import_extended_model_arrays setselected setselected getstring key_import_extended_collections_flag jcheckbox configpanel creategridbagconstraints getstring key_import_extended_collections_list jtextfield configpanel creategridbagconstraints jlabel listlabel jlabel configpanel listlabel creategridbagconstraints getstring key_import_extended_orderedcolls_flag jcheckbox configpanel creategridbagconstraints getstring key_import_extended_orderedcolls_list jtextfield configpanel creategridbagconstraints listlabel jlabel configpanel listlabel creategridbagconstraintsfinal create a grid bag constraints object to use with the layout param top inset true to use a top inset param bottom inset true to use a bottom inset param fill true to fill horizontally return the grid bag constraints private grid bag constraints create grid bag constraints boolean top inset boolean bottom inset boolean fill grid bag constraints gbc new grid bag constraints gbc gridx grid bag constraints relative gbc gridy grid bag constraints relative gbc gridwidth grid bag constraints remainder gbc gridheight 1 gbc weightx 1 0 gbc weighty 0 0 gbc anchor grid bag constraints northwest gbc fill fill grid bag constraints horizontal grid bag constraints none gbc insets new insets top inset 5 0 5 bottom inset 5 0 5 gbc ipadx 0 gbc ipady 0 return gbc gridbagconstraints topinset bottominset gridbagconstraints creategridbagconstraints topinset bottominset gridbagconstraints gridbagconstraints gridbagconstraints gridbagconstraints gridbagconstraints gridbagconstraints gridbagconstraints gridbagconstraints topinset bottominset a grid bag constraints for the last item to take up the rest of the space return the grid bag constraints object private grid bag constraints create grid bag constraints final grid bag constraints gbc create grid bag constraints false true false gbc gridheight grid bag constraints remainder gbc weighty 1 0 return gbc gridbagconstraints gridbagconstraints gridbagconstraints creategridbagconstraintsfinal gridbagconstraints creategridbagconstraints gridbagconstraints return the attribute radio button public j radio button get attribute return attribute jradiobutton getattribute return the datatype radio button public j radio button get datatype return datatype jradiobutton getdatatype public void dispose dialog configuration set string key import extended model attr string value of get attribute is selected 0 1 configuration set string key import extended model arrays string value of get datatype is selected 0 1 configuration set string key import extended collections flag string value of modelcollections is selected configuration set string key import extended collections list string value of collectionlist get text configuration set string key import extended orderedcolls flag string value of modelorderedcollections is selected configuration set string key import extended orderedcolls list string value of orderedcollectionlist get text disposedialog setstring key_import_extended_model_attr valueof getattribute isselected setstring key_import_extended_model_arrays valueof getdatatype isselected setstring key_import_extended_collections_flag valueof isselected setstring key_import_extended_collections_list valueof gettext setstring key_import_extended_orderedcolls_flag valueof isselected setstring key_import_extended_orderedcolls_list valueof gettext param f the given fi public selection enumeration fig f super f selectionenumeration override protected string get instructions int i return instructions i 10 getinstructions override protected object get new node int index object ns model get facade get namespace get content get owner return model get core factory build enumeration ns getnewnode getfacade getnamespace getcontent getowner getcorefactory buildenumeration override protected object get new node type int index return model get meta types get enumeration getnewnodetype getmetatypes getenumeration deprecated for 0 27 3 by tfmorris the type org tigris gef util predicate and this method will be removed in the next release see org tigris gef util predicate predicate java lang object deprecated public boolean predicate object obj return evaluate obj public boolean evaluate object obj return project manager get manager get current project is in trash obj projectmanager getmanager getcurrentproject isintrash the constructor param modal true if the dialog is modal public system info dialog boolean modal super translator localize dialog title system information argo dialog close option modal info set editable false info set margin new insets inset px inset px inset px inset px rungc button add action listener new action listener public void action performed action event e rungc action performed e copy button add action listener new action listener public void action performed action event e copy action performed e name button copy button button copy to clipboard name button rungc button button run gc add button copy button 0 add button rungc button 0 set content new j scroll pane info update info add window listener new window adapter public void window activated window event e update info pack systeminfodialog argodialog close_option seteditable setmargin inset_px inset_px inset_px inset_px rungcbutton addactionlistener actionlistener actionperformed actionevent rungcactionperformed copybutton addactionlistener actionlistener actionperformed actionevent copyactionperformed namebutton copybutton namebutton rungcbutton addbutton copybutton addbutton rungcbutton setcontent jscrollpane updateinfo addwindowlistener windowadapter windowactivated windowevent updateinfo rungc button add action listener new action listener public void action performed action event e rungc action performed e rungcbutton addactionlistener actionlistener actionperformed actionevent rungcactionperformed copy button add action listener new action listener public void action performed action event e copy action performed e copybutton addactionlistener actionlistener actionperformed actionevent copyactionperformed update info add window listener new window adapter public void window activated window event e update info updateinfo addwindowlistener windowadapter windowactivated windowevent updateinfo run garbage collector param e the action private void rungc action performed action event e assert e get source rungc button runtime get runtime gc update info rungcactionperformed actionevent getsource rungcbutton getruntime updateinfo copy system info to clipboard param e the action private void copy action performed action event e assert e get source copy button string info text info get text string selection contents new string selection info text clipboard clipboard get toolkit get system clipboard clipboard set contents contents default clipboard owner copyactionperformed actionevent getsource copybutton infotext gettext stringselection stringselection infotext gettoolkit getsystemclipboard setcontents defaultclipboardowner end copy actionperformed void update info info set text get info end update info copy_actionperformed updateinfo settext getinfo updateinfo collect system information return string containing a variety of system info public static string get info string buffer s new string buffer s append translator localize dialog systeminfo argoumlversion s append application version get version n s append translator localize dialog systeminfo javaversion s append system get property java version n s append translator localize dialog systeminfo javavendor s append system get property java vendor n s append translator localize dialog systeminfo url javavendor s append system get property java vendor url n s append translator localize dialog systeminfo java home directory s append system get property java home n s append translator localize dialog systeminfo java classpath s append system get property java class path n s append translator localize dialog systeminfo operating system s append system get property os name s append translator localize dialog systeminfo operating systemversion s append system get property os version n s append translator localize dialog systeminfo architecture s append system get property os arch n s append translator localize dialog systeminfo user name s append system get property user name n s append translator localize dialog systeminfo user home directory s append system get property user home n s append translator localize dialog systeminfo current directory s append system get property user dir n s append translator localize dialog systeminfo jvm total memory s append string value of runtime get runtime total memory n s append translator localize dialog systeminfo jvm free memory s append string value of runtime get runtime free memory n return s to string getinfo stringbuffer stringbuffer applicationversion getversion getproperty getproperty getproperty getproperty getproperty getproperty getproperty getproperty getproperty getproperty getproperty valueof getruntime totalmemory valueof getruntime freememory tostring static class clipboard observer implements clipboard owner public void lost ownership clipboard clipboard transferable contents clipboardobserver clipboardowner lostownership constructor for uml state machine top list model public uml state machine top list model super top umlstatemachinetoplistmodel umlstatemachinetoplistmodel see org argouml uml ui uml model element list model2 build model list protected void build model list remove all elements add element model get facade get top get target umlmodelelementlistmodel2 buildmodellist buildmodellist removeallelements addelement getfacade gettop gettarget see org argouml uml ui uml model element list model2 is valid element object protected boolean is valid element object element return element model get facade get top get target umlmodelelementlistmodel2 isvalidelement isvalidelement getfacade gettop gettarget main constructor fig call state called from file loading deprecated for 0 27 4 by tfmorris use link fig call state object rectangle diagram settings suppress warnings deprecation deprecated public fig call state super figcallstate figcallstate diagramsettings suppresswarnings figcallstate constructor fig call state that hooks the fig into an existing uml model element param gm ignored param node owner i e the uml element deprecated for 0 27 4 by tfmorris use link fig call state object rectangle diagram settings suppress warnings deprecation deprecated public fig call state suppress warnings unused graph model gm object node this set owner node figcallstate figcallstate diagramsettings suppresswarnings figcallstate suppresswarnings graphmodel setowner construct a new fig call state param owner owning uml element param bounds position and size param settings rendering settings public fig call state object owner rectangle bounds diagram settings settings super owner bounds settings figcallstate figcallstate diagramsettings see org argouml uml diagram activity ui fig action state get notation provider type override protected int get notation provider type return notation provider factory2 type callstate figactionstate getnotationprovidertype getnotationprovidertype notationproviderfactory2 type_callstate override public object clone fig call state fig clone fig call state super clone return fig clone figcallstate figclone figcallstate figclone see org argouml uml diagram state ui fig state vertex make selection override public selection make selection return new selection call state this figstatevertex makeselection makeselection selectioncallstate the constructor public cr final subclassed setup head and desc add supported decision uml decision inheritance set knowledge types critic kt semantics add trigger specialization add trigger is leaf crfinalsubclassed setupheadanddesc addsupporteddecision umldecision setknowledgetypes kt_semantics addtrigger addtrigger isleaf public boolean predicate2 object dm designer dsgr if model get facade isa generalizable element dm return no problem if model get facade is leaf dm return no problem iterator specs model get facade get specializations dm iterator return specs has next problem found no problem getfacade isageneralizableelement no_problem getfacade isleaf no_problem getfacade getspecializations hasnext problem_found no_problem public set object get criticized design materials set object ret new hash set object ret add model get meta types get classifier ret add model get meta types get interface return ret getcriticizeddesignmaterials hashset getmetatypes getclassifier getmetatypes getinterface constructor for prop paneluml deployment diagram public prop paneluml deployment diagram super translator localize label deployment diagram lookup icon deployment diagram proppanelumldeploymentdiagram proppanelumldeploymentdiagram lookupicon deploymentdiagram the constructor public action add data type super button new datatype put value action name translator localize button new datatype actionadddatatype putvalue public void action performed action event e object target target manager get instance get model target object ns null if model get facade isa namespace target ns target if model get facade isa parameter target if model get facade get behavioral feature target null target model get facade get behavioral feature target if model get facade isa feature target if model get facade get owner target null target model get facade get owner target if model get facade isa event target ns model get facade get namespace target if model get facade isa classifier target ns model get facade get namespace target if model get facade isa association end target target model get facade get association target ns model get facade get namespace target object new dt model get core factory build data type ns target manager get instance set target new dt super action performed e actionperformed actionevent targetmanager getinstance getmodeltarget getfacade isanamespace getfacade isaparameter getfacade getbehavioralfeature getfacade getbehavioralfeature getfacade isafeature getfacade getowner getfacade getowner getfacade isaevent getfacade getnamespace getfacade isaclassifier getfacade getnamespace getfacade isaassociationend getfacade getassociation getfacade getnamespace newdt getcorefactory builddatatype targetmanager getinstance settarget newdt actionperformed adds a model interpreter to this set param mi the model interpreter public void add model interpreter model interpreter mi set add mi modelinterpreter addmodelinterpreter modelinterpreter public object invoke feature map string object vt object subject string feature string type object parameters for model interpreter mi set object ret mi invoke feature vt subject feature type parameters if ret null return ret return null invokefeature modelinterpreter invokefeature public object get built in symbol string sym for model interpreter mi set object ret mi get built in symbol sym if ret null return ret return null getbuiltinsymbol modelinterpreter getbuiltinsymbol the constructor for action add extend extension point public action add instance classifier super actionaddextendextensionpoint actionaddinstanceclassifier construct add classifier action for an instance when used with a uml object an instance of a uml class the argument code choice code will be uml class instead of classifier to further restrict the available choices param choice the classifier type we are adding public action add instance classifier object choice super choice class choice umlclass actionaddinstanceclassifier choiceclass override protected void do it collection selected model get common behavior helper set classifiers get target selected doit getcommonbehaviorhelper setclassifiers gettarget protected list get choices list ret new array list if get target null project p project manager get manager get current project object model p get root ret add all model get model management helper get all model elements of kind with model model choice class return ret getchoices arraylist gettarget projectmanager getmanager getcurrentproject getroot addall getmodelmanagementhelper getallmodelelementsofkindwithmodel choiceclass protected string get dialog title return translator localize dialog title add specifications getdialogtitle protected list get selected list ret new array list ret add all model get facade get classifiers get target return ret getselected arraylist addall getfacade getclassifiers gettarget the constructor public action open decisions super translator localize action design issues null set the tooltip string put value action short description translator localize action design issues actionopendecisions putvalue short_description public void action performed action event ae super action performed ae design issues dialog d new design issues dialog d set visible true actionperformed actionevent actionperformed designissuesdialog designissuesdialog setvisible the constructor public cr interface all public setup head and desc add supported decision uml decision planned extensions set knowledge types critic kt syntax add trigger behavioral feature crinterfaceallpublic setupheadanddesc addsupporteddecision umldecision planned_extensions setknowledgetypes kt_syntax addtrigger behavioralfeature public boolean predicate2 object dm designer dsgr if model get facade isa interface dm return no problem object inf dm collection bf model get facade get features inf if bf null return no problem iterator features bf iterator while features has next object f features next if model get facade get visibility f null return no problem if model get facade get visibility f equals model get visibility kind get public return problem found return no problem getfacade isainterface no_problem getfacade getfeatures no_problem hasnext getfacade getvisibility no_problem getfacade getvisibility getvisibilitykind getpublic problem_found no_problem public set object get criticized design materials set object ret new hash set object ret add model get meta types get interface return ret getcriticizeddesignmaterials hashset getmetatypes getinterface construct a new property panel for a transition public prop panel transition super label transition title lookup icon transition add field label name get name text field add field label statemachine get single row scroll new uml transition statemachine list model add field label state get single row scroll new uml transition state list model add separator add field label source get single row scroll new uml transition source list model add field label target get single row scroll new uml transition target list model add field label trigger get single row scroll new uml transition trigger list model add field label guard get single row scroll new uml transition guard list model add field label effect get single row scroll new uml transition effect list model add action new action navigate container element add action get trigger actions add action new button action new guard add action get effect actions add action new action new stereotype add action get delete action proppaneltransition lookupicon addfield getnametextfield addfield getsinglerowscroll umltransitionstatemachinelistmodel addfield getsinglerowscroll umltransitionstatelistmodel addseparator addfield getsinglerowscroll umltransitionsourcelistmodel addfield getsinglerowscroll umltransitiontargetlistmodel addfield getsinglerowscroll umltransitiontriggerlistmodel addfield getsinglerowscroll umltransitionguardlistmodel addfield getsinglerowscroll umltransitioneffectlistmodel addaction actionnavigatecontainerelement addaction gettriggeractions addaction buttonactionnewguard addaction geteffectactions addaction actionnewstereotype addaction getdeleteaction private object get trigger actions object actions new button action new call event new button action new change event new button action new signal event new button action new time event tool bar utility manage default actions transition state trigger return actions gettriggeractions buttonactionnewcallevent buttonactionnewchangeevent buttonactionnewsignalevent buttonactionnewtimeevent toolbarutility managedefault protected object get effect actions object actions action new call action get button instance action new create action get button instance action new destroy action get button instance action new return action get button instance action new send action get button instance action new terminate action get button instance action new uninterpreted action get button instance action new action sequence get button instance tool bar utility manage default actions transition state effect return actions geteffectactions actionnewcallaction getbuttoninstance actionnewcreateaction getbuttoninstance actionnewdestroyaction getbuttoninstance actionnewreturnaction getbuttoninstance actionnewsendaction getbuttoninstance actionnewterminateaction getbuttoninstance actionnewuninterpretedaction getbuttoninstance actionnewactionsequence getbuttoninstance toolbarutility managedefault see org argouml ui explorer rules perspective rule get rule name public string get rule name return translator localize misc component resident modelelement perspectiverule getrulename getrulename public collection get children object parent if model get facade isa component parent first get the collection of element residence iterator eri model get facade get resident elements parent iterator collection result new array list while eri has next result add model get facade get resident eri next return result return collections empty set getchildren getfacade isacomponent elementresidence getfacade getresidentelements arraylist hasnext getfacade getresident empty_set see org argouml ui explorer rules perspective rule get dependencies java lang object public set get dependencies object parent return collections empty set perspectiverule getdependencies getdependencies empty_set abstract class member file persister load a project member from an input stream param project the project to persist param input stream the input stream to parse to load the member throws open exception on any parsing errors public abstract void load project project input stream input stream memberfilepersister inputstream inputstream inputstream openexception inputstream inputstream load a project member from an input stream param project the project to persist param url the url to open and parse to load the member throws open exception on any parsing errors public abstract void load project project url url inputstream openexception gets the tag name which is the root tag for this member return tag name save the project member as xml to the given output stream param member the project member to save param stream the output stream to write the contents to throws save exception if the save fails since 0 25 4 public abstract void save project member member outputstream saveexception projectmember send an existing file of xml to the print writer param writer the print writer param file the file throws save exception on any errors protected void add xml file to writer print writer writer file file throws save exception try buffered reader reader new buffered reader new input stream reader new file input stream file argo get encoding skip the xml first line string line reader read line while line null line starts with xml line starts with doctype line reader read line while line null writer println line line reader read line reader close catch file not found exception e throw new save exception e catch io exception e throw new save exception e printwriter printwriter saveexception addxmlfiletowriter printwriter saveexception bufferedreader bufferedreader inputstreamreader fileinputstream getencoding readline startswith startswith readline readline filenotfoundexception saveexception ioexception saveexception constructor for action add classifier role base protected action add event as trigger super set multi select false actionaddclassifierrolebase actionaddeventastrigger setmultiselect protected list get choices list vec new array list todo the namespace of created events is currently the model i think this is wrong they should be in the namespace of the activitygraph vec add all model get model management helper get all model elements of kind model get facade get namespace get target model get meta types get event vec add all model get model management helper get all model elements of kind model get facade get model get target model get meta types get event return vec getchoices arraylist addall getmodelmanagementhelper getallmodelelementsofkind getfacade getnamespace gettarget getmetatypes getevent addall getmodelmanagementhelper getallmodelelementsofkind getfacade getmodel gettarget getmetatypes getevent protected list get selected list vec new array list object trigger model get facade get trigger get target if trigger null vec add trigger return vec getselected arraylist getfacade gettrigger gettarget protected string get dialog title return translator localize dialog title add events getdialogtitle override protected void do it collection selected object trans get target if selected null selected size 0 model get state machines helper set event as trigger trans null else model get state machines helper set event as trigger trans selected iterator next doit gettarget getstatemachineshelper seteventastrigger getstatemachineshelper seteventastrigger the constructor public style panel fig package super add to display pane stereo check box stereo check box set selected false stereo check box add item listener this add to display pane visibility check box visibility check box add item listener this stylepanelfigpackage addtodisplaypane stereocheckbox stereocheckbox setselected stereocheckbox additemlistener addtodisplaypane visibilitycheckbox visibilitycheckbox additemlistener public void refresh refresh transaction true super refresh stereotype container stc stereotype container get panel target stereo check box set selected stc is stereotype visible visibility container vc visibility container get panel target visibility check box set selected vc is visibility visible refresh transaction false refreshtransaction stereotypecontainer stereotypecontainer getpaneltarget stereocheckbox setselected isstereotypevisible visibilitycontainer visibilitycontainer getpaneltarget visibilitycheckbox setselected isvisibilityvisible refreshtransaction public void item state changed item event e if refresh transaction object src e get source if src stereo check box stereotype container get panel target set stereotype visible stereo check box is selected else if src visibility check box visibility container get panel target set visibility visible visibility check box is selected else super item state changed e itemstatechanged itemevent refreshtransaction getsource stereocheckbox stereotypecontainer getpaneltarget setstereotypevisible stereocheckbox isselected visibilitycheckbox visibilitycontainer getpaneltarget setvisibilityvisible visibilitycheckbox isselected itemstatechanged create a new instance of association end name notation uml return the notation public static final association end name notation uml get instance return new association end name notation uml associationendnamenotationuml associationendnamenotationuml getinstance associationendnamenotationuml the constructor protected association end name notation uml super associationendnamenotationuml see org argouml notation providers notation provider get parsing help public string get parsing help return parsing help fig association end name notationprovider getparsinghelp getparsinghelp public void parse object model element string text try parse association end model element text catch parse exception pe string msg statusmsg bar error parsing association end name object args pe get localized message integer value of pe get error offset argo event pump fire event new argo help event argo event types help changed this translator message format msg args modelelement parseassociationend modelelement parseexception getlocalizedmessage valueof geterroroffset argoeventpump fireevent argohelpevent argoeventtypes help_changed messageformat param role the association end em text em describes param text a string on the above format throws parse exception when it detects an error in the role string see also parse error get error offset protected void parse association end object role string text throws parse exception my tokenizer st string name null string builder stereotype null string token try st new my tokenizer text u00ab u00bb while st has more tokens token st next token if equals token u00ab equals token if stereotype null string msg parsing error association name twin stereotypes throw new parse exception translator localize msg st get token index stereotype new string builder while true token st next token if equals token u00bb equals token break stereotype append token else if name null string msg parsing error association name twin names throw new parse exception translator localize msg st get token index name token catch no such element exception nsee string ms parsing error association name unexpected end element throw new parse exception translator localize ms text length catch parse exception pre throw pre if name null name name trim if name null name starts with name name substring 1 trim model get core helper set visibility role model get visibility kind get public if name null name starts with name name substring 1 trim model get core helper set visibility role model get visibility kind get private if name null name starts with name name substring 1 trim model get core helper set visibility role model get visibility kind get protected if name null name starts with name name substring 1 trim model get core helper set visibility role model get visibility kind get package if name null model get core helper set name role name stereotype utility deal with stereotypes role stereotype true associationend parseexception parseerror geterroroffset parseassociationend parseexception mytokenizer stringbuilder mytokenizer hasmoretokens nexttoken parseexception gettokenindex stringbuilder nexttoken parseexception gettokenindex nosuchelementexception parseexception parseexception startswith getcorehelper setvisibility getvisibilitykind getpublic startswith getcorehelper setvisibility getvisibilitykind getprivate startswith getcorehelper setvisibility getvisibilitykind getprotected startswith getcorehelper setvisibility getvisibilitykind getpackage getcorehelper setname stereotypeutility dealwithstereotypes suppress warnings deprecation deprecated override public string to string object model element map args return to string model element notation utility uml is value visibility visible args notation utility uml is value use guillemets args suppresswarnings tostring modelelement tostring modelelement notationutilityuml isvalue visibilityvisible notationutilityuml isvalue useguillemets private string to string object model element boolean show visibility boolean use guillemets string name model get facade get name model element if name null name string visibility if show visibility visibility notation utility uml generate visibility2 model element if name length 1 visibility this is the temporary solution for issue 1011 string stereo string notation utility uml generate stereotype model element use guillemets if stereo string length 0 stereo string return stereo string visibility name tostring modelelement showvisibility useguillemets getfacade getname modelelement showvisibility notationutilityuml generatevisibility2 modelelement stereostring notationutilityuml generatestereotype modelelement useguillemets stereostring stereostring stereostring override public string to string object model element notation settings settings return to string model element settings is show visibilities settings is use guillemets tostring modelelement notationsettings tostring modelelement isshowvisibilities isuseguillemets load the todo member see org argouml persistence member file persister load org argouml kernel project java io input stream public void load project project input stream input stream throws open exception try todo parser parser new todo parser reader reader new input stream reader input stream argo get encoding parser read todo list reader project member todo list pm new project member todo list project project add member pm catch exception e if e instanceof open exception throw open exception e throw new open exception e memberfilepersister inputstream inputstream inputstream openexception todoparser todoparser inputstreamreader inputstream getencoding readtodolist projectmembertodolist projectmembertodolist addmember openexception openexception openexception override public void load project project url url throws open exception try load project url open stream catch io exception e throw new open exception e openexception openstream ioexception openexception see org argouml persistence member file persister get main tag public final string get main tag return todo memberfilepersister getmaintag getmaintag public void save project member member output stream out stream throws save exception ocl expander expander try expander new ocl expander template reader get instance read to do tee catch expansion exception e throw new save exception e print writer pw try pw new print writer new output stream writer out stream utf 8 catch unsupported encoding exception e1 throw new save exception utf 8 encoding not supported on platform e1 try designer disable critiquing warning the gef implementation of the output stream version of this method doesn t work tfm 20070531 expander expand pw member catch expansion exception e throw new save exception e finally pw flush pw close designer enable critiquing projectmember outputstream outstream saveexception oclexpander oclexpander templatereader getinstance to_do_tee expansionexception saveexception printwriter printwriter outputstreamwriter outstream unsupportedencodingexception saveexception disablecritiquing outputstream expansionexception saveexception enablecritiquing construct a property panel for uml permission elements public prop panel permission super label permission lookup icon permission add field translator localize label name get name text field add field translator localize label namespace get namespace selector add separator add field translator localize label suppliers get supplier scroll add field translator localize label clients get client scroll add action new action navigate namespace add action get delete action proppanelpermission lookupicon addfield getnametextfield addfield getnamespaceselector addseparator addfield getsupplierscroll addfield getclientscroll addaction actionnavigatenamespace addaction getdeleteaction public abstract class abstract command implements command public abstract object execute abstractcommand public abstract object execute public abstract void undo public abstract void undo public boolean is undoable return true isundoable public boolean is redoable return true isredoable the constructor public to do by type super combobox todo perspective type add sub tree model new go list to type to item todobytype addsubtreemodel golisttotypetoitem public void to do items changed to do list event tde log debug to do items changed list to do item items tde get to do item list object path new object 2 path 0 designer the designer get to do list for knowledge type node ktn knowledge type node get type list string kt ktn get name path 1 ktn int n matching items 0 for to do item item items if item contains knowledge type kt continue n matching items if n matching items 0 continue int child indices new int n matching items object children new object n matching items n matching items 0 for to do item item items if item contains knowledge type kt continue child indices n matching items get index of child ktn item children n matching items item n matching items fire tree nodes changed this path child indices children todoitemschanged todolistevent todoitemschanged todoitem gettodoitemlist thedesigner gettodolist knowledgetypenode knowledgetypenode gettypelist getname nmatchingitems todoitem containsknowledgetype nmatchingitems nmatchingitems childindices nmatchingitems nmatchingitems nmatchingitems todoitem containsknowledgetype childindices nmatchingitems getindexofchild nmatchingitems nmatchingitems firetreenodeschanged childindices public void to do items added to do list event tde log debug to do item added list to do item items tde get to do item list object path new object 2 path 0 designer the designer get to do list for knowledge type node ktn knowledge type node get type list string kt ktn get name path 1 ktn int n matching items 0 for to do item item items if item contains knowledge type kt continue n matching items if n matching items 0 continue int child indices new int n matching items object children new object n matching items n matching items 0 for to do item item items if item contains knowledge type kt continue child indices n matching items get index of child ktn item children n matching items item n matching items fire tree nodes inserted this path child indices children todoitemsadded todolistevent todoitemadded todoitem gettodoitemlist thedesigner gettodolist knowledgetypenode knowledgetypenode gettypelist getname nmatchingitems todoitem containsknowledgetype nmatchingitems nmatchingitems childindices nmatchingitems nmatchingitems nmatchingitems todoitem containsknowledgetype childindices nmatchingitems getindexofchild nmatchingitems nmatchingitems firetreenodesinserted childindices public void to do items removed to do list event tde log debug to do item removed list to do item items tde get to do item list object path new object 2 path 0 designer the designer get to do list for knowledge type node ktn knowledge type node get type list boolean any inkt false string kt ktn get name for to do item item items if item contains knowledge type kt any inkt true if any inkt continue log debug to do item removed updating priority node path 1 ktn fire tree nodes changed this path child indices children fire tree structure changed path todoitemsremoved todolistevent todoitemremoved todoitem gettodoitemlist thedesigner gettodolist knowledgetypenode knowledgetypenode gettypelist anyinkt getname todoitem containsknowledgetype anyinkt anyinkt todoitemremoved prioritynode firetreenodeschanged childindices firetreestructurechanged see org argouml cognitive to do list listener to do list changed org argouml cognitive to do list event public void to do list changed to do list event tde todolistlistener todolistchanged todolistevent todolistchanged todolistevent constructor for uml model element client dependency list model public uml association connection list model super connection umlmodelelementclientdependencylistmodel umlassociationconnectionlistmodel protected void add other model event listeners object new target super add other model event listeners new target make a copy of the modelelements others new array list model get facade get connections new target iterator i others iterator while i has next object end i next model get pump add model event listener this end name addothermodeleventlisteners newtarget addothermodeleventlisteners newtarget arraylist getfacade getconnections newtarget hasnext getpump addmodeleventlistener protected void remove other model event listeners object old target super remove other model event listeners old target iterator i others iterator while i has next object end i next model get pump remove model event listener this end name others clear removeothermodeleventlisteners oldtarget removeothermodeleventlisteners oldtarget hasnext getpump removemodeleventlistener protected void build model list if get target null set all elements model get facade get connections get target buildmodellist gettarget setallelements getfacade getconnections gettarget see org argouml uml ui uml model element list model2 is valid element object protected boolean is valid element object o return model get facade isa association end o model get facade get connections get target contains o umlmodelelementlistmodel2 isvalidelement isvalidelement getfacade isaassociationend getfacade getconnections gettarget protected void move down int index object assoc get target since we are uml 1 4 this is surely a list list c list model get facade get connections assoc if index c size 1 object mem c get index model get core helper remove connection assoc mem model get core helper add connection assoc index 1 mem movedown gettarget getfacade getconnections getcorehelper removeconnection getcorehelper addconnection see org argouml uml ui uml model element ordered list model2 move to bottom int override protected void move to bottom int index object assoc get target since we are uml 1 4 this is surely a list list c list model get facade get connections assoc if index c size 1 object mem1 c get index model get core helper remove connection assoc mem1 model get core helper add connection assoc c size 1 mem1 umlmodelelementorderedlistmodel2 movetobottom movetobottom gettarget getfacade getconnections getcorehelper removeconnection getcorehelper addconnection see org argouml uml ui uml model element ordered list model2 move to top int override protected void move to top int index object assoc get target since we are uml 1 4 this is surely a list list c list model get facade get connections assoc if index 0 object mem1 c get index model get core helper remove connection assoc mem1 model get core helper add connection assoc 0 mem1 umlmodelelementorderedlistmodel2 movetotop movetotop gettarget getfacade getconnections getcorehelper removeconnection getcorehelper addconnection constructor public uml instance receiver stimulus list model todo not sure this is the right event name it was stimuli2 which was left over from uml 1 3 and definitely won t work tfm 20061108 super stimulus umlinstancereceiverstimuluslistmodel see org argouml uml ui uml model element list model2 build model list protected void build model list remove all elements add element model get facade get received stimuli get target umlmodelelementlistmodel2 buildmodellist buildmodellist removeallelements addelement getfacade getreceivedstimuli gettarget see org argouml uml ui uml model element list model2 is valid element object protected boolean is valid element object element return model get facade get received stimuli get target contains element umlmodelelementlistmodel2 isvalidelement isvalidelement getfacade getreceivedstimuli gettarget construct default style panel for text elements public style panel fig text super font field add item listener this size field add item listener this style field add item listener this just field add item listener this text color field add item listener this text color field set renderer new color renderer text color label set label for text color field add text color label add text color field add seperator font label set label for font field add font label add font field size label set label for size field add size label add size field style label set label for style field add style label add style field just label set label for just field add just label add just field init choices2 stylepanelfigtext fontfield additemlistener sizefield additemlistener stylefield additemlistener justfield additemlistener textcolorfield additemlistener textcolorfield setrenderer colorrenderer textcolorlabel setlabelfor textcolorfield textcolorlabel textcolorfield addseperator fontlabel setlabelfor fontfield fontlabel fontfield sizelabel setlabelfor sizefield sizelabel sizefield stylelabel setlabelfor stylefield stylelabel stylefield justlabel setlabelfor justfield justlabel justfield initchoices2 second part of the default style panel construction protected void init choices2 text color field add item color black text color field add item color white text color field add item color gray text color field add item color light gray text color field add item color dark gray text color field add item color red text color field add item color blue text color field add item color green text color field add item color orange text color field add item color pink text color field add item get custom item name initchoices2 textcolorfield additem textcolorfield additem textcolorfield additem textcolorfield additem lightgray textcolorfield additem darkgray textcolorfield additem textcolorfield additem textcolorfield additem textcolorfield additem textcolorfield additem textcolorfield additem getcustomitemname refresh the style panel when the fig has been altered see org argouml ui tab target refresh public void refresh super refresh fig text ft fig text get panel target if ft null return string font name ft get font family to lower case int size ft get font size string style name styles 0 font field set selected item font name size field set selected item integer value of size if ft get bold style name styles 1 if ft get italic style name styles 2 if ft get bold ft get italic style name styles 3 style field set selected item style name string just name justifies 0 int just code ft get justification if just code 0 just code justifies length just name justifies just code just field set selected item just name color c ft get text color text color field set selected item c if c null text color field get selected item equals c text color field insert item at c text color field get item count 1 text color field set selected item c if ft is filled color fc ft get fill color get fill field set selected item fc if fc null get fill field get selected item equals fc get fill field insert item at fc get fill field get item count 1 get fill field set selected item fc else get fill field set selected index 0 tabtarget figtext figtext getpaneltarget fontname getfontfamily tolowercase getfontsize stylename fontfield setselecteditem fontname sizefield setselecteditem valueof getbold stylename getitalic stylename getbold getitalic stylename stylefield setselecteditem stylename justname justcode getjustification justcode justcode justname justcode justfield setselecteditem justname gettextcolor textcolorfield setselecteditem textcolorfield getselecteditem textcolorfield insertitemat textcolorfield getitemcount textcolorfield setselecteditem isfilled getfillcolor getfillfield setselecteditem getfillfield getselecteditem getfillfield insertitemat getfillfield getitemcount getfillfield setselecteditem getfillfield setselectedindex set the font of the text element to the selected value protected void set target font if get panel target null return string font str string font field get selected item if font str length 0 return fig text get panel target set font family font str get panel target end trans settargetfont getpaneltarget fontstr fontfield getselecteditem fontstr figtext getpaneltarget setfontfamily fontstr getpaneltarget endtrans change font size of the text element according to the selected value protected void set target size if get panel target null return integer size integer size field get selected item fig text get panel target set font size size int value get panel target end trans settargetsize getpaneltarget sizefield getselecteditem figtext getpaneltarget setfontsize intvalue getpaneltarget endtrans change style of the text element bold italic according to the selected value protected void set target style if get panel target null return string style str string style field get selected item if style str null return boolean bold style str index of bold 1 boolean italic style str index of italic 1 fig text get panel target set bold bold fig text get panel target set italic italic get panel target end trans settargetstyle getpaneltarget stylestr stylefield getselecteditem stylestr stylestr indexof stylestr indexof figtext getpaneltarget setbold figtext getpaneltarget setitalic getpaneltarget endtrans change the justification of the text according to the selected value protected void set target justification if get panel target null return string just str string just field get selected item if just str null return fig text get panel target set justification by name just str get panel target end trans settargetjustification getpaneltarget juststr justfield getselecteditem juststr figtext getpaneltarget setjustificationbyname juststr getpaneltarget endtrans change the color of the text element according to the selected value protected void set target text color if get panel target null return object c text color field get selected item if c instanceof color fig text get panel target set text color color c get panel target end trans settargettextcolor getpaneltarget textcolorfield getselecteditem figtext getpaneltarget settextcolor getpaneltarget endtrans public void item state changed item event e object src e get source fig target get panel target if e get state change item event selected target instanceof fig text if src font field set target font else if src size field set target size else if src style field set target style else if src just field set target justification else if src text color field if e get item get custom item name handle custom color text color field label stylepane custom text color fig text target get text color set target text color else super item state changed e itemstatechanged itemevent getsource getpaneltarget getstatechange itemevent figtext fontfield settargetfont sizefield settargetsize stylefield settargetstyle justfield settargetjustification textcolorfield getitem getcustomitemname handlecustomcolor textcolorfield figtext gettextcolor settargettextcolor itemstatechanged the constructor public cr too many oper setup head and desc add supported decision uml decision methods set threshold operations threshold add trigger behavioral feature crtoomanyoper setupheadanddesc addsupporteddecision umldecision setthreshold operations_threshold addtrigger behavioralfeature public boolean predicate2 object dm designer dsgr if model get facade isa classifier dm return no problem todo consider inherited attributes collection str model get facade get features dm if str null return no problem int n 0 for iterator iter str iterator iter has next if model get facade isa behavioral feature iter next n if n get threshold return no problem return problem found getfacade isaclassifier no_problem getfacade getfeatures no_problem hasnext getfacade isabehavioralfeature getthreshold no_problem problem_found public set object get criticized design materials set object ret new hash set object ret add model get meta types getuml class return ret getcriticizeddesignmaterials hashset getmetatypes getumlclass constructor public action deployment diagram super action deployment diagram actiondeploymentdiagram public argo diagram create diagram object namespace a deployment diagram shows something about the whole model according to the uml spec but we rely on the caller to enforce that if desired if model get facade isa namespace namespace log error no namespace as argument log error namespace throw new illegal argument exception the argument namespace is not a namespace return diagram factory get instance create diagram diagram factory diagram type deployment namespace null argodiagram creatediagram getfacade isanamespace illegalargumentexception diagramfactory getinstance creatediagram diagramfactory diagramtype public boolean is valid namespace object namespace a deployment diagram shows something about the whole model according to the uml spec if model get facade isa namespace namespace log error no namespace as argument log error namespace throw new illegal argument exception the argument namespace is not a namespace may only occur as child of the model or in a package if model get facade isa package namespace return true return false isvalidnamespace getfacade isanamespace illegalargumentexception getfacade isapackage override protected object find namespace object ns super find namespace if ns null return ns if model get facade isa namespace ns return ns while model get facade isa package ns ns is a namespace but not a package object candidate model get facade get namespace ns if model get facade isa namespace candidate return null ns candidate return ns findnamespace findnamespace getfacade isanamespace getfacade isapackage getfacade getnamespace getfacade isanamespace constructor for uml structural feature type combo box model public uml structural feature type combo box model super type true allow null umlstructuralfeaturetypecomboboxmodel umlstructuralfeaturetypecomboboxmodel protected boolean is valid element object element return model get facade isa class element model get facade isa interface element model get facade isa data type element isvalidelement getfacade isaclass getfacade isainterface getfacade isadatatype suppress warnings unchecked protected void build model list set object elements new tree set object new path comparator project p project manager get manager get current project if p null return for object model p get user defined model list elements add all model get model management helper get all model elements of kind model model get meta types getuml class elements add all model get model management helper get all model elements of kind model model get meta types get interface elements add all model get model management helper get all model elements of kind model model get meta types get data type elements add all p get profile configuration find by meta type model get meta types get classifier set elements elements suppresswarnings buildmodellist treeset pathcomparator projectmanager getmanager getcurrentproject getuserdefinedmodellist addall getmodelmanagementhelper getallmodelelementsofkind getmetatypes getumlclass addall getmodelmanagementhelper getallmodelelementsofkind getmetatypes getinterface addall getmodelmanagementhelper getallmodelelementsofkind getmetatypes getdatatype addall getprofileconfiguration findbymetatype getmetatypes getclassifier setelements suppress warnings unchecked override protected void build minimal model list collection list new array list 1 object element get selected model element if element null list add element set elements list set model invalid suppresswarnings buildminimalmodellist arraylist getselectedmodelelement setelements setmodelinvalid override protected boolean is lazy return true islazy protected object get selected model element object o null if get target null o model get facade get type get target return o getselectedmodelelement gettarget getfacade gettype gettarget override protected void add other model event listeners object new target super add other model event listeners new target model get pump add class model event listener this model get meta types get namespace owned element model get pump add class model event listener this model get meta types getuml class name model get pump add class model event listener this model get meta types get interface name model get pump add class model event listener this model get meta types get data type name addothermodeleventlisteners newtarget addothermodeleventlisteners newtarget getpump addclassmodeleventlistener getmetatypes getnamespace ownedelement getpump addclassmodeleventlistener getmetatypes getumlclass getpump addclassmodeleventlistener getmetatypes getinterface getpump addclassmodeleventlistener getmetatypes getdatatype override protected void remove other model event listeners object old target super remove other model event listeners old target model get pump remove class model event listener this model get meta types get namespace owned element model get pump remove class model event listener this model get meta types getuml class name model get pump remove class model event listener this model get meta types get interface name model get pump remove class model event listener this model get meta types get data type name removeothermodeleventlisteners oldtarget removeothermodeleventlisteners oldtarget getpump removeclassmodeleventlistener getmetatypes getnamespace ownedelement getpump removeclassmodeleventlistener getmetatypes getumlclass getpump removeclassmodeleventlistener getmetatypes getinterface getpump removeclassmodeleventlistener getmetatypes getdatatype override public void model changed uml change event evt the default behavior for super implementation is to add remove elements from the list but it isn t that complex here because there is no need to change the list on a simple type change object new selection get selected model element if get selected item new selection the combo is not showing the correct uml element as the selected item so let s empty the combo model and set the right selected uml element build minimal model list set selected item new selection if evt get source get target the target model element is not changed but something else that may be shown in the list since this is a lazy model we can simply reset the flag to indicate that the model has to be built again set model invalid modelchanged umlchangeevent newselection getselectedmodelelement getselecteditem newselection buildminimalmodellist setselecteditem newselection getsource gettarget setmodelinvalid the constructor public old zargo file persister oldzargofilepersister see org argouml persistence abstract file persister get desc protected string get desc return translator localize combobox filefilter zargo abstractfilepersister getdesc getdesc see org argouml persistence abstract file persister is save enabled public boolean is save enabled return true abstractfilepersister issaveenabled issaveenabled it is being considered to save out individual xmi s from individuals diagrams to make it easier to modularize the output of argo param file the file to write param project the project to save throws save exception when anything goes wrong throws interrupted exception if the thread is interrupted see org argouml persistence project file persister save org argouml kernel project java io file public void do save project project file file throws save exception interrupted exception progress mgr progress mgr new progress mgr progress mgr set number of phases 4 progress mgr next phase file last archive file new file file get absolute path file temp file null try temp file create temp file file catch file not found exception e throw new save exception failed to archive the previous file version e catch io exception e throw new save exception failed to archive the previous file version e buffered writer writer null try project set file file project set version application version get version project set persistence version persistence version zip output stream stream new zip output stream new file output stream file writer new buffered writer new output stream writer stream utf 8 save the argo entry todo cyclic dependency with persistence manager move persistence manager get project base name someplace else zip entry zip entry new zip entry persistence manager get instance get project base name project file constants uncompressed file ext stream put next entry zip entry hashtable templates template reader get instance read argo mini tee ocl expander expander new ocl expander templates expander expand writer project writer flush stream close entry int counter 0 int size project get members size collection string names new array list string for int i 0 i size i project member project member project get members get i if project member get type equals ignore case xmi if log is info enabled log info saving member project get members get i get zip name string name project member get zip name string original name name while names contains name issue 4806 explains why we need this name counter original name names add name stream put next entry new zip entry name member file persister persister get member file persister project member persister save project member stream stream flush stream close entry for int i 0 i size i project member project member project get members get i if project member get type equals ignore case xmi if log is info enabled log info saving member of type project get members get i get type stream put next entry new zip entry project member get zip name old model member file persister persister new old model member file persister persister save project member stream stream flush if save did not raise an exception and name exists move name to name this is the correct backup file if last archive file exists last archive file delete if temp file exists last archive file exists temp file rename to last archive file if temp file exists temp file delete progress mgr next phase catch exception e log error exception occured during save attempt e try writer close catch exception ex do nothing frank in case of exception delete name and mv name back to name if name exists this is the rollback to old file file delete temp file rename to file we have to give a message to user and set the system to unsaved throw new save exception e try writer close catch io exception ex log error failed to close save output writer ex saveexception interruptedexception projectfilepersister dosave saveexception interruptedexception progressmgr progressmgr progressmgr progressmgr setnumberofphases progressmgr nextphase lastarchivefile getabsolutepath tempfile tempfile createtempfile filenotfoundexception saveexception ioexception saveexception bufferedwriter setfile setversion applicationversion getversion setpersistenceversion persistence_version zipoutputstream zipoutputstream fileoutputstream bufferedwriter outputstreamwriter persistencemanager persistencemanager getprojectbasename zipentry zipentry zipentry persistencemanager getinstance getprojectbasename fileconstants uncompressed_file_ext putnextentry zipentry templatereader getinstance argo_mini_tee oclexpander oclexpander closeentry getmembers arraylist projectmember projectmember getmembers projectmember gettype equalsignorecase isinfoenabled getmembers getzipname projectmember getzipname originalname originalname putnextentry zipentry memberfilepersister getmemberfilepersister projectmember projectmember closeentry projectmember projectmember getmembers projectmember gettype equalsignorecase isinfoenabled getmembers gettype putnextentry zipentry projectmember getzipname oldmodelmemberfilepersister oldmodelmemberfilepersister projectmember lastarchivefile lastarchivefile tempfile lastarchivefile tempfile renameto lastarchivefile tempfile tempfile progressmgr nextphase tempfile renameto saveexception ioexception the zargo save format is able to save we must override uml file persister which has turned this off suggests a need for some refactoring here see org argouml persistence abstract file persister is save enabled return boolean public boolean is load enabled return false umlfilepersister abstractfilepersister issaveenabled isloadenabled constructor for uml guard transition list model public uml event transition list model super transition umlguardtransitionlistmodel umleventtransitionlistmodel see org argouml uml ui uml model element list model2 build model list protected void build model list remove all elements add all model get facade get transitions get target umlmodelelementlistmodel2 buildmodellist buildmodellist removeallelements addall getfacade gettransitions gettarget see org argouml uml ui uml model element list model2 is valid element object protected boolean is valid element object element return model get facade get transitions get target contains element umlmodelelementlistmodel2 isvalidelement isvalidelement getfacade gettransitions gettarget the constructor public prop panel call state this label call state lookup icon call state proppanelcallstate lookupicon callstate param name the name of the properties panel param icon the icon to be shown next to the name public prop panel call state string name image icon icon super name icon call action entry list new uml call state entry list new uml state entry list model call action entry list set visible row count 2 call action entry scroll new j scroll pane call action entry list add field translator localize label name get name text field add field translator localize label container get container scroll add field translator localize label entry get call action entry scroll add field translator localize label deferrable get deferrable events scroll add separator add field translator localize label incoming get incoming scroll add field translator localize label outgoing get outgoing scroll proppanelcallstate imageicon callactionentrylist umlcallstateentrylist umlstateentrylistmodel callactionentrylist setvisiblerowcount callactionentryscroll jscrollpane callactionentrylist addfield getnametextfield addfield getcontainerscroll addfield getcallactionentryscroll addfield getdeferrableeventsscroll addseparator addfield getincomingscroll addfield getoutgoingscroll let s add a buttun to create a call action see org argouml uml ui behavior state machines prop panel state vertex add extra buttons protected void add extra buttons action a new action new entry call action a put value action short description translator localize button new callaction icon icon resource loader wrapper lookup icon call action a put value action small icon icon add action a callaction state_machines proppanelstatevertex addextrabuttons addextrabuttons actionnewentrycallaction putvalue short_description resourceloaderwrapper lookupicon callaction putvalue small_icon addaction return returns the entry scroll protected j scroll pane get call action entry scroll return call action entry scroll entryscroll jscrollpane getcallactionentryscroll callactionentryscroll the constructor public cr multi composite setup head and desc add supported decision uml decision containment set knowledge types critic kt semantics add trigger aggregation add trigger multiplicity crmulticomposite setupheadanddesc addsupporteddecision umldecision setknowledgetypes kt_semantics addtrigger addtrigger public boolean predicate2 object dm designer dsgr boolean problem no problem if model get facade isa association end dm if model get facade is composite dm if model get facade get upper dm 1 problem problem found return problem no_problem getfacade isaassociationend getfacade iscomposite getfacade getupper problem_found see org argouml cognitive critics critic get wizard class org argouml cognitive to do item public class get wizard class to do item item return wiz assoc composite class getwizardclass todoitem getwizardclass todoitem wizassoccomposite public set object get criticized design materials set object ret new hash set object ret add model get meta types get association end return ret getcriticizeddesignmaterials hashset getmetatypes getassociationend see org argouml ui explorer rules perspective rule get rule name public string get rule name return translator localize misc model element behavior perspectiverule getrulename getrulename public collection get children object parent if model get facade isa model element parent return model get facade get behaviors parent return collections empty set getchildren getfacade isamodelelement getfacade getbehaviors empty_set public set get dependencies object parent if model get facade isa model element parent set set new hash set set add parent return set return collections empty set getdependencies getfacade isamodelelement hashset empty_set the constructor param x x param y y param w width param h height deprecated for 0 27 3 by tfmorris use link fig operations compartment object rectangle diagram settings suppress warnings deprecation deprecated public fig operations compartment int x int y int w int h super x y w h figoperationscompartment diagramsettings suppresswarnings figoperationscompartment constructor for an operations compartment param owner owning uml element param bounds position and size param settings render settings public fig operations compartment object owner rectangle bounds diagram settings settings super owner bounds settings super populate figoperationscompartment diagramsettings see org argouml uml diagram ui fig editable compartment get uml collection protected collection get uml collection object classifier get owner return model get facade get operations and receptions classifier figeditablecompartment getumlcollection getumlcollection getowner getfacade getoperationsandreceptions see org argouml uml diagram ui fig editable compartment get notation type protected int get notation type return notation provider factory2 type operation figeditablecompartment getnotationtype getnotationtype notationproviderfactory2 type_operation deprecated by mvw in v0 27 3 use the one without np parameter param owner owning uml element param bounds position and size param settings render settings param np notation provider return a fig single line text with notation which can be used to display the text suppress warnings deprecation deprecated override protected fig single line text with notation create fig text object owner rectangle bounds diagram settings settings notation provider np return new fig operation owner bounds settings np figsinglelinetextwithnotation suppresswarnings figsinglelinetextwithnotation createfigtext diagramsettings notationprovider figoperation param owner owning uml element param bounds position and size param settings render settings return a fig single line text with notation which can be used to display the text override protected fig single line text with notation create fig text object owner rectangle bounds diagram settings settings return new fig operation owner bounds settings figsinglelinetextwithnotation figsinglelinetextwithnotation createfigtext diagramsettings figoperation protected void create model element object classifier get group get owner project project get project object return type project get default return type object oper model get core factory build operation classifier return type target manager get instance set target oper createmodelelement getgroup getowner getproject returntype getdefaultreturntype getcorefactory buildoperation returntype targetmanager getinstance settarget construct a property panel for the uml enumeration element public prop panel enumeration super label enumeration title lookup icon enumeration add field translator localize label literals get literals scroll proppanelenumeration lookupicon addfield getliteralsscroll override protected void add enumeration buttons super add enumeration buttons add action new action add literal addenumerationbuttons addenumerationbuttons addaction actionaddliteral returns the attribute scroll return j scroll pane public j scroll pane get literals scroll if literals scroll null j list list new uml linked list literals list model literals scroll new j scroll pane list return literals scroll attributescroll jscrollpane jscrollpane getliteralsscroll literalsscroll jlist umllinkedlist literalslistmodel literalsscroll jscrollpane literalsscroll constructor public uml component resident list model super resident umlcomponentresidentlistmodel protected void build model list if model get facade isa component get target iterator it model get facade get resident elements get target iterator array list list new array list while it has next list add model get facade get resident it next set all elements list buildmodellist getfacade isacomponent gettarget getfacade getresidentelements gettarget arraylist arraylist hasnext getfacade getresident setallelements see org argouml uml ui uml model element list model2 is valid element object protected boolean is valid element object o return model get facade isa model element o umlmodelelementlistmodel2 isvalidelement isvalidelement getfacade isamodelelement the constructor public cr name conflictac setup head and desc add supported decision uml decision naming set knowledge types critic kt syntax crnameconflictac setupheadanddesc addsupporteddecision umldecision setknowledgetypes kt_syntax java lang object org argouml cognitive designer public boolean predicate2 object dm designer dsgr todo not implemented return no problem no_problem public set object get criticized design materials set object ret new hash set object ret add model get meta types get association class return ret getcriticizeddesignmaterials hashset getmetatypes getassociationclass constructor public action project settings super translator localize action properties resource loader wrapper lookup icon action properties set the tooltip string put value action short description translator localize action properties actionprojectsettings resourceloaderwrapper lookupicon putvalue short_description public void action performed action event e if dialog null dialog new project settings dialog dialog show dialog actionperformed actionevent projectsettingsdialog showdialog public collection load model profile reference reference throws profile exception log info loading profile from file reference get path try file model file new file reference get path url url model file touri tourl return super load model url reference get public reference catch malformedurl exception e throw new profile exception model file not found e loadmodel profilereference profileexception getpath modelfile getpath modelfile loadmodel getpublicreference malformedurlexception profileexception the constructor deprecated for 0 27 3 by tfmorris use link fig association end object diagram settings suppress warnings deprecation deprecated public fig association end super dest mult new fig multiplicity placed at a 45 degree angle close to the end add path item dest mult new path item placement this dest mult 100 5 45 5 argo fig util mark position this 100 5 45 5 color green dest group new fig association end annotation this add path item dest group new path item placement this dest group 100 5 45 5 argo fig util mark position this 100 5 45 5 color blue set between nearest points true figassociationend diagramsettings suppresswarnings figassociationend destmult figmultiplicity addpathitem destmult pathitemplacement destmult argofigutil markposition destgroup figassociationendannotation addpathitem destgroup pathitemplacement destgroup argofigutil markposition setbetweennearestpoints the constructor param owner the uml object association end param lay the layer that contains this fig deprecated for 0 27 3 by tfmorris use link fig association end object diagram settings suppress warnings deprecation deprecated public fig association end object owner layer lay this set layer lay set owner owner if model get facade isa association end owner add element listener owner figassociationend diagramsettings suppresswarnings figassociationend setlayer setowner getfacade isaassociationend addelementlistener construct fig param owner owning uml element i e an association end param settings rendering settings public fig association end object owner diagram settings settings super owner settings dest mult new fig multiplicity owner settings add path item dest mult new path item placement this dest mult 100 5 45 5 argo fig util mark position this 100 5 45 5 color green dest group new fig association end annotation this owner settings add path item dest group new path item placement this dest group 100 5 45 5 argo fig util mark position this 100 5 45 5 color blue set between nearest points true initialize notation providers internal owner associationend figassociationend diagramsettings destmult figmultiplicity addpathitem destmult pathitemplacement destmult argofigutil markposition destgroup figassociationendannotation addpathitem destgroup pathitemplacement destgroup argofigutil markposition setbetweennearestpoints initializenotationprovidersinternal set the owner param owner the association end see org argouml uml diagram ui fig edge model element set owner java lang object deprecated for 0 27 3 by mvw set the owner in the constructor suppress warnings deprecation deprecated override public void set owner object owner super set owner owner dest group set owner owner dest mult set owner owner associationend figedgemodelelement setowner suppresswarnings setowner setowner destgroup setowner destmult setowner see org argouml uml diagram ui fig edge model element get notation provider type override protected int get notation provider type return notation provider factory2 type association end name figedgemodelelement getnotationprovidertype getnotationprovidertype notationproviderfactory2 type_association_end_name suppress warnings deprecation override protected void init notation providers object own initialize notation providers internal own suppresswarnings initnotationproviders initializenotationprovidersinternal suppress warnings deprecation private void initialize notation providers internal object own super init notation providers own dest mult init notation providers init notation arguments suppresswarnings initializenotationprovidersinternal initnotationproviders destmult initnotationproviders initnotationarguments protected void init notation arguments nothing yet later maybe something like put notation argument show association name get settings is show association names initnotationarguments putnotationargument showassociationname getsettings isshowassociationnames override public void update listeners object old owner object new owner set object listeners new hash set object if new owner null listeners add new object new owner new string is abstract remove update element listeners listeners updatelisteners oldowner newowner hashset newowner newowner isabstract updateelementlisteners override protected void text edited fig text ft if get owner null return super text edited ft if get owner null return if ft dest group get role dest group get role text edited else if ft dest mult the text the user has filled in the textfield is first checked to see if it s a valid multiplicity if so then that is the multiplicity to be set if not the input is rejected dest mult text edited textedited figtext getowner textedited getowner destgroup getrole destgroup getrole textedited destmult destmult textedited override protected void text edit started fig text ft if ft dest group get role dest group get role text edit started else if ft dest mult dest mult text edit started else super text edit started ft texteditstarted figtext destgroup getrole destgroup getrole texteditstarted destmult destmult texteditstarted texteditstarted override public void rendering changed super rendering changed fonts and colors should get updated automatically for contained figs dest mult rendering changed dest group rendering changed init notation arguments renderingchanged renderingchanged destmult renderingchanged destgroup renderingchanged initnotationarguments override protected void update stereotype text there is none updatestereotypetext override public void paint clarifiers graphics g indicate bounds get name fig g indicate bounds dest mult g indicate bounds dest group get role g super paint clarifiers g paintclarifiers indicatebounds getnamefig indicatebounds destmult indicatebounds destgroup getrole paintclarifiers updates the multiplicity field protected void update multiplicity if get owner null dest mult get owner null dest mult set text updatemultiplicity getowner destmult getowner destmult settext constructor for uml association end changeability radio button panel param title the title for the panel param horizontal determines the orientation public uml structural feature changeability radio button panel string title boolean horizontal super title label texts and action commands changeability action set changeability get instance horizontal umlassociationendchangeabilityradiobuttonpanel umlstructuralfeaturechangeabilityradiobuttonpanel labeltextsandactioncommands actionsetchangeability getinstance public void build model if get target null object target get target object kind model get facade get changeability target if kind null set selected null else if kind equals model get changeable kind get add only set selected action set changeability addonly command else if kind equals model get changeable kind get changeable set selected action set changeability changeable command else if kind equals model get changeable kind get frozen set selected action set changeability frozen command else set selected action set changeability changeable command buildmodel gettarget gettarget getfacade getchangeability setselected getchangeablekind getaddonly setselected actionsetchangeability addonly_command getchangeablekind getchangeable setselected actionsetchangeability changeable_command getchangeablekind getfrozen setselected actionsetchangeability frozen_command setselected actionsetchangeability changeable_command see org argouml uml ui abstract action navigate navigate to java lang object protected object navigate to object source return model get facade get transition source abstractactionnavigate navigateto navigateto getfacade gettransition constructor for uml message activator combo box model public uml message activator combo box model super activator false umlmessageactivatorcomboboxmodel umlmessageactivatorcomboboxmodel protected void build model list object target get target if model get facade isa message target object mes target remove all elements fill the list with items set elements model get collaborations helper get all possible activators mes buildmodellist gettarget getfacade isamessage removeallelements setelements getcollaborationshelper getallpossibleactivators protected boolean is valid element object m try return model get facade isa message m m get target model get facade get predecessors get target contains m model get facade get interaction m model get facade get interaction get target catch invalid element exception e return false isvalidelement getfacade isamessage gettarget getfacade getpredecessors gettarget getfacade getinteraction getfacade getinteraction gettarget invalidelementexception protected object get selected model element if get target null return model get facade get activator get target return null getselectedmodelelement gettarget getfacade getactivator gettarget public void set target object target if model get facade isa message get target if interaction null model get pump remove model event listener this interaction message super set target target if model get facade isa message target interaction model get facade get interaction target if interaction null model get pump add model event listener this interaction message settarget getfacade isamessage gettarget getpump removemodeleventlistener settarget getfacade isamessage getfacade getinteraction getpump addmodeleventlistener constructor for uml dependency supplier list model public uml dependency supplier list model super supplier umldependencysupplierlistmodel umldependencysupplierlistmodel protected void build model list if get target null set all elements model get facade get suppliers get target buildmodellist gettarget setallelements getfacade getsuppliers gettarget see org argouml uml ui uml model element list model2 is valid element object protected boolean is valid element object o return model get facade isa model element o model get facade get suppliers get target contains o umlmodelelementlistmodel2 isvalidelement isvalidelement getfacade isamodelelement getfacade getsuppliers gettarget the default constructor for this class public settings tab profile set layout new border layout j panel warning new j panel warning set layout new box layout warning box layout page axis j label warning label new j label translator localize label warning warning label set alignmentx component right alignment warning add warning label j link button project settings new j link button project settings set action new action project settings project settings set text translator localize button project settings project settings set icon null project settings set alignmentx component right alignment warning add project settings add warning border layout north j panel profile settings new j panel profile settings set layout new box layout profile settings box layout y axis profile settings add init default stereotype view selector directory list set prototype cell value 123456789012345678901234567890123456789012345678901234567890 directory list set minimum size new dimension 50 50 j panel sdir panel new j panel sdir panel set layout new box layout sdir panel box layout y axis j panel dlist new j panel dlist set layout new border layout j panel lcb new j panel lcb set layout new box layout lcb box layout y axis lcb add add directory lcb add remove directory add directory add action listener this remove directory add action listener this dlist add new j scroll pane directory list border layout center dlist add lcb border layout east sdir panel add new j label translator localize tab profiles directories desc sdir panel add dlist profile settings add sdir panel j panel config panel new j panel config panel set layout new box layout config panel box layout x axis available list set prototype cell value 12345678901234567890 default list set prototype cell value 12345678901234567890 available list set minimum size new dimension 50 50 default list set minimum size new dimension 50 50 refresh lists j panel left list new j panel left list set layout new border layout left list add new j label translator localize tab profiles userdefined available border layout north left list add new j scroll pane available list border layout center config panel add left list j panel center buttons new j panel center buttons set layout new box layout center buttons box layout y axis center buttons add add button center buttons add remove button config panel add center buttons j panel right list new j panel right list set layout new border layout right list add new j label translator localize tab profiles userdefined default border layout north right list add new j scroll pane default list border layout center config panel add right list add button add action listener this remove button add action listener this profile settings add config panel j panel lff panel new j panel lff panel set layout new flow layout lff panel add load from file lff panel add refresh profiles load from file add action listener this refresh profiles add action listener this profile settings add lff panel add profile settings border layout center settingstabprofile setlayout borderlayout jpanel jpanel setlayout boxlayout boxlayout page_axis jlabel warninglabel jlabel warninglabel setalignmentx right_alignment warninglabel jlinkbutton projectsettings jlinkbutton projectsettings setaction actionprojectsettings projectsettings settext projectsettings seticon projectsettings setalignmentx right_alignment projectsettings borderlayout jpanel profilesettings jpanel profilesettings setlayout boxlayout profilesettings boxlayout y_axis profilesettings initdefaultstereotypeviewselector directorylist setprototypecellvalue directorylist setminimumsize jpanel sdirpanel jpanel sdirpanel setlayout boxlayout sdirpanel boxlayout y_axis jpanel jpanel setlayout borderlayout jpanel jpanel setlayout boxlayout boxlayout y_axis adddirectory removedirectory adddirectory addactionlistener removedirectory addactionlistener jscrollpane directorylist borderlayout borderlayout sdirpanel jlabel sdirpanel profilesettings sdirpanel jpanel configpanel jpanel configpanel setlayout boxlayout configpanel boxlayout x_axis availablelist setprototypecellvalue defaultlist setprototypecellvalue availablelist setminimumsize defaultlist setminimumsize refreshlists jpanel leftlist jpanel leftlist setlayout borderlayout leftlist jlabel borderlayout leftlist jscrollpane availablelist borderlayout configpanel leftlist jpanel centerbuttons jpanel centerbuttons setlayout boxlayout centerbuttons boxlayout y_axis centerbuttons addbutton centerbuttons removebutton configpanel centerbuttons jpanel rightlist jpanel rightlist setlayout borderlayout rightlist jlabel borderlayout rightlist jscrollpane defaultlist borderlayout configpanel rightlist addbutton addactionlistener removebutton addactionlistener profilesettings configpanel jpanel lffpanel jpanel lffpanel setlayout flowlayout lffpanel loadfromfile lffpanel refreshprofiles loadfromfile addactionlistener refreshprofiles addactionlistener profilesettings lffpanel profilesettings borderlayout private j panel init default stereotype view selector j panel set def stereov new j panel set def stereov set layout new flow layout stereo label set label for stereo field set def stereov add stereo label set def stereov add stereo field default combo box model cmodel new default combo box model stereo field set model cmodel cmodel add element translator localize menu popup stereotype view textual cmodel add element translator localize menu popup stereotype view big icon cmodel add element translator localize menu popup stereotype view small icon stereo field add item listener new item listener public void item state changed item event e object src e get source if src stereo field object item e get item default combo box model model default combo box model stereo field get model int idx model get index of item switch idx case 0 configuration set integer profile configuration key default stereotype view diagram appearance stereotype view textual break case 1 configuration set integer profile configuration key default stereotype view diagram appearance stereotype view big icon break case 2 configuration set integer profile configuration key default stereotype view diagram appearance stereotype view small icon break return set def stereov jpanel initdefaultstereotypeviewselector jpanel setdefstereov jpanel setdefstereov setlayout flowlayout stereolabel setlabelfor stereofield setdefstereov stereolabel setdefstereov stereofield defaultcomboboxmodel defaultcomboboxmodel stereofield setmodel addelement addelement addelement stereofield additemlistener itemlistener itemstatechanged itemevent getsource stereofield getitem defaultcomboboxmodel defaultcomboboxmodel stereofield getmodel getindexof setinteger profileconfiguration key_default_stereotype_view diagramappearance stereotype_view_textual setinteger profileconfiguration key_default_stereotype_view diagramappearance stereotype_view_big_icon setinteger profileconfiguration key_default_stereotype_view diagramappearance stereotype_view_small_icon setdefstereov public void item state changed item event e object src e get source if src stereo field object item e get item default combo box model model default combo box model stereo field get model int idx model get index of item switch idx case 0 configuration set integer profile configuration key default stereotype view diagram appearance stereotype view textual break case 1 configuration set integer profile configuration key default stereotype view diagram appearance stereotype view big icon break case 2 configuration set integer profile configuration key default stereotype view diagram appearance stereotype view small icon break itemstatechanged itemevent getsource stereofield getitem defaultcomboboxmodel defaultcomboboxmodel stereofield getmodel getindexof setinteger profileconfiguration key_default_stereotype_view diagramappearance stereotype_view_textual setinteger profileconfiguration key_default_stereotype_view diagramappearance stereotype_view_big_icon setinteger profileconfiguration key_default_stereotype_view diagramappearance stereotype_view_small_icon private void refresh lists available list set model new default combo box model get available profiles to array default list set model new default combo box model get used profiles to array directory list set model new default combo box model profile facade get manager get search path directories to array refreshlists availablelist setmodel defaultcomboboxmodel getavailableprofiles toarray defaultlist setmodel defaultcomboboxmodel getusedprofiles toarray directorylist setmodel defaultcomboboxmodel profilefacade getmanager getsearchpathdirectories toarray private list profile get used profiles return new array list profile profile facade get manager get default profiles getusedprofiles arraylist profilefacade getmanager getdefaultprofiles private list profile get available profiles list profile used get used profiles list profile ret new array list profile for profile profile profile facade get manager get registered profiles if used contains profile ret add profile return ret getavailableprofiles getusedprofiles arraylist profilefacade getmanager getregisteredprofiles public void action performed action event arg0 mutable combo box model model avl mutable combo box model available list get model mutable combo box model model usd mutable combo box model default list get model if arg0 get source add button if available list get selected index 1 profile selected profile model avl get element at available list get selected index model usd add element selected model avl remove element selected else if arg0 get source remove button if default list get selected index 1 profile selected profile model usd get element at default list get selected index if selected profile facade get manager getuml profile j option pane show message dialog this translator localize tab profiles cantremoveuml else model usd remove element selected model avl add element selected else if arg0 get source load from file j file chooser file chooser user defined profile helper create user defined profile file chooser int ret file chooser show open dialog this list file files null if ret j file chooser approve option files user defined profile helper get file list file chooser get selected files if files null files size 0 for file file files try user defined profile profile new user defined profile file profile facade get manager register profile profile model avl add element profile catch profile exception e j option pane show message dialog this translator localize tab profiles userdefined errorloading file get absolute path else if arg0 get source remove directory if directory list get selected index 1 int idx directory list get selected index mutable combo box model directory list get model remove element at idx else if arg0 get source refresh profiles boolean refresh j option pane show confirm dialog this translator localize tab profiles confirmrefresh translator localize tab profiles confirmrefresh title j option pane yes no option j option pane yes option if refresh handle settings tab save profile facade get manager refresh registered profiles refresh lists else if arg0 get source add directory j file chooser file chooser new j file chooser file chooser set file filter new file filter public boolean accept file file return file is directory public string get description return directories file chooser set file selection mode j file chooser directories only int ret file chooser show open dialog this if ret j file chooser approve option file file file chooser get selected file string path file get absolute path mutable combo box model directory list get model add element path available list validate default list validate actionperformed actionevent mutablecomboboxmodel modelavl mutablecomboboxmodel availablelist getmodel mutablecomboboxmodel modelusd mutablecomboboxmodel defaultlist getmodel getsource addbutton availablelist getselectedindex modelavl getelementat availablelist getselectedindex modelusd addelement modelavl removeelement getsource removebutton defaultlist getselectedindex modelusd getelementat defaultlist getselectedindex profilefacade getmanager getumlprofile joptionpane showmessagedialog modelusd removeelement modelavl addelement getsource loadfromfile jfilechooser filechooser userdefinedprofilehelper createuserdefinedprofilefilechooser filechooser showopendialog jfilechooser approve_option userdefinedprofilehelper getfilelist filechooser getselectedfiles userdefinedprofile userdefinedprofile profilefacade getmanager registerprofile modelavl addelement profileexception joptionpane showmessagedialog getabsolutepath getsource removedirectory directorylist getselectedindex directorylist getselectedindex mutablecomboboxmodel directorylist getmodel removeelementat getsource refreshprofiles joptionpane showconfirmdialog joptionpane yes_no_option joptionpane yes_option handlesettingstabsave profilefacade getmanager refreshregisteredprofiles refreshlists getsource adddirectory jfilechooser filechooser jfilechooser filechooser setfilefilter filefilter isdirectory getdescription filechooser setfileselectionmode jfilechooser directories_only filechooser showopendialog jfilechooser approve_option filechooser getselectedfile getabsolutepath mutablecomboboxmodel directorylist getmodel addelement availablelist defaultlist file chooser set file filter new file filter public boolean accept file file return file is directory filechooser setfilefilter filefilter isdirectory public string get description return directories getdescription return the internationalization key that containing the name of this tab see org argouml application api gui settings tab interface get tab key public string get tab key return tab profiles guisettingstabinterface gettabkey gettabkey return the panel containing this tab see org argouml application api gui settings tab interface get tab panel public j panel get tab panel return this guisettingstabinterface gettabpanel jpanel gettabpanel public void handle reset to default refresh lists handleresettodefault refreshlists public void handle settings tab cancel handlesettingstabcancel public void handle settings tab refresh refresh lists switch configuration get integer profile configuration key default stereotype view diagram appearance stereotype view textual case diagram appearance stereotype view textual stereo field set selected index 0 break case diagram appearance stereotype view big icon stereo field set selected index 1 break case diagram appearance stereotype view small icon stereo field set selected index 2 break handlesettingstabrefresh refreshlists getinteger profileconfiguration key_default_stereotype_view diagramappearance stereotype_view_textual diagramappearance stereotype_view_textual stereofield setselectedindex diagramappearance stereotype_view_big_icon stereofield setselectedindex diagramappearance stereotype_view_small_icon stereofield setselectedindex public void handle settings tab save list profile to remove new array list profile list profile used itens new array list profile mutable combo box model model usd mutable combo box model default list get model mutable combo box model model dir mutable combo box model directory list get model for int i 0 i model usd get size i used itens add profile model usd get element at i for profile profile profile facade get manager get default profiles if used itens contains profile to remove add profile for profile profile to remove profile facade get manager remove from default profiles profile for profile profile used itens if profile facade get manager get default profiles contains profile profile facade get manager add to default profiles profile list string to remove dir new array list string list string used itens dir new array list string for int i 0 i model dir get size i used itens dir add string model dir get element at i for string dir entry profile facade get manager get search path directories if used itens dir contains dir entry to remove dir add dir entry for string dir entry to remove dir profile facade get manager remove search path directory dir entry for string dir entry used itens dir if profile facade get manager get search path directories contains dir entry profile facade get manager add search path directory dir entry handlesettingstabsave toremove arraylist useditens arraylist mutablecomboboxmodel modelusd mutablecomboboxmodel defaultlist getmodel mutablecomboboxmodel modeldir mutablecomboboxmodel directorylist getmodel modelusd getsize useditens modelusd getelementat profilefacade getmanager getdefaultprofiles useditens toremove toremove profilefacade getmanager removefromdefaultprofiles useditens profilefacade getmanager getdefaultprofiles profilefacade getmanager addtodefaultprofiles toremovedir arraylist useditensdir arraylist modeldir getsize useditensdir modeldir getelementat direntry profilefacade getmanager getsearchpathdirectories useditensdir direntry toremovedir direntry direntry toremovedir profilefacade getmanager removesearchpathdirectory direntry direntry useditensdir profilefacade getmanager getsearchpathdirectories direntry profilefacade getmanager addsearchpathdirectory direntry main constructor for a link fig data type parent link org argouml uml diagram ui fig node model element will have created the main box link get big port and its name link get name fig and stereotype link get stereotype fig this constructor creates a box for the operations p the properties of all these graphic elements are adjusted appropriately the main boxes are all filled and have outlines p em warning em much of the graphics positioning is hard coded the overall figure is placed at location 10 10 the stereotype compartment is created 15 pixels high in the parent but we change it to 19 pixels 1 more than link stereoheight here the operations box is created at 19 pixels 2 more than link rowheight p caution this constructor with no arguments is the only one that does enable size checking false all others must set it true this is because this constructor is the only one called when loading a project in this case the parsed size must be maintained p deprecated for 0 27 3 by tfmorris use link fig data type object rectangle diagram settings suppress warnings deprecation deprecated public fig data type construct figs figdatatype fignodemodelelement getbigport getnamefig getstereotypefig enablesizechecking figdatatype diagramsettings suppresswarnings figdatatype constructfigs private void construct figs get stereotype fig set keyword get keyword set suppress calc bounds true add fig get big port add fig get stereotype fig add fig get name fig add fig get operations fig add fig border fig set suppress calc bounds false set the bounds of the figure to the total of the above enable size checking true super set standard bounds x0 y0 width name fig height rowheight constructfigs getstereotypefig setkeyword getkeyword setsuppresscalcbounds addfig getbigport addfig getstereotypefig addfig getnamefig addfig getoperationsfig addfig borderfig setsuppresscalcbounds enablesizechecking setstandardbounds name_fig_height constructor for use if this figure is created for an existing interface node in the metamodel param gm not actually used in the current implementation param node the uml object being placed deprecated for 0 27 3 by tfmorris use link fig data type object rectangle diagram settings suppress warnings deprecation deprecated public fig data type suppress warnings unused graph model gm object node this set owner node enable size checking true figdatatype diagramsettings suppresswarnings figdatatype suppresswarnings graphmodel setowner enablesizechecking primary constructor for a link fig data type parent link org argouml uml diagram ui fig node model element will have created the main box link get big port and its name link get name fig and stereotype link get stereotype fig this constructor creates a box for the operations p the properties of all these graphic elements are adjusted appropriately the main boxes are all filled and have outlines p em warning em much of the graphics positioning is hard coded the overall figure is placed at location 10 10 the stereotype compartment is created 15 pixels high in the parent but we change it to 19 pixels 1 more than link stereoheight here the operations box is created at 19 pixels 2 more than link rowheight param owner owning uml element param bounds position and size param settings render settings public fig data type object owner rectangle bounds diagram settings settings super owner bounds settings construct figs figdatatype fignodemodelelement getbigport getnamefig getstereotypefig figdatatype diagramsettings constructfigs constructor that allows specification of keyword to be used for figure param gm unused param node node to be placed param keyword string to be placed in guillemots at top of figure public fig data type graph model gm object node string keyword this gm node get stereotype fig set keyword keyword figdatatype graphmodel getstereotypefig setkeyword this function shall return the keyword to be used by the constructor p subclasses of data type shall override this method to set their own keyword return the string to be used as the keyword protected string get keyword return datatype datatype getkeyword see org tigris gef presentation fig make selection override public selection make selection return new selection data type this makeselection makeselection selectiondatatype gets the minimum size permitted for a datatype on the diagram p parts of this are hardcoded with magic numbers p return the size of the minimum bounding box override public dimension get minimum size use a size to build up the minimum size start with the size of the name compartment and build up dimension a size get name fig get minimum size a size height name v padding 2 a size height math max name fig height a size height if we have a stereotype displayed then allow some space for that width and height a size add child dimensions a size get stereotype fig a size add child dimensions a size get operations fig we want to maintain a minimum width for datatypes a size width math max min width a size width return a size getminimumsize asize asize getnamefig getminimumsize asize name_v_padding asize name_fig_height asize asize addchilddimensions asize getstereotypefig asize addchilddimensions asize getoperationsfig asize min_width asize asize see org tigris gef presentation fig get line width override public int get line width return border fig get line width getlinewidth getlinewidth borderfig getlinewidth override public void translate int dx int dy super translate dx dy editor ce globals cur editor if ce null selection sel ce get selection manager find selection for this if sel instanceof selection class selection class sel hide buttons cureditor getselectionmanager findselectionfor selectionclass selectionclass hidebuttons override public void set enclosing fig fig encloser fig old encloser get enclosing fig if encloser null encloser null model get facade isa instance encloser get owner super set enclosing fig encloser if model get facade isauml element get owner return if this fig is not visible do not adapt the uml model this is used for deleting see issue 3042 if is visible return object me get owner object m null try if moved into an package if encloser null old encloser encloser model get facade isa package encloser get owner model get core helper set namespace me encloser get owner if default namespace is not already set if model get facade get namespace me null target manager get instance get target instanceof argo diagram m argo diagram target manager get instance get target get namespace model get core helper set namespace me m catch exception e log error could not set package due to e at encloser e setenclosingfig oldencloser getenclosingfig getfacade isainstance getowner setenclosingfig getfacade isaumlelement getowner isvisible getowner oldencloser getfacade isapackage getowner getcorehelper setnamespace getowner getfacade getnamespace targetmanager getinstance gettarget argodiagram argodiagram targetmanager getinstance gettarget getnamespace getcorehelper setnamespace used by pgml tee return the class name and bounds together with compartment visibility override public string class name and bounds return super class name and bounds operations visible is operations visible classnameandbounds classnameandbounds operationsvisible isoperationsvisible sets the bounds but the size will be at least the one returned by link get minimum size unless checking of size is disabled p if the required height is bigger then the additional height is equally distributed among all figs i e compartments such that the accumulated height of all visible figs equals the demanded height p param x desired x coordinate of upper left corner param y desired y coordinate of upper left corner param w desired width of the figure param h desired height of the figure see org tigris gef presentation fig set bounds impl int int int int override protected void set standard bounds final int x final int y final int w final int h save our old boundaries to use in our property message later rectangle old bounds get bounds and get minimum size info set bounds of big box get big port set bounds x y w h border fig set bounds x y w h int current height 0 if get stereotype fig is visible int stereotype height get stereotype fig get minimum size height get stereotype fig set bounds x y w stereotype height current height stereotype height int name height get name fig get minimum size height get name fig set bounds x y current height w name height current height name height if get operations fig is visible int operationsy y current height int operations height h y operationsy line width get operations fig set bounds x operationsy w operations height now force calculation of the bounds of the figure update the edges and trigger anyone who s listening to see if the bounds property has changed calc bounds update edges fire prop change bounds old bounds get bounds getminimumsize setboundsimpl setstandardbounds oldbounds getbounds getbigport setbounds borderfig setbounds currentheight getstereotypefig isvisible stereotypeheight getstereotypefig getminimumsize getstereotypefig setbounds stereotypeheight currentheight stereotypeheight nameheight getnamefig getminimumsize getnamefig setbounds currentheight nameheight currentheight nameheight getoperationsfig isvisible currentheight operationsheight line_width getoperationsfig setbounds operationsheight calcbounds updateedges firepropchange oldbounds getbounds constructor for uml classifier role available contents list model public uml classifier role available contents list model super umlclassifierroleavailablecontentslistmodel umlclassifierroleavailablecontentslistmodel see org argouml uml ui uml model element list model2 build model list protected void build model list set all elements model get collaborations helper all available contents get target umlmodelelementlistmodel2 buildmodellist buildmodellist setallelements getcollaborationshelper allavailablecontents gettarget public void property change property change event e if e instanceof add association event if e get property name equals base e get source get target object clazz get changed element e add all model get facade get owned elements clazz model get pump add model event listener this clazz owned element else if e get property name equals owned element model get facade get bases get target contains e get source add element get changed element e else if e instanceof remove association event if e get property name equals base e get source get target object clazz get changed element e model get pump remove model event listener this clazz owned element else if e get property name equals owned element model get facade get bases get target contains e get source remove element get changed element e else super property change e propertychange propertychangeevent addassociationevent getpropertyname getsource gettarget getchangedelement addall getfacade getownedelements getpump addmodeleventlistener ownedelement getpropertyname ownedelement getfacade getbases gettarget getsource addelement getchangedelement removeassociationevent getpropertyname getsource gettarget getchangedelement getpump removemodeleventlistener ownedelement getpropertyname ownedelement getfacade getbases gettarget getsource removeelement getchangedelement propertychange public void set target object the new target the new target the new target instanceof fig fig the new target get owner the new target if model get facade isa model element the new target the new target instanceof diagram if get target null enumeration enumeration elements while enumeration has more elements object base enumeration next element model get pump remove model event listener this base owned element model get pump remove model event listener this get target base set list target the new target if get target null collection bases model get facade get bases get target iterator it bases iterator while it has next object base it next model get pump add model event listener this base owned element make sure we know it when a classifier is added as a base model get pump add model event listener this get target base if get target null remove all elements set building model true build model list set building model false if get size 0 fire interval added this 0 get size 1 settarget thenewtarget thenewtarget thenewtarget thenewtarget getowner thenewtarget getfacade isamodelelement thenewtarget thenewtarget gettarget hasmoreelements nextelement getpump removemodeleventlistener ownedelement getpump removemodeleventlistener gettarget setlisttarget thenewtarget gettarget getfacade getbases gettarget hasnext getpump addmodeleventlistener ownedelement getpump addmodeleventlistener gettarget gettarget removeallelements setbuildingmodel buildmodellist setbuildingmodel getsize fireintervaladded getsize see org argouml uml ui uml model element list model2 is valid element object protected boolean is valid element object element return false umlmodelelementlistmodel2 isvalidelement isvalidelement public class init collaboration diagram implements init subsystem public list abstract argoj panel get details tabs return collections empty list initcollaborationdiagram initsubsystem abstractargojpanel getdetailstabs emptylist public list gui settings tab interface get project settings tabs return collections empty list guisettingstabinterface getprojectsettingstabs emptylist public list gui settings tab interface get settings tabs return collections empty list guisettingstabinterface getsettingstabs emptylist public void init set up the property panels for collaboration diagrams prop panel factory diagram factory new collaboration diagram prop panel factory prop panel factory manager add prop panel factory diagram factory proppanelfactory diagramfactory collaborationdiagramproppanelfactory proppanelfactorymanager addproppanelfactory diagramfactory construct a new property panel for an extend p todo improve the conditionfield so it can be checked and the ocl editor can be used public prop panel extend super label extend lookup icon extend add field label name get name text field add field label namespace get namespace selector add separator link to the two ends add field label usecase base get single row scroll new uml extend base list model add field label extension get single row scroll new uml extend extension list model j list extension point list new uml mutable linked list new uml extend extension point list model action add extend extension point get instance action new extend extension point singleton add field label extension points new j scroll pane extension point list add separator uml expression model2 condition model new uml condition expression model this condition j text area condition area new uml expression body field condition model true condition area set rows 5 j scroll pane condition scroll new j scroll pane condition area add field label condition condition scroll add the toolbar buttons add action new action navigate namespace add action new action new extension point add action new action new stereotype add action get delete action proppanelextend lookupicon addfield getnametextfield addfield getnamespaceselector addseparator addfield getsinglerowscroll umlextendbaselistmodel addfield getsinglerowscroll umlextendextensionlistmodel jlist extensionpointlist umlmutablelinkedlist umlextendextensionpointlistmodel actionaddextendextensionpoint getinstance actionnewextendextensionpoint addfield jscrollpane extensionpointlist addseparator umlexpressionmodel2 conditionmodel umlconditionexpressionmodel jtextarea conditionarea umlexpressionbodyfield conditionmodel conditionarea setrows jscrollpane conditionscroll jscrollpane conditionarea addfield conditionscroll addaction actionnavigatenamespace addaction actionnewextensionpoint addaction actionnewstereotype addaction getdeleteaction construct an action to create a new extension point public action new extension point super button new extension point put value action name translator localize button new extension point extensionpoint actionnewextensionpoint putvalue override public void action performed action event e object target target manager get instance get model target if model get facade isa extend target model get facade get namespace target null model get facade get base target null object extension point model get use cases factory build extension point model get facade get base target model get use cases helper add extension point target extension point target manager get instance set target extension point super action performed e actionperformed actionevent targetmanager getinstance getmodeltarget getfacade isaextend getfacade getnamespace getfacade getbase extensionpoint getusecasesfactory buildextensionpoint getfacade getbase getusecaseshelper addextensionpoint extensionpoint targetmanager getinstance settarget extensionpoint actionperformed constructor for uml extend base combo box model public uml extend base list model super base model get pump add class model event listener this model get meta types get namespace owned element umlextendbasecomboboxmodel umlextendbaselistmodel getpump addclassmodeleventlistener getmetatypes getnamespace ownedelement protected void build model list if is empty remove all elements add element model get facade get base get target buildmodellist isempty removeallelements addelement getfacade getbase gettarget see org argouml uml ui uml model element list model2 is valid element java lang object protected boolean is valid element object element return model get facade isa use case element umlmodelelementlistmodel2 isvalidelement isvalidelement getfacade isausecase public class init use case diagram implements init subsystem public list abstract argoj panel get details tabs return collections empty list initusecasediagram initsubsystem abstractargojpanel getdetailstabs emptylist public list gui settings tab interface get project settings tabs return collections empty list guisettingstabinterface getprojectsettingstabs emptylist public list gui settings tab interface get settings tabs return collections empty list guisettingstabinterface getsettingstabs emptylist public void init set up the property panels for use case diagrams prop panel factory diagram factory new use case diagram prop panel factory prop panel factory manager add prop panel factory diagram factory proppanelfactory diagramfactory usecasediagramproppanelfactory proppanelfactorymanager addproppanelfactory diagramfactory constructs a model for a combobox the container given is used to retrieve the target that is manipulated through this combobox if clearable is true the user can select null in the combobox and thereby clear the attribute in the model param name the name of the property change event that must be fired to set the selected item programmatically via changing the model param clearable flag to indicate if the user may select the special cleared value none as value in the combobox if true the attribute that is shown by this combobox may be set to null makes sure that there is always an entry for this in the list with objects so the user has the opportunity to select this to clear the attribute throws illegal argument exception if one of the arguments is null public uml combo box model2 string name boolean clearable super if name null name equals throw new illegal argument exception one of the arguments is null it would be better if we didn t need the container to get the target this constructor can have zero parameters as soon as we improve target changed is clearable clearable property set name name illegalargumentexception umlcomboboxmodel2 illegalargumentexception targetchanged isclearable propertysetname public final void property change final property change event pve if pve instanceof uml change event final uml change event event uml change event pve runnable do work runnable new runnable public void run try model changed event catch invalid element exception e if log is debug enabled log debug event event get class get name log debug source event get source log debug old event get old value log debug name event get property name log debug update layout method accessed deleted element e swing utilities invoke later do work runnable propertychange propertychangeevent umlchangeevent umlchangeevent umlchangeevent doworkrunnable modelchanged invalidelementexception isdebugenabled getclass getname getsource getoldvalue getpropertyname updatelayout swingutilities invokelater doworkrunnable runnable do work runnable new runnable public void run try model changed event catch invalid element exception e if log is debug enabled log debug event event get class get name log debug source event get source log debug old event get old value log debug name event get property name log debug update layout method accessed deleted element e doworkrunnable modelchanged invalidelementexception isdebugenabled getclass getname getsource getoldvalue getpropertyname updatelayout if the property that this comboboxmodel depicts is changed in the uml model this method will make sure that the changes will be done in the combobox model equally p todo this function is not yet completely written inherit doc see java beans property change listener property change java beans property change event public void model changed uml change event evt building model true if evt instanceof attribute change event if evt get property name equals property set name if evt get source get target is clearable get changed element evt null object elem get changed element evt if elem null contains elem add element elem mvw for this case i had to move the call to set selected item outside the building model otherwise the combo does not update with the new selection see issue 5418 building model false set selected item elem else if evt instanceof delete instance event if contains get changed element evt object o get changed element evt remove element o else if evt instanceof add association event if get target null is valid event evt if evt get property name equals property set name evt get source get target object elem evt get new value todo here too set selected item elem else object o get changed element evt add element o else if evt instanceof remove association event is valid event evt if evt get property name equals property set name evt get source get target if evt get old value internal2external get selected item todo here too set selected item external2internal evt get new value else object o get changed element evt if contains o remove element o else if evt get source instanceof argo diagram evt get property name equals property set name this should not be necessary but let s be sure add element evt get new value mvw for this case i have to move the call to set selected item outside the building model otherwise the combo does not update with the new selection the same does probably apply to the cases above building model false set selected item evt get new value building model false inheritdoc propertychangelistener propertychange propertychangeevent modelchanged umlchangeevent buildingmodel attributechangeevent getpropertyname propertysetname getsource gettarget isclearable getchangedelement getchangedelement addelement setselecteditem buildingmodel buildingmodel setselecteditem deleteinstanceevent getchangedelement getchangedelement removeelement addassociationevent gettarget isvalidevent getpropertyname propertysetname getsource gettarget getnewvalue setselecteditem getchangedelement addelement removeassociationevent isvalidevent getpropertyname propertysetname getsource gettarget getoldvalue getselecteditem setselecteditem getnewvalue getchangedelement removeelement getsource argodiagram getpropertyname propertysetname addelement getnewvalue setselecteditem buildingmodel buildingmodel setselecteditem getnewvalue buildingmodel returns true if the given element is valid p it is valid if it may be added to the list of elements param element the given element return true if the given element is valid builds the list of elements and sets the selected index to the currently selected item if there is one called from target changed every time the target of the proppanel is changed selectedindex targetchanged param obj an uml object return its name or if it was not named or deleted protected string get name object obj try object n model get facade get name obj string name n null string n return name catch invalid element exception e return getname getfacade getname invalidelementexception utility method to change all elements in the list with modelelements at once a minimal update strategy is used to minimize event firing for unchanged elements param elements the given elements protected void set elements collection elements if elements null array list to be removed new array list for object o objects if elements contains o is clearable check against is needed for backward compatibility don t remove without checking subclasses and warning downstream developers tfm 20081211 equals o cleared equals o to be removed add o remove all to be removed add all elements if is clearable elements contains cleared add element cleared if objects contains selected object selected object null else throw new illegal argument exception in set elements may not set elements to null collection setelements arraylist toberemoved arraylist isclearable toberemoved removeall toberemoved addall isclearable addelement selectedobject selectedobject illegalargumentexception setelements utility method to get the target return the model element protected object get target return combo box target modelelement gettarget comboboxtarget utility method to remove a collection of elements from the model param col the elements to be removed protected void remove all collection col int first 1 int last 1 fire list events false for object o col int index get index of o remove element o if first 1 start of interval first index last index else if index last 1 end of interval fire list events true fire interval removed this first last fire list events false first index last index else in middle of interval last fire list events true removeall firelistevents getindexof removeelement firelistevents fireintervalremoved firelistevents firelistevents utility method to add a collection of elements to the model param col the elements to be addd protected void add all collection col object selected get selected item fire list events false int old size objects size for object o col add element o set selected item external2internal selected fire list events true if objects size old size fire interval added this old size 0 0 old size 1 objects size 1 addall getselecteditem firelistevents oldsize addelement setselecteditem firelistevents oldsize fireintervaladded oldsize oldsize utility method to get the changed element from some event e param e the given event return object the changed element protected object get changed element property change event e if e instanceof association change event return association change event e get changed value return e get new value getchangedelement propertychangeevent associationchangeevent associationchangeevent getchangedvalue getnewvalue sets the target if the old target is a model element it also removes the model from the element listener list of the target if the new target is a model element the model is added as element listener to the new target p this function is called when the user changes the target hence this shall not result in any uml model changes hence we block firing list events completely by setting building model to true for the duration of this function p this function looks a lot like the one in uml model element list model2 param the new target the target public void set target object the new target if the new target null the new target equals combo box target log debug ignoring duplicate set target request the new target return model valid false log debug set target target the new target the new target the new target instanceof fig fig the new target get owner the new target if model get facade isa model element the new target the new target instanceof argo diagram remove old listeners if model get facade isa model element combo box target model get pump remove model event listener this combo box target property set name allow listening to other elements remove other model event listeners combo box target else if combo box target instanceof argo diagram argo diagram combo box target remove property change listener argo diagram namespace key this add new listeners if model get facade isa model element the new target combo box target the new target model get pump add model event listener this combo box target property set name allow listening to other elements add other model event listeners combo box target building model true build minimal model list do not set building model false here otherwise the action for selection is performed set selected item external2internal get selected model element building model false if get size 0 fire interval added this 0 get size 1 else if the new target instanceof argo diagram combo box target the new target argo diagram diagram argo diagram the new target diagram add property change listener argo diagram namespace key this building model true build minimal model list set selected item external2internal get selected model element building model false if get size 0 fire interval added this 0 get size 1 else mvw this can never happen isn t it combo box target null remove all elements if get selected item null is clearable add element cleared makes sure we can select none modelelement modelelement buildingmodel umlmodelelementlistmodel2 thenewtarget settarget thenewtarget thenewtarget thenewtarget comboboxtarget settarget thenewtarget modelvalid settarget thenewtarget thenewtarget thenewtarget thenewtarget getowner thenewtarget getfacade isamodelelement thenewtarget thenewtarget argodiagram getfacade isamodelelement comboboxtarget getpump removemodeleventlistener comboboxtarget propertysetname removeothermodeleventlisteners comboboxtarget comboboxtarget argodiagram argodiagram comboboxtarget removepropertychangelistener argodiagram namespace_key getfacade isamodelelement thenewtarget comboboxtarget thenewtarget getpump addmodeleventlistener comboboxtarget propertysetname addothermodeleventlisteners comboboxtarget buildingmodel buildminimalmodellist buildingmodel setselecteditem getselectedmodelelement buildingmodel getsize fireintervaladded getsize thenewtarget argodiagram comboboxtarget thenewtarget argodiagram argodiagram thenewtarget addpropertychangelistener argodiagram namespace_key buildingmodel buildminimalmodellist setselecteditem getselectedmodelelement buildingmodel getsize fireintervaladded getsize comboboxtarget removeallelements getselecteditem isclearable addelement build the minimal number of items in the model for the edit box to be populated by default this calls build model list but it can be overridden in subclasses to delay population of the list till the list is displayed p if this lazy list building is used do call set model invalid here protected void build minimal model list build model list timed buildmodellist setmodelinvalid buildminimalmodellist buildmodellisttimed private void build model list timed long start time system current time millis try build model list long end time system current time millis log debug build model list took end time start time msec for this get class get name catch invalid element exception e log warn build model list attempted to operate on deleted element buildmodellisttimed starttime currenttimemillis buildmodellist endtime currenttimemillis buildmodellist endtime starttime getclass getname invalidelementexception buildmodellist this function allows subclasses to listen to more modelelements the given target is guaranteed to be a uml modelelement param old target the uml modelelement protected void remove other model event listeners object old target do nothing by default oldtarget removeothermodeleventlisteners oldtarget this function allows subclasses to listen to more modelelements the given target is guaranteed to be a uml modelelement param new target the uml modelelement protected void add other model event listeners object new target do nothing by default newtarget addothermodeleventlisteners newtarget gets the modelelement that is selected in the uml model for example say that this combo boxmodel contains all namespaces as in uml namespace combo boxmodel this method should return the namespace that owns the target then return object comboboxmodel umlnamespacecomboboxmodel public object get element at int index if index 0 index objects size return objects get index return null getelementat see javax swing list model get size public int get size return objects size listmodel getsize getsize param o the given element return the index of the given element public int get index of object o return objects index of o getindexof indexof param o the element to be added public void add element object o todo for large lists this is doing a linear search of literally thousands of elements if objects contains o objects add o fire interval added this objects size 1 objects size 1 addelement fireintervaladded public void set selected item object o if selected object null selected object equals o selected object null o null selected object o fire contents changed this 1 1 setselecteditem selectedobject selectedobject selectedobject selectedobject firecontentschanged param o the element to be removed public void remove element object o int index objects index of o if get element at index selected object if is clearable if index 0 set selected item get size 1 null get element at index 1 else set selected item get element at index 1 if index 0 objects remove index fire interval removed this index index removeelement indexof getelementat selectedobject isclearable setselecteditem getsize getelementat setselecteditem getelementat fireintervalremoved remove all elements public void remove all elements int start index 0 int end index math max 0 objects size 1 objects clear selected object null fire interval removed this start index end index removeallelements startindex endindex selectedobject fireintervalremoved startindex endindex see javax swing combo box model get selected item public object get selected item return selected object comboboxmodel getselecteditem getselecteditem selectedobject private object external2internal object o return o null is clearable cleared o isclearable private object internal2external object o return is clearable cleared equals o null o isclearable returns true if some object elem is contained by the list of choices param elem the given element return boolean true if it is in the selection public boolean contains object elem if objects contains elem return true if elem instanceof collection for object o collection elem if objects contains o return false return true return false returns true if some event is valid an event is valid if the element changed in the event is valid this is determined via a call to is valid element this method can be overriden by subclasses if they cannot determine if it is a valid event just by checking the changed element param e the event return boolean true if the event is valid protected boolean is valid event property change event e boolean valid false if get changed element e instanceof collection if e get new value null e get old value null don t try to test this if we re removing the element is valid element get changed element e valid true we tried to remove a value else collection col collection get changed element e if col is empty valid true for object o col if is valid element o valid false break else if e get old value instanceof collection collection e get old value is empty valid true return valid isvalidelement isvalidevent propertychangeevent getchangedelement getnewvalue getoldvalue isvalidelement getchangedelement getchangedelement isempty isvalidelement getoldvalue getoldvalue isempty override protected void fire contents changed object source int index0 int index1 if fire list events building model super fire contents changed source index0 index1 firecontentschanged firelistevents buildingmodel firecontentschanged override protected void fire interval added object source int index0 int index1 if fire list events building model super fire interval added source index0 index1 fireintervaladded firelistevents buildingmodel fireintervaladded override protected void fire interval removed object source int index0 int index1 if fire list events building model super fire interval removed source index0 index1 fireintervalremoved firelistevents buildingmodel fireintervalremoved see target listener target added target event public void target added target event e log debug target added targetevent e set target e get new target targetlistener targetadded targetevent targetadded targetevent targetadded settarget getnewtarget public void target removed target event e log debug target removed targetevent e object current target combo box target object old target e get old targets length 0 e get old targets 0 null if old target instanceof fig old target fig old target get owner if old target current target if model get facade isa model element current target model get pump remove model event listener this current target property set name combo box target e get new target set target e get new target targetremoved targetevent targetremoved currenttarget comboboxtarget oldtarget getoldtargets getoldtargets oldtarget oldtarget oldtarget getowner oldtarget currenttarget getfacade isamodelelement currenttarget getpump removemodeleventlistener currenttarget propertysetname comboboxtarget getnewtarget settarget getnewtarget public void target set target event e log debug target set targetevent e set target e get new target targetset targetevent targetset settarget getnewtarget return boolean indicating whether combo allows empty string this flag can only be specified in the constructor so it will never change the flag is checked directly internally so overriding this method will have no effect return state of is clearable flag protected boolean is clearable return is clearable isclearable isclearable isclearable return name of property registered with event listener protected string get property set name return property set name getpropertysetname propertysetname return returns the fire list events protected boolean is fire list events return fire list events firelistevents isfirelistevents firelistevents param events the fire list events to set protected void set fire list events boolean events this fire list events events firelistevents setfirelistevents firelistevents protected boolean is lazy return false islazy indicate that the model has to be rebuild for a lazy model this suffices to get the model rebuild the next time the user opens the combo protected void set model invalid assert is lazy catch callers attempting to use one without other model valid false setmodelinvalid islazy modelvalid public void popup menu canceled popup menu event e popupmenucanceled popupmenuevent public void popup menu will become invisible popup menu event e popupmenuwillbecomeinvisible popupmenuevent public void popup menu will become visible popup menu event ev if is lazy model valid processing will become visible build model list timed model valid true we should be able to just do the above but swing has already computed the size of the popup menu the rest of this is a workaround for swing bug http bugs sun com bugdatabase view bug do bug id 4743225 j combo box list j combo box ev get source processing will become visible true try list getui set popup visible list true finally processing will become visible false popupmenuwillbecomevisible popupmenuevent islazy modelvalid processingwillbecomevisible buildmodellisttimed modelvalid view_bug bug_id jcombobox jcombobox getsource processingwillbecomevisible setpopupvisible processingwillbecomevisible constructor deprecated by for 0 27 4 by tfmorris use link fig component object rectangle diagram settings suppress warnings deprecation deprecated public fig component super figcomponent diagramsettings suppresswarnings figcomponent the constructor that hooks the fig into an existing uml element param gm ignored param node the uml element deprecated by for 0 27 4 by tfmorris use link fig component object rectangle diagram settings suppress warnings deprecation deprecated public fig component graph model gm object node super gm node figcomponent diagramsettings suppresswarnings figcomponent graphmodel construct a new fig component param owner owning uml element param bounds position and size param settings render settings public fig component object owner rectangle bounds diagram settings settings super owner bounds settings figcomponent figcomponent diagramsettings override protected void text edit started fig text ft if ft get name fig show help parsing help fig component texteditstarted figtext getnamefig showhelp override public selection make selection return new selection component this makeselection selectioncomponent override public void set enclosing fig fig encloser object comp get owner if encloser null model get facade isa node encloser get owner model get facade isa component encloser get owner get owner null if model get facade isa node encloser get owner object node encloser get owner if model get facade get deployment locations comp contains node model get core helper add deployment location comp node super set enclosing fig encloser if get layer null element ordering figures list contents new array list get layer get contents iterator it contents iterator while it has next object o it next if o instanceof fig edge model element fig edge model element figedge fig edge model element o figedge get layer bring to front figedge else if encloser null get enclosing fig null object encloser owner get enclosing fig get owner if model get facade isa node encloser owner model get facade get deployment locations comp contains encloser owner model get core helper remove deployment location comp encloser owner super set enclosing fig encloser setenclosingfig getowner getfacade isanode getowner getfacade isacomponent getowner getowner getfacade isanode getowner getowner getfacade getdeploymentlocations getcorehelper adddeploymentlocation setenclosingfig getlayer elementordering arraylist getlayer getcontents hasnext figedgemodelelement figedgemodelelement figedgemodelelement getlayer bringtofront getenclosingfig encloserowner getenclosingfig getowner getfacade isanode encloserowner getfacade getdeploymentlocations encloserowner getcorehelper removedeploymentlocation encloserowner setenclosingfig override public vector get pop up actions mouse event me vector pop up actions super get pop up actions me modifiers pop up actions add pop up actions size get popup add offset build modifier pop up abstract leaf root return pop up actions getpopupactions mouseevent popupactions getpopupactions popupactions popupactions getpopupaddoffset buildmodifierpopup popupactions the constructor param owner the uml object param x the x of the initial location param y the y of the initial location param w the initial width param h the initial height deprecated for 0 27 3 by tfmorris use link fig class association class object rectangle diagram settings suppress warnings deprecation deprecated public fig class association class object owner int x int y int w int h super owner x y w h enable size checking true figclassassociationclass diagramsettings suppresswarnings figclassassociationclass enablesizechecking the constructor param owner the owner uml object deprecated for 0 27 3 by tfmorris use link fig class association class object rectangle diagram settings suppress warnings deprecation deprecated public fig class association class object owner super null owner figclassassociationclass diagramsettings suppresswarnings figclassassociationclass construct the class box piece of a complex association class fig param owner owning model element param bounds position and size param settings rendering settings public fig class association class object owner rectangle bounds diagram settings settings super owner bounds settings enable size checking true figclassassociationclass diagramsettings enablesizechecking protected fig get remove delegate look for the dashed edge for object fig get fig edges if fig instanceof fig edge association class we have the dashed edge now find the opposite fig node fig edge association class dashed edge fig edge association class fig return dashed edge get remove delegate return null getremovedelegate getfigedges figedgeassociationclass fignode figedgeassociationclass dashededge figedgeassociationclass dashededge getremovedelegate constructor for action remove argument protected action remove argument super translator localize menu popup delete actionremoveargument actionremoveargument public void action performed action event e super action performed e if get object to remove null project p project manager get manager get current project object o get object to remove set object to remove null p move to trash o actionperformed actionevent actionperformed getobjecttoremove projectmanager getmanager getcurrentproject getobjecttoremove setobjecttoremove movetotrash construct a property panel for association class elements public prop panel association class super label association class lookup icon association class add field translator localize label name get name text field add field translator localize label namespace get namespace selector get modifiers panel add new uml class active check box add get modifiers panel add get visibility panel add separator add field translator localize label client dependencies get client dependency scroll add field translator localize label supplier dependencies get supplier dependency scroll add field translator localize label generalizations get generalization scroll add field translator localize label specializations get specialization scroll j list assoc end list new uml linked list new uml association connection list model assoc end scroll new j scroll pane assoc end list add field translator localize label connections assoc end scroll add separator add field translator localize label attributes get attribute scroll j list connections new uml linked list new uml classifier association end list model j scroll pane connections scroll new j scroll pane connections add field translator localize label association ends connections scroll add field translator localize label operations get operation scroll add field translator localize label owned elements get owned elements scroll add action new action navigate namespace add action new action add attribute add action new action add operation add action get action new reception add action new action new inner class add action new action new class add action new action new stereotype add action get delete action associationclass proppanelassociationclass lookupicon associationclass addfield getnametextfield addfield getnamespaceselector getmodifierspanel umlclassactivecheckbox getmodifierspanel getvisibilitypanel addseparator addfield getclientdependencyscroll addfield getsupplierdependencyscroll addfield getgeneralizationscroll addfield getspecializationscroll jlist assocendlist umllinkedlist umlassociationconnectionlistmodel assocendscroll jscrollpane assocendlist addfield assocendscroll addseparator addfield getattributescroll jlist umllinkedlist umlclassifierassociationendlistmodel jscrollpane connectionsscroll jscrollpane addfield connectionsscroll addfield getoperationscroll addfield getownedelementsscroll addaction actionnavigatenamespace addaction actionaddattribute addaction actionaddoperation addaction getactionnewreception addaction actionnewinnerclass addaction actionnewclass addaction actionnewstereotype addaction getdeleteaction returns the operation scroll return j scroll pane override public j scroll pane get operation scroll if operation scroll null j list list new uml linked list operation list model operation scroll new j scroll pane list return operation scroll operationscroll jscrollpane jscrollpane getoperationscroll operationscroll jlist umllinkedlist operationlistmodel operationscroll jscrollpane operationscroll returns the attribute scroll return j scroll pane override public j scroll pane get attribute scroll if attribute scroll null j list list new uml linked list attribute list model attribute scroll new j scroll pane list return attribute scroll attributescroll jscrollpane jscrollpane getattributescroll attributescroll jlist umllinkedlist attributelistmodel attributescroll jscrollpane attributescroll default constructor param profile the selected profile public action export profilexmi profile profile super translator localize action export profile as xmi this selected profile profile actionexportprofilexmi selectedprofile public void action performed action event arg0 try final collection profile packages selected profile get profile packages final object model profile packages iterator next if model null file destiny get target file if destiny null save model destiny model catch profile exception e todo we should be giving the user more direct feedback log error exception e catch io exception e log error exception e catch uml exception e log error exception e actionperformed actionevent profilepackages selectedprofile getprofilepackages profilepackages gettargetfile savemodel profileexception ioexception umlexception private void save model file destiny object model throws io exception uml exception output stream stream new file output stream destiny xmi writer xmi writer model get xmi writer model stream application version get version uml file persister persistence version xmi writer write savemodel ioexception umlexception outputstream fileoutputstream xmiwriter xmiwriter getxmiwriter applicationversion getversion umlfilepersister persistence_version xmiwriter private file get target file show a chooser dialog for the file name only xmi is allowed j file chooser chooser new j file chooser chooser set dialog title translator localize action export profile as xmi chooser set file view project file view get instance chooser set approve button text translator localize filechooser export chooser set accept all file filter used true chooser set file filter new file filter public boolean accept file file return file is directory is xmi file file public string get description return xmi string fn configuration get string persistence manager key project name path if fn length 0 fn persistence manager get instance get base name fn chooser set selected file new file fn int result chooser show save dialog argo frame get instance if result j file chooser approve option file the file chooser get selected file if the file null if the file get name to upper case ends with xmi the file new file the file get absolute path xmi return the file return null gettargetfile jfilechooser jfilechooser setdialogtitle setfileview projectfileview getinstance setapprovebuttontext setacceptallfilefilterused setfilefilter filefilter isdirectory isxmifile getdescription getstring persistencemanager key_project_name_path persistencemanager getinstance getbasename setselectedfile showsavedialog argoframe getinstance jfilechooser approve_option thefile getselectedfile thefile thefile getname touppercase endswith thefile thefile getabsolutepath thefile chooser set file filter new file filter public boolean accept file file return file is directory is xmi file file setfilefilter filefilter isdirectory isxmifile public string get description return xmi getdescription private static boolean is xmi file file file return file is file file get name to lower case ends with xml file get name to lower case ends with xmi isxmifile isfile getname tolowercase endswith getname tolowercase endswith anonymous constructor allows configuration changes public configuration handler this true configurationhandler constructor which optionally allows configuration changes param c indicates if the configuration can be changed public configuration handler boolean c super changeable c configurationhandler returns a default configuration path this could be a filename or a url it is not guaranteed to be usable across different implementations of configuration handler return the default configuration path or url configurationhandler internal worker which is called prior to any get value or set value to ensure that the default load is done if it was not loaded previously private void load if necessary if loaded load default getvalue setvalue loadifnecessary loaddefault load the configuration from the default location return true if this call loaded the configuration otherwise false not distinguishing between a load error or a previously loaded configuration see is loaded public final boolean load default only allow one load if loaded return false boolean status load new file get default path if status status load unspecified loaded true return status isloaded loaddefault getdefaultpath loadunspecified save the configuration to the location it was loaded from do not force it if the configuration was not loaded already return true if the save was successful false if it was not attempted or encountered an error public final boolean save default return save default false savedefault savedefault save the configuration to the location it was loaded from param force the save even if it would not normally be done return true if the save was successful false if it was not attempted or encountered an error public final boolean save default boolean force if force file to file new file get default path boolean saved save file to file if saved loaded from file to file return saved if loaded return false if loaded from file null return save file loaded from file if loaded fromurl null return saveurl loaded fromurl return false savedefault tofile getdefaultpath savefile tofile loadedfromfile tofile loadedfromfile savefile loadedfromfile loadedfromurl loadedfromurl indicates whether the configuration can be saved return true if the configuration can be saved indicates whether the configuration has been loaded return true if the configuration has been loaded load the configuration from a code file code param file to load from return true if this call loaded the configuration otherwise false not distinguishing between a load error or a previously loaded configuration public final boolean load file file boolean status load file file if status if pcl null pcl fire property change configuration file loaded null file loaded from file file return status loadfile firepropertychange file_loaded loadedfromfile load the configuration from a code url code param url to load from return true if this call loaded the configuration otherwise false not distinguishing between a load error or a previously loaded configuration public final boolean load url url boolean status loadurl url if status if pcl null pcl fire property change configuration url loaded null url loaded fromurl url return status firepropertychange url_loaded loadedfromurl save the configuration to a code file code param file to save to return true if this call saved the configuration otherwise false public final boolean save file file if loaded return false boolean status save file file if status if pcl null pcl fire property change configuration file saved null file return status savefile firepropertychange file_saved save the configuration to a code url code param url to save to return true if this call saved the configuration otherwise false public final boolean save url url if loaded return false boolean status saveurl url if status if pcl null pcl fire property change configuration url saved null url return status firepropertychange url_saved returns the string value of a configuration property param key the configuration key to return param default value the default value key to return if the key is not found return the value of the key or the default value if the key does not exist public final string get string configuration key key string default value load if necessary return get value key get key default value defaultvalue getstring configurationkey defaultvalue loadifnecessary getvalue getkey defaultvalue returns the numeric value of a configuration property param key the configuration key to return param default value the default value key to return if the key is not found return the value of the key or the default value if the key does not exist public final int get integer configuration key key int default value load if necessary try string s get value key get key integer to string default value return integer parse int s catch number format exception nfe return default value defaultvalue getinteger configurationkey defaultvalue loadifnecessary getvalue getkey tostring defaultvalue parseint numberformatexception defaultvalue returns the numeric value of a configuration property param key the configuration key to return param default value the default value key to return if the key is not found return the value of the key or the default value if the key does not exist public final double get double configuration key key double default value load if necessary try string s get value key get key double to string default value return double parse double s catch number format exception nfe return default value defaultvalue getdouble configurationkey defaultvalue loadifnecessary getvalue getkey tostring defaultvalue parsedouble numberformatexception defaultvalue returns the boolean value of a configuration property param key the configuration key to return param default value the default value key to return if the key is not found return the value of the key or the default value if the key does not exist public final boolean get boolean configuration key key boolean default value load if necessary boolean dflt boolean value of default value boolean b key null boolean value of get value key get key dflt to string dflt return b boolean value defaultvalue getboolean configurationkey defaultvalue loadifnecessary valueof defaultvalue valueof getvalue getkey tostring booleanvalue internal routine which calls the abstract set value and handles all necessary functionality including firing property change notifications and tracing param key the configuration key to modify param new value the new value of the key private synchronized void worker set value configuration key key string new value load if necessary string old value get value key get key set value key get key new value if pcl null pcl fire property change key get key old value new value setvalue newvalue workersetvalue configurationkey newvalue loadifnecessary oldvalue getvalue getkey setvalue getkey newvalue firepropertychange getkey oldvalue newvalue sets the string value of a configuration property param key the configuration key to modify param new value the value to set the key to public final void set string configuration key key string new value worker set value key new value newvalue setstring configurationkey newvalue workersetvalue newvalue sets the numeric value of a configuration property param key the configuration key to modify param value the value to set the key to public final void set integer configuration key key int value worker set value key integer to string value setinteger configurationkey workersetvalue tostring sets the numeric value of a configuration property param key the configuration key to modify param value the value to set the key to public final void set double configuration key key double value worker set value key double to string value setdouble configurationkey workersetvalue tostring sets the boolean value of a configuration property param key the configuration key to modify param value the value to set the key to public final void set boolean configuration key key boolean value boolean bool boolean value of value worker set value key bool to string setboolean configurationkey valueof workersetvalue tostring adds a property change listener param p the class which will listen for property changes public final void add listener property change listener p if pcl null pcl new property change support this log debug add property change listener p pcl add property change listener p addlistener propertychangelistener propertychangesupport addpropertychangelistener addpropertychangelistener removes a property change listener param p the class to remove as a property change listener public final void remove listener property change listener p if pcl null log debug remove property change listener pcl remove property change listener p removelistener propertychangelistener removepropertychangelistener removepropertychangelistener adds a property change listener static for simplicity of use param key the specific key to listen for param p the class which will listen for property changes public final void add listener configuration key key property change listener p if pcl null pcl new property change support this log debug add property change listener key get key pcl add property change listener key get key p addlistener configurationkey propertychangelistener propertychangesupport addpropertychangelistener getkey addpropertychangelistener getkey removes a property change listener param key the specific key being listened for param p the class to remove as a property change listener public final void remove listener configuration key key property change listener p if pcl null log debug remove property change listener key get key pcl remove property change listener key get key p removelistener configurationkey propertychangelistener removepropertychangelistener getkey removepropertychangelistener getkey internal processing to load from an unspecified source return true if the load was successful otherwise false boolean load unspecified return false loadunspecified internal processing to save to an unspecified source return true if the save was successful otherwise false boolean save unspecified return false saveunspecified internal processing to load a code file code param file the file to load return true if the load was successful otherwise false internal processing to load a code url code param url the url to load return true if the load was successful otherwise false internal processing to save a code file code param file the file to save return true if the save was successful otherwise false internal processing to save a code url code param url the url to save return true if the save was successful otherwise false allows query for the existence of a configuration property this may be overridden if the implementation has a more efficient method param key the property being checked return true if the key exists otherwise false public boolean has key configuration key key return get value key get key true equals get value key get key false haskey configurationkey getvalue getkey getvalue getkey returns the string value of a configuration property param key the configuration key to return param default value the configuration key to return return the value of the key or the default value if the key does not exist defaultvalue sets the string value of a configuration property param key the configuration key to modify param value the value to set the key to remove the property and the assotiated value param key the key to remove the constructor param edge the fig edge public classdiagram realization edge fig edge edge super edge classdiagramrealizationedge figedge constructor for uml collaboration represented classifier combo box model public uml collaboration represented classifier combo box model super represented classifier true umlcollaborationrepresentedclassifiercomboboxmodel umlcollaborationrepresentedclassifiercomboboxmodel representedclassifier protected void build model list collection classifiers new array list project p project manager get manager get current project for object model p get user defined model list collection c model get model management helper get all model elements of kind model model get meta types get classifier for object cls c collection s model get model management helper get all surrounding namespaces cls if s contains get target classifiers add cls set elements classifiers buildmodellist arraylist projectmanager getmanager getcurrentproject getuserdefinedmodellist getmodelmanagementhelper getallmodelelementsofkind getmetatypes getclassifier getmodelmanagementhelper getallsurroundingnamespaces gettarget setelements protected boolean is valid element object element return model get facade isa classifier element model get facade get represented classifier get target element isvalidelement getfacade isaclassifier getfacade getrepresentedclassifier gettarget see org argouml uml ui uml combo box model2 get selected model element protected object get selected model element return model get facade get represented classifier get target umlcomboboxmodel2 getselectedmodelelement getselectedmodelelement getfacade getrepresentedclassifier gettarget public void model change uml change event evt do nothing by design modelchange umlchangeevent construct an element using the string param strelement the element public string namespace element string strelement this element strelement stringnamespaceelement see org argouml uml util namespace namespace element get namespace element public object get namespace element return element namespaceelement getnamespaceelement getnamespaceelement return the plain string object public string to string return element tostring construct a property panel for generalization elements public prop panel generalization super label generalization lookup icon generalization add field translator localize label name get name text field add field translator localize label discriminator get discriminator text field add field translator localize label namespace get namespace selector add separator add field translator localize label parent get single row scroll new uml generalization parent list model add field translator localize label child get single row scroll new uml generalization child list model add field translator localize label powertype new uml combo box2 new uml generalization powertype combo box model action set generalization powertype get instance add action new action navigate container element add action new action new stereotype add action get delete action proppanelgeneralization lookupicon addfield getnametextfield addfield getdiscriminatortextfield addfield getnamespaceselector addseparator addfield getsinglerowscroll umlgeneralizationparentlistmodel addfield getsinglerowscroll umlgeneralizationchildlistmodel addfield umlcombobox2 umlgeneralizationpowertypecomboboxmodel actionsetgeneralizationpowertype getinstance addaction actionnavigatecontainerelement addaction actionnewstereotype addaction getdeleteaction override public void navigate up object target get target if model get facade isa model element target object namespace model get facade get namespace target if namespace null target manager get instance set target namespace navigateup gettarget getfacade isamodelelement getfacade getnamespace targetmanager getinstance settarget return the discriminator textfield protected j text field get discriminator text field if discriminator text field null discriminator text field new uml text field2 discriminator document return discriminator text field jtextfield getdiscriminatortextfield discriminatortextfield discriminatortextfield umltextfield2 discriminatordocument discriminatortextfield constructor public uml action argument list model super actual argument umlactionargumentlistmodel actualargument protected void build model list if get target null set all elements model get facade get actual arguments get target buildmodellist gettarget setallelements getfacade getactualarguments gettarget see org argouml uml ui uml model element list model2 is valid element java lang object protected boolean is valid element object element return model get facade isa argument element umlmodelelementlistmodel2 isvalidelement isvalidelement getfacade isaargument protected void move down int index object clss get target list c model get facade get actual arguments clss if index c size 1 object mem c get index model get common behavior helper remove actual argument clss mem model get common behavior helper add actual argument clss index 1 mem movedown gettarget getfacade getactualarguments getcommonbehaviorhelper removeactualargument getcommonbehaviorhelper addactualargument see org argouml uml ui uml model element ordered list model2 move to bottom int override protected void move to bottom int index object clss get target list c model get facade get actual arguments clss if index c size 1 object mem c get index model get common behavior helper remove actual argument clss mem model get common behavior helper add actual argument clss c size 1 mem umlmodelelementorderedlistmodel2 movetobottom movetobottom gettarget getfacade getactualarguments getcommonbehaviorhelper removeactualargument getcommonbehaviorhelper addactualargument see org argouml uml ui uml model element ordered list model2 move to top int override protected void move to top int index object clss get target list c model get facade get actual arguments clss if index 0 object mem c get index model get common behavior helper remove actual argument clss mem model get common behavior helper add actual argument clss 0 mem umlmodelelementorderedlistmodel2 movetotop movetotop gettarget getfacade getactualarguments getcommonbehaviorhelper removeactualargument getcommonbehaviorhelper addactualargument param the name name of the unit param path the path relative to the project source path param the content the source code of the unit public source unit string the name string path string the content set name the name set base path path this content the content thename thecontent sourceunit thename thecontent setname thename setbasepath thecontent param full name name with path relative to the project source path param the content the source code of the unit public source unit string full name string the content set full name full name content the content fullname thecontent sourceunit fullname thecontent setfullname fullname thecontent return returns the source code of the unit public string get content return content getcontent param the content the source code for this unit public void set content string the content this content the content thecontent setcontent thecontent thecontent return returns the file name of this unit without path public string get name return name getname param filename the file name of this unit without path public void set name string filename int sep filename last index of file separator if sep 0 name filename substring sep file separator length else name filename setname lastindexof file_separator file_separator return returns the base path of the unit relative to the project source path public string get base path return base path getbasepath basepath param path the base path of the unit relative to the project source path public void set base path string path if path ends with file separator base path path substring 0 path length file separator length else base path path setbasepath endswith file_separator basepath file_separator basepath return returns the name with path of the unit relative to the project source path public string get full name return base path system get property file separator name getfullname basepath getproperty param path the full name with path of the unit relative to the project source path public void set full name string path int sep path last index of file separator if sep 0 base path path substring 0 sep name path substring sep file separator length else base path name path setfullname lastindexof file_separator basepath file_separator basepath return returns the language public language get language return language getlanguage param lang the language to set public void set language language lang this language lang setlanguage public class init sequence diagram implements init subsystem public list abstract argoj panel get details tabs return collections empty list initsequencediagram initsubsystem abstractargojpanel getdetailstabs emptylist public list gui settings tab interface get project settings tabs return collections empty list guisettingstabinterface getprojectsettingstabs emptylist public list gui settings tab interface get settings tabs return collections empty list guisettingstabinterface getsettingstabs emptylist public void init set up the property panels for sequence diagrams prop panel factory diagram factory new sequence diagram prop panel factory prop panel factory manager add prop panel factory diagram factory proppanelfactory diagramfactory sequencediagramproppanelfactory proppanelfactorymanager addproppanelfactory diagramfactory schedule this object to run on awt event queue 0 at some later time private synchronized void schedule if hot return hot true event queue invoke later this eventqueue eventqueue invokelater schedule update children to be called on node at some later time does nothing if there already is a pending update of node param node the explorer tree node to be updated throws null pointer exception if node is null public synchronized void schedule explorer tree node node if node get pending return pending updates add node node set pending true schedule updatechildren explorertreenode nullpointerexception explorertreenode getpending pendingupdates setpending call update children for some pending nodes will call at most max updates per run each time should there still be pending updates after that then it will reschedule itself p this method should not be called explicitly instead schedule should be called and this method will be called automatically public void run boolean done false for int i 0 i max updates per run i explorer tree node node null synchronized this if pending updates is empty node pending updates remove first node set pending false else done true hot false break update children new tree path get path to root node if done schedule else todo this seems like a brute force workaround and a very indirect one at that it appears to be needed though until we fix the problem properly tfm 20070904 this solves issue 2287 tree refresh selection updatechildren max_updates_per_run max_updates_per_run explorertreenode pendingupdates isempty pendingupdates removefirst setpending updatechildren treepath getpathtoroot refreshselection the constructor of explorer tree model param root an object to place at the root param my tree the tree public explorer tree model object root explorer tree my tree super new default mutable tree node tree my tree set root new explorer tree node root this set asks allows children false model element map new hash map object set explorer tree node explorer event adaptor get instance set tree modeluml event listener this order new type then name order explorertreemodel mytree explorertreemodel explorertree mytree defaultmutabletreenode mytree setroot explorertreenode setasksallowschildren modelelementmap hashmap explorertreenode explorereventadaptor getinstance settreemodelumleventlistener typethennameorder see org argouml ui explorer tree modeluml event listener model element changed java lang object public void model element changed object node traverse modified tree node get root node treemodelumleventlistener modelelementchanged modelelementchanged traversemodified treenode getroot see org argouml ui explorer tree modeluml event listener model element added java lang object public void model element added object node traverse modified tree node get root node treemodelumleventlistener modelelementadded modelelementadded traversemodified treenode getroot traverses the children finds those affected by the given node and notifies them that they are modified param start the node to start from param node the given node private void traverse modified tree node start object node enumeration children start children while children has more elements tree node child tree node children next element traverse modified child node if start instanceof explorer tree node explorer tree node start node modified node traversemodified treenode hasmoreelements treenode treenode nextelement traversemodified explorertreenode explorertreenode nodemodified public void model element removed object node for explorer tree node change node new array list explorer tree node find nodes node if change node get parent null remove node from parent change node traverse modified tree node get root node modelelementremoved explorertreenode changenode arraylist explorertreenode findnodes changenode getparent removenodefromparent changenode traversemodified treenode getroot public void structure changed remove references for gc if get root instanceof explorer tree node explorer tree node get root remove this should only be helpful for old garbage collectors for collection nodes model element map values nodes clear model element map clear this is somewhat inconsistent with the design of the constructor that receives the root object by argument if this is okay then there may be no need for a constructor with that argument model element map new hash map object set explorer tree node project proj project manager get manager get current project explorer tree node root node new explorer tree node proj this add to map proj root node set root root node structurechanged getroot explorertreenode explorertreenode getroot modelelementmap modelelementmap modelelementmap hashmap explorertreenode projectmanager getmanager getcurrentproject explorertreenode rootnode explorertreenode addtomap rootnode setroot rootnode updates next level of the explorer tree for a given tree path param path the path to the node whose children to update throws illegal argument exception if node has a child that is not a descendant of default mutable tree node public void update children tree path path explorer tree node node explorer tree node path get last path component object model element node get user object avoid doing this too early in the initialization process if rules null return avoid recursively updating the same child if updating children contains node return updating children add node list children reorder children node list new children new array list set deps new hash set collect children model element new children deps node set modify set deps merge children node children new children updating children remove node illegalargumentexception defaultmutabletreenode updatechildren treepath explorertreenode explorertreenode getlastpathcomponent modelelement getuserobject updatingchildren updatingchildren reorderchildren newchildren arraylist hashset collectchildren modelelement newchildren setmodifyset mergechildren newchildren updatingchildren sorts the child nodes of node using the current ordering p note user object is only available from descendants of default mutable tree node so any other children couldn t be sorted thus these are currently forbidden but currently no such node is ever inserted into the tree param node the node whose children to sort return the user objects of the children in the same order as the children throws illegal argument exception if node has a child that is not a descendant of default mutable tree node private list object reorder children explorer tree node node list object child user objects new array list object list explorer tree node reordered new array list explorer tree node enumerate the current children of node to find out which now sorts in different order since these must be moved enumeration en chld node children object last obj null while en chld has more elements object child en chld next element if child instanceof explorer tree node object obj explorer tree node child get user object if last obj null order compare last obj obj 0 if a node to be moved is currently selected move its predecessors instead so don t lose selection this fixes issue 3249 note this does not deal with the case where multiple nodes are selected and they are out of order with respect to each other but i don t think more than one node is ever reordered at a time tfm if tree is path selected new tree path get path to root explorer tree node child reordered add explorer tree node child else explorer tree node prev explorer tree node explorer tree node child get previous sibling while prev null order compare prev get user object obj 0 reordered add prev child user objects remove child user objects size 1 prev explorer tree node prev get previous sibling child user objects add obj last obj obj else child user objects add obj last obj obj else throw new illegal argument exception incomprehencible child node child to string for explorer tree node child reordered avoid our deinitialization here the node will be added back to the tree again super remove node from parent child for each reordered node find it s new position among the current children and move it there for explorer tree node child reordered object obj child get user object int ip collections binary search child user objects obj order if ip 0 ip ip 1 avoid our initialization here super insert node into child node ip child user objects add ip obj return child user objects userobject defaultmutabletreenode userobjects illegalargumentexception defaultmutabletreenode reorderchildren explorertreenode childuserobjects arraylist explorertreenode arraylist explorertreenode enchld lastobj enchld hasmoreelements enchld nextelement explorertreenode explorertreenode getuserobject lastobj lastobj ispathselected treepath getpathtoroot explorertreenode explorertreenode explorertreenode explorertreenode explorertreenode getprevioussibling getuserobject childuserobjects childuserobjects explorertreenode getprevioussibling childuserobjects lastobj childuserobjects lastobj illegalargumentexception tostring explorertreenode removenodefromparent explorertreenode getuserobject binarysearch childuserobjects insertnodeinto childuserobjects childuserobjects collects the set of children model element should have at this point in time the children are added to new children p note both new children and deps are modified by this function it is in fact it s primary purpose to modify these collections it is your responsibility to make sure that they are empty when it is called or to know what you are doing if they are not param model element the element to collect children for param new children the new children of model element param deps the set of objects that should be monitored for changes since these could affect this list throws unsupported operation exception if add is not supported by new children or add all isn t supported by deps throws null pointer exception if new children or deps is null throws class cast exception if new children or deps rejects some element throws illegal argument exception if new children or deps rejects some element private void collect children object model element list new children set deps if model element null return collect the current set of objects that should be children to this node for perspective rule rule rules todo a better implementation would be to batch events into logical groups and update the tree one time for the entire group synchronizing access to the model repository so that it stays consistent during the query this would likely require doing the updates in a different thread than the event delivery thread to prevent deadlocks so for right now we protect ourselves with try catch blocks collection children collections empty set try children rule get children model element catch invalid element exception e log debug invalid element exception in explorer tree e get stack trace for object child children if child null log warn perspective rule rule wanted to add null to the explorer tree else if new children contains child new children add child try set dependencies rule get dependencies model element deps add all dependencies catch invalid element exception e log debug invalid element exception in explorer tree e get stack trace order the new children the dependencies cannot and need not be ordered collections sort new children order deps add all new children modelelement newchildren newchildren modelelement newchildren modelelement unsupportedoperationexception newchildren addall nullpointerexception newchildren classcastexception newchildren illegalargumentexception newchildren collectchildren modelelement newchildren modelelement perspectiverule emptyset getchildren modelelement invalidelementexception invalidelementexception explorertree getstacktrace perspectiverule newchildren newchildren getdependencies modelelement addall invalidelementexception invalidelementexception explorertree getstacktrace newchildren addall newchildren returns a set of current children to remove and modifies new children to only contain the children not already in children and not subsumed by any weak explorer node in children p note new children will be modified by this call p note it is expected that a weak explorer node will not be reused and thus they will always initially be slated for removal and only those nodes are in fact used to check subsumption of new nodes new nodes are not checked among themselves for subsumtion param children is the list of current children param new children is the list of expected children return the set of current children to remove throws unsupported operation exception if new children doesn t support remove or remove all throws null pointer exception if either argument is null private set prepare add remove sets list children list new children set remove set new hash set set common objects new hash set if children size new children size common objects add all children common objects retain all new children else common objects add all new children common objects retain all children new children remove all common objects remove set add all children remove set remove all common objects handle weak explorer nodes iterator it remove set iterator list weak nodes null while it has next object obj it next if obj instanceof weak explorer node continue weak explorer node node weak explorer node obj if weak nodes null weak nodes new linked list iterator it2 new children iterator while it2 has next object obj2 it2 next if obj2 instanceof weak explorer node weak nodes add obj2 iterator it3 weak nodes iterator while it3 has next object obj3 it3 next if node subsumes obj3 remove the node from remove set it remove remove obj3 from weak nodes and new children new children remove obj3 it3 remove break return remove set newchildren weakexplorernode newchildren weakexplorernode newchildren unsupportedoperationexception newchildren removeall nullpointerexception prepareaddremovesets newchildren removeset hashset commonobjects hashset newchildren commonobjects addall commonobjects retainall newchildren commonobjects addall newchildren commonobjects retainall newchildren removeall commonobjects removeset addall removeset removeall commonobjects weakexplorernodes removeset weaknodes hasnext weakexplorernode weakexplorernode weakexplorernode weaknodes weaknodes linkedlist newchildren hasnext weakexplorernode weaknodes weaknodes hasnext removeset weaknodes newchildren newchildren removeset merges the current children with the new children removing children no longer present and adding new children in the right place param node the tree node were merging lists for param children the current child user objects in order param new children the expected child user objects in order throws unsupported operation exception if the iterator returned by new children doesn t support the remove operation or if new children itself doesn t support remove or remove all throws null pointer exception if node children or new children are null private void merge children explorer tree node node list children list new children set remove objects prepare add remove sets children new children remember that children are not tree nodes but user objects list explorer tree node actual nodes new array list explorer tree node enumeration children enum node children while children enum has more elements actual nodes add explorer tree node children enum next element int position 0 iterator child nodes actual nodes iterator iterator new nodes new children iterator object first new new nodes has next new nodes next null while child nodes has next object child obj child nodes next if child obj instanceof explorer tree node continue explorer tree node child explorer tree node child obj object user object child get user object if remove objects contains user object remove node from parent child else while first new null order compare first new user object 0 insert node into new explorer tree node first new this node position position first new new nodes has next new nodes next null position add any remaining nodes while first new null insert node into new explorer tree node first new this node position position first new new nodes has next new nodes next null treenode userobjects newchildren userobjects unsupportedoperationexception newchildren newchildren removeall nullpointerexception newchildren mergechildren explorertreenode newchildren removeobjects prepareaddremovesets newchildren treenodes userobjects explorertreenode actualnodes arraylist explorertreenode childrenenum childrenenum hasmoreelements actualnodes explorertreenode childrenenum nextelement childnodes actualnodes newnodes newchildren firstnew newnodes hasnext newnodes childnodes hasnext childobj childnodes childobj explorertreenode explorertreenode explorertreenode childobj userobject getuserobject removeobjects userobject removenodefromparent firstnew firstnew userobject insertnodeinto explorertreenode firstnew firstnew newnodes hasnext newnodes firstnew insertnodeinto explorertreenode firstnew firstnew newnodes hasnext newnodes override public void insert node into mutable tree node new child mutable tree node parent int index super insert node into new child parent index if new child instanceof explorer tree node add nodes to map explorer tree node new child insertnodeinto mutabletreenode newchild mutabletreenode insertnodeinto newchild newchild explorertreenode addnodestomap explorertreenode newchild override public void remove node from parent mutable tree node node if node instanceof explorer tree node remove nodes from map explorer tree node node explorer tree node node remove super remove node from parent node removenodefromparent mutabletreenode explorertreenode removenodesfrommap explorertreenode explorertreenode removenodefromparent map all nodes in the subtree rooted at node param node the node to be added private void add nodes to map explorer tree node node enumeration children node children while children has more elements explorer tree node child explorer tree node children next element add nodes to map child add to map node get user object node addnodestomap explorertreenode hasmoreelements explorertreenode explorertreenode nextelement addnodestomap addtomap getuserobject unmap all nodes in the subtree rooted at the given node param node the given node private void remove nodes from map explorer tree node node enumeration children node children while children has more elements explorer tree node child explorer tree node children next element remove nodes from map child remove from map node get user object node removenodesfrommap explorertreenode hasmoreelements explorertreenode explorertreenode nextelement removenodesfrommap removefrommap getuserobject adds a new tree node and model element to the map nodes are removed from the map when a link model element removed object model element removed event is received param model element the modelelement to be added param node the node to be added private void add to map object model element explorer tree node node set explorer tree node nodes model element map get model element if nodes null nodes add node else nodes new hash set explorer tree node nodes add node model element map put model element nodes modelelementremoved modelelementremoved modelelement addtomap modelelement explorertreenode explorertreenode modelelementmap modelelement hashset explorertreenode modelelementmap modelelement removes a new tree node and model element from the map param model element the modelelement to be removed param node the node to be removed private void remove from map object model element explorer tree node node collection explorer tree node nodes model element map get model element if nodes null nodes remove node if nodes is empty model element map remove model element modelelement removefrommap modelelement explorertreenode explorertreenode modelelementmap modelelement isempty modelelementmap modelelement node lookup for a given model element param model element the given modelelement return the nodes sought private collection explorer tree node find nodes object model element collection explorer tree node nodes model element map get model element if nodes null return collections empty list return nodes modelelement explorertreenode findnodes modelelement explorertreenode modelelementmap modelelement empty_list updates the explorer for new perspectives orderings inherit doc public void item state changed item event e if e get source instanceof perspective combo box rules explorer perspective e get item get list else it is the combo for order order comparator e get item structure changed todo temporary let tree expand implicitly tfm tree expand path tree get path for row 1 inheritdoc itemstatechanged itemevent getsource perspectivecombobox explorerperspective getitem getlist getitem structurechanged expandpath getpathforrow return returns the node updater explorer updater get node updater return node updater nodeupdater explorerupdater getnodeupdater nodeupdater build a new compartment fig text of the given dimensions within the compartment described by code a fig code p invoke the parent constructor then set the reference to the associated compartment figure the associated fig text is marked as expand only p em warning em won t work properly if code a fig code is null a warning is printed p param x x coordinate of the top left of the fig text param y y coordinate of the top left of the fig text param w width of the fig text param h height of the fig text param a fig the figure describing the whole compartment param np the notation provider see notation provider factory2 deprecated for 0 27 3 by tfmorris use link compartment fig text object rectangle diagram settings suppress warnings deprecation deprecated public compartment fig text int x int y int w int h fig a fig notation provider np super x y w h true if np null log warn need a notation provider for compartment fig text set notation provider np set the enclosing compartment fig warn if its null which will break ref fig a fig if ref fig null log warn this get class to string cannot create with null compartment fig set justification fig text justify left set right margin margin set left margin margin figtext afig figtext afig figtext figtext figtext figtext afig notationprovider notationproviderfactory2 compartmentfigtext diagramsettings suppresswarnings compartmentfigtext afig notationprovider notationprovider compartmentfigtext setnotationprovider reffig afig reffig getclass tostring setjustification figtext justify_left setrightmargin setleftmargin construct a compartment fig text deprecated by mvw for 0 27 3 use a constructor without np parameter param element owning uml element param bounds position and size param settings render settings param np notation provider deprecated public compartment fig text object element rectangle bounds diagram settings settings notation provider np super element bounds settings true if np null log warn need a notation provider for compartment fig text set notation provider np set justification fig text justify left set right margin margin set left margin margin compartmentfigtext compartmentfigtext diagramsettings notationprovider notationprovider compartmentfigtext setnotationprovider setjustification figtext justify_left setrightmargin setleftmargin construct a compartment fig text param element owning uml element param bounds position and size param settings render settings public compartment fig text object element rectangle bounds diagram settings settings super element bounds settings true target manager get instance add target listener this set justification fig text justify left set right margin margin set left margin margin todo we d like these to not be filled but gef won t let us select them if we do that set filled false compartmentfigtext compartmentfigtext diagramsettings targetmanager getinstance addtargetlistener setjustification figtext justify_left setrightmargin setleftmargin setfilled build a new compartment fig text of the given dimensions within the compartment described by code a fig code p invoke the parent constructor then set the reference to the associated compartment figure the associated fig text is marked as expand only p em warning em won t work properly if code a fig code is null a warning is printed p param x x coordinate of the top left of the fig text param y y coordinate of the top left of the fig text param w width of the fig text param h height of the fig text param a fig the figure describing the whole compartment param property the property this fig should listen for deprecated for 0 27 3 by tfmorris use link compartment fig text object rectangle diagram settings string deprecated public compartment fig text int x int y int w int h fig a fig string property this x y w h a fig new string property figtext afig figtext afig figtext figtext figtext figtext afig compartmentfigtext diagramsettings compartmentfigtext afig afig build a new compartment fig text of the given dimensions within the compartment described by code a fig code p invoke the parent constructor then set the reference to the associated compartment figure the associated fig text is marked as expand only p em warning em won t work properly if code a fig code is null a warning is printed p param x x coordinate of the top left of the fig text param y y coordinate of the top left of the fig text param w width of the fig text param h height of the fig text param a fig the figure describing the whole compartment param properties the properties this fig should listen for deprecated for 0 27 3 by tfmorris use link compartment fig text object rectangle diagram settings string suppress warnings deprecation deprecated public compartment fig text int x int y int w int h fig a fig string properties super x y w h true properties if a fig null throw new illegal argument exception a ref fig must be provided set the enclosing compartment fig warn if its null which will break ref fig a fig figtext afig figtext afig figtext figtext figtext figtext afig compartmentfigtext diagramsettings suppresswarnings compartmentfigtext afig afig illegalargumentexception reffig reffig afig build a new compartment fig text of the given dimensions within the compartment described by code a fig code p invoke the parent constructor then set the reference to the associated compartment figure the associated fig text is marked as expand only p param owner owning uml element param bounds position and size param settings render settings param property the property this fig should listen for public compartment fig text object owner rectangle bounds diagram settings settings string property this owner bounds settings new string property figtext afig figtext compartmentfigtext diagramsettings build a new compartment fig text of the given dimensions within the compartment described by code a fig code p invoke the parent constructor then set the reference to the associated compartment figure the associated fig text is marked as expand only p param owner owning uml element param bounds position and size param settings render settings param properties the properties this fig should listen for public compartment fig text object owner rectangle bounds diagram settings settings string properties super owner bounds settings true properties target manager get instance add target listener this figtext afig figtext compartmentfigtext diagramsettings targetmanager getinstance addtargetlistener override public void remove from diagram super remove from diagram fig fg get group if fg instanceof fig group fig group fg remove fig this set group null target manager get instance remove target listener this removefromdiagram removefromdiagram getgroup figgroup figgroup removefig setgroup targetmanager getinstance removetargetlistener return current fill status mdash always code false code override public boolean is filled return false isfilled override for correct graphical behaviour p return current fill colour mdash always the fill colour of the associated compartment fig override public color get line color if ref fig null return ref fig get line color else get the right color from our settings return super get line color getlinecolor reffig reffig getlinecolor getlinecolor this is actually used to mark this fig as selected however set selected is set final in gef todo can set selected be used without side effect if gef is adjusted otherwise consider renaming as set selected child and try to make protected param flag code true code if the entry is to be highlighted code false code otherwise public void set highlighted boolean flag highlighted flag setselected setselected setselectedchild sethighlighted extends the normal paint function in order to display a similar selection box to that given for a non resizable fig node param g the graphics object see org tigris gef presentation fig text paint java awt graphics override public void paint graphics g super paint g if highlighted final int x getx final int y gety final int w get width final int h get height g set color globals get prefs handle color for this g draw rect x 1 y 1 w 2 h 2 g draw rect x y w h fignode figtext getwidth getheight setcolor getprefs handlecolorfor drawrect drawrect return whether this item is highlighted p return code true code if the entry is highlighted code false code otherwise public boolean is highlighted return highlighted ishighlighted called when text editing has completed on this fig protected void text edited set highlighted true super text edited textedited sethighlighted textedited public void target added target event e if arrays as list e get new targets contains get owner set highlighted true this damage targetadded targetevent aslist getnewtargets getowner sethighlighted public void target removed target event e if e get removed target collection contains get owner set highlighted false this damage targetremoved targetevent getremovedtargetcollection getowner sethighlighted public void target set target event e this is needed for when the selection changes from one compartment fig to an other object without this the selection indicators would stay on the screen see issue 5681 set highlighted arrays as list e get new targets contains get owner targetset targetevent sethighlighted aslist getnewtargets getowner the constructor public cr invalid join trigger or guard setup head and desc add supported decision uml decision state machines add trigger trigger add trigger guard crinvalidjointriggerorguard setupheadanddesc addsupporteddecision umldecision state_machines addtrigger addtrigger public boolean predicate2 object dm designer dsgr if model get facade isa transition dm return no problem object tr dm object t model get facade get trigger tr object g model get facade get guard tr object dv model get facade get target tr if model get facade isa pseudostate dv return no problem wfr transitions omg uml 1 3 object k model get facade get kind dv if model get facade equals pseudostate kind k model get pseudostate kind get join return no problem boolean has trigger t null model get facade get name t null model get facade get name t length 0 if has trigger return problem found boolean no guard g null model get facade get expression g null model get facade get body model get facade get expression g null model get facade get body model get facade get expression g to string length 0 if no guard return problem found return no problem getfacade isatransition no_problem getfacade gettrigger getfacade getguard getfacade gettarget getfacade isapseudostate no_problem getfacade getkind getfacade equalspseudostatekind getpseudostatekind getjoin no_problem hastrigger getfacade getname getfacade getname hastrigger problem_found noguard getfacade getexpression getfacade getbody getfacade getexpression getfacade getbody getfacade getexpression tostring noguard problem_found no_problem public set object get criticized design materials set object ret new hash set object ret add model get meta types get transition return ret getcriticizeddesignmaterials hashset getmetatypes gettransition the constructor public cr component without node setup head and desc add supported decision uml decision patterns crcomponentwithoutnode setupheadanddesc addsupporteddecision umldecision public boolean predicate2 object dm designer dsgr if dm instanceof uml deployment diagram return no problem uml deployment diagram dd uml deployment diagram dm list set offs compute offenders dd if offs null return no problem return problem found umldeploymentdiagram no_problem umldeploymentdiagram umldeploymentdiagram listset computeoffenders no_problem problem_found public to do item to do item object dm designer dsgr uml deployment diagram dd uml deployment diagram dm list set offs compute offenders dd return new uml to do item this offs dsgr todoitem todoitem umldeploymentdiagram umldeploymentdiagram listset computeoffenders umltodoitem public boolean still valid to do item i designer dsgr if is active return false list set offs i get offenders uml deployment diagram dd uml deployment diagram offs get 0 if predicate dm dsgr return false list set new offs compute offenders dd boolean res offs equals new offs return res stillvalid todoitem isactive listset getoffenders umldeploymentdiagram umldeploymentdiagram listset newoffs computeoffenders newoffs if there are components that have no enclosing figm node the returned list set is not null then in the list set are the uml deployment diagram and all fig components with no enclosing figm node param dd the diagram to check return the set of offenders public list set compute offenders uml deployment diagram dd collection figs dd get layer get contents list set offs null iterator fig iter figs iterator boolean is node false while fig iter has next object obj fig iter next if obj instanceof figm node is node true fig iter figs iterator while fig iter has next object obj fig iter next if obj instanceof fig component continue fig component fc fig component obj if fc get enclosing fig null is node if offs null offs new list set offs add dd offs add fc else if fc get enclosing fig null model get facade get deployment locations fc get owner null model get facade get deployment locations fc get owner size 0 if offs null offs new list set offs add dd offs add fc return offs figmnode listset listset umldeploymentdiagram figcomponents figmnode listset computeoffenders umldeploymentdiagram getlayer getcontents listset figiter isnode figiter hasnext figiter figmnode isnode figiter figiter hasnext figiter figcomponent figcomponent figcomponent getenclosingfig isnode listset getenclosingfig getfacade getdeploymentlocations getowner getfacade getdeploymentlocations getowner listset see org argouml ui explorer rules perspective rule get rule name public string get rule name return translator localize misc interaction messages perspectiverule getrulename getrulename public collection get children object parent if model get facade isa interaction parent return model get facade get messages parent return collections empty set getchildren getfacade isainteraction getfacade getmessages empty_set public set get dependencies object parent if model get facade isa interaction parent set set new hash set set add parent return set return collections empty set getdependencies getfacade isainteraction hashset empty_set the constructor for this class public cruml the constructor for this class overriding the default localization resource param non default localization prefix the overriding localization resource public cruml string non default localization prefix if non default localization prefix null this localization prefix non default localization prefix setup head and desc nondefaultlocalizationprefix nondefaultlocalizationprefix nondefaultlocalizationprefix localizationprefix nondefaultlocalizationprefix setupheadanddesc set the resources for this critic based on the class name param key is the class name public void set resource string key super set headline get localized string key head super set description get localized string key desc setresource setheadline getlocalizedstring setdescription getlocalizedstring returns a localized string for the current critic class param suffix the suffix of the key return the localized string protected string get localized string string suffix return get localized string get class simple name suffix getlocalizedstring getlocalizedstring getclasssimplename returns a localized string for the given key and suffix param key the main key param suffix the suffix of the key return the localized string protected string get localized string string key string suffix return translator localize localization prefix key suffix getlocalizedstring localizationprefix loads the localized wizard s instruction return the instructions protected string get instructions return get localized string ins getinstructions getlocalizedstring loads the localized wizard s default suggestion return the default suggestion protected string get default suggestion return get localized string sug getdefaultsuggestion getlocalizedstring set up the locale specific text for the critic headline the one liner that appears in the to do pane and the critic description the detailed explanation that appears in the to do tab of the details pane public final void setup head and desc set resource get class simple name setupheadanddesc setresource getclasssimplename override public boolean predicate object dm designer dsgr if model get facade isa model element dm model get uml factory is removed dm return no problem else return predicate2 dm dsgr getfacade isamodelelement getumlfactory isremoved no_problem this is the decision routine for the critic param dm is the uml entity that is being checked param dsgr is for future development and can be ignored return boolean problem found public boolean predicate2 object dm designer dsgr return super predicate dm dsgr expand text with ocl brackets in it no recursive expansion return the expanded text param res is the text to expand param offs is the elements to replace public string expand string res list set offs if offs size 0 return res object off1 offs get 0 string buffer beginning new string buffer int match pos res index of ocl start replace all occurances of offender with the name of the first offender while match pos 1 int end expr res index of ocl end match pos 1 check if there is no ocl end if so the critic expression is not correct and can not be expanded if end expr 1 break if match pos 0 beginning append res substring 0 match pos string expr res substring match pos ocl start length end expr string eval str null try eval str critic ocl evaluator get instance eval to string off1 expr catch expansion exception e really ought to have a critic exception to throw here log error failed to evaluate critic expression e if expr ends with eval str equals eval str translator localize misc name anon beginning append eval str res res substring end expr ocl end length match pos res index of ocl start if beginning length 0 return original string if no replacements made return res else return beginning append res to string listset stringbuffer stringbuffer matchpos indexof ocl_start matchpos endexpr indexof ocl_end matchpos ocl_end endexpr matchpos matchpos matchpos ocl_start endexpr evalstr evalstr criticoclevaluator getinstance evaltostring expansionexception criticexception endswith evalstr evalstr evalstr endexpr ocl_end matchpos indexof ocl_start tostring see org argouml cognitive critics critic to do item object designer override public to do item to do item object dm designer dsgr return new uml to do item this dm dsgr todoitem todoitem todoitem umltodoitem get the name of the current class return the name of the current class without any leading packages private final string get class simple name todo this method can be replaced by get class get simple name when argo drops support for java versions 1 5 string class name get class get name return class name substring class name last index of 1 getclasssimplename getclass getsimplename classname getclass getname classname classname lastindexof return the created mode label drag instance see org tigris gef base mode factory create mode public fig modifying mode create mode return new mode label drag modelabeldrag modefactory createmode figmodifyingmode createmode modelabeldrag param the editor to create the mode in return the created mode label drag instance see org tigris gef base mode factory create mode org tigris gef base editor public fig modifying mode create mode editor editor return new mode label drag editor modelabeldrag modefactory createmode figmodifyingmode createmode modelabeldrag creates a new instance of wiz add instance variable public wiz add instance variable super wizaddinstancevariable wizaddinstancevariable public void do action int old step object attr switch old step case 1 string new name get suggestion if step1 null new name step1 get text object me get model element object attr type project manager get manager get current project get default attribute type attr model get core factory build attribute2 me attr type model get core helper set name attr new name break doaction oldstep oldstep newname getsuggestion newname gettext getmodelelement attrtype projectmanager getmanager getcurrentproject getdefaultattributetype getcorefactory buildattribute2 attrtype getcorehelper setname newname param s set a new instruction string public void set instructions string s instructions s setinstructions public j panel make panel int new step switch new step case 1 if step1 null step1 new wiz step text field this instructions label offer suggestion return step1 return null jpanel makepanel newstep newstep wizsteptextfield offersuggestion see org argouml ui explorer rules perspective rule get rule name public string get rule name return translator localize misc namespace classifer or package perspectiverule getrulename getrulename public collection get children object parent if model get facade isa namespace parent return collections empty set iterator elements model get facade get owned elements parent iterator list result new array list while elements has next object element elements next if model get facade isa package element model get facade isa classifier element result add element return result getchildren getfacade isanamespace empty_set getfacade getownedelements arraylist hasnext getfacade isapackage getfacade isaclassifier public set get dependencies object parent if model get facade isa namespace parent set set new hash set set add parent return set return collections empty set getdependencies getfacade isanamespace hashset empty_set constructor for uml dependency supplier list model public uml attribute initial value list model super initial value umldependencysupplierlistmodel umlattributeinitialvaluelistmodel initialvalue protected void build model list if get target null remove all elements add element model get facade get initial value get target buildmodellist gettarget removeallelements addelement getfacade getinitialvalue gettarget see org argouml uml ui uml model element list model2 is valid element object protected boolean is valid element object element return model get facade get initial value get target element umlmodelelementlistmodel2 isvalidelement isvalidelement getfacade getinitialvalue gettarget constructor for uml feature owner list model public uml feature owner list model super owner umlfeatureownerlistmodel umlfeatureownerlistmodel protected void build model list if get target null remove all elements add element model get facade get owner get target buildmodellist gettarget removeallelements addelement getfacade getowner gettarget see org argouml uml ui uml model element list model2 is valid element object protected boolean is valid element object o return model get facade get owner get target o umlmodelelementlistmodel2 isvalidelement isvalidelement getfacade getowner gettarget constructs a new itemuid and creates a new id for it public itemuid id generateid constructs a new itemuid and uses the string param as the id mainly intended to be used during loading of saved objects param param the id to used for the new instance see to string public itemuid string param id param tostring returns the id of this itemuid as a string if everything works all such strings will be unique it is possible to created a new identical itemuid using this string return the id as a string see itemuid string public string to string return id tostring generates a new unique id and returns it as a string the contents of the string is supposed to be unique with respect to all strings generated by other instances of this class todo we should consider using java util uuid for this instead return a string with unique content public static string generateid return new java rmi server uid to string tostring obtains the id of an object and returns it as a string if can create is true it will try to create a new id for the object if it has none param obj the object to get the id of param can create if an id can be created should object not have one return the id of the object or null public static string getid of object object obj boolean can create string s read objectid obj if s null can create s create objectid obj return s cancreate cancreate getidofobject cancreate readobjectid cancreate createobjectid tries to read the id of the object it uses the reflective properties of java to access a method named get itemuid of the object which is expected to return an itemuid param obj the object whose id to read return the id of the object or null protected static string read objectid object obj if model get facade isauml element obj return model get facade getuuid obj if obj instanceof i itemuid final itemuid item uid i itemuid obj get itemuid return item uid null null item uid to string object rv try todo we shouldn t need this reflection any more once we have convinced ourselves that everything with a get itemuid method is implementing i itemuid method m obj get class get method get itemuid class null rv m invoke obj object null catch no such method exception nsme apparently this object had no get itemuid try this is needed for a comment edge todo why doesn t comment edge implement i itemuid and be handled with the mechanism above method m obj get class get method getuuid class null rv m invoke obj object null return string rv catch no such method exception nsme2 apparently this object had no getuuid return null catch illegal argument exception iare log error getuuid for obj get class takes strange parameter iare return null catch illegal access exception iace apparently it had a get itemuid but we re not allowed to call it return null catch invocation target exception tie log error getuuid for obj get class threw tie return null catch security exception se apparently it had a get itemuid but we re not allowed to call it return null catch invocation target exception tie log error get itemuid for obj get class threw tie return null catch illegal access exception iace apparently it had a get itemuid but we re not allowed to call it return null catch illegal argument exception iare log error get itemuid for obj get class takes strange parameter iare return null catch exception in initializer error eiie log error get itemuid for obj get class exception eiie return null if rv null return null if rv instanceof itemuid log error get itemuid for obj get class returns strange value rv get class return null return rv to string getitemuid readobjectid getfacade isaumlelement getfacade iitemuid itemuid iitemuid getitemuid itemuid itemuid tostring getitemuid iitemuid getclass getmethod getitemuid nosuchmethodexception getitemuid commentedge commentedge iitemuid getclass getmethod nosuchmethodexception illegalargumentexception getclass illegalaccessexception getitemuid invocationtargetexception getclass securityexception getitemuid invocationtargetexception getitemuid getclass illegalaccessexception getitemuid illegalargumentexception getitemuid getclass exceptionininitializererror getitemuid getclass getitemuid getclass getclass tostring tries to create a new id for the object it uses the reflective properties of java to access a method named set itemuid itemuid if that method exist and doesn t throw when called then the call is assumed to have been successful and the object is responsible for remembering the id param obj the object to assign a new id return the new id of the object or null protected static string create objectid object obj if model get facade isauml element obj return null if obj instanceof i itemuid itemuid uid new itemuid i itemuid obj set itemuid uid return uid to string class params new class 1 object mparam params 0 myclass try todo we shouldn t need this reflection any more once we have convinced ourselves that everything with a set itemuid method is implementing i itemuid method m obj get class get method set itemuid params mparam new object 1 mparam 0 new itemuid m invoke obj mparam catch no such method exception nsme apparently this object had no set itemuid return null catch security exception se apparently it had a set itemuid but we re not allowed to call it return null catch invocation target exception tie log error set itemuid for obj get class threw tie return null catch illegal access exception iace apparently it had a set itemuid but we re not allowed to call it return null catch illegal argument exception iare log error set itemuid for obj get class takes strange parameter iare return null catch exception in initializer error eiie log error set itemuid for obj get class threw eiie return null return mparam 0 to string setitemuid createobjectid getfacade isaumlelement iitemuid iitemuid setitemuid tostring setitemuid iitemuid getclass getmethod setitemuid nosuchmethodexception setitemuid securityexception setitemuid invocationtargetexception setitemuid getclass illegalaccessexception setitemuid illegalargumentexception setitemuid getclass exceptionininitializererror setitemuid getclass tostring see org argouml uml ui abstract action navigate navigate to java lang object protected object navigate to object elem return model get facade get namespace elem abstractactionnavigate navigateto navigateto getfacade getnamespace the constructor public action add client dependency action super set multi select true actionaddclientdependencyaction setmultiselect protected void do it collection selected set old set new hash set get selected for object client selected if old set contains client old set remove client to be able to remove dependencies later else model get core factory build dependency get target client collection to be deleted new array list collection dependencies model get facade get client dependencies get target for object dependency dependencies if old set contains all model get facade get suppliers dependency to be deleted add dependency project manager get manager get current project move to trash to be deleted doit oldset hashset getselected oldset oldset getcorefactory builddependency gettarget tobedeleted arraylist getfacade getclientdependencies gettarget oldset containsall getfacade getsuppliers tobedeleted projectmanager getmanager getcurrentproject movetotrash tobedeleted protected list get choices list ret new array list object model project manager get manager get current project get model if get target null ret add all model get model management helper get all model elements of kind model org omg uml foundation core model element ret remove get target return ret getchoices arraylist projectmanager getmanager getcurrentproject getmodel gettarget addall getmodelmanagementhelper getallmodelelementsofkind modelelement gettarget see org argouml uml ui abstract action add model element get dialog title protected string get dialog title return translator localize dialog title add client dependency abstractactionaddmodelelement getdialogtitle getdialogtitle protected list get selected list v new array list collection c model get facade get client dependencies get target for object cd c v add all model get facade get suppliers cd return v getselected arraylist getfacade getclientdependencies gettarget addall getfacade getsuppliers constructor for uml state internal transition public uml state internal transition super internal transition umlstateinternaltransition umlstateinternaltransition internaltransition see org argouml uml ui uml model element list model2 build model list protected void build model list set all elements model get facade get internal transitions get target umlmodelelementlistmodel2 buildmodellist buildmodellist setallelements getfacade getinternaltransitions gettarget see org argouml uml ui uml model element list model2 is valid element object protected boolean is valid element object element return model get facade get internal transitions get target contains element umlmodelelementlistmodel2 isvalidelement isvalidelement getfacade getinternaltransitions gettarget the constructor param c the container of uml user interface components param name the name of the property public uml expression model2 uml user interface container c string name container c property name name must refresh true umlexpressionmodel2 umluserinterfacecontainer propertyname mustrefresh when the target is changed we must refresh public void target changed must refresh true expression null targetchanged mustrefresh return the expression public abstract object get expression getexpression public abstract object get expression param expr the expression public abstract void set expression object expr getexpression setexpression public abstract void set expression object expr return a new expression public abstract object new expression setexpression newexpression return the language of the expression public string get language if must refresh expression get expression if expression null return emptystring return model get data types helper get language expression getlanguage mustrefresh getexpression getdatatypeshelper getlanguage return the body text of the expression public string get body if must refresh expression get expression if expression null return emptystring return model get data types helper get body expression getbody mustrefresh getexpression getdatatypeshelper getbody param lang the language of the expression public void set language string lang boolean must change true if expression null string old value model get data types helper get language expression if old value null old value equals lang must change false if must change string body emptystring if expression null model get data types helper get body expression null body model get data types helper get body expression set expression lang body setlanguage mustchange oldvalue getdatatypeshelper getlanguage oldvalue oldvalue mustchange mustchange getdatatypeshelper getbody getdatatypeshelper getbody setexpression param body the body text of the expression public void set body string body boolean must change true if expression null object old value model get data types helper get body expression if old value null old value equals body must change false if must change string lang null if expression null lang model get data types helper get language expression if lang null lang emptystring set expression lang body setbody mustchange oldvalue getdatatypeshelper getbody oldvalue oldvalue mustchange mustchange getdatatypeshelper getlanguage setexpression param lang the language of the expression param body the body text of the expression private void set expression string lang string body expressions are data types not independent model elements be careful not to reuse them if must refresh expression null expression new expression expression model get data types helper set language expression lang expression model get data types helper set body expression body set expression expression setexpression datatypes mustrefresh newexpression getdatatypeshelper setlanguage getdatatypeshelper setbody setexpression return the container protected uml user interface container get container return container umluserinterfacecontainer getcontainer todo the next text was copied to adapt sets the target if the old target is an uml element it also removes the model from the element listener list of the target if the new target is an uml element the model is added as element listener to the new target p this function is called when the user changes the target hence this shall not result in any uml model changes p this function looks a lot like the one in uml combo box model2 p as a possible future extension we could allow listening to other model elements param the new target the new target public void set target object the new target the new target the new target instanceof fig fig the new target get owner the new target if model get facade isauml element target model get pump remove model event listener this target property name allow listening to other elements remove other model event listeners list target if model get facade isauml element the new target target the new target model get pump add model event listener this target property name allow listening to other elements add other model event listeners list target if container instanceof tab target tab target container refresh else target null umlcomboboxmodel2 thenewtarget settarget thenewtarget thenewtarget thenewtarget thenewtarget getowner thenewtarget getfacade isaumlelement getpump removemodeleventlistener propertyname removeothermodeleventlisteners listtarget getfacade isaumlelement thenewtarget thenewtarget getpump addmodeleventlistener propertyname addothermodeleventlisteners listtarget tabtarget tabtarget public void property change property change event e if target null target e get source must refresh true expression null this works we do get an event and now refresh the ui if container instanceof tab target swing utilities invoke later new runnable public void run tab target container refresh todo the above statement also refreshes when we are not shown to be verified hence not entirely correct propertychange propertychangeevent getsource mustrefresh tabtarget swingutilities invokelater tabtarget swing utilities invoke later new runnable public void run tab target container refresh todo the above statement also refreshes when we are not shown to be verified hence not entirely correct swingutilities invokelater tabtarget public void target added target event e set target e get new target targetadded targetevent settarget getnewtarget public void target removed target event e set target e get new target targetremoved targetevent settarget getnewtarget public void target set target event e set target e get new target targetset targetevent settarget getnewtarget the constructor param message the message to show public profile exception string message super message profileexception the constructor param message the message to show param the cause the cause for the exception public profile exception string message throwable the cause super message the cause thecause profileexception thecause thecause the constructor param the cause the cause for the exception public profile exception throwable the cause super the cause thecause profileexception thecause thecause public object invoke feature map string object vt object subject string feature string type object parameters if type equals todo implement the difference between ocl is kind of and ocl is type of if feature to string trim equals ocl is kind of feature to string trim equals ocl is type of string type name ocl type parameters 0 get name if type name equals ocl any return true else return model get facade isa type name subject if feature to string trim equals ocl as type return subject if subject instanceof ocl type if feature to string trim equals name return ocl type subject get name if subject instanceof string if feature to string trim equals size return string subject length if feature to string trim equals concat return string subject concat string parameters 0 if feature to string trim equals to lower return string subject to lower case if feature to string trim equals to upper return string subject to upper case if feature to string trim equals substring return string subject substring integer parameters 0 integer parameters 1 return null invokefeature ocliskindof oclistypeof tostring ocliskindof tostring oclistypeof typename ocltype getname typename oclany getfacade typename tostring oclastype ocltype tostring ocltype getname tostring tostring tostring tolower tolowercase tostring toupper touppercase tostring public object get built in symbol string sym if sym equals ocl type return new ocl type ocl type todo implement ocl expression else if sym equals ocl expression return new ocl type ocl expression if sym equals ocl any return new ocl type ocl any return null getbuiltinsymbol ocltype ocltype ocltype oclexpression oclexpression ocltype oclexpression oclany ocltype oclany the constructor public sp fig edge model element super edge appearance init choices document bbox doc getb box field get document bbox doc add document listener this get line field add item listener this get line field set renderer new color renderer getb box label set label for getb box field add getb box label add getb box field get line label set label for get line field add get line label add get line field spfigedgemodelelement initchoices bboxdoc getbboxfield getdocument bboxdoc adddocumentlistener getlinefield additemlistener getlinefield setrenderer colorrenderer getbboxlabel setlabelfor getbboxfield getbboxlabel getbboxfield getlinelabel setlabelfor getlinefield getlinelabel getlinefield the constructor public sax parser base empty constructor saxparserbase accessors param s true if statistics have to be shown public void set stats boolean s stats s setstats public void set stats boolean s stats s return true if statistics have to be shown public boolean get stats return stats setstats getstats return the parsing time public long get parse time return parse time getparsetime parsetime param reader the reader to read throws sax exception when parsing xml public void parse reader reader throws sax exception parse new input source reader saxexception saxexception inputsource param input the input source to read throws sax exception when parsing xml public void parse input source input throws sax exception long start end sax parser factory factory sax parser factory new instance factory set namespace aware false factory set validating false try sax parser parser factory newsax parser if we weren t given a system id attempt to use the url for the jar that we were loaded from why tfm if input get system id null input set system id get jar resource org argouml kernel project start system current time millis parser parse input this end system current time millis parse time end start catch io exception e throw new sax exception e catch parser configuration exception e throw new sax exception e if stats log is info enabled log info elapsed time end start ms inputsource saxexception inputsource saxexception saxparserfactory saxparserfactory newinstance setnamespaceaware setvalidating saxparser newsaxparser getsystemid setsystemid getjarresource currenttimemillis currenttimemillis parsetime ioexception saxexception parserconfigurationexception saxexception isinfoenabled implement in the concrete class to handle reaching the start tag of an element of interest param e the element throws sax exception on any error parsing the element protected abstract void handle start element xml element e saxexception handlestartelement xmlelement throws sax exception implement in the concrete class to handle reaching the end tag of an element of interest param e the element throws sax exception on any error parsing the element protected abstract void handle end element xml element e saxexception saxexception handleendelement xmlelement public void start element string uri string localname string name attributes atts throws sax exception if is element of interest name xml element element create xml element name atts if log is debug enabled string buffer buf new string buffer buf append start append name append append element for int i 0 i atts get length i buf append att append atts get local name i append append atts get value i log debug buf to string elements n elements element handle start element element startelement saxexception iselementofinterest xmlelement createxmlelement isdebugenabled stringbuffer stringbuffer getlength getlocalname getvalue tostring nelements handlestartelement factory method to return an xml element this will reuse previously created elements when possible param name the element name param atts the element attributes return the element private xml element create xml element string name attributes atts if n free elements 0 return new xml element name atts xml element e free elements n free elements e set name name e set attributes atts e reset text return e xmlelement xmlelement createxmlelement nfreeelements xmlelement xmlelement freeelements nfreeelements setname setattributes resettext public void end element string uri string localname string name throws sax exception if is element of interest name xml element e elements n elements if log is debug enabled string buffer buf new string buffer buf append end e get name e get text e n for int i 0 i e get num attributes i buf append att e get attribute name i e get attribute value i n log debug buf handle end element e endelement saxexception iselementofinterest xmlelement nelements isdebugenabled stringbuffer stringbuffer getname gettext getnumattributes getattributename getattributevalue handleendelement determine if an element of the given name is of interest to the parser the base implementation assumes always true param name the element name return true if the element name is of interest protected boolean is element of interest string name return true iselementofinterest public void characters char ch int start int length throws sax exception elements n elements 1 add text ch start length todo remove this old implementation after 0 22 if it s demonstrated that it s not needed tfm why does the text get added to all the elements on the stack tfm for int i 0 i n elements i xml element e elements i if e length 0 this seems wrong since this method can be called multiple times at the parser s discretion tfm e add text returnstring e add text ch start length saxexception nelements addtext nelements xmlelement addtext addtext public input source resolve entity string public id string system id throws sax exception try url test it new url system id input source s new input source test it open stream return s catch exception e log info note could not open dtd system id due to exception string dtd name system id substring system id last index of 1 string dtd path org argouml persistence dtd name input stream is sax parser base class get resource as stream dtd path if is null try is new file input stream dtd path substring 1 catch exception ex throw new sax exception e return new input source is inputsource resolveentity publicid systemid saxexception testit systemid inputsource inputsource testit openstream systemid dtdname systemid systemid lastindexof dtdpath dtdname inputstream saxparserbase getresourceasstream dtdpath fileinputstream dtdpath saxexception inputsource param cls the class return the jar public string get jar resource string cls e g org argouml uml generator ui class generation dialog poseidon jar string jar file string file sep system get property file separator string class file cls replace file sep char at 0 class class loader this class loader this get class get class loader url url this class loader get resource class file if url null string url string url get file int id begin url string index of file int id end url string index of if id begin 1 id end 1 id end id begin jar file url string substring id begin 5 id end return jar file getjarresource classgenerationdialog jarfile filesep getproperty classfile filesep charat classloader thisclassloader getclass getclassloader thisclassloader getresource classfile urlstring getfile idbegin urlstring indexof idend urlstring indexof idbegin idend idend idbegin jarfile urlstring idbegin idend jarfile param e the element public void ignore element xml element e if log is debug enabled log debug note ignoring tag e get name ignoreelement xmlelement isdebugenabled getname param e the element public void not implemented xml element e if log is debug enabled log debug note element not implemented e get name notimplemented xmlelement isdebugenabled getname evaluate the predicate for the given object and return true or false param object object to be tested return boolean indicating whether predicate evaluated true or false get an iterator which iterates through the children of the given object param parent the parent of the children to be iterated through return an iterator for the children of the given parent set the item uid param i the new id public void set itemuid itemuid i return the item uid public itemuid get itemuid setitemuid getitemuid returns the namespace which is common to both namespaces e g code org argouml model code and code org argouml util code have code org argouml code in common param namespace a namespace return the common or empty namespace returns the base of a namespace e g the base of code org argouml util code is code org argouml code return base namespace add another element to a namespace param element the element to add reduces the innermost namespace element e g code org argouml model code will return code model code and change the namespace to code org argouml code return the popped element return the innermost namespace element without removing it return the innermost namespace element namespaces usually have a scope operator when used in representational form see also the predifined constants param token the token to use from now on return an iterator to the namespace elements return an iterator of namespace elements namespaceelements check if the namespace is empty return true if empty return a string representation of the namespace with the given token the existence of the method implies that classes also must implement to string in a reasonable manner using the default token param token the token to be converted return a string representation of the namespace tostring public interface namespace element return the wrapped namespace element object get namespace element namespaceelement namespaceelement getnamespaceelement public interface source path controller from a model element retrieve its source path or null if it does not have a direct one if that happens you must use recursively its parent or the parent s parent param model element model element return the file reference that represents the source file sourcepathcontroller modelelement provide the complete list of existing source path settings for a model on request return the source path settings table see source path table model sourcepathtablemodel set the source path for a specific model element package or classifier based on a given file object param model element the model element param source path its source path modelelement sourcepath set the source path of the model from the specified settings param src paths the source path settings to be set in the model note these are used in a resetting way use the object retrieved with see get source path settings srcpaths getsourcepathsettings delete the source path settings of the model element param model element the model element for which the source path settings are going to be removed modelelement retrieve a collection of all model elements that have source path settings return the collection public interface uml user interface component this method is called when the target of a uml user interface container has been changed umluserinterfacecomponent umluserinterfacecontainer this method is called when the navigation history has been changed and navigation buttons may need to be updated target changed implies navigation history changed so this method will not be called after a target change targetchanged navigationhistorychanged targetchange this method shall test the type of the given object and if recognised create a new instance of a prop panel p if the object type is not something this factory knows how to deal with then null shall be returned do not throw an exception p if the given object falls within a class of objects that this factory is the exclusive factory for then it is allowed to throw an exception if the object is invalid unknown however be careful not to break the possibility to extend argouml param object the object to create a new prop panel for return the new proppanel or null proppanel proppanel public interface uml user interface container return the current target for the container may be null public object get target umluserinterfacecontainer gettarget return the current target for the container if the target is a model element otherwise null modelelement return the current profile p note an incompatible change was made to this api for 0 25 4 the return type was changed from profile to profile configuration return the current profile may not be null profileconfiguration formats the specified model element typically deferred to the profile param element the given model element return the formatted string modelelement formats a collection of model elements typically deferred to the profile param iter an iterator into the collection of modelelements return the formatted string formats the model element as a namespace param ns the namespace return the formatted string return the level of import detail requested by the user one of detail classifier detail classifier feature or detail full detail_classifier detail_classifier_feature detail_full return string representing the character encoding of the input source files provides an array of suffix filters for the module return suffix filter suffixes for processing suffixfilter tells if the object is parseable or not it s is up to the module to decide whether it does something simple like verify that the file has the correct extension or something more complicated param file object to be tested return true if parseable false if not parse a collection of source files the collection includes the full set of files selected by the user p if the import module needs multiple parsing passes to resolve identifiers or for other reasons it needs to implement that internally in previous versions of argouml the multipass behavior was implemented both in the calling code and in some import modules it is now solely the responsibility of the module param p the current project param files collection of files to be parsed param settings use this object to get common settings param monitor progress monitor which will be updated as files are parsed and checked for user requests to cancel it is mandatory for the module to both update progress and check for cancel requests return a collection of model elements parsed from the given files throws import exception if an error occurs this will contain the nested exception that was originally thrown collection parse files project p final collection file files import settings settings progress monitor monitor progressmonitor importexception parsefiles importsettings progressmonitor returns a list with objects that represent settings for this import these objects implement the settings types interfaces p the caller must determine what interface an object is implementing iterating the interfaces settings types p this is done this way to eliminate the need to use gui elements the settings can easily be mapped into any gui elements this way we are independent from the type of gui return the list of settings that are required by this particular import settingstypes settingstypes construct an import exception with a wrapped throwable param message message indicating error that occurred param cause the wrapped exception public import exception string message throwable cause super import exception message cause importexception importexception public import exception string message super message importexception public import exception throwable cause super import exception cause importexception return true if the directory tree should be descended recursively importing all parseable files return true if user as requested that only sources files which have been changed since the last import should be imported this time if false all files should be imported regardless of their modification date return true if the user has requested automatic layout for figures placed on diagrams return true if the user has request diagrams to be created for packages contained in the imported source code return true if user has requested that new figures placed in diagrams should be minimized so they don t show internal compartments interface setting returns the string to use as a label for the associated setting or setting group the implementor is responsible for translation into the local language return the string message returns a string with an extended description of the setting suitable for use as a tooltip or help message return the description returns the available options from which the user can pick one return a list with strings that identifies the options this is the default selected option if the user doesn t choose other option then this will be the selected option return the 0 based index of the default option as is in the list returned by link settings types unique selection get options or undefined selection if there is no default option settingstypes uniqueselection getoptions undefined_selection this is how the user can choose an option param selection the 0 based index of the default option as is in the list returned by link settings types unique selection get options return true if was successful or false if the selection is out of bounds settingstypes uniqueselection getoptions boolean set selection int selection return the current selection int get selection setselection getselection interface user string extends setting return the initial string to display if any may be null string get default string userstring getdefaultstring string get default string return the user entered string string get user string getdefaultstring getuserstring set user string to new value param user string new user string userstring interface boolean selection extends setting return the default setting to use when first displayed boolean get default value booleanselection getdefaultvalue boolean get default value return the user selected value boolean is selected getdefaultvalue isselected set the selection value param selected boolean indicating new state of selection interface path selection extends setting2 return the default path to use when first displayed string get default path pathselection getdefaultpath string get default path return the user selected path string get path getdefaultpath getpath set the path to the given value param path new value of the path interface path list selection extends setting2 return the default list of paths to use when first displayed list string get default path list pathlistselection getdefaultpathlist list string get default path list return the user selected ordered list of file system paths list string get path list getdefaultpathlist getpathlist set the path list to the new values param path list new list of paths pathlist public interface method import interface public void begin method imports methodimportinterface beginmethodimports public void begin method imports public void end method imports beginmethodimports endmethodimports generate code for the specified classifiers if generation of dependencies is requested then every file the specified elements depends on is generated too e g if the class my class has an attribute of type other class then files for other class are generated too param elements the uml model elements to generate code for param deps recursively generate dependency files too return a collection of link source unit objects the collection may be empty if no file is generated myclass otherclass otherclass sourceunit generate files for the specified classifiers see generate collection boolean param elements the uml model elements to generate code for param path the source base path param deps recursively generate dependency files too return the filenames with relative path as a collection of strings the collection may be empty if no file will be generated collection string generate files collection elements string path generatefiles returns a list of files that will be generated from the specified modelelements see generate collection boolean param elements the uml model elements to generate code for param deps recursively generate dependency files too return the filenames with relative path as a collection of strings the collection may be empty if no file will be generated public interface stereotype styled return the rendering style for stereotypes public abstract stereotype style get stereotype style stereotypestyled stereotypestyle getstereotypestyle set the stereotype style to be used for rendering this fig param style the stereotype style to be set set the owning project for this fig this is an optional operation which may throw an link unsupported operation exception if not implemented param project the project deprecated for 0 27 2 by tfmorris this optional method has never been implemented by any concrete class that implements this interface and should not be used project ownership is maintained at a coarser granularity level deprecated unsupportedoperationexception get the owning project for this fig return the owning project deprecated for 0 27 2 by tfmorris implementations should have all the information that they require in the diagram settings object deprecated diagramsettings rerender the entire fig p this may be an expensive operation for subclasses which are complex so should be used sparingly it is only intended to be used when some global change to the rendering defaults is made at the argo diagram level argodiagram public void rendering changed return the rendering settings for the fig public diagram settings get settings renderingchanged diagramsettings getsettings set the rendering settings to be used for this fig currently this normally will be a diagram wide or project wide settings object that is shared by all figs param settings the rendering settings to use setting the owner of the fig must be done in the constructor and not changed aftewards for all argouml figs param owner owning uml element see org tigris gef presentation fig set owner java lang object deprecated for 0 27 3 by tfmorris set owner in constructor deprecated setowner public interface enum literals compartment container determine if the enumeration literals compartment is visible return true if the enumeration literals compartment is visible enumliteralscompartmentcontainer enumerationliterals enumerationliterals set the visibility of the enumeration literals compartment param visible the new visibility status enumerationliterals void set enum literals visible boolean visible return the bounds of the enumeration literals compartment rectangle get enum literals bounds setenumliteralsvisible enumerationliterals getenumliteralsbounds public interface clarifiable void paint clarifiers graphics g paintclarifiers public interface layouted edge extends layouted object abstract method to layout the edge public void layout layoutededge layoutedobject operation get size returns the size of this node return the size of this node getsize operation get location returns the current location of this node return the location of this node getlocation operation set location sets a new location for this node param new location represents the new location for this node setlocation newlocation add an object to this container param obj represents the object to add to this container remove an object from this container param obj represents the object to be removed operation get content returns all the objects from this container return all the objects from this container getcontent resize this container so it fits the layouted objects within itself param new size represents the new size of this container newsize add another object to the diagram param obj represents the object to be part of the diagram remove a object from the diagram param obj represents the object to be removed operation get objects returns all the layouted objects from this diagram return an array with the layouted objects of this diagram getobjects operation get object returns one object from the diagram param index represents the index of this object return the object getobject layouted object get object int index this operation starts the actual layout process void layout layoutedobject getobject operation get minimum diagram size returns the minimum diagram size after the layout so the diagram could be resized to this size return the size dimension getminimumdiagramsize public interface path container determine if the path is visible return true if the path is visible pathcontainer set the visibility of the path param visible the new path status factory method to create a new instance of an argo diagram param owner the owning element this can be the owning namespace for a class diagram or an owning statemachine for a state diagram or any other interpretation that the diagram type wants to apply param name the name of the diagram this may be null if the caller would like the factory to provide a default name param settings default rendering settings for the diagram return the newly instantiated diagram public argo diagram create diagram final object owner final string name argodiagram argodiagram creatediagram set the rendering settings for this diagram param settings the new diagram settings public void set diagram settings diagram settings settings return the current diagram settings object public diagram settings get diagram settings setdiagramsettings diagramsettings diagramsettings diagramsettings getdiagramsettings see org tigris gef base diagram set name java lang string public void set name string n throws property veto exception setname setname propertyvetoexception public void set name string n throws property veto exception param i the new id public void set itemuid itemuid i setname propertyvetoexception setitemuid used by pgml tee return the item uid todo the reference to the method org argouml uml ui vetoable property change get veto message string was here but the class does exist anymore where is it this method is never used param property name is the name of the property return a message or null if not applicable vetoablepropertychange getvetomessage propertyname finds the presentation the fig for some object if the object is a modelelement that is contained in some other modelelement that has its own fig that fig is returned it extends presentation for that only gets the fig belonging to the node obj p author jaap branderhorst xs4all nl return the fig for the object param obj is th object presentationfor this will mark the entire visible area of all editors to be repaired from any damage i e repainted get all the model elements in this diagram that are represented by a fig edge see org tigris gef base diagram get edges figedge getedges get all the model elements in this diagram that are represented by a fig node see org tigris gef base diagram get nodes fignode getnodes we hang our heads in shame there are still bugs in argouml and or gef that cause corruptions in the model before a save takes place we repair the model in order to be as certain as possible that the saved file will reload todo split into small inner classes for each fix return a text that explains what is repaired find all the figs that visualise the given model element in this layer or null if there is none todo once gef includes this same method in diagram then this can go see org tigris gef base diagram presentations for java lang object presentationsfor remove this diagram from existence todo move to gef keeps track of the project that contains this diagram the project determines many settings that reflect the way the diagram is painted such as font size param p the project that contains this diagram public void set project project p return the project which owns this diagram public project get project setproject getproject called when the user releases a dragged fig node param enclosed the enclosed fig node that was dragged into the encloser param old encloser the previous encloser param new encloser the fig node that encloses the dragged fig node public void encloser changed fig node enclosed fig node old encloser fignode fignode oldencloser newencloser fignode fignode encloserchanged fignode fignode oldencloser this method shall return any uml modelelements that should be deleted when the diagram gets deleted or null if there are none the default implementation returns null e g a statechart diagram should return its statemachine author mvw tigris org return the dependent element in the general case there aren t so null todo mvw i am not completely sure of the following p the namespace of the diagram is e g used when creating new elements that are shown on the diagram they will have their namespace set according this it is not necessarily equal to the owner return the namespace for the diagram sets the namespace of the diagram and adds the diagram as a listener of its namespace in the uml model so that it can delete itself when the model element is deleted param ns the namespace for the diagram set the namespace of a model element to the owner of the given namespace if the namespace is null the namespace of the diagram is used instead if the model element is not valid in the given namespace this method takes no action param model element the model element param ns the namespace modelelement modelelement this diagram listens to events from its namespace model element when the modelelement is removed we also want to delete this diagram p there is also a risk that if this diagram was the one shown in the diagram panel then it will remain after it has been deleted so we need to deselect this diagram there are other things to take care of so all this is delegated to link org argouml kernel project move to trash object param evt a property change event object describing the event source and the property that has changed see property change listener property change property change event modelelement movetotrash propertychangeevent propertychangelistener propertychange propertychangeevent the owner of a diagram is the modelelement that is saved with the project in the pgml file and binds it to the model p this value is shown in the diagram s properties panel as the home model return the home model public object get owner return an iterator which iterates over all figs in diagram public iterator fig get fig iterator getowner getfigiterator param listener see org tigris gef base diagram add vetoable change listener vetoable change listener addvetoablechangelistener vetoablechangelistener param listener see org tigris gef base diagram remove vetoable change listener vetoable change listener removevetoablechangelistener vetoablechangelistener param property param listener see org tigris gef base diagram add property change listener string property change listener public void add property change listener string property addpropertychangelistener propertychangelistener addpropertychangelistener param property param listener see org tigris gef base diagram remove property change listener string property change listener public void remove property change listener string property removepropertychangelistener propertychangelistener removepropertychangelistener return the gef graphmodel for this diagram see org tigris gef base diagram get graph model getgraphmodel return the gef layer perspective of this diagram see org tigris gef base diagram get layer layerperspective getlayer param figures list of figures to check for in diagram return count of figures contained in this diagram see org tigris gef base diagram count contained list countcontained param o the object which owns the fig return the corresponding fig see org tigris gef base diagram presentation for object presentationfor param f fig to be added see org tigris gef base diagram add fig used by argo tee return the name of the diagram see org tigris gef base diagram get name getname perform any pre save actions see org tigris gef base diagram pre save presave perform any post save actions see org tigris gef base diagram post save postsave perform any post load actions see org tigris gef base diagram post load postload factory method to create a new instance of an argo diagram param namespace the namespace that in directly owns the elements on the diagram param machine the state machine for the diagram only statemachine activitygraph return the newly instantiated diagram deprecated for 0 27 3 by tfmorris use link diagram factory interface2 create diagram object object diagram settings deprecated argodiagram statemachine diagramfactoryinterface2 creatediagram diagramsettings public interface attributes compartment container determine if the attributes compartment is visible return true if the attributes compartment is visible attributescompartmentcontainer set the visibility of the attributes compartment param visible the new visibility status return the bounds of the operations compartment rectangle get attributes bounds getattributesbounds public interface operations compartment container determine if the operations compartment is visible return true if the operations compartment is visible operationscompartmentcontainer set the visibility of the operations compartment param visible the new visibility status void set operations visible boolean visible return the bounds of the operations compartment rectangle get operations bounds setoperationsvisible getoperationsbounds public interface stereotype container determine if the stereotype is visible return true if the stereotype is visible stereotypecontainer set the visibility of the stereotype param visible the new visibility status this function should return true if it is allowed to relocate this type of diagram to the given modelelement param base the given modelelement return true if adding a diagram here is allowed relocate this diagram e g for a class diagram assign it a new namespace e g for a statechart move it together with the statemachine to a new operation classifier p precondition is relocation allowed base is true param base the new location i e base modelelement return true if successful isrelocationallowed create a collection of candidate modelelements to relocate this diagram to all candidates belong to a given namespace e g the root model param root all returned candidates are contained in this namespace return the collection of candidate modelelements to which this diagram may be relocated suppress warnings unchecked suppresswarnings public interface visibility container determine if the visibility is visible return true if the visibility is visible visibilitycontainer set the visibility of the visibility param visible the new visibility status determine if the operations compartment is visible return true if the operations compartment is visible set the visibility of the operations compartment param visible the new visibility status fired when a total new set of targets is set param e the targetevent name will be target set target_set fired when a target is removed from the list of targets param e the targetevent name will be target removed target_removed fired when a target is added to the list of targets param e the targetevent name will be target added target_added returns the swing model that implements targetlistener return the swing model public interface perspective rule return the name of the rule like from to string get rule name perspectiverule getrulename gets a collection of child objects for the given parent object in the uml model which creates the tree structure param parent the given parent return the children gets a collection of objects for any parent object in the uml model for which the tree structure must be recreated when they are changed param parent the parent return the dependent objects public interface perspective manager listener param perspective the perspective to be added void add perspective object perspective perspectivemanagerlistener addperspective void add perspective object perspective param perspective the perspective to be removed void remove perspective object perspective addperspective removeperspective this method is called by explorer tree model to check if this weak explorer node subsumes another weak explorer node ie if this node should be preserved rather than adding the other node p this relation should be reflexive so that if code a code is a weak explorer node then code a subsumes a true code p this relation should be symmetric so that if a and b are weak explorer nodes and code a subsumes b true code then code b subsumes a true code p this relation should be transitive so that if a b and c are weak explorer nodes code a subsumes b true code and code b subsumes c true code then code a subsumes c true code p note while this means that only other weak explorer nodes can be subsumed the argument is still of object type this is just since there is no particular point in getting a weak explorer node reference you would either have to down cast it further or wouldn t use it more than as an object pointer param obj another weak explorer node return true if this node subsumes obj otherwise false explorertreemodel weakexplorernode weakexplorernode weakexplorernode weakexplorernodes weakexplorernodes weakexplorernodes weakexplorernode weakexplorernode public interface tree modeluml event listener param element the modelelement that is changed void model element changed object element treemodelumleventlistener modelelementchanged void model element changed object element param element the modelelement that is added void model element added object element modelelementchanged modelelementadded void model element added object element param element the modelelement that is removed void model element removed object element modelelementadded modelelementremoved the structure of the model is changed in an undefined way and needs to be rebuilt from scratch called when a shortcut changed event is fired param event the shortcut changed event fired shortcutchangedevent shortcutchangedevent set the target param target the new target to set public interface clarifier extends icon param f the fig on which the clarifier is to be painted public void set fig fig f setfig public void set fig fig f param i the todo item that is visualised by this clarifier public void set to do item to do item i setfig settodoitem todoitem reply true if the given point is inside the given fig param x the x of the given point param y the y of the given point return true if hit set the target param target the new target to set get the current target return the target public object get target refresh the tab in total public void refresh gettarget return true whether the tab should be enabled with the given target param target the given target return true if the tab should be enabled informs the progress tool that the total progress was updated param progress the amount of progress done so far this is the whole progress until now not just the subtask s progress or the main task s progress updates the subtask that is in progress param name the name of the subtask updates the major task that is going on param name the new task determines if the user wants to cancel the current action if this happens the current action should be stopped p so in a long running action you should query this periodicaly to see if the user still wants to continue or he canceled the action p note it appears to be some kind of java tradition to misspell the name of this method so we follow the swing and eclipse tradition of spelling it with a single l return true if the user cancelled the action and false otherwise determines the maximum amount of progress that can be reached this should be set before the progress is updated param max the maximum progress value or 1 if the value is unknown this method notifies the gui that the working thread determines that there are no actions that could be done for various reasons the gui should notify the user too if something happens the user should be notified param title a title for the error information etc param introduction a short message that will continue with the message param message the actual message with all the details indicate that the operation is complete this happens automatically when the value set by set progress is max but it may be called earlier if the operation ends early setprogress public interface progress listener extends event listener called when a progress event is fired param event the progress event throws interrupted exception if thread is interrupted progresslistener eventlistener progressevent progressevent interruptedexception counts the number of repetitions of e in this bag if e is not present return 0 param element the element return the number of occurrences of e in this bag public interface ocl expression evaluator interprets the given ocl expression under the given variable table and model interpreter param vt variable table param mi model interpreter param ocl ocl expression return the return value throws invalid ocl exception if the ocl expression is not valid object evaluate map string object vt model interpreter mi string ocl oclexpressionevaluator invalidoclexception modelinterpreter actually interprets the feature and operations in the model param vt the variable table param subject the subject the object from which the feature is accessed param feature the feature name operation attribute or collection operation param type the type of feature for operations and attributes and for collection operations param parameters the parameters for this invokation return the return value object invoke feature map string object vt object subject invokefeature looks for a built in symbol in the case that not all possible built in symbols are not in the variable table the remaining ones should be resolved using this method this should be the case e g for the names of the uml metaclasses param sym the symbol name return the symbol value or null if the passed symbol is not built in public interface lambda evaluator evaluates the given ocl expression param vt variable table param exp expression return the return value lambdaevaluator load a model from the specified path param reference the reference to the profile file which contains the path where the profile file can be found return the set of defined packages throws profile exception if the profile could not be loaded for some reason profileexception public interface default type strategy return the default type used in new attributes public object get default attribute type defaulttypestrategy getdefaultattributetype public object get default attribute type return the default type used in new parameters public object get default parameter type getdefaultattributetype getdefaultparametertype public object get default parameter type return the default type used in new operations public object get default return type getdefaultparametertype getdefaultreturntype produce a string that represents the specific model element in the context of the specified namespace param element element to represent param namespace context namespace may be null return a string representing the model element produce a string the represents the collection of model elements in the context of the specified namespace param iter iterator over collection param namespace context namespace may be null return a string representing the collection returns the image of the icon that should replace the model elements having this stereotype param stereotype the stereotype model element return the icon or code null code if the stereotype has no icon register a new profile param profile a profile to be registered so that it is available to the users remove a profile from the list of registered profiles only user defined profiles can be removed param profile the profile to unregister it will no longer be available for selection by users void remove profile profile profile return the list of registered profiles list profile get registered profiles removeprofile getregisteredprofiles search for a profile with the given java classname return the profile instance for the class or null if there is none param class name the name of the java class to search for classname profile get profile for class string class name return the default list of profiles list profile get default profiles getprofileforclass classname getdefaultprofiles add a profile to the default list param profile profile to be added to the default application profiles new models will reference it by default remove a profile from the default list param profile the profile to be removed add a new directory to the directory list param path a directory name where the manager will try to look for user defined profiles as xmi files remove a directory from the directory list param path the directory path to be removed void remove search path directory string path return the current directory list list string get search path directories removesearchpathdirectory getsearchpathdirectories look for xmi files at the current directory list and registers them as user defined profiles return the profile for uml i e the base uml profile as defined by the standard looks for registered profile param profile identifier return profile apply the given profile configuration to argouml param pc the profile configuration profileconfiguration param project the project to save param file the file to write throws save exception if anything goes wrong throws interrupted exception if the thread is interrupted void save project project file file throws save exception saveexception interruptedexception saveexception param file the file of the project to load return the project throws open exception when we fail to open from this url throws interrupted exception if the thread is interrupted openexception interruptedexception add any object interested in listening to persistence progress param listener the interested listener remove any object no longer interested in listening to persistence progress param listener the listener to remove interface xmi extension parser void parse string type string xml extension string xmiextensionparser xmlextensionstring returns the name of the language return the language name returns the version of the language if applicable otherwise code null code return the language version or code null code returns a textual title for the notation the name and version return a title for the language returns an icon for the notation or code null code if no icon is available return an link icon for the language or code null code returns the text string stored in the configuration for this notation this string is used to determine notation equality in link same notation as notation name p this should incorporate both the name and the version if one exists return the value for this notation to be stored in the configuration samenotationas notationname ease of use helper for usage in swing usually it is equal to code get configuration value code return a string representation of the notation name getconfigurationvalue ease of use helper to determine if this notation is the same as another this must be equivalent to code get configuration value equals nn get configuration value code param notation name to compare return boolean indicating equality or inequality getconfigurationvalue getconfigurationvalue notationname public interface details tab provider return the details tabs to be added public list abstract argoj panel get details tabs detailstabprovider abstractargojpanel getdetailstabs public interface module interface method to enable the module p if it cannot enable the module because some other module is not enabled it can return code false code in that case the module loader will defer this attempt until all other modules are loaded or until some more of argouml is loaded if at startup eventually it is only this and some other modules that is not loaded and they will then be listed as having problems return true if all went well moduleinterface method to disable the module p if we cannot disable the module because some other module relies on it we return false this will then make it impossible to turn off an error is signalled at the attempt return true if all went well the name of the module p this should be a short string for the purpose of having the gui that turns on and off the module look nice there is no whitespace in this string no spaces tabs or newlines p this name is also used as the key internally when modules checks for other modules if they are available return the name a string the info about the module p this returns texts with information about the module p the possible informations are retrieved by giving any of the arguments ul li link description li link author li link version li link downloadsite ul if a module does not provide a specific piece of information code null code can be returned hence the normal implementation should be pre public string get info int type switch type case description return this module does case author return annie coder default return null pre param type the type of information return the description a string getinfo get the project name this is just the name part of the full filename return the name of the project get the uri for this project return the uri set the uri for this project p don t use this directly use instead link org argouml persistence persistence manager set projecturi uri project p todo why isn t this deprecated or private if it is not to be used param the uri the uri to set persistencemanager setprojecturi theuri set the project file this only works if it is possible to convert the file to an uri param file file to set the project to used by argo tee return the search path todo unused param search path element the element to be added to the searchpath todo unused searchpathelement sets the searchpath param the searchpath the searchpath to set todo unused thesearchpath get all members of the project used by argo tee return all members add a member argo diagram a uml model or a project member todo list param m the member to be added argodiagram projectmembertodolist public void add member final object m param model a namespace public void add model final object model addmember addmodel get the author name used by argo tee return the author name set the author name param s the new author name get the author e mail address used by argo tee return the author e mail address set the author e mail address param s the new author e mail address get the version this is the argouml version that last saved this project this field is not editable by the user used by argo tee return the version set the new version this is the argouml version that last saved this project this field is not editable by the user param s the new version get the description this is the description of the project as entered by the user used by argo tee return the description set a new description this is the description of the project it is freely editable by the user param s the new description get the history file name not used used by argo tee return the history file set the history file name param s the new history file returns all models defined by the user i e this does not return any profile packages but all other top level packages usually models return a list of all user defined models returns all top level packages e g models including the profile packages p em warning em the models returned by this method are em not em ordered any code which makes the assumption that the user model is first or any other ordering assumption is broken p em note em since user defined models and profiles are handled quite differently you normally want to use link get user defined model list instead of this method return a collection containing all models getuserdefinedmodellist return the model p if there isn t exactly one model code null code is returned return the model deprecated for 0 25 4 by tfmorris use link get user defined model list or link get models deprecated getuserdefinedmodellist getmodels return the default type for an attribute return a classifier to use as the default type todo this belongs in project settings tfm projectsettings return the default type for a parameter return a classifier to use as the default type todo this belongs in project settings tfm projectsettings return the default type for the return parameter of a method return a classifier to use as the default type todo this belongs in project settings tfm projectsettings searches for a type classifier with name s if the type is not found a new type is created and added to the current namespace p todo move to model subsystem tfm 20070307 param s the name of the type classifier to be found return classifier searches for a type classifier with name s if define new is true a new type is defined if the type classifier is not found the newly created type is added to the current namespace and given the name s p todo move to model subsystem tfm 20070307 param s the name of the type classifier to be found param define new if true define a new one return classifier the found classifier definenew currentnamespace definenew finds all figs on the diagrams for some project member including the figs containing the member so for some operation the containing figclass is returned param member the member we are looking for this can be a model element object but also another object return collection the collection with the figs returns a list with all figs for some uml object on all diagrams param obj the given uml object return list the list of figs finds a classifier with a certain name p will only return first classifier with the matching name todo move to model subsystem tfm 20070307 param s is short name param ns namespace where we do the search return the found classifier or code null code if not found param m the namespace deprecated for 0 27 2 by tfmorris since we can now have multiple top level packages in the project there is no concept of a single current namespace to add a new top level package use link get roots add object deprecated getroots return the namespace deprecated for 0 27 2 by tfmorris since we can now have multiple top level packages in the project there is no concept of a single current namespace callers should use link get roots and be prepared to handle multiple roots deprecated getroots return the diagrams public list argo diagram get diagram list argodiagram getdiagramlist get the number of diagrams in this project used by argo2 tee return the number of diagrams in this project finds a diagram with a specific name or uid return the diagram object if found otherwise null param name is the name to search for public argo diagram get diagram string name param d the diagram to be added public void add diagram final argo diagram d argodiagram getdiagram adddiagram argodiagram param me the given modelelement return the total number of presentation for the given modelelement in the project public int get presentation count for object me return an initial target in casu a diagram or a model public object get initial target getpresentationcountfor getinitialtarget return the vetoable change support object see vetoable change support deprecated for 0 27 3 by tfmorris this appears to be unused anywhere in argouml speak up now if you need it deprecated vetoablechangesupport vetoablechangesupport public vetoable change support get veto support this is executed before a save public void pre save vetoablechangesupport getvetosupport presave public void pre save this is executed after a save public void post save presave postsave public void post save this is executed after a load public void post load postsave postload moves some object to trash i e deletes it completely with all dependent structures p deleting an object involves pre removing target history deleting all fig representations for the object deleting the uml element deleting all dependent uml modelelements deleting comment edges which are not uml elements move to trash for enclosed objects i e graphically drawn on top of move to trash subdiagrams for the object saveguard that there is always at least 1 diagram left if the current diagram has been deleted select a new one to show trigger the explorer when a diagram is deleted set the needs save dirty flag of the projectmanager pre param obj the object to be deleted see org argouml kernel project impl trash internal object p todo this should just be named delete or something which better tells what it does since there really isn t a trash can commentedges needssave projectimpl trashinternal param obj the object return true if the object is trashed deprecated for 0 27 3 by tfmorris not actually implemented the future undo facility is a better way to handle this deprecated find a type by name in the default model p em note em the behavior of this method changed after version 0 24 earlier versions copied the type from the profile or default model into the user model the type is now returned directly and hre fs are used to link to it when the model is written out param name the name return the type hrefs returns the root package return the package which is the root deprecated for 0 25 4 by tfmorris use link get roots to packages model elements which are at the top level p todo we probably need a get default namespace method or something similar to replace some uses of this deprecated getroots getdefaultnamespace sets the root package param root the root to set a uml package deprecated for 0 25 4 by tfmorris use link set roots deprecated setroots return a collection of top level model elements normally for argouml created models this will be a single package or model but other tools may allow more liberal structures return collection of top level model elements modelelements set the top level model elements for this project param elements collection of top level model elements modelelements modelelements returns true if the given name is a valid name for a diagram valid means that it does not occur as a name for a diagram yet param name the name to test return boolean true if there are no problems with this name false if it s not valid returns the uri return uri returns the uuid refs return hash map uuidrefs hashmap sets the uuid refs param uuid refs the uuid refs to set uuidrefs uuidrefs uuidrefs sets the vetoable change support object this will be returned by link get veto support but is otherwise unused p todo why is this here since it s never used tfm param the veto support the veto support to set see vetoable change support deprecated for 0 27 3 by tfmorris this appears to be unused anywhere in argouml speak up now if you need it deprecated vetoablechangesupport getvetosupport thevetosupport vetosupport vetoablechangesupport get the current viewed diagram p used by argo tee to save the name of this diagram so that the same diagram can be initially shown when reloading this project this probably needs to be converted to an ordered list of open diagram windows to support mdi return the current viewed diagram deprecated for 0 27 2 by tfmorris for all uses other than argo tee the active diagram is a concept associated with the current editing window not a project it can be retrieved from link org argouml uml diagram diagram utils get active diagram which will get the diagram for the window that last contained the mouse from gef alternatively to get the diagram from a fig use layer perspective get layer get diagram deprecated diagramutils getactivediagram layerperspective getlayer getdiagram param the diagram the argo diagram deprecated for 0 27 2 by tfmorris the active diagram is a concept associated with the current editing window not a project deprecated thediagram argodiagram param diagram name the name of the diagram to show by default after loading diagramname public void set saved diagram name string diagram name remove the project public void remove setsaveddiagramname diagramname used by argo tee return returns the persistence version persistenceversion public int get persistence version param pv the persistence version to set public void set persistence version int pv getpersistenceversion persistenceversion setpersistenceversion repair all parts of the project before a save takes place return a report of any fixes used by argo tee return the settings of this project public project settings get project settings return returns the profile configuration public profile configuration get profile configuration projectsettings getprojectsettings profileconfiguration getprofileconfiguration set the profile configuration param pc the profile configuration return the undo manager for this project undo is managed on a per project basis return the undo manager for this project undomanager undomanager public undo manager get undo manager return true if project has been modified since last save public boolean is dirty undomanager getundomanager isdirty set the dirty flag for the project this has no direct effect other than setting the flag param is dirty true if the project should be marked as dirty isdirty public interface delayedv change listener param pce the event public void delayed vetoable change property change event pce delayedvchangelistener delayedvetoablechange propertychangeevent in contrast to link get zip name returns the member s name without the prepended name of the project author steffen zschaler return the member s name without any prefix or suffix getzipname returns a unique member s name for storage in a zipfile the project s base name is prepended followed by an underscore return the name for zip file storage _ return a short string defining the member type usually equals the file extension string get type return the file extension string string get zip file extension gettype getzipfileextension repair any corruptions in the project member executed before a save in order to ensure persistence is robust return a text that explains what is repaired execute the command to redo an instruction return any result object created by the command public abstract object execute perform undo an an undoable command that is in an undoable state abstract void undo returns true if the command can be undone return true if the command is undoable returns true if the command can be redone once undone return true if the command is redoable adds a new command to the undo stack param command the command execute a command and add it to the undo stack param command the command return any resulting object the command creates set the maximum number of interactions the stack can hold param max the maximum chain count undo the top user interaction on the undo stack and move it to the redo stack redo the top user interaction on the redo stack and move it to the undo stack instructs the undo manager that a new user interaction is about to take place all commands received until the next call to start interaction will form a single undoable unit param label the label for this interaction to build the undo redo label undomanager startinteraction add a new property change listener for undo redo events allow a listener to detect when the undo or redo stack changes availability no guarantees are made about which thread the event will be delivered on so any specific thread requirements e g swing awt thread requirements must be dealt with by the link property change listener property change java beans property change event method param listener a property change listener public abstract void add property change listener propertychangelistener propertychangelistener propertychange propertychangeevent propertychangelistener addpropertychangelistener remove the given listener param listener a property change listener public abstract void remove property change listener propertychangelistener removepropertychangelistener return the actual key used to access the configuration return the key tells if this configuration key is the one changed in the code property change event code param pce property change event to check return true if the changed property is for the key propertychangeevent propertychangeevent returns the customized configuration for the user return a concrete class which extends configuration handler and can be used to access and manipulate the configuration configurationhandler notify this wizarditem that it has been changed reply true if the given item should be kept on the designer s to do list false if it is no longer valid param i the todo item param d the designer return true if thisitem is still valid todolist param d the decision return true if the decision is still supported return the list of supported decisions since 0 25 4 an incompatible change was made to the return type it used to return vector deprecation wasn t used since this is only used one place in argouml param g the goal return true if the goal is still supported return the list of supported goals since 0 25 4 an incompatible change was made to the return type it used to return vector deprecation wasn t used since this is only used one place in argouml param knowledge type the knowledge type return true if it is valid knowledgetype customize the description string just before it is displayed param desc the description param offs the offenders return the customized expanded string string expand string desc list set offs return the icon shown on the todo item to show the wizard s progress icon get clarifier listset getclarifier criticism control temporarily disable this poster void snooze unsnooze this poster it may resume posting without further delay todo not implemented yet if the given to do item can be fixed automatically and the user wants that to happen then do it obviously this depends on the specific critic and problem by default this method does nothing param item the todo item param arg the design material todoitem param item the todo item return true if it can be fixed param c the critic param d the designer return true f the critic is relevant for the given designer set the highlighted state param highlighted true to highlight the fig void set highlight boolean highlighted return the current highlight state boolean get highlight sethighlight gethighlight public interface to do list listener extends java util event listener param tde the todo list event void to do list changed to do list event tde todolistlistener eventlistener todolistchanged todolistevent void to do list changed to do list event tde param tde the todo list event void to do items changed to do list event tde todolistchanged todolistevent todoitemschanged todolistevent void to do items changed to do list event tde param tde the todo list event void to do items added to do list event tde todoitemschanged todolistevent todoitemsadded todolistevent void to do items added to do list event tde param tde the todo list event void to do items removed to do list event tde todoitemsadded todolistevent todoitemsremoved todolistevent when a poster produces a to do item both the designer and the offending design material s are notified subclasses may for example visually change their appearance to indicate the presence of an error one paper called this clarifiers p param item the todo item todoitem designmaterial invoked when any aspect of the generator has been changed param e code argo generator event code describing the change argogeneratorevent invoked when a code generator has been added param e code argo generator event code describing the added notation codegenerator argogeneratorevent invoked when a code generator has been removed param e code argo generator event code describing the removed notation codegenerator argogeneratorevent invoked when there is a new status text to be shown that should replace any previous one param e code argo status event code describing the changed text argostatusevent invoked when a previously shown status text has to be removed param e code argo status event code describing the removed event argostatusevent a project has been saved param e code argo status event code with the name of the project that was saved argostatusevent a project has been loaded param e code argo status event code with the name of the project that was loaded argostatusevent a project has been modified param e code argo status event code with the name of the project that was modified ignored for current argouml implementation where there is only a single project open at a time argostatusevent invoked when there is a new help text to be shown that should replace any previous one param e code argo help event code describing the changed text argohelpevent invoked when a previously shown help text has to be removed param e code argo help event code describing the removed event argohelpevent invoked when any aspect of the notation has been changed param e code argo notation event code describing the change argonotationevent invoked when a notation has been added param e code argo notation event code describing the added notation argonotationevent invoked when a notation has been removed param e code argo notation event code describing the removed notation argonotationevent invoked when a notation provider has been added param e code argo notation event code describing the added notation provider argonotationevent invoked when a notation provider has been removed param e code argo notation event code describing the removed notation provider argonotationevent invoked when any aspect of the notation has been changed param e code argo notation event code describing the change argonotationevent public interface argo profile event listener extends argo event listener invoked when a profile has been added param e code argo profile event code describing the added notation argoprofileeventlistener argoeventlistener argoprofileevent invoked when a profile has been removed param e code argo profile event code describing the removed notation argoprofileevent argouml shall call this at initialisation time before the other operations in this interface are called p use it at will this method shall not return null return an ordered list of tab panels to be added to the settings dialog this method shall not return null return an ordered list of tab panels to be added to the project settings dialog this method shall not return null return an ordered list of tabs to be added to the details panel detailspanel public interface command line interface the method is called with the argument to this class from the command line or null if no argument param argument a string that is used to send arguments return true if the command was performed successfully commandlineinterface public interface gui settings tab interface save any fields changed void handle settings tab save guisettingstabinterface handlesettingstabsave void handle settings tab save cancel any changes void handle settings tab cancel handlesettingstabsave handlesettingstabcancel void handle settings tab cancel load or reload field settings void handle settings tab refresh handlesettingstabcancel handlesettingstabrefresh reset the settings shown to the same settings with a broader scope i e copy settings from wider scope to narrow scope p remark this shall only adapt the displayed value you need a save to make the actual change gets the unlocalized settings tab name return the unlocalized settings tab name gets the j panel which implements the tab return the j panel which implements the tab jpanel jpanel public interface predicate public boolean evaluate object object