input
stringlengths
10
828
output
stringlengths
5
107
public boolean get folded return is folded
get if ui is folded
public void position changed update projection
update observer of change in model
public double get projected x return projected x
get the projected x
public double get projected y return projected y
get the projected y
public void update projection double x model get x double y model get y double length math sqrt x x y y projection get focal depth projection get focal depth double scale projection get sphere radius length projected x scale x projected y scale y depth 1 scale projection get focal depth calculate faded color
project the model coordinates into the hyperbolic plane
public double get scale double size pos projection get focal depth depth projection get sphere radius double scale size pos size pos size pos return scale
calculated the scale to adjust canvas items projection
public boolean is nearest item double scr x double scr y return false
method called to find nearest node ui to mouse pointer
private void draw folded boolean folded state tree node node iterator tree node it node get children iterator while it has next tree node cur it next hyper node view hyper node view hypernodeviews get cur if hyper node view null hyper node view set visible folded state if hyper node view get folded this draw folded folded state cur
method to fold and unfold hyper node views
public void set highlight edge boolean state this highlight edge state
method called to set highlight flag
private void unfold nodes hyper node view hyper node view tree node node hyper node view get tree node tree node parent node get parent hyper node view cur hyper node hypernodeviews get parent if cur hyper node get visible unfold nodes cur hyper node if cur hyper node get folded draw folded true parent cur hyper node set folded false repaint
unfold nodes back to root node
public boolean get highlight edge return this highlight edge
get state of highlight edge flag
public double get view radius return view radius
return the node ui radius
private int get leaf node total tree node root int sum of leaf nodes 0 iterator tree node children iterator root get children iterator while children iterator has next tree node cur children iterator next int num ofchildren cur get children size if num ofchildren 0 sum of leaf nodes else sum of leaf nodes sum of leaf nodes get leaf node total cur return sum of leaf nodes
this method counts the number of leaves on a sub branch
public void clear for string property name node properties panels key set abstract properties panel prop panel node properties panels get property name prop panel clear
clear description value panel from any leftover properties left from previous example
private void create onto tree node tree node top tree edge edge onto tree node onto tree node new onto tree node top onto tree node set rel link edge get edge type onto hash put top onto tree node iterator tree node children top get children iterator while children has next tree node to model tree node children next tree edge cur edge top get edge to model tree node create onto tree node to model tree node cur edge
convert each node to onto tree node
public object get root ontorama model tree tree node root model node tree get root node return onto tree builder get tree node root model node
returns the root of the tree
public object get child object parent int index tree node parent node onto tree node parent onto tree node child node onto tree node parent node get child at index return child node
returns the child of parent at index index in the parents child array
public boolean is leaf object node onto tree node tree node onto tree node node return tree node is leaf
returns true if node is a leaf
public void value for path changed tree path path object new value get value if object in the tree path assuming that its still old value there this assumption may be wrong object old value path get last path component if old value equals new value post tree nodes changed event
messaged when the user has altered the value for the item
public int get index of child object parent object child return tree node parent get index tree node child
returns the index of child in parent
public void add tree model listener tree model listener l todo we should probably support the listeners
adds a listener for the tree model event posted after the tree changes
public void remove tree model listener tree model listener l todo we should probably support the listeners
removes a listener previously added with add tree model listener
public tree path get tree path onto tree node parent onto tree node this get parent stack onto tree node stack new stack onto tree node stack push this if this get parent null if this node is root don t need to build stack stack build path parent stack now reverse stack as it is backwards starting at node and finishing at root stack onto tree node reverse stack new stack onto tree node while stack is empty reverse stack push stack pop tree path path new tree path reverse stack to array return path
build tree path for this node path from root to the node
public void move canvas items double x double y iterator hyper node it this hypernodes values iterator while it has next hyper node hn it next hn move x y
move all the nodes by an offset x and y
public tree node get child at int child index list ontorama model tree tree node children tree node get children ontorama model tree tree node node children get child index tree node onto tree node onto tree builder get tree node node return onto tree node
returns the child tree node at index child index
public tree node get parent ontorama model tree tree node model node parent tree node get parent if model node parent null return onto tree builder get tree node model node parent return null
returns the parent tree node of the receiver
public int get index tree node node list ontorama model tree tree node children tree node get children iterator ontorama model tree tree node it children iterator int index 1 while it has next ontorama model tree tree node cur node it next tree node onto tree node onto tree builder get tree node cur node if onto tree node equals node index children index of cur node return index
returns the index of node in the receivers children
public boolean get allows children return allow children
returns true if the receiver allows children
public boolean is leaf list ontorama model tree tree node children list tree node get children if children list size 0 return true return false
returns true if the receiver is a leaf
protected icon get icon edge type edge type image icon node image icon boolean is clone image node image null if is clone node image make image for rel link edge type true node image icon else node image make image for rel link edge type false node image icon icon icon new image icon node image return icon
get icon for the given relation link
protected string get tool tip text object value edge type edge type string result onto tree node tree node onto tree node value if edge type null result result node tree node get model tree node get name else string edge type name edge type get name result result relation type edge type name return result
get tool tip text for given object and relation link
protected void reset canvas super clear canvas add layer sphere add layer edges add layer nodes add layer labels this hypernodes clear this hypernodeviews clear this focus node null this current highlighted view null simple hyper view label view null this canvas scale 1
method called when a new graph is loaded
private void highlight edge tree node node tree node parent node get parent if parent null return hyper node view hyper node view hypernodeviews get parent if hyper node view null hyper node view set highlight edge true this highlight edge parent
method called to highlight graph edges back to the root node
public void set graph graph graph graph graph nodes list graph get branch roots list remove all items add item default heading string set list size dependant properties sort list iterator node it nodes list iterator while it has next node cur node it next add item cur node
set new list of nodes
private void show detailed error msg component component throwable e string title string error msg throwable original e get cause if original null if e instanceof null pointer exception new error dialog component title null pointer exception else new error dialog component title error msg return object options ok details int n joption pane show option dialog component error msg title joption pane ok cancel option joption pane error message null options options 0 if n 1 error dialog show error component original title original get message
show an error dialog that gives the option to show a more detailed
private void build history menu create back and forward buttons history back menu item add back action history forward menu item add forward action set shortcut keys history back menu item set accelerator key stroke get key stroke key event vk left action event alt mask history forward menu item set accelerator key stroke get key stroke key event vk right action event alt mask set enabled disabled enable back forward buttons add separator
create history menu
public void update history query query jradio button menu item history item if history item find if query already exists query null set selected menu item history item history item set selected true else append history query enable back forward buttons
update history menu if given query is a query not stored in history
private jradio button menu item get selected history menu item for jradio button menu item cur menu item history mapping key set if cur is selected return cur return null
return currently selected menu item from history menu
public string get menu display name return menu display name
get this elements name
private void calculate depths hyper node top int depth top set depth depth iterator tree node it top get tree node get children iterator while it has next tree node child node it next hyper node child hyper node this hypernodes get child node child hyper node set depth depth 1 calculate depths child hyper node depth 1
calculate the depths of all children in respect to this node
private void add components to scroll panel jcomponent left comp jcomponent right comp split pane set left component left comp split pane set right component right comp split pane set one touch expandable true
add the scroll panes to a split pane
public data format mapping get data format mapping return this data format mapping
returns the data format mapping
private jmenu find examples sub menu string submenu name jmenu sub menu submenus mapping get submenu name if sub menu null sub menu make new examples sub menu submenu name return sub menu
find submenu for given name
public void set ldap login string ldap login this ldap login ldap login
set the login name into the ldap system
public void set main menu string main menu assert has text main menu main menu must be set parameters put main menu main menu
sets the main menu
public void set sub menu string sub menu if string utils has text sub menu parameters put sub menu sub menu else parameters remove sub menu
sets the sub menu
public void execute jobs if jira integration allowed jira soap client export inserted jira soap client export updated jira soap client export with issue updated jira soap client export deleted
executes the jobs defined by the
public void set jira worklog logic jira worklog logic jira worklog logic this jira worklog logic jira worklog logic
set the jira worklog logic manager
public void set jira master password string jira master password this jira master password jira master password
set the master password
public string login string username string password login request request new login request request set username username request set password password login response response try response login response web service marshal send and receive request catch soap fault client exception sf logger error sf get fault string or reason username username password password return null return response get token
log in into jira with the given username and password
public string logout string login token logout request request new logout request request set login token login token logout response response logout response web service marshal send and receive request return response get success
required logout from jira
public string add worklog and auto adjust remaining estimate string login token string issue jira remote worklog jira remote worklog worklog add request request new worklog add request request set login token login token request set jira issue issue request set jira remote worklog jira remote worklog try worklog add response response worklog add response web service marshal send and receive request return response get success catch soap fault client exception sf logger error sf get fault string or reason issue issue return null
adds a worklog to the given issue in jira
public string update worklog and auto adjust remaining estimate string login token jira remote worklog jira remote worklog worklog update request request new worklog update request request set login token login token request set jira remote worklog jira remote worklog try web service marshal send and receive request catch soap fault client exception e logger error e get fault string or reason worklog jira remote worklog return null return success
finds a worklog in jira and updates it by the given data
public boolean is on invoice if invoice null invoice get pk null return true return false
returns true if worklog is on some invoice
public boolean is editable according to invoice if is on invoice if invoice get state invoice state active return true return false return true
returns true if worklog is on active invoice
public string delete worklog and auto adjust remaining estimate string login token string worklog id delete worklog request request new delete worklog request request set login token login token request set issue id worklog id try web service marshal send and receive request catch soap fault client exception sf logger error sf get fault string or reason worklog id worklog id return null return success
deletes the given worklog from jira
public boolean issue exists string login token string issue get issue request req new get issue request req set token login token req set issue issue try web service marshal send and receive req catch soap fault client exception sf logger error sf get fault string or reason issue issue return false return true
checks if the issue exists in jira
public boolean is jira integration enabled return jira integration enabled
get the integration switch
public void set jira integration enabled boolean jira integration enabled this jira integration enabled jira integration enabled
set the integration switch
public long get activity id return activity id
returns mira activity pk mapped to this imported activity
public void set activity id long activity id this activity id activity id
sets mira activity pk mapped to this imported activity
public int prepare worklog items import data parser parser list project projects list activity activities throws ioexception buffered reader reader new buffered reader new input stream reader new byte array input stream import data import data encoding string line int parse errors 0 create a table of valid projects and activities final map string project project mapping create project mapping projects parser final map long activity activity mapping create activity mapping activities parser construct a list of worklog items parser init import data worklog items parser parse worklog items project mapping activity mapping return parser get parse errors
prepares worklog items according to the import data
private string remove quotes string str if str null return str string clean str trim if clean starts with clean clean substring 1 if clean ends with clean clean substring 0 clean length 1 return clean
removes quotes around worklog item description if there are any quotes
public void set activity logic activity logic activity logic this activity logic activity logic
sets activity logic
public void set project logic project logic project logic this project logic project logic
sets project logic
public void set worklog logic worklog logic worklog logic this worklog logic worklog logic
sets worklog logic
public void set import data byte import data this import data import data this fresh import data true
sets imported data
public boolean is fresh import data return fresh import data
flag indicating if the import data has not been parsed yet
private import data parser get parser worklog import form form final string encoding form get import data encoding if form get import type worklog import form import type type trackit return new tsv track it parser encoding else if form get import type worklog import form import type type outlook express return new outlook express parser encoding else throw new illegal argument exception unsupported import data type
returns a data parser according to the import type
public import type get import type return import type
returns a selected import type
private void load mapping from cookies http servlet request request worklog import form form cookie cookies request get cookies import data parser parser get parser form string project cookie name parser get project mapping cookie name string activity cookie name parser get activity mapping cookie name for int i 0 i cookies length i cookie cookie cookies i if cookie get name equals project cookie name form set project mapping from cookie cookie get value else if cookie get name equals activity cookie name form set activity mapping from cookie cookie get value
loads project and activity mappings from cookies
public void set import type import type import type this import type import type
sets selected import type
private void store mapping to cookies http servlet response response worklog import form form projects import data parser parser get parser form string project cookie name parser get project mapping cookie name if project cookie name null cookie cookie new cookie project cookie name form get project mapping cookie cookie set max age integer max value response add cookie cookie activities string activity cookie name parser get activity mapping cookie name if activity cookie name null cookie cookie new cookie activity cookie name form get activity mapping cookie cookie set max age integer max value response add cookie cookie
stores the last project and activity mapping into cookies
public void set worklog items list worklog worklog items this worklog items worklog items
sets a list of all worklog items
public void set confirmed items int confirmed items this confirmed items confirmed items
sets a list of indexes of confirmed worklog items
public string get project mapping cookie string buffer buf new string buffer for external project project external projects if project get project id equals long value of 1 l buf append project get id append mapping delimiter buf append project get project id append separating delimiter return buf to string
creates a cookie value for project mapping
public string get activity mapping cookie string buffer buf new string buffer for external activity activity external activities if activity get activity id equals long value of 1 l buf append activity get id append mapping delimiter buf append activity get activity id append separating delimiter return buf to string
creates a cookie value for activity mapping
public model and view worklog delete model model request context request context string worklog pk str request context get parameter worklog pk long worklog pk long convertor get long from string worklog pk str string view get success view if worklog pk null worklog logic remove worklog pk if request context get errors size 0 view get error view else request context add redirect ignore info new message worklog deleted request context convert messages to redirect ignoring else view get error view return create model and view model view
delete given worklog for user
public void set project mapping from cookie string value try string mappings string utils delimited list to string array value separating delimiter for int i 0 i mappings length 1 i string mapping string utils delimited list to string array mappings i mapping delimiter string id mapping 0 long project id long parse long mapping 1 for external project project external projects if project get id equals id project set project id project id catch exception e ignore cookie import logger warn error parsing project mapping cookie e
configures project mapping according to the cookie value
public model and view worklog view model model request context request context string worklog pk str request context get parameter worklog pk long worklog pk long convertor get long from string worklog pk str string view get success view if worklog pk null worklog worklog worklog logic get worklog pk model put worklog worklog else view get error view return create model and view model view
view given worklog
public void set activity mapping from cookie string value try string mappings string utils delimited list to string array value separating delimiter for int i 0 i mappings length 1 i string mapping string utils delimited list to string array mappings i mapping delimiter long id long parse long mapping 0 long activity id long parse long mapping 1 for external activity activity external activities if activity get id equals id activity set activity id activity id catch exception e ignore cookie import logger warn error parsing activity mapping cookie e
configures activity mapping according to the cookie value
public model and view invoice list model model request context request context filter filter get filter model long employee pk filter helper get field as long invoice filter invoice filter employee filter employee not set so show actualy logged user if employee pk null employee pk get security logic get logged employee get pk filter helper set field invoice filter invoice filter employee employee pk filter prepare employees model prepare invoice states model list invoice list invoice logic find by filter filter model set invoices list return create model and view model get success view
show invoice list
public void set name comparator comparator string name comparator this name comparator name comparator
sets the employee name comparator
public model and view schedule delete model model request context request context string schedule pk str request context get parameter schedule pk long schedule pk long convertor get long from string schedule pk str string view get success view if schedule pk null schedule logic remove schedule pk if request context get errors size 0 view get error view else request context add redirect ignore info new message schedule deleted request context convert messages to redirect ignoring else view get error view return create model and view model view
delete given schedule for user
public void add to cookies object command form request context request context add to cookies command form request context null
this method is used for common adding something to cookies
public void clean cookies request context request context clean cookies request context null
sometimes is needed to clean cookies so implement this method
public void clean cookies request context request context map help parameters
implement if needed to clean cookies and for cleaning is needed some
public cookie create cookie string name string value cookie cookie new cookie name value cookie set max age cookie max age cookie set comment cookie comment return cookie
this method creates default cookie
public cookie create and add cookie string name string value request context request context cookie cookie create cookie name value request context add cookie cookie return cookie
this method creates cookie and set it to response
public void set messages context messages context messages context this messages context messages context
sets a custom messages context
public messages context get messages context return messages context
returns a messages context
public model and view create model and view map model string view return new model and view view model
returns model and view
protected request context create request context http servlet request request http servlet response response return new http request context request response
creates new request context
public model and view create model and view string view return new model and view view
returns model and view
public model and view create model and view model model string view return new model and view view model get map
returns model and view
public void convert messages to redirect ignoring add all redirect ignore messages get messages
convers all current request messages to redirect ignoring messages
private void load system news resource resource get application context get resource system news file try to load from xml try jaxbcontext jc jaxbcontext new instance cz softinel uaf news unmarshaller u jc create unmarshaller system news system news u unmarshal resource get file catch jaxbexception e logger warn couldn t load system news file system news file e catch ioexception e logger warn couldn t load system news file system news file e
load all system news
public void add warning message warning add message warnings warning
add message to warnings
public void remove warning message warning warnings remove warning
remove message from warnings
public void add info message info add message infos info
add message to infos