input
stringlengths
10
828
output
stringlengths
5
107
public void key released key event evt ok set enabled id get text length 0 id request focus
enabled the ok button when something is typed in the user id field
public void set drop border border drop border this drop border drop border
sets the border to be used for nodes on which drops will occur
public border get drop border return drop border
returns the border to be used for nodes on which drops will occur
protected void remove component view from cache object id id system err println component view panel remove cvfrom cache remove remove from cache on close id id if remove from cache on close id null source remove component view id request tag
removes the cv if appropriate
public string get user id return id get text
returns the user id
public embedded object path get menu path return menu path
returns the path to the last object on which the menu was opened
public void set drop node tree node drop node this drop node drop node if tree null tree repaint
sets the node on which drop will occur
public string get password return pw get text
returns the password
public tree node get drop node return drop node
returns the node on which drop will occur
public boolean handle selection component parent boolean result true object sel get selected item if sel instanceof string string sel starts with other string cur path get other string path string joption pane show input dialog parent enter path to object enter path joption pane question message null null cur path if path null result false else set other path return result
utility method that prompts for a path setting the other field
public string get selected path string path null object sel get selected item if sel instanceof embedded object descriptor path embedded object descriptor sel get name else if sel instanceof string string sel starts with other if other null other length 0 path other return path
returns the path of the selected object
public void set request tag object tag this request tag tag
returns the tag that will be passed to the component view source
public void property change property change event evt if evt get source instanceof embedded object descriptor this could be optimized for int i 0 i model get size i embedded object descriptor desc extractor get embedded object descriptor model get element at i set title at i desc get name else component view view component view evt get source int idx index of component view view if idx 1 if view instanceof swing component support swing component support scs swing component support view set icon at idx scs get icon
update name and icon when those change
public void state changed change event e if panel get parent null panel get parent remove panel int idx get selected index if idx 1 panel set embedded object descriptor extractor get embedded object descriptor model get element at idx jpanel p jpanel get selected component p remove all p add panel border layout center revalidate
listen for tab selection changes
public void attach list model lm list get model if lm model if we re attached to a different model detach now if model null detach model lm for int i 0 i lm get size i object bean get bean for model value lm get element at i if bean null property support add property change listener this bean model add list data listener this if timer interval 0 timer new timer timer interval this timer set repeats true timer start
attaches a listener to all items in the lists model
public dimension get minimum size dimension d super get minimum size d width math min d width 200 return d
overriding to allow more flexible window resizing
public void detach if model null model remove list data listener this for int i 0 i model get size i object bean get bean for model value model get element at i if bean null property support remove property change listener this bean model null if timer null timer stop timer null
detaches a listener from all items in the last model we attached to
protected object get bean for model value object mv return mv
may be overridden to return a bean for the given model value
protected object get model value for bean object bean return bean
may be overriden to return a model value for the given bean
public void load icon paths input stream in try icon paths load in catch ioexception e e print stack trace catch throwable t t print stack trace
loads a set of classname to iconpath mappings from an input stream
public void load icon paths string resource name input stream is default icon manager class get resource as stream resource name load icon paths is
loads a set of classname to iconpath mappings from a properties
public icon get icon string class name icon icon icon icons get class name if icon null string path icon paths get property class name default icon path if path null path apache icons small generic gif if path null url u default icon manager class get resource path if u null icon new image icon u if icon null icons put class name icon return icon
returns an icon for the given class
public icon get icon object id id return get icon id get classname
returns an icon for the given object id
public void set menu accelerators int menu key mask toolkit get default toolkit get menu shortcut key mask undo set accelerator key stroke get key stroke z menu key mask redo set accelerator key stroke get key stroke r menu key mask cut set accelerator key stroke get key stroke x menu key mask copy set accelerator key stroke get key stroke c menu key mask paste set accelerator key stroke get key stroke v menu key mask select all set accelerator key stroke get key stroke a menu key mask
sets keyboard accelerators on menu items
public void clear menu accelerators undo set accelerator null redo set accelerator null cut set accelerator null copy set accelerator null paste set accelerator null select all set accelerator null
clears keyboard accelerators on menu items
public void add extra menu jmenu menu add menu extras add element menu
adds an extra non component view specific menu to the menu bar
public void activate frame source
called when the owner of this frame source becomes active
public void remove component menu super remove menu extras remove element menu
look for removed menus in extras
public void deactivate frame source
called when the owner of this frame source is deactivated
protected int get layer for index int idx return idx return list get size idx 1
maybe overridden by subclasses to enforce a different layering
public void do layout insets insets get insets dimension sz get size rectangle child boundaries new rectangle insets left insets top sz width insets left insets right sz height insets top insets bottom component kids get components for int i 0 i kids length i kids i set bounds child boundaries super do layout
layered pane expects components to provide their own sizes
public component view get top component view return top
returns the top most component view
public view factory get view factory return new syntax highlighter view factory
returns a view factory that generates syntax highlighter views
public void set request tag object tag if tag request tag this request tag tag reset menu items
returns the tag that will be passed to the component view source
public dimension get preferred size return new dimension m i size x m i size y
give the layout manager the size the white board should be
public void set name string name object old this name this name name if listeners null listeners fire property change name old name
sets the name of the item
public object id get to do list return todo
returns the object id of our list of to do items
public void set description string description object old this description this description description if listeners null listeners fire property change description old description
sets the description of the item
public void set to do list object id id object old todo this todo id fire property change to do list old id
sets the object id of our list of to do items
public object id get recurring list return recurring
returns the object id of our list of recurring items
public void set start date start object old this start this start start if listeners null listeners fire property change start old start
sets the start date for the item
public void set recurring list object id id object old recurring this recurring id fire property change recurring list old id
sets the object id of our list of recurring items
public void update graphics g paint paint g paint
paint the white board
public void set end date end object old this end this end end if listeners null listeners fire property change end old end
sets the end date for the item
public int get web embed mode return web embed mode
returns the way that the calendar is displayed when embedded
public int get repeat cycle return repeat cycle
returns the repeat cycle for the item
public void set web embed mode int mode int old web embed mode web embed mode mode if old mode fire property change web embed mode new integer old new integer mode
sets the way that the calendar is displayed when embedded in a
public boolean get show to do on web return show to do on web
returns whether we show to do items on the web view
public void set show to do on web boolean show boolean old show to do on web show to do on web show if old show fire property change show to do on web new boolean old new boolean show
sets whether we show to do items on the web view
public void set repeat type int type if type this repeat type object old new integer this repeat type this repeat type type if listeners null listeners fire property change repeat type old new integer type
sets the repeat type for the item see repeat constants
public void set timeline cell renderer timeline cell renderer renderer this renderer renderer repaint
sets the renderer for timeline cells
public boolean get show all day label on web return show all day label on web
returns whether we show all day as the time for all day meetings
public void set viewed last modification users string users
update the list of users that have read the object since last modification
public timeline cell renderer get timeline cell renderer return renderer
returns the current renderer for timeline cells
public date get repeat until return repeat until
returns the date we repeat until
public void set show all day on web boolean show boolean old show all day label on web show all day label on web show if old show fire property change show all day label on web new boolean old new boolean show
sets whether we show all day as the time for all day meetings
public void set timeline intervals timeline interval intervals this intervals intervals preferred width 0 if intervals null for int i 0 i intervals length i preferred width intervals i get preferred width 1 label width 1 repaint
sets the intervals to be displayed
public void dispose if m g current board graphics null m g current board graphics dispose if m g draw buffer graphics null m g draw buffer graphics dispose if m i sketch image null m i sketch image flush if m i background image null m i background image flush if m i current board null m i current board flush if m i draw buffer null m i draw buffer flush
dispose method for freeing image data when were done
public void set repeat until date repeat until object old this repeat until this repeat until repeat until if listeners null listeners fire property change repeat until old repeat until
sets the date we repeat until
public void add calendar item factory calendar item factory cif factories add element cif repaint
adds a calendar item factory creating a new row in the timeline
public boolean get show all events on large calendar return show all events in large cal
returns whether we show all events in the large calendar grid
public void remove all calendar item factories factories remove all elements repaint
removes all registered calendar item factories
public void set show all events on large calendar boolean show boolean old show all events in large cal show all events in large cal show if old show fire property change show all events on large calendar new boolean old new boolean show
sets whether we show all events in the large calendar grid
public int get row count return factories size
returns the number of rows in the factory
public void set creation time string creation time object old this creation time this creation time creation time if listeners null listeners fire property change creation time old creation time
sets the creation time of this item
public insets get insets insets ins super get insets if ins null ins new insets 0 0 0 0 return ins
overriding so that this never returns null
public boolean get use short month names on web return use short month names on web
returns whether we use short month names on lists in the web view
public string get last modification time return last modification time
returns the last modification time of this item
public void set last modification time string last modification time object old this last modification time this last modification time last modification time if listeners null listeners fire property change last modification time old last modification time
sets the last modification time of this item
public void set use short month names on web boolean usmn boolean old use short month names on web use short month names on web usmn if old usmn fire property change use short month names on web new boolean old new boolean usmn
sets whether we use short month names on lists in the web view
public void set row height int row height this row height row height if get parent null get parent invalidate get parent validate repaint
sets the height allocated to each row
public dimension get preferred size will eventually need to account for header insets ins get insets return new dimension preferred width ins left ins right label width get row count row height ins top ins bottom header height
returns the preferred size of the timeline
public void set store descriptor embedded object descriptor desc store desc desc
sets the descriptor associated with our calendar store
public void set last modification user string last modification user object old this last modification user this last modification user last modification user if listeners null listeners fire property change last modification user old last modification user
sets the last modification user of this item
public embedded object descriptor get store descriptor return store desc
gets the descriptor associated with our calendar store
public void set selection state calendar item ci object sel if sel null selections remove ci else selections put ci sel
associates an arbitrary representation of selection state with the
public object get selection state calendar item ci return selections get ci
returns the selection state object associated with the given
public void clear selection state selections clear
clears all selection state
public enumeration get embedded object descriptors vector v new vector if recurring null v add element new object record recurring recurring recurring if todo null v add element new object record todo todo todo for int i 0 i get size i v add element get item at i return v elements
returns an enumeration of embedded object descriptors representing
public int get row at point point p int result 1 insets ins get insets dimension sz get size if p y ins top header height p y sz height ins bottom result p y ins top header height row height 1 return result
returns the index of the row for the given point
public calendar item factory get calendar item factory at point point p calendar item factory result null int idx get row at point p if idx 1 idx factories size result calendar item factory factories element at idx return result
returns the calendar item factory for the given point
public embedded object descriptor get embedded object descriptor string name embedded object descriptor result null if name equals recurring result new object record recurring recurring recurring else if name equals todo result new object record todo todo todo else for int i 0 i get size result null i embedded object descriptor desc embedded object descriptor get item at i if desc get name equals name result desc return result
returns the embedded object descriptor with the given name
public timeline interval get timeline interval at point point p timeline interval result null object objs get interval and offset p if objs null result timeline interval objs 0 return result
returns the interval for the given point
public string get name return store get name
returns a name for this factorys underlying storage
public int get label width return label width
returns the width in pixels of the labels
public void set enabled boolean enabled if enabled is enabled return super set enabled enabled if items null for int i 0 i items get component count i component c items get component i if c instanceof calendar item pane calendar item pane jtp calendar item pane c calendar item item jtp get calendar item jtp set editable enabled item instanceof default calendar item if new item null new item set enabled enabled
disable editing of the text fields if were disabled
public string to string return get class get name name name description description start start end end repeat type repeat type repeat cycle repeat cycle repeat until repeat until last modification time last modification time last modification user last modification user
returns a string representation of the calendar item
public string get lazy jar list return null
returns a string listing comma delimited all lazily loaded jar files
public string get property from source string prop string default value string val props get property prop default value system err print prop prop val if val default value system err print used default value system err println return val
pulls a property from the props object dumping the result
public default calendar item copy default calendar item item new default calendar item copy into item return item
copies fields from this calendar item into a new calendar item
protected object get bean for model value object mv object bean mv try if mv null if is osd osduser list cell renderer r osduser list cell renderer list get cell renderer bean r get session data mv else bean context get replicated object client get object object id from string mv to string catch throwable t t print stack trace return bean
may be overridden to return a bean for the given model value
protected object get model value for bean object bean object mv bean if is osd mv session data bean get name else object id id context get replicated object client get object id bean if id null mv new string list item id to string return mv
may be overriden to return a model value for the given bean
public void copy into default calendar item item item name name item description description item start start item end end item repeat type repeat type item repeat cycle repeat cycle item repeat until repeat until item creation time creation time item last modification time last modification time item last modification user last modification user
copies fields from this calendar item into a specified calendar item
public void drag enter drop target drag event evt if evt is data flavor supported object record list drag source listener flavor evt accept drag evt get drop action else evt reject drag
accept object record list drag source listener
public void save annotation space set ass user group grps new user group tabs get tab count 1 int idx 0 for int i 0 i tabs get tab count i def panel dp def panel tabs get component i if dp is non guest ass set non guest group dp get user group else grps idx dp get user group ass set groups grps ass set guests can view guests can view is selected
saves the state of the panel to the given annotation space set
public string get timeline state return
bogus property used to log timeline open close
public navigable location get current location return current
returns the path to the object that we are currently navigated to
public void element removed map event evt if evt get source session
invoked when something is removed from a session
public void activate frame source eventually we ll probably want to check osds for any open frames here
called when the owner of this frame source becomes active
public void invite if absent session data user if model get object session data is in object session path get last embedded object descriptor get object id user get name invite user
invites the given user to the windows conference if they arent