input
stringlengths
10
828
output
stringlengths
5
107
public void set column name string colname column name colname
set the name of this column
private string write number double d return formatter format d
converts a code double code to a code string code not in
public affine transformation set to identity m00 1 0 m01 0 0 m02 0 0 m10 0 0 m11 1 0 m12 0 0 return this
sets this transformation to be the identity transformation
public list adjust segments find all points in envelope list pts in env find points in env env compute adjusted pt map pts in env return adjust segs
return a list of adjusted segments
public affine transformation set transformation affine transformation trans m00 trans m00 m01 trans m01 m02 trans m02 m10 trans m10 m11 trans m11 m12 trans m12 return this
sets this transformation to be a copy of the given one
public coordinate find point geometry geometry if geometry is empty can t use geometry get point because it returns null jon aquino return new coordinate 0 0 if geometry get dimension 0 points and multipoints jon aquino return geometry get coordinate if geometry instanceof geometry collection return find point geometry collection geometry get geometry n 0 geometry envelope middle envelope middle geometry if envelope middle instanceof point return envelope middle get coordinate geometry intersections envelope middle intersection geometry geometry widest intersection widest geometry intersections return centre widest intersection get envelope internal
finds a reasonable point at which to label a geometry
public double get determinant return m00 m11 m01 m10
computes the determinant of the transformation matrix
public coordinate centre envelope envelope todo refactoring move avg from guiutilities to a core jcs util class jon aquino return new coordinate math util avg envelope get min x envelope get max x math util avg envelope get min y envelope get max y
returns the centre of mass of the envelope
public void translate coordinate p if trans pt null trans pt new coordinate p else trans pt x p x trans pt y p y trans pt z p z
append a translation to the transform
public affine transformation set to reflection double x double y if x 0 0 y 0 0 throw new illegal argument exception reflection vector must be non zero rotate vector to positive x axis direction double d math sqrt x x y y double sin y d double cos x d rotate sin cos reflect about the x axis scale 1 1 rotate back rotate sin cos return this
sets this transformation to be a reflection about the line defined by
private double dot product coordinate p coordinate p0 coordinate p1 double dx0 p0 x p x double dy0 p0 y p y double dx1 p1 x p x double dy1 p1 y p y return dx0 dx1 dy0 dy1
computes the dot product of the vectors p p0 and p p1
public affine transformation set to rotation double sin theta double cos theta m00 cos theta m01 sin theta m02 0 0 m10 sin theta m11 cos theta m12 0 0 return this
sets this transformation to be a rotation by specifying the sin and cos
public affine transformation set to scale double x scale double y scale m00 x scale m01 0 0 m02 0 0 m10 0 0 m11 y scale m12 0 0 return this
sets this transformation to be a scaling
public affine transformation set to shear double x shear double y shear m00 1 0 m01 x shear m02 0 0 m10 y shear m11 1 0 m12 0 0 return this
sets this transformation to be a shear
public affine transformation set to translation double dx double dy m00 1 0 m01 0 0 m02 dx m10 0 0 m11 1 0 m12 dy return this
sets this transformation to be a translation
public affine transformation reflect double x double y compose reflection instance x y return this
updates the value of this transformation to that of a reflection
public affine transformation rotate double theta compose rotation instance theta return this
updates the value of this transformation to that of a rotation
public affine transformation rotate double sin theta double cos theta compose rotation instance sin theta cos theta return this
updates the value of this transformation to that of a rotation
public affine transformation scale double x scale double y scale compose scale instance x scale y scale return this
updates the value of this transformation to that of a scale
public affine transformation shear double x shear double y shear compose shear instance x shear y shear return this
updates the value of this transformation to that of a shear
public combined schema create schema string geometry name combined schema new schema new combined schema add attributes new schema a schema a attribute names a new attribute names new schema a new to old attribute index map new schema last new attribute index for a new schema get attribute count 1 add attributes new schema b schema b attribute names b new attribute names new schema b new to old attribute index map new schema add attribute geometry name attribute type geometry return new schema
returns a new feature schema with the destination attributes of the mapping
public affine transformation translate double x double y compose translation instance x y return this
updates the value of this transformation to that of a translation
public affine transformation compose affine transformation trans double mp00 trans m00 m00 trans m01 m10 double mp01 trans m00 m01 trans m01 m11 double mp02 trans m00 m02 trans m01 m12 trans m02 double mp10 trans m10 m00 trans m11 m10 double mp11 trans m10 m01 trans m11 m11 double mp12 trans m10 m02 trans m11 m12 trans m12 m00 mp00 m01 mp01 m02 mp02 m10 mp10 m11 mp11 m12 mp12 return this
composes the given
public affine transformation compose before affine transformation trans double mp00 m00 trans m00 m01 trans m10 double mp01 m00 trans m01 m01 trans m11 double mp02 m00 trans m02 m01 trans m12 m02 double mp10 m10 trans m00 m11 trans m10 double mp11 m10 trans m01 m11 trans m11 double mp12 m10 trans m02 m11 trans m12 m12 m00 mp00 m01 mp01 m02 mp02 m10 mp10 m11 mp11 m12 mp12 return this
composes this transformation with the given
public boolean is identity return m00 1 m01 0 m02 0 m10 0 m11 1 m12 0
tests if this transformation is the identity transformation
public string to string return affine transformation m00 m01 m02 m10 m11 m12
gets a text representation of this transformation
public object clone return new affine transformation this
clones this transformation
private 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
notify all listeners that have registered interest for
private double get scale int min int max double data min double data max double scale scale max min data max data min return scale
calculate scale between real data and integer data for showing up on screen
public int get index object o list model model this get model for int i 0 i model get size i object obj model get element at i if obj equals o return i return 1
assume no duplicate item in the list
public class get column class int c if types null return types c object o get value at 0 c if o null return o get class else return super get column class c
jtable uses this method to determine the default renderer
public boolean is cell editable int row int col note that the data cell address is constant no matter where the cell appears onscreen if editables null col editables length return editables col else return false
dont need to implement this method unless your tables
public void set types class types this types types
set data type of each column
public void move row up int row this move row row true
move a record up one row
public boolean is record contained string pk column name string value for int i 0 i this get row count i string pk string this get value at i pk column name if value equals pk return true return false
see if a record already contained in the table
public void remove data set listener data set listener l listener list remove data set listener class l
removes an data set listener from the button
protected void fire data set changed data set for apps data set logger finest shp to shp fire data set changed hi 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 set this data set listener listeners i 1 data set changed e
notify all listeners that have registered interest for
private int get value screen double data double scale int min double data min int value screen if double is na n data value screen integer min value else value screen int data data min scale min return value screen
convert the single value to integer value worked on screen
protected void init parallel space model model visual settings popup menu pop menu new visual settings popup menu this mouse adapter listener new visual settings popup adapter pop menu pop menu add mouse listener listener add mouse listener listener logger finest initializing parallel display component int empty array indication neighbors empty array set model model set minimum size new dimension 100 100 set preferred size new dimension 700 400 set background color white set double buffered false set opaque true set default preferences update ui
initializes the component with the given model
protected int get axis int order return axis order order
returns the dimension associated with the given axis
public int get num axes if axis order null return axis order length return 0
returns the number of axes to display
public void swap axes int axis1 int axis2 int temp axis order axis1 axis order axis1 axis order axis2 axis order axis2 temp
swaps two axes
public void set axis order int order axis order order
sets up the axis dimension assignment
public void set edit mode int mode edit mode mode reset cursor
sets the mode for user interaction with the display
public int get edit mode return edit mode
returns the currently active interaction mode
protected parallel space model get model return model
returns the model
public int get num records if model null return model get num records return 0
returns the number of records in the model
private float get yvalue int record int axis parallel display comp float value comp get value record axis value comp get axis offset axis value comp get height 2 border v comp get axis scale axis return value
helper function returns the y value on screen for a given record
public void mouse exited mouse event e hover record 1
invoked when the mouse exits the component
public void mouse released mouse event e parallel display comp parallel display e get component switch comp get edit mode case parallel display reorder drag axis false break case parallel display brush in brush false break
invoked when a mouse button has been released on a component
public void remove color array listener color array listener l listener list remove color array listener class l
removes an color array listener from the component
public void set ui parallel display ui ui super set ui ui
sets the user interface delegate for the component
public void remove palette listener palette listener l listener list remove palette listener class l
removes an palette listener from the component
public void remove color classifier listener color classifier listener l listener list remove color classifier listener class l
removes an color classifier listener from the component
public void mouse clicked mouse event e parallel display comp parallel display e get component arrow clicked or invert mode if comp get edit mode parallel display invert e get y 25 e get y 12 if hover axis 1 comp set axis offset hover axis comp get axis offset hover axis comp get axis scale hover axis comp set axis scale hover axis comp get axis scale hover axis 1 render region active axis 1 active axis 1
invoked when the mouse has been clicked on a component
public void state changed change event e repaint
invoked when the model has changed its state
private void fire palette changed palette new palette guaranteed to return a non null array object listeners listener list get listener list palette 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 palette listener class lazily create the event if e null e new palette event this new palette palette listener listeners i 1 palette changed e next i
notify all listeners that have registered interest for
public void indication changed indication event e int indication e get indication this indication indication indication neighbors e get neighbors if logger is loggable level finest logger finest got indication n bors indication neighbors length model basic parallel display ui bui basic parallel display ui uimanager get ui this can t use previous line b c this makes a new ui when called bui set hover record indication this if saved selection null get ui get render thread null saved selection length 0 get ui get render thread use selection blur use selection blur repaint
added by frank hardisty 19 july 2002
private void fire action performed string command if update 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 i end if
notify all listeners that have registered interest for notification on
public float get axis offset int num if axis offset null axis order length num return axis offset axis order num return 0
returns the current offset translation in axis units for the axis
private void set meta info string text int x int y meta text text meta x x meta y y
helper method to display a tooltip on hover
public float get axis scale int num if axis scale null axis order length num return axis scale axis order num return 0
returns the current scale visible region in axis units for the axis
public int get record by coordinates int x int y parallel display comp for int i 0 i num dimensions 1 i if x i stepx x i 1 stepx float part x i stepx float stepx for int j 0 j num records j if j comp get num records return 1 float rec val 1 part get yvalue j i comp part get yvalue j i 1 comp if logger is loggable level finest logger finest get record by coordinates rec val if math abs rec val y 3 0 return j break return 1
returns the record that goes through the screen coordinates x y
public void set axis offset int axis float offset if axis offset null axis offset length axis order axis axis offset axis order axis offset repaint
sets the offset translation in axis units for the axis
public void set axis scale int axis float scale if axis scale null axis scale length axis order axis axis scale axis order axis scale repaint
sets the scale visible region in axis units for the axis
public void min max scale for int i 0 i get num axes i initialize scaling of axis to show maximum detail axis offset i model get max value i axis scale i model get min value i axis offset i deep repaint true repaint
configures scales translates all axes to show all values between its
public void remove bivariate palette listener bivariate palette listener l listener list remove bivariate palette listener class l
removes an bivariate palette listener from the component
public void zero max scale for int i 0 i get num axes i initialize scaling of axis to show maximum detail axis offset i model get max value i axis scale i 1 axis offset i deep repaint true repaint
configures scales translates all axes to show all values between zero
public void add record float values string label if num dimensions 0 init num dimensions values length else if values length num dimensions throw new illegal argument exception recordsets must have same number of dimensions num dimensions this values add element values record labels add element label
adds a record
public void add record float values add record values null
adds a record
public void min max abs scale int i float absmax float negative infinity float absmin 0 0f for i 0 i get num axes i initialize scaling of axis to show maximum detail float val model get max value i if val absmax absmax val val model get min value i if val absmin absmin val for i 0 i get num axes i axis offset i absmax axis scale i absmin absmax deep repaint true repaint
configures scales translates all axes to show values between zero or
protected void init num dimensions int num if num dimensions 0 throw new illegal argument exception number of dimensions already set to num dimensions num dimensions num axis labels new string num value labels new hashtable num for int i 0 i num i axis labels i null value labels i null
sets up all internal variables for the given number of dimensions
public int get num dimensions return num dimensions
returns the number of dimnesions
public int get num records return values size
returns the number of records
public float get max value int dimension float maxval float values first element dimension if float is na n maxval maxval 1 float max value for int i 0 i values size i if float values element at i dimension maxval maxval float values element at i dimension return maxval
returns the maximum value for the given dimension
public float get min value int dimension float minval float values first element dimension if float is na n minval minval float max value for int i 0 i values size i if float values element at i dimension minval minval float values element at i dimension return minval
returns the minimum value for the given dimension
public float get value int record int dimension if record values size logger severe tried to fetch obs record out of values size return float max value float vals float values element at record if dimension vals length logger severe tried to fetch dimension dimension out of vals length return float max value return vals dimension
returns a specific value of the dataset
public string get axis label int dimension return axis labels dimension
returns a string label for a specific dimension
public void set axis labels string labels for int i 0 i labels length i axis labels i labels i
sets the labels for all axes
public void set axis label int dimension string label axis labels dimension label
sets the label of a single axis
public hashtable get value labels int dimension return value labels dimension
returns a hashtable with labels for specific values
public string get value label int dimension float value if value labels dimension null return string value labels dimension get new float value return null
returns the label for a single value in a specific dimension if present
public void set value labels int dimension float values string labels if values length labels length throw new illegal argument exception number of values and labels do not match if value labels dimension null value labels dimension new hashtable for int i 0 i values length i value labels dimension put new float values i labels i
sets the value labels for a dimension
public void set value label int dimension float value string label if value labels dimension null value labels dimension new hashtable value labels dimension put new float value label
sets a single value label for a specific axis
public void add change listener change listener l listeners add change listener class l
subscribes a change listener with the model
public void remove change listener change listener l listeners remove change listener class l
removes a previously subscribed change listener
public string get record label int num return string record labels element at num
returns a human readable label for a specific record
public void read contents throws ioexception fire progress event new progress event this progress event progress start 0 0f loading file urlconnection conn url open connection conn connect filesize conn get content length logger finest filesize filesize input stream reader in new input stream reader conn get input stream read first line in read header lines in read data in fire progress event new progress event this progress event progress finish 1 0f loading file
reads the contents of the file and exposes them vis the
public void fire indication changed int new indication 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 new indication indication listener listeners i 1 indication changed e next i
notify all listeners that have registered interest for notification on
public void fire selection changed guaranteed to return a non null array object listeners listener list get listener list selection 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 selection listener class lazily create the event if e null int new selection find selection e new selection event this new selection selection listener listeners i 1 selection changed e next i
notify all listeners that have registered interest for notification on
public void fire conditioning changed int condition guaranteed to return a non null array object listeners listener list get listener list conditioning 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 conditioning listener class lazily create the event if e null e new conditioning event this condition conditioning listener listeners i 1 conditioning changed e next i
notify all listeners that have registered interest for notification on
public void add action listener action listener l listener list action add action listener class l
adds an action listener to the button
public void remove action listener action listener l listener list action remove action listener class l
removes an action listener from the button
public void fire action performed guaranteed to return a non null array object listeners listener list action get listener list process the listeners last to first notifying those that are interested in this event action event e2 new action event this action event action performed ok for int i listeners length 2 i 0 i 2 if listeners i action listener class lazily create the event action listener listeners i 1 action performed e2
notify all listeners that have registered interest for notification on
public void state changed change event e this gets the source or originator of the event try slider action performed e catch exception ex logger throwing sliders class get name init ex
get the event from a unit plot and send it to all units
public void add indication listener indication listener l logger finest parallel plot adding indication listener listener list add indication listener class l
adds an indication listener
public void remove indication listener indication listener l logger finest pcp removing indication listener listener list remove indication listener class l
removes an indication listener from the component
public void add selection listener selection listener l parallel display add selection listener l
adds an selection listener
public void remove selection listener selection listener l parallel display remove selection listener l
removes an selection listener from the component
public void set color index int polygon colors this color index polygon colors
dummy method to fit superclass