input
stringlengths 10
828
| output
stringlengths 5
107
|
|---|---|
public void mouse moved mouse event e if data indices null return if data indices 0 data indices 1 histogram mouse moved e return if e null axis on false make tool tip e get x e get y e consume int id find covered data id e get x e get y if id 0 set indication id this repaint fire indication event fire indication changed id
|
mouse over it will show the values for current point by tool tip
|
protected int find covered data id int x int y int array index 1 boolean point move false if data indices null return 1 if exsint null return 1 int tolerance 3 if point size tolerance tolerance point size if data indices 0 data indices 1 exsint null whyint null for int i 0 i data x length i if exsint i tolerance x x exsint i tolerance whyint i tolerance y y whyint i tolerance condition array i 1 point move true array index i return array index return array index
|
add by jin chen
|
public void key pressed key event e if e get key code 10 this is the key code for enter string message user name input area get text append message message user name if logger is loggable level finest logger finest chat panel sending message to receiver message msg reciever receive message user name input area get text input area set text input area request focus in window
|
handle the key pressed event from the text field
|
public void mouse clicked mouse event e int count e get click count module body selected true int mouse pos new int 2 mouse pos 0 e get x mouse pos 1 e get y single click select performed if data indices null return if count 1 select apoint mouse pos double click pop up a detail scatter plot if count 2 this is a double click or triple string class name this get class get name popup adetailed plot class name
|
mouse click for selecting or brushing points observations
|
public void set panel size int width pixels int height pixels set size width pixels height pixels set preferred size new dimension width pixels height pixels set minimum size new dimension width pixels height pixels super set layout null
|
set up the default size of matrix panel
|
public void action performed action event e try action button action performed e catch exception ex ex print stack trace
|
button to set up new data ranges shown up in scatter plot
|
public void action performed action event e try config button action performed e catch exception exception exception print stack trace
|
set up the attributes for plotted in spm
|
public void action performed action event e this gets the source or originator of the event try unit action performed e catch exception exception exception print stack trace
|
get the event from a unit plot and send
|
private void config button action performed action event e att select dialog 400 400
|
configure attributes for plotted in matrix
|
public void set max num arrays int max num max num arrays max num
|
set the maximum number of columns and rows can be shown in matrix
|
public int get max num arrays return max num arrays
|
get the maximum number of columns and rows can be shown in matrix
|
public void set plotted begin int plotted begin this plotted begin plotted begin
|
set the beginning varaible
|
public int get plotted begin return plotted begin
|
get the beginning varaible
|
public void set plotted attributes int plotted att plotted attributes plotted att
|
set the attribute arrays which need to display in matrix by indices
|
public void action performed action event e try config button action performed e catch exception exception
|
set up the attributes for plotted in spm
|
public void action performed action event e this gets the source or originator of the event try unit action performed e catch exception exception
|
get the event from a unit plot and send
|
public void set selection color color c selection color c for matrix element other element element other element set selection color selection color
|
set up selection color for each matrix element
|
protected void fire marshaled component string marshaled xml guaranteed to return a non null array object listeners listener list get listener list process the listeners last to first notifying those that are interested in this event for int i listeners length 2 i 0 i 2 if listeners i marshaled component listener class marshaled component listener listeners i 1 marshaled component marshaled xml next i
|
notify all listeners that have registered interest for notification on
|
public void set multiple selection colors color multiple selection colors logger finest set selected colors this multiple selection colors multiple selection colors for int i 0 i selected obvs int length i selected obvs int i 0 for int k 0 k plot number plot number k matrix element other element element k other element set selections selected obvs int other element set multiple selection colors this multiple selection colors repaint
|
set up selection
|
protected void fire annotation changed string new annotation guaranteed to return a non null array object listeners listener list get listener list annotation event e null process the listeners last to first notifying those that are interested in this event for int i listeners length 2 i 0 i 2 if listeners i annotation listener class lazily create the event if e null e new annotation event this new annotation annotation listener listeners i 1 annotation changed e next i
|
notify all listeners that have registered interest for notification on
|
public void fire action performed string command guaranteed to return a non null array object listeners listener list action get listener list action event e null process the listeners last to first notifying those that are interested in this event for int i listeners length 2 i 0 i 2 if listeners i action listener class lazily create the event if e null e new action event this action event action performed command action listener listeners i 1 action performed e
|
notify all listeners that have registered interest for notification on
|
public void set element class name string classname element class name classname try set element class element class name null class for name element class name null bivariate graph matrix element element class new instance intialize catch exception e e print stack trace
|
set up the name for element which will be displayed in matrix
|
public void set element class object obj set element class name obj null obj get class get name null
|
set the element which will be displayed in matrix by connecting to an
|
public void set element class class clazz element class clazz
|
set up the element displayed in matrix
|
public void fire indication changed int indicator guaranteed to return a non null array object listeners listener list get listener list indication event e null process the listeners last to first notifying those that are interested in this event for int i listeners length 2 i 0 i 2 if listeners i indication listener class lazily create the event if e null e new indication event this indicator indication listener listeners i 1 indication changed e next i
|
notify all listeners that have registered interest for notification on
|
public void set element class name string classname element class name classname try set element class element class name null class for name element class name null catch exception e e print stack trace
|
set up the name for element which will be displayed in matrix
|
public void add indication listener indication listener l bivariate graph add indication listener l
|
adds an indication listener to the button
|
public void set element class class clazz if element class clazz recreate true element class clazz
|
set up the element displayed in matrix
|
public void remove indication listener indication listener l bivariate graph remove indication listener l
|
removes an indication listener from the button
|
public void add indication listener indication listener l if indic listeners null indic listeners new vector indic listeners add l if element null for matrix element other element element other element add indication listener l
|
adds an indication listener to the elements
|
public void remove indication listener indication listener l if element null return for matrix element other element element other element remove indication listener l indic listeners remove l
|
removes an indication listener from the elements
|
public void remove color classifier listener color classifier listener l vis class one remove color classifier listener l vis class two remove color classifier listener l
|
removes an color classifier listener from the component
|
private void select button action performed action event e logger finest select button pressed in action performed plot number plotted attributes length logger finest select button pressed plot number plot number init
|
selection button in variable selection dialog
|
private void close button action performed action event e dialog set visible false
|
close the variable selection dialog
|
public void value changed list selection event e if e get value is adjusting return jlist the list jlist e get source if the list is selection empty return plotted attributes the list get selected indices
|
inform that value or selection in the jlist variable selection dialog
|
public void add subspace listener subspace listener l listener list add subspace listener class l
|
adds a subspace listener
|
public void remove subspace listener subspace listener l listener list remove subspace listener class l
|
removes an subspace listener from the component
|
public void fire subspace changed int selection guaranteed to return a non null array object listeners listener list get listener list subspace event e null process the listeners last to first notifying those that are interested in this event for int i listeners length 2 i 0 i 2 if listeners i subspace listener class lazily create the event if e null e new subspace event this selection subspace listener listeners i 1 subspace changed e next i
|
notify all listeners that have registered interest for notification on
|
private void fire selection changed selection event e guaranteed to return a non null array object listeners listener list get listener list process the listeners last to first notifying those that are interested in this event for int i listeners length 2 i 0 i 2 selection listener listeners i 1 selection changed e next i
|
notify all listeners that have registered interest for notification on
|
public void add color array listener color array listener l listener list add color array listener class l
|
adds an selection listener
|
public void action performed action event e try config button action performed e catch exception ex ex print stack trace
|
set up the attributes for plotted in spm
|
public void action performed action event e this gets the source or originator of the event try unit action performed e catch exception ex ex print stack trace
|
get the event from a unit plot and send
|
protected void fire action performed string command guaranteed to return a non null array object listeners listener list get listener list action event e null process the listeners last to first notifying those that are interested in this event for int i listeners length 2 i 0 i 2 if listeners i action listener class lazily create the event if e null e new action event this action event action performed command action listener listeners i 1 action performed e next listener end method
|
notify all listeners that have registered interest for notification on
|
public void action performed action event e object source e get source if source instanceof jbutton jbutton but jbutton e get source string but name but get text if but name incoming on get text fire action performed bean shortcuts gui event incoming on if but name incoming off get text fire action performed bean shortcuts gui event incoming off if but name outgoing on get text fire action performed bean shortcuts gui event outgoing on if but name outgoing off get text fire action performed bean shortcuts gui event outgoing off end if
|
listens to the buttons
|
public void item state changed item event e if e get state change item event deselected cm disconnect beans meth l bean else if e get state change item event selected cm reconnect beans meth l bean
|
we listen to our box
|
public void test get firing methods fail not yet implemented todo
|
test method for
|
public void test get firing beans fail not yet implemented todo
|
test method for
|
public void test disconnect beans fail not yet implemented todo
|
test method for
|
public void test reconnect beans fail not yet implemented todo
|
test method for
|
public void mouse pressed mouse event e if data indices 0 data indices 1 return if e is popup trigger maybe show popup e sel records clear mouse x1 e get x mouse y1 e get y
|
begin the drawing of selection region box
|
protected void fire data set changed data set for apps data guaranteed to return a non null array object listeners listener list get listener list data set event e null process the listeners last to first notifying those that are interested in this event for int i listeners length 2 i 0 i 2 if listeners i data set listener class lazily create the event if e null e new data set event data this data set listener listeners i 1 data set changed e
|
notify all listeners that have registered interest for notification on
|
public void mouse moved mouse event e if e null axis on false make tool tip e get x e get y e consume
|
mouse over it will show the values for current point by tool tip
|
public double row mean int row double matrix2 d m this sub matrix row 0 1 super columns return m aggregate functions plus functions identity super columns double sum 0 for int i 0 i columns i sum values row i return sum columns
|
this method computes mean value of designated row
|
public double row var n int row double mean double matrix2 d m this view part row 0 1 super columns return m aggregate functions plus functions chain functions square functions minus mean double sum 0 for int i 0 i columns i sum math pow values row i mean 2 return sum
|
compute the given rows variance n where n is the number of columns
|
public matrix sub matrix int row int column int height int width double v new double height width for int i row i row height i for int j column j column width j v i row j column values i j matrix subm new matrix subm values v subm rows height subm columns width return subm
|
gets a copy of designated submatrix
|
protected void output matrix m string file try print writer pw new print writer file pw println m rows m columns for int i 1 i m rows i for int j 1 j m columns j pw print m get quick i j pw println pw flush pw close catch exception e e print stack trace
|
this method writes a matrix to the given file
|
public int signature eff string label integer index label index get label if index null return 1 return effs index int value
|
this method returns the number of effective bits for given label
|
protected void initialize locations for v v get graph get vertices point2 d coord delegate transform v if dontmove contains v initialize location v coord get size
|
this method calls tt initialize local vertex tt for each vertex and
|
protected void initialize location v v point2 d coord dimension d point point map get v coord set location point x point y
|
sets persisted location for a vertex within the dimensions of the space
|
public void persist string file name throws ioexception for v v get graph get vertices point p new point transform v map put v p object output stream oos new object output stream new file output stream file name oos write object map oos close
|
save the vertex locations to a file
|
protected void check offscreen image dimension d if double buffered if offscreen null offscreen get width d width offscreen get height d height offscreen new buffered image d width d height buffered image type int argb offscreen g2d offscreen create graphics
|
ensure that if double buffering is enabled the offscreen
|
override public void repaint rectangle r
|
overridden for performance reasons
|
override public void fire property change string property name boolean old value boolean new value
|
overridden for performance reasons
|
public v get vertex layout v e layout double x double y double max distance return super get vertex layout x y max distance
|
gets the vertex nearest to the location of the x y location selected
|
public e get edge layout v e layout double x double y double max distance return super get edge layout x y max distance
|
gets the edge nearest to the location of the x y location selected
|
public void add graph mouse listener graph mouse listener v gel add mouse listener new mouse listener translator v e gel this
|
this is the interface for adding a mouse listener
|
protected boolean vertices are filtered predicate context graph v e v vertex include predicate vv get render context get vertex include predicate return vertex include predicate null vertex include predicate instanceof true predicate false
|
quick test to allow optimization of code get filtered vertices code
|
protected boolean edges are filtered predicate context graph v e e edge include predicate vv get render context get edge include predicate return edge include predicate null edge include predicate instanceof true predicate false
|
quick test to allow optimization of code get filtered edges code
|
protected boolean is vertex rendered context graph v e v context predicate context graph v e v vertex include predicate vv get render context get vertex include predicate return vertex include predicate null vertex include predicate evaluate context
|
returns code true code if this vertex in this graph is included
|
public float get pick size return pick size
|
returns the size of the edge picking area
|
public void set pick size float pick size this pick size pick size
|
sets the size of the edge picking area
|
public void draw shape s shape shape shape transformer transformer transform s delegate draw shape
|
transform the shape before letting the delegate draw it
|
public void fill shape s shape shape shape transformer transformer transform s delegate fill shape
|
transform the shape before letting the delegate fill it
|
public shape transform shape shape return transform shape 0
|
transform the supplied shape with the overridden transform
|
public boolean hit rectangle rect shape s boolean on stroke shape shape shape transformer transformer transform s return delegate hit rect shape on stroke
|
transform the shape before letting the delegate apply hit
|
public shape magnify shape shape return magnify shape 0
|
magnify the shape without considering the lens
|
private void set component component component dimension d component get size if d width 0 d height 0 d component get preferred size float ewidth d width 1 5f float eheight d height 1 5f lens shape set frame d width 2 ewidth 2 d height 2 eheight 2 ewidth eheight
|
set values from the passed component
|
public shape transform shape shape rectangle2 d bounds shape get bounds2 d point2 d center new point2 d double bounds get center x bounds get center y point2 d new center transform center double dx new center get x center get x double dy new center get y center get y affine transform at affine transform get translate instance dx dy return at create transformed shape shape
|
return the supplied shape translated to the coordinates
|
public shape inverse transform shape shape rectangle2 d bounds shape get bounds2 d point2 d center new point2 d double bounds get center x bounds get center y point2 d new center inverse transform center double dx new center get x center get x double dy new center get y center get y affine transform at affine transform get translate instance dx dy return at create transformed shape shape
|
return the supplied shape translated to the coordinates
|
public point2 d inverse transform point2 d p return get inverse transform p null
|
applies the inverse transform to the supplied point
|
public void scale double scalex double scaley point2 d from affine transform xf affine transform get translate instance from get x from get y xf scale scalex scaley xf translate from get x from get y inverse null transform pre concatenate xf fire state changed
|
setter for the scale
|
public double get scale y return transform get scale y
|
getter for scaley
|
public void set scale double scalex double scaley point2 d from transform set to identity scale scalex scaley from
|
setter for the scale
|
public void shear double shx double shy point2 d from inverse null affine transform at affine transform get translate instance from get x from get y at shear shx shy at translate from get x from get y transform pre concatenate at fire state changed
|
shears the transform by passed parameters
|
public void set translate double tx double ty float scalex float transform get scale x float scaley float transform get scale y float shearx float transform get shear x float sheary float transform get shear y inverse null transform set transform scalex sheary shearx scaley tx ty fire state changed
|
replace the transforms translate x and y values
|
public double get shear x return transform get shear x
|
getter for shear in x axis
|
public void translate double offsetx double offsety inverse null transform translate offsetx offsety fire state changed
|
apply the passed values to the current transform
|
public double get shear y return transform get shear y
|
getter for shear in y axis
|
public void rotate double theta point2 d from affine transform rotate affine transform get rotate instance theta from get x from get y inverse null transform pre concatenate rotate fire state changed
|
preconcatenates the rotation at the supplied point with the current transform
|
public void rotate double radians double x double y inverse null transform rotate radians x y fire state changed
|
rotates the current transform at the supplied points
|
public double get translate x return transform get translate x
|
get the translate x value
|
public double get translate y return transform get translate y
|
get the translate y value
|
public void add change listener change listener l change support add change listener l
|
adds a code change listener code
|
public point2 d transform point2 d p if p null return null return transform transform p null
|
applies the transform to the supplied point
|
public void remove change listener change listener l change support remove change listener l
|
removes a change listener
|
public void fire state changed change support fire state changed
|
notifies all listeners that have registered interest for
|
public void set icon map map v icon icon map this icon map icon map
|
sets the icon storage to the specified code map code
|
public icon transform v v return icon map get v
|
returns the code icon code associated with code v code
|
public void set control offset increment float y control offset increment y
|
sets the value of code control offset increment code
|
public icon transform v v if pi is picked v return picked icon else return icon
|
returns the appropriate code icon code depending on picked state
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.