input stringlengths 10 828 | output stringlengths 5 107 |
|---|---|
public string get product icon path return product icon | returns the path of the icon for products of this machine |
protected shared list get new shared list return new generic character | subclasses should override this to return an empty instance of |
public void start sharing object shared object replicated object client client prop listener new property support client client get object id shared object machine shared object add property change listener prop listener | attach listeners necessary to replicate the object |
public void stop sharing object shared object replicated object client client machine shared object remove property change listener prop listener | detach any listeners attached in code start sharing code |
public void set product icon path string product icon object old this product icon this product icon product icon listeners fire property change product icon path old product icon | sets the path to the icon for products of this machine |
public thing get wrapped thing return delegate | the thing that this wrapper is wrapping |
public thing get thing at int idx return get thing from item get item at idx | return the thing at the given index |
public string get name return get wrapped thing get name | return the human readable name of this thing |
public string get description return get wrapped thing get description | returns a human readable description of the thing were wrapping |
public float point get coordinates return get wrapped thing get coordinates | returns the coordinates for the wrapped thing at its current location |
public void set coordinates float point coords get wrapped thing set coordinates coords | sets the coordinates for the wrapped thing at its current location |
public void add property change listener property change listener l if get wrapped thing null get wrapped thing add property change listener l | adds a listener for property changes |
public void add thing list listener list listener l if listeners set up setup listeners list listeners add list listener l | adds a listener for changes to the list of things |
public string get verb text return verb text | returns a chunk of text describing the verbs for things created by |
public void remove property change listener property change listener l if get wrapped thing null get wrapped thing remove property change listener l | removes a listener for property changes |
public void remove thing list listener list listener l list listeners remove list listener l | removes a listener for changes to the list of things |
public string to external form try return util get hex string get wrapped thing catch ioexception ioe ioe print stack trace return null | returns a string that can be parsed by code from external form code |
public string get description return container of things | should be overridden |
public void from external form string external form try set wrapped thing thing util get object from hex string external form catch exception ioe ioe print stack trace | parses the string to initialize the item |
public float point get coordinates return coords | returns the coordinates for this thing at its current location |
public void set verb text string verb text object old this verb text this verb text verb text listeners fire property change verb text old verb text | sets a chunk of text describing the verbs for things created by |
public void set coordinates float point coords object old this coords this coords coords fire property change coordinates old coords | sets the coordinates for this thing at its current location |
public string get name return unnamed generic thing | return the human readable name of this thing |
public string get description return generic thing | return the human readable description of this thing |
public boolean is recursive menu attachment allowed return true | returns true if the container can attach mouse listeners to show |
public boolean contains int x int y return icon contains x y | overriding contains so we ignore mouse clicks outside of our icon |
private void create instance final class cl throws exception create instance cl new null permissions | ensures that a single public instance of the given class exists |
public void setup manufactured thing manufactured thing mt try abstract shared thing mtc mt get abstract shared thing if we haven t already made a client for this class do that here and store it for later if mtc null class client class get client class get product class name get product codebase mtc abstract shared thing client class new instance mt set abstract shared thing mtc mtc set manufactured thing mt mtc set location mt get landmark initialize it once its location is set mtc init catch exception e e print stack trace | called to set up the manufactured thing |
public void set object source object source source src source | this method will be called before any object test requests are |
protected shared list get new shared list return new landmark | subclasses should override this to return an empty instance of |
public void element added map event evt set icon scale icon | invoked when an element is added to the avatars shared file map |
public string get name if product name null return create new unknown thing else return create new product name | returns the name of the verb |
public void set owner string ow this owner ow | sets the owner to the given user |
public void add permission string user string key if user equals owner owner can do everything vector group null object val perms get key if val instanceof vector group vector val else group new vector perms put key group if group contains user group add element user | gives the user permission to do the operation identified by the |
public void set allowed from all string key perms put key value all | allows all users to access the operation identified by the given key |
public boolean is allowed from all string key return perms get key value all | returns true if the operation is allowed from all users |
protected moosburg permissions get new instance string owner return new generic character permissions owner | this method can be overridden by subclasses to construct a new |
public void set restricted to owner string key perms remove key | allows all users to access the operation identified by the given key |
protected moosburg permissions get new instance string owner return new moosburg permissions owner | this method can be overridden by subclasses to construct a new |
protected moosburg permissions get new instance string owner landmark permissions perms new landmark permissions owner initialize these to allow from all perms set allowed from all landmark permissions key add thing perms set allowed from all landmark permissions key remove thing return perms | this method can be overridden by subclasses to construct a new |
protected moosburg permissions get new instance string owner space permissions perms new space permissions owner perms set allowed from all landmark permissions key add thing perms set allowed from all landmark permissions key remove thing perms set allowed from all space permissions key add landmark perms set allowed from all space permissions key remove landmark return perms | this method can be overridden by subclasses to construct a new |
public boolean is restricted to owner string key return perms get key null | returns true if the operation is allowed from all users |
public void remove all permissions perms clear | clears all permissions restricting all operations to the |
public boolean is allowed string user string key object val perms get key return user equals owner is owner user equals admin val null is not restricted to owner val equals value all is allowed from all or is group that user is in val instanceof vector vector val contains user | returns true if the given user can perform the given operation |
public void check get principal p throws security exception if is allowed p get name key get throw new security exception p get name cannot retrieve this object | throws an exception if the given principal is not allowed to |
public void check delete principal p throws security exception if is allowed p get name key change throw new security exception p get name cannot edit delete this object | throws an exception if the given principal is not allowed to |
public void check change principal p change ch throws security exception if is allowed p get name key change throw new security exception p get name cannot edit delete this object | throws an exception if the given principal is not allowed to |
protected shared list get new shared list space s new space s set space size new dimension 0 0 return s | subclasses should override this to return an empty instance of |
public point get point return new point int x int y | casts the floats into ints to produce an awt style point |
public void start sharing object shared object replicated object client client super start sharing shared object client prop listener new content change listener client client get object id shared object landmark shared object add property change listener prop listener | attach listeners necessary to replicate the object |
public void stop sharing object shared object replicated object client client landmark shared object remove property change listener prop listener see if the content is a shared object object id content landmark shared object get content if content null try the content may have alread gone away by the time we get here object content obj client get object content if content obj null replication manager get instance stop sharing content obj client catch exception e e print stack trace super stop sharing shared object client | detach any listeners attached in code start sharing code |
public string get name return inspect | returns the name of the verb |
public string get name return remove | returns the name of the verb |
public void set published boolean published if published this published object old new boolean this published this published published listeners fire property change published old new boolean published | sets the name of the kind of thing that this machine produces |
public void set name string name this name name if this name null this name go to else this name this name replace delimiter | sets the name of the verb |
public object id get last removed return last removed | returns the object id of the last object removed by the verb |
public string to external form string buffer buf new string buffer if destination null buf append destination to string buf append delimiter if name go to buf append name return buf to string | returns a string that can be parsed by code from external form code |
public void from external form string external form if external form null int idx external form index of delimiter see if we have a destination id if idx 0 destination object id from string external form substring 0 idx see if we have a name if idx 1 idx external form length 1 name external form substring idx 1 | parses the string to initialize the item |
public string to external form return | returns a string that can be parsed by code from external form code |
public string get name return enter space | returns the name of the verb |
public object id get destination return destination | returns the destination |
public void set destination object id destination this destination destination | sets the destination |
public object id get default landmark return default landmark id | returns the object id of the spaces default landmark |
public void set default landmark object id default landmark id object old this default landmark id this default landmark id default landmark id listeners fire property change default landmark old default landmark id | sets the object id of the spaces default landmark |
public dimension get space size return size | returns the size of the space |
public void set space size dimension size object old this size this size size listeners fire property change space size old size | sets the size of the space |
public void add landmark list listener list listener l if list listeners null list listeners new list support this list listeners add list listener l | adds a listener for changes to the landmark list |
public void remove landmark list listener list listener l list listeners remove list listener l | removes a listener for changes to the landmark list |
public void set map content object id map content object old this map content this map content map content listeners fire property change map content old map content | sets the map content for the space |
public object id get map content return map content | returns the map content of the space |
public void set product description string product description object old this product description this product description product description listeners fire property change product description old product description | sets the description for this machines products |
public string get description return interactive whiteboard based viewer | return a human readable description of this viewer e |
public dimension get maximum size dimension d null if state null d super get maximum size else if state is panorama d new dimension white board room default width state get height else d new dimension state get width state get height return d | returns the maximum size of the component |
private void logout get current landmark remove thing user if frame null frame set visible false frame dispose frame null if show button null temp temp temp still need to fix re login just disabling for now show button set enabled false show button set text login | logs the user out |
public boolean is supported landmark type landmark l object id content l get content return content null content get classname equals white board room class get name l instanceof space | returns true if the editor is capable of editing the given landmark |
public string get description return space | return a human readable description of this editor e |
public class get landmark class return space class | returns the class of the thing that this editor edits |
public void init context get context set applet this show button new jbutton login show button set enabled false show button add action listener new action listener public void action performed action event evt if frame null frame show else do login get frame show get content pane set layout new border layout get content pane add show button border layout center | init method for the applet |
protected shared list get new shared list return new white board room | subclasses should override this to return an empty instance of |
public string get background image url string str super get background image if str null str index of 1 object id id object id from string str if id null str shared file get download url id return str | returns a url for the background |
protected shared list get new shared list return new white board map | subclasses should override this to return an empty instance of |
public string get description return place | return a human readable description of this editor e |
public boolean is supported landmark type landmark l object id content l get content return l instanceof space content null content get classname equals white board room class get name | returns true if the editor is capable of editing the given landmark |
public void start sharing object shared object replicated object client client listener new property support client client get object id shared object room shared object add property change listener listener | attach listeners necessary to replicate the object |
public void stop sharing object shared object replicated object client client room shared object remove property change listener listener | detach any listeners attached in code start sharing code |
public void view landmark landmark landmark component parent forward this to the internal frames viewer view landmark landmark parent chat view landmark landmark parent inventory view landmark landmark parent add to inform map of landmark change map view landmark landmark parent | called when we need to view a new landmark |
public void start if frame null do login if user null get frame show else system out println cannot start no user | start the applet |
public object read object input stream in throws ioexception room r new room data input stream dis new data input stream in storage handler utility string item item util read string item dis while item null if item name equals ignore case name r set name item value else if item name equals ignore case description r set description item value else if item name equals ignore case image r set image item value item util read string item dis return r | reads the object from the given stream |
public void stop this gets called when the applet window is minimized so we aren t doing anything with it for now system out println not stopping applet | stop the applet |
public boolean is supported landmark type landmark l object id content l get content return content null content get classname equals room class get name | returns true if the editor is capable of editing the given landmark |
public string get description return desktop landmark viewer | returns a description of the desktop as a landmark viewer |
public void destroy if frame null frame set visible false frame dispose logout client close frame null | destroy the applet |
public class get landmark class return landmark class return white board room class | returns the class of the thing that this editor edits |
public void add property change listener property change listener listener m section add property change listener listener | adds a java beans style property change listener |
public void remove property change listener property change listener listener m section remove property change listener listener | removes a java beans style property change listener |
public vector get sections return m sections | returns the current list of sections |
public object id get content id return m content | returns the content id for serialization of the section list |
public string get name return m section get name | returns a displayable name for this section |
public void add property change listener property change listener listener m file add property change listener listener | adds a java beans style property change listener |
public void set name string name m section set name name | sets the name of this section |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.