input
stringlengths
10
828
output
stringlengths
5
107
public void check access thread group g
throws a code security exception code if the
public void check exit int status
throws a code security exception code if the
public void check read file descriptor fd
throws a code security exception code if the
public void check read string file object context
throws a code security exception code if the
public void check write file descriptor fd
throws a code security exception code if the
public void report exception string heading throwable t properties props try string writer sw new string writer print writer out new print writer sw out println heading if props null props list out t print stack trace out out flush message m new message vs exception isenhour vt edu isenhour vt edu heading sw to string linc cs vt edu catch exception e e print stack trace
report an exception
public void check write string file
throws a code security exception code if the
public void check connect string host int port object context
throws a code security exception code if the
public void reset for enumeration e components elements e has more elements jcomponent jc jcomponent e next element dimension size jc get preferred size size width width jc set preferred size size jc set minimum size size
resets all components to have their prefered minimum height and the
public void check listen int port
throws a code security exception code if the
public void check accept string host int port
throws a code security exception code if the
public void check multicast inet address maddr
tests if current execution context is allowed to use
public void check multicast inet address maddr byte ttl
tests to see if current execution context is allowed to use
public boolean check top level window object window return true
returns code false code if the calling
public void check system clipboard access
tests if a client can get access to the system clipboard
public void check awt event queue access
tests if a client can get access to the awt event queue
public string get year week name calendar c int wk c get calendar week of year int year c get calendar year adjust for the last week of the year if wk 52 wk 1 year if wk 3 year 1999 icky year wk 52 string week id string week map get year wk if week id null week id no week return integer to string year week id
returns the sub directory name based on year and week
private string get name string group calendar c string prefix return get name group c prefix true
returns the name of a file
public void check member access class clazz int which
tests if a client is allowed to access members
public void set activity record activity record activity record this activity record activity record
sets the activity record that the registry updates
public activity record get activity record return activity record
returns the activity record that the registry updates
public int get broadcast interval return broadcast interval
returns the interval in number of events at which we send mouse
public void set broadcast interval int broadcast interval this broadcast interval broadcast interval
sets the interval in number of events at which we send mouse
public void mouse moved mouse event evt if event counter broadcast interval 0 point p swing utilities convert point component evt get source evt get point rec get window activity record set last mouse point p
the mouse position is only interesting if were the active window
public void component resized component event e update bounds
update the bounds when we resize
public void component moved component event e update bounds
update the bounds when we move
public void set screen size dimension screen size object old this screen size this screen size screen size listeners fire property change screen size old screen size
sets the screen size
public object id get window list id return window list id
returns the object id of the window list
public void set window list id object id window list id object old this window list id this window list id window list id listeners fire property change window list id old window list id
sets the object id of the window list
public int get last activated return last activated
returns the id of the last activated window in the window list
public void set last activated int last activated object old new integer this last activated this last activated last activated listeners fire property change last activated old new integer last activated
sets the id of the last activated window in the window list
public point get last mouse point return last mouse point
returns the point within the active window of the last
public void set last mouse point point last mouse point object old this last mouse point this last mouse point last mouse point listeners fire property change last mouse point old last mouse point
sets the point within the active window of the last
public void set window list shared list window list object old this window list this window list window list listeners fire property change window list old window list
sets the window list
public boolean include object object id id throws halt search exception if super include object id try activity record rec activity record get object source get object id get user return rec get client id client id catch exception e e print stack trace return false
this method should return true if the object with the given id
public void set name string name object old this name this name name listeners fire property change name old name
sets the name of this session
public void set client id long client id object old new long this client id this client id client id listeners fire property change client id old new long client id
sets the client id for this session
public void set id int id this id id version
sets the id for this window
public object get element at int idx return list element at idx
return the record at the specified index
public void set bounds rectangle bounds this bounds bounds version
sets the bounds for this window
public void set window window window this window window version
sets the window
public void set title string title this title title version
sets the windows title
public void set type string type this type type version
sets the windows type
public void set minimized boolean minimized this minimized minimized version
sets the windows minimized state
public void set visible boolean visible this visible visible version
sets the windows minimized state
public string to external form string buffer sb new string buffer integer to string id sb append sb append type sb append sb append integer to string bounds x sb append sb append integer to string bounds y sb append sb append integer to string bounds width sb append sb append integer to string bounds height sb append if minimized sb append true else sb append false sb append sb append title return sb to string
returns a string that can be parsed by code from external form code
public void from external form string external form string tokenizer st new string tokenizer external form id integer parse int st next token type st next token bounds new rectangle integer parse int st next token integer parse int st next token integer parse int st next token integer parse int st next token minimized st next token equals ignore case true title st next token while st has more tokens title title st next token
parses the string to initialize the item
public string get title object obj styled text shared value val styled text shared value obj return val get name
return a string suitable for use a title for this object
public string get title object obj string name notice list obj get name if name null name notice board return name
return a string suitable for use a title for this object
public string get type return notebook section
returns a human readable name for what kind of thing this is
public string get type return notice board
returns a human readable name for what kind of thing this is
public string get title object obj string name shared list obj get name if name null name bibliography return name
return a string suitable for use a title for this object
public string get type return bibliography
returns a human readable name for what kind of thing this is
public void render user table row user u print writer out string row prefix render user table row u out row prefix false
renders a row in a table describing a user
public string get title object obj return notebook model obj get name
return a string suitable for use a title for this object
public string get type return notebook
returns a human readable name for what kind of thing this is
public void render profile links print writer out out println p out println center out println a href virtual school servlet get root user show all users a out println a href virtual school servlet get root group show all groups a out println center
renders links for getting user and group indices
public string get title object obj return chat session obj get name
return a string suitable for use a title for this object
public string get title object obj htmltext shared value val htmltext shared value obj return val get name
return a string suitable for use a title for this object
public string get type return html notebook section
returns a human readable name for what kind of thing this is
public string get title object obj string name shared white board state obj get name if name null name notice board return name
return a string suitable for use a title for this object
public void set last in group boolean is last this is last is last
sets whether this is the last in a logical group of entries
public void set folder folder what try table get selection model clear selection model set folder what scrollpane invalidate scrollpane validate catch messaging exception me me print stack trace
change the current folder for the viewer
public void close if frame null frame is visible prompt for expunge frame set visible false
called when were being externally shut down
public string get real name return get attr value profile properties fullname
returns the human readable name of the group
public boolean is in group string user id attribute a get attribute profile properties members if a null return a contains profile client get default to dn user id else return false
returns false if given user is in this group false otherwise
public boolean join string user id get the users profile profile client client profile client get default profile profile client get profile user id if profile null return false add the attributes set attr value profile properties members profile get dn false set attr value profile properties mailforwards user id false add a group membership to the users profile profile add group membership get id client modify profile profile return true
places the given user into this group
private void form object classes create ldap object types for a li nc profile attribute obj classes new basic attribute objectclass pli openldap obj classes add top obj classes add person pli openldap obj classes add organizational person pli openldap obj classes add inet org person pli openldap obj classes add mail recipient pli openldap obj classes add ns license user pli openldap obj classes add lincprofile put obj classes
creates and sets up the objectclass attribute
table cell renderer ret null if type to string equals class edu vt cs linc profile profile system out println profiles being rendered ret new profile table cell renderer color white color blue else ret new default table cell renderer return ret
returns a cell renderer appropriate to the given object type
if scroll null scroll get viewport null scroll get viewport remove all remove scroll display view state
listens for changes to the table model and updates accordingly
if scroll null scroll get viewport null scroll get viewport remove all get content pane remove scroll display view state
listens for changes to the table model and updates accordingly
vector host list new vector if get key null host list add element value else host list vector get key host list add element value put key host list
this is a modified put command that allows us to keep track of
put field value
this adds a field value restriction pair to the filter
clear system gc
this clears the filter
return model
returns the underlying table model
db system out println type get class action actions btvd get actions type jpopup menu pop new jpopup menu for int i 0 i actions length i pop add actions i pop show this point x point y pop set visible true
pops up a menu containing the appropriate options for what is being viewed
return type
returns a string description the main data type held in the table
return sort by
returns the field name used to separate the search results
public string get type string return oval
return a string to represent the type of this item
public white board item create item color c color critical point cp start critical point cp end return new white board oval c color cp start cp end
return an item of the appropriate type for this listener
public dimension get minimum size return new dimension 100 50
return the size needed to draw the button
public dimension get preferred size font f font metrics fm f get font if f null fm get font metrics get font return new dimension fm string width m s text 10 fm get height 10 else return new dimension 100 50
return the size needed to draw the button
public void paint graphics g paint dimension d dim font f font font metrics fm metrics d dim get size f font get font g paint set color color light gray g paint fill rect 0 0 d dim width d dim height if f font null fm metrics get font metrics f font g paint set color color black g paint draw string m s text get size width 2 fm metrics string width m s text 2 get size height 2 fm metrics get height 2 fm metrics get max descent
paint the button in either is released state or its pressed state
public white board item create item color c color critical point cp start critical point cp end return new white board line c color cp start cp end
return an item of the appropriate type for this listener
public void set label string s text m s text s text repaint
change the label on the button
public white board item create item color c color critical point cp start critical point cp end return new white board solid oval c color cp start cp end
return an item of the appropriate type for this listener
public dimension get minimum size return new dimension m i image get width this 4 m i image get height this 4
return the size needed to draw the button
public dimension get preferred size return new dimension m i image get width this 4 m i image get height this 4
return the size needed to draw the button
public void mouse pressed mouse event me event press
call the press method if this was a left click
public critical point get start return m cp start
get the critical point where the drag started
public void press if m b pushed if null m v button vector for int i counter 0 i counter m v button vector size i counter image button m v button vector element at i counter release m b pushed true repaint
release any other buttons that are pressed and depress this one
public critical point get end return m cp end
get the critical point where the drag ended
public void release if m b pushed m b pushed false repaint
put the button back up if its down
public void shift item int i xshift int i yshift super shift item i xshift i yshift m cp start set x m cp start get x i xshift m cp start set y m cp start get y i yshift m cp end set x m cp end get x i xshift m cp end set y m cp end get y i yshift
shift the item by adding the provided values to the coordinates of each
public string get type string return line
return a string to represent the type of this item
public void mouse clicked mouse event me event
function included only to implement mouse listener interface
public void paint graphics g paint g paint set color get color g paint draw line get start get x get start get y get end get x get end get y super paint g paint
just a line between two points
public white board item create item color c color critical point cp start critical point cp end return new white board solid rectangle c color cp start cp end
return an item of the appropriate type for this listener
public void mouse entered mouse event me event
function included only to implement mouse listener interface
public string get type string return rectangle
return a string to represent the type of this item