input
stringlengths
10
828
output
stringlengths
5
107
public void set announcement paths string announcement paths object old this announcement paths this announcement paths announcement paths fire property change announcement paths old announcement paths
sets a comma delimited list of paths to text objects that should
public string get help location return help location
returns a url for help materials
public void set help location string help location object old this help location this help location help location fire property change help location old help location
sets a url for help materials
public void mouse press mouse event evt last mouse event evt point p evt get point press transform point p u p transform point u m press press view map focus
method to learn of mouse press
public boolean get include unmatched entries return include unmatched entries
returns true if documents whose users do not match any of the subgroup
public void drag mouse event evt last mouse event evt point p evt get point coordinate drag transform point p u p restricts dragging operation to only be effective within map display if drag x 1 drag x 1 drag y 1 drag y 1 return transform point u m drag update the current focus coordinate map focus x press view x press x drag x map focus y press view y press y drag y update dependents map focus
method that accepts the pixels of a drag operation
public int get length if file null return int file get length bytes per milli sec else return 1
returns the length of the clip in millisec
public void mouse released mouse event evt update dependents map focus
method that learns of a mouse release action
public int get loaded return get length
returns the amount of the clip that has been loaded
public void mouse entered mouse event evt last mouse event evt if timer is running look up timer start
method that learns of mouse entering and starts timer
public boolean get cycle through all current docs return cycle through all current docs
returns true if document cycling should include all current versions
public void set position int pos int old this pos this pos pos fire property change position old pos
sets the current position of the clip
protected void object loaded reset timeline reset announcement tabs running true auto selector new auto selector auto selector start
called when the lsdparameters object has been loaded from the server
protected void fire property change string prop int old val int new val if old val new val fire property change prop new integer old val new integer new val
utility method for firing int changes
public void mouse exited mouse event evt last mouse event evt if look up timer stop tool tip update dependents tool tip
method that learns of mouse exiting and stops timer
public void set playing boolean playing boolean old this playing synchronized lock this playing playing lock notify all if playing in play loop try lock wait 2000 catch interrupted exception ie ie print stack trace listeners fire property change playing new boolean old new boolean playing
starts stops the clip
public void mouse moved mouse event evt last mouse event evt if look up timer restart tool tip update dependents tool tip
method that learns of mouse moving and stops timer
public void set speed float speed float old this speed this speed math min 2 0f math max speed 0 01f listeners fire property change speed new float old new float speed
sets the speed at which the clip will be played
public float get speed return 1 0f
returns the actual speed at which the clip will be played
public void mouse clicked mouse event evt if evt get click count 2 clip null clip set playing true
start playing on double click
public void transform point m u coordinate p switch method case 0 flat p to square f map focus zoom break case 1 parabolic p to square p map focus zoom break case 2 hyperbolic p to circle h map focus zoom break case 3 arctan p to circle a map focus zoom break case 5 parabola like p to square pl map focus zoom break
method to define the transformation for a point from
public void transform point u m coordinate p switch method case 0 flat p from square f map focus zoom break case 3 arctan p from circle a map focus zoom break case 1 parabolic p from square p map focus zoom break case 2 hyperbolic p from circle h map focus zoom break case 5 parabola like p from square pl map focus zoom break
method to change a point from unit coordinates to map coordinates
public point transform point u p coordinate c point p new point p x display center x int c x map center x p y display center y int c y map center y return p
method to define the transformation for a point from
public coordinate transform point p u point p coordinate c new coordinate c x double p x display center x map center x c y double display center y p y map center y return c
method to define the transformation for a point from pixel coordinates
public file reference get file string prompt component parent file reference ref null jfile chooser chooser new jfile chooser chooser set dialog title prompt chooser set dialog type jfile chooser open dialog chooser set current directory last int result chooser show open dialog parent if result jfile chooser approve option last chooser get selected file ref new file wrapper last return ref
prompts the user to select an existing file
public file reference get new file string prompt component parent file reference ref null jfile chooser chooser new jfile chooser chooser set dialog title prompt chooser set dialog type jfile chooser save dialog chooser set current directory last int result chooser show save dialog parent if result jfile chooser approve option last chooser get selected file ref new file wrapper last return ref
prompts the user to select a new file
public void save byte data throws ioexception buffered output stream out new buffered output stream new file output stream file out write data out flush out close
saves the given chunk of data to the file
public void property change property change event evt if evt get source jump float f jump get jump value int msecs int f 1000 back button set label back f s f8 back start stop set rewind msecs fwd button set label fwd f s f9 fwd start stop set rewind msecs
update the jump button s when the jump chooser changes
public media clip get clip return clip
returns the current clip
public announcement data source get announcement data source return announcement data source
returns an announcement data source that provides content from
public object get element at int idx string list item item null object id id null string name null try item string list item list get item at idx id object id from string item get value name shared file client get object id get name catch exception e e print stack trace return name
return the element at the specified index
public void load images only load the thumbnails if slides exist if presentation get size 0 local current slide group get current slide value last current slide group get current slide value display existing slides 0
this method moves the loading of the thumbnail images out of the
protected void resize pack validate repaint
resizes the frame so that it correctly displays the layout changes
public void remove user group data get sync groups remove dependent control menu local group remove user local character if local group get number of leader users 0 local group get number of follower users 0 group data remove group local group
removes the user from their group possibly removing the group
private void display existing slides int i lir new load images runnable presentation i this icon width icon height image loader new thread lir image loader set daemon true image loader set priority thread min priority image loader start
creates a thread to retrieve an existing slides data
public void thread finished image image int i image icon image icon new image icon image image icon set image observer this jbutton button jbutton thumbnails element at i button set icon image icon load the next image if i last presentation size 1 display existing slides i 1
automatically called when the loading thread finishes
public void action performed action event evt integer index new integer evt get action command if follower group set local current slide value index int value else group set current slide value index int value
handles clicking on any of the thumbnail images causing the
public boolean is current slide value shared boolean result string map item smi string map item data get new string map item current slide integer shared value new integer smi to string if get current slide value shared value int value result false else result true return result
method to determine if current slide is different from shared value
public void set local group group group this group group
lets the view know about its group data
public void set local group group group this local group group update dependents local group
assigns our local group when determined through a dialog box
public void run system out println thread started for image i slidedata p get slide data i image slidedata get image get image image image get scaled instance width height image scale smooth view thread finished image i
method to define thumbnail loading
public void remove try group list remove leaders remove followers remove replication manager get instance stop sharing data client client delete object client get object id data catch exception e e print stack trace
method for removing the shared data when the presentation object
public presentation view presentation data p this presentation p
creates new presentation view
public void element added map event evt if evt get key equals new string map item current slide system out println current slide property change noted string map item smi string map item data get new string map item current slide current slide new integer smi to string system out println current slide is current slide int value update dependents current slide
if someone changes the current slide property notify the display
public void set follower status boolean follower this follower follower
lets the view know about the local users status
public void set frame application window w this parent w
lets the view know about its parent frame
public void element removed map event evt
currently not used
private boolean check for save boolean ok to close true if has been typed in set visible true to front int result joption pane show confirm dialog this save changes to get title before closing save changes joption pane yes no cancel option joption pane information message if result joption pane yes option ok to close save file false else if result joption pane cancel option ok to close false return ok to close
see if we need to save
public slide data get slide data int index string list item sli string list item list get item at index slide data slidedata slide data table get sli return slidedata
method to get any slides data
public boolean contains slides if list get size 0 return true else return false
method to determine if the presentation contains any slides
public boolean get include wall clock return include wall clock is selected
returns true if the inserted timestamp should include wall clock time
public void activate boolean writable is writable config set enabled writable reload set enabled writable
called to inform the component that it is being activated or
public void deactivate kill off the applet when we re done if viewer null viewer set applet null null false
called to inform the component that it is being de activated and
public void set include wall clock boolean inc include wall clock set selected inc
set to true if inserted timestamps should include wall clock time
public void was clicked synchronized this clicked true notify all
called to indicate that a manual selection was made
public void set start timestamp long ts start time ts
sets the timestamp at which the first event occurs
public long get start timestamp return start time
returns the timestamp at which the first event occurs
public void element added list event evt timeline repaint
list listener methods for repainting on updates
public object get value at int row int col object val null if row 0 row list get size object elem list get element at row val get value for elem row col return val
uses the get value for
public int get model row for sorted row int row return indexes row
returns the row in the model that corresponds to the row in the
public int get sorted row for model row int row int srow 1 for int i 0 i indexes length srow 1 i if indexes i row srow i return srow
returns the row in the sorted model that maps to the given row
public int get sorted column return column
returns the current column that were sorting by
public boolean is sorting return sorting
returns true if were currently re sorting
public object get element at int idx return list get item at idx to string
return the element at the specified index
public void object changed server event evt if evt get object id equals search id index request req index request property change change evt get change get value enqueue index request req
called when an object is changed
public void object removed server event evt object id id evt get object id try remove documents id to string catch exception e system err println search server listener object removed e e print stack trace
called when an object is removed
public void add object text extractor class cl object text extractor ext extractors put cl ext
adds an object text extractor for objects of the given
public renderable set factory get factory return factory
returns the factory that created this set
public float point get translated point float point native point return new float point native point x native bounds x width ratio trans bounds x native point y native bounds y height ratio trans bounds y
returns the translated point for the given native point
public object get object at int idx return data element at idx
returns the object with the given index
public float point get native point float point translated point return new float point translated point x trans bounds x width ratio native bounds x translated point y trans bounds y height ratio native bounds y
returns the native point for the given translated point
public renderable set get renderable set viewpoint vp chunk set set new chunk set for int i 0 i chunks size i lazy renderable chunk chunk lazy renderable chunk chunks element at i if chunk is visible vp set add chunk chunk set start loading return set
returns a renderable set based on visible chunks for the given
public void clear if data size 0 object obj data element at 0 data remove all elements firing a single event should be sufficient here listeners fire element removed obj 0
clears the data
public void add object object obj data add element obj listeners fire element added obj data size 1
adds an object to the set
public void remove object object obj int idx data index of obj data remove element obj listeners fire element removed obj idx
removes an object from the set
public void add renderable chunk lazy renderable chunk chunk chunks add element chunk
adds a new renderable chunk to the factory
public void add list listener list listener l listeners add list listener l
adds a listener for objects being added to or removed from the set
public void load all renderable chunks for enumeration e chunks elements e has more elements lazy renderable chunk chunk lazy renderable chunk e next element if chunk is loaded chunk load
forces all unloaded renderable chunks to be immediately loaded
public void remove list listener list listener l listeners remove list listener l
removes a listener for objects being added to or removed from the set
public class get type return delegate get type
returns the type of objects that renderable sets created by this
public renderable set get renderable set viewpoint viewpoint viewpoint vp new viewpoint default coordinate translator get translated rectangle viewpoint get world bounds translator true default coordinate translator get translated rectangle viewpoint get view bounds translator true viewpoint get rendered dimension return delegate get renderable set vp
returns the set of renderable objects for the viewpoint
public boolean contains float point pt return pt get x x pt get y y pt get x x w pt get y y h
returns true if the given point is contained in the rectangle
public boolean intersects float rectangle r return r x r w x r y r h y r x x w r y y h
returns true if the given rectangle intersects this rectangle
public float rectangle intersection float rectangle r float x1 math max x r x float x2 math min x w r x r w float y1 math max y r y float y2 math min y h r y r h if x2 x1 0 y2 y1 0 width or height is negative no intersection return new float rectangle 0 0 0 0 else return new float rectangle x1 y1 x2 x1 y2 y1
computes the intersection between the given rectangle and
public r2 vect translate r2 vect v x v x y v y return this
shift this vector on given vector
public object get object at int idx object obj null int count last count int i 0 if idx last idx last chunk idx 0 count 0 for sets with lots of chunks a more complex search algorithm might work better for i last chunk idx i loaded size obj null i int old count count lazy renderable chunk chunk lazy renderable chunk loaded element at i count chunk get size if count idx obj chunk get object at idx old count last chunk idx i last idx idx last count old count return obj
returns the object with the given index
public r2 point add r2 vect v return new r2 point x v x y v y
a sum of a point and a vector
public float rectangle union float rectangle r float x1 math min x r x float x2 math max x w r x r w float y1 math min y r y float y2 math max y h r y r h return new float rectangle x1 y1 x2 x1 y2 y1
computes the union between the given rectangle and this rectangle
public r2 vect transform double coeff x coeff y coeff return this
multiply this vector by a scalar
public rectangle get rectangle return new rectangle int x int y int w int h
casts the floats into ints to produce an awt style rectangle
public r2 vect dilate double coeff transform coeff return this
the same as transform
public renderable set get renderable set viewpoint viewpoint if vp null viewpoint equals vp seen clear vp viewpoint return new renderable set wrapper factory wrapper this delegate get renderable set viewpoint
returns the set of renderable objects for the viewpoint
public r2 point add r2 point p return new r2 point x p x y p y
a sum of 2 points depends on coordinate system
public void render object obj graphics g viewpoint vp float rectangle rect float rectangle obj float rectangle view vp get view bounds dimension sz vp get rendered dimension int x int rect get x view get x view get width sz width int y int rect get y view get y view get height sz height int w int rect get width sz width view get width 1 int h int rect get height sz height view get height 1 hmmmm this seems wrong y sz height y h g set color color g draw rect x y w h
renders the given object to a graphics object for the view
public double mult r2 vect v return x v x y v y
a scalar product of two vectors
public int get size return delegate get size duplicates
returns the size of the set
public r2 vect sub r2 point p return new r2 vect x p x y p y
a difference of two points returns a vector
public object get object at int idx idx duplicates object obj null if idx delegate get size obj delegate get object at idx while obj null seen get obj null seen get obj factory duplicates fire an element removed change here if idx delegate get size obj delegate get object at idx else obj null if obj null seen put obj factory return obj
returns the object with the given index
public r2 point mult double coeff return new r2 point x coeff y coeff
a product of coordinates of a point and a scalar
public r2 vect normalize double len length if len 0 transform 1 len return this
make the length of this vector to be 1 direction is the same