input
stringlengths
10
828
output
stringlengths
5
107
private void fire indication changed int new indication if fire indications false return 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
protected range slider create default slider range slider slider new range slider number of sliders 1 return slider
creates a rangeslider using all of the defaults
protected void initialize tabbed pane new jtabbed pane swing constants top tabbed pane add change listener this this add tabbed pane set background color black slider tabs new vector
initializes the range sliders
protected void add tabs range slider slider panes int number of slider panes slider panes length logger finest number of slider panes number of slider panes for int i 0 i number of slider panes i logger finest range slider legend ctor slider panes i slider panes i logger finest tabbed pane tabbed pane tabbed pane add tab slider panes i get tab title slider panes i tabbed pane add tab get tab title slider panes i slider tabs add slider panes i
creates tabs on the range slider legend and adds the sliders to them
public void set create slider int number of sliders int count number of sliders for int i 0 i count i range slider slider new range slider string attribute name get tab title string attribute name tab title tabbed pane add tab attribute name slider slider tabs add slider
set how many sliders are created
public void set visible boolean visible if this visible visible this visible visible client repaint visualization repaint
sets the visible
public void fire selection changed int radius if fire selections false return 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 this find selection radius 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 int compare object o1 object o2 double d point2 d double o1 get y point2 d double o2 get y if d 0 return 1 else if d 0 return 0 else return 1
for sorting points vertically
public void set units string u range slider rslider range slider slider tabs get current index rslider set units u
method to set title of the rangeslider
public void set title string s range slider rslider range slider slider tabs get current index rslider set title s
method to set title of the rangeslider
public int get gap return gap
returns the gap
public color get label panel color range slider rslider range slider slider tabs get current index return rslider get label panel color return slider panes current index get label panel color
returns the color of the panel containing the labels of the thumb
public void set gap int gap this gap gap
sets the gap
public void set label panel color color lpc range slider rslider range slider slider tabs get current index rslider set label panel color lpc slider panes current index set label panel color lpc
sets the color of the panel containing the labels of the thumb locations
public int get max labels return max labels
returns the max labels
public void set max labels int max labels this max labels max labels item position new point2 d double max labels allocate points item position link position new point2 d double max labels allocate points link position label position new point2 d double max labels allocate points label position left new point2 d double max labels right new point2 d double max labels
sets the max labels
public int get focus size return focus size
returns the focus size
public void set focus size int focus size this focus size focus size cursor bounds new rectangle2 d double 0 0 focus size focus size
sets the focus size
protected void fire change event guaranteed to return a non null array object listeners listener list get listener list change 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 change listener class lazily create the event if e null e new change event this change listener listeners i 1 state changed e
notify all listeners that have registered interest for notification on
public void mouse clicked mouse event e if folded folded false set minimum size unfolded size set preferred size unfolded size set maximum size unfolded size fire action performed unfold else folded true set minimum size folded size set preferred size folded size set maximum size folded size fire action performed fold
toggle our state and let any listening classes know
private void check orientation int orientation switch orientation case vertical case horizontal break default throw new illegal argument exception orientation must be one of vertical horizontal
validates the orientation parameter
public boolean is transformed float x float y return metric compare lens radius x focus x y focus y 0
returns true of point is transformed
public int get number of thumbs return slider models length
returns the number of thumbs in the slider
public boolean is transformed double x double y return is transformed float x float y
returns true of point is transformed
private void set number of thumbs int min int max int num set number of thumbs min max num false
sets the number of thumbs with the specified parameters
public void set thumb count int count thumb count count
sets the number of thumbs
private void set number of thumbs int min int max int values if values null values length 1 values new int 50 int num values length slider models new bounded range model num for int i 0 i num i slider models i new default bounded range model values i 0 min max slider models i add change listener change listener update ui
sets the number of thumbs with the specified parameters
protected int get current index return current index
returns the index number of the thumb currently operated
public void set number of thumbs int num set number of thumbs num false
sets the number of thumbs
public boolean is transformed point2 d p return is transformed p get x p get y
returns true of point is transformed
public void set number of thumbs int num boolean use end points if get number of thumbs num set number of thumbs get minimum get maximum num use end points
sets the number of thumbs
public void set number of thumbs int values set number of thumbs get minimum get maximum values
sets the number of thumbs by specifying the initial values
public int get current thumb index return multi slider ui ui get current index
returns the index number of currently operated thumb
public bounded range model get model at int index if slider models null index slider models length return null return slider models index
returns data model that handles the sliders three fundamental properties
public void set model at int index bounded range model new model bounded range model old model get model at index if old model null old model remove change listener change listener slider models index new model if new model null new model add change listener change listener if accessible context null accessible context fire property change accessible context accessible value property old model null null new integer old model get value new integer new model get value fire property change model old model slider models index
sets the model that handles the sliders three fundamental properties
public int get value at int index return get model at index get value
returns the sliders value
public void set value at int index int n bounded range model m get model at index int old value m get value m set value n if accessible context null accessible context fire property change accessible context accessible value property new integer old value new integer m get value
sets the sliders current value
public boolean get value is adjusting at int index return get model at index get value is adjusting
true if the slider knob is being dragged
public void set value is adjusting at int index boolean b bounded range model m get model at index boolean old value m get value is adjusting m set value is adjusting b if old value b accessible context null accessible context fire property change accessible context accessible state property old value accessible state busy null b accessible state busy null
sets the models value is adjusting property
public float point height float x float y return height distance x y
returns the height of a specified point
public void set bounded boolean b bounded b
sets a bounded attribute of a slider thumb
public boolean is bounded return bounded
returns a bounded attribute of a slider thumb
public void set focus float x float y focus x x focus y y bounds x x lens radius bounds y y lens radius
sets for focus position
public float distance float x float y return metric distance x focus x y focus y
returns the distance of the specified point from the focus
public float height float dist if focal height 0 return 0 float real focus focus radius get maximum scale if dist lens radius return 0 else if dist real focus return focal height else float t dist real focus lens radius real focus return math min focal height lens t focal height
returns the height at the specified distance from the focus
public void mouse pressed mouse event e mouse x1 e get x
begin the drawing of selection region box
public float lens float t return lens profile profile t
returns the height at the specified normalized distance from the focus
public void mouse dragged mouse event e int v for int i 0 i pixel values size i v integer pixel values get i int value if math abs mouse x1 v 5 mouse x2 e get x this repaint
work with mouse released to draw a selection region box for selection
public float get focus x return focus x
returns the focus x
public void mouse moved mouse event e if e null 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 float get focus y return focus y
returns the focus y
public void set focus x float focus x this focus x focus x bounds x focus x lens radius
sets the focus x
public void set minor tick spacing int minor tick range slider set minor tick spacing minor tick repaint
put your documentation comment here
public void action performed action event e try action button action performed e catch exception ex logger throwing this get class get name show change boundarydlg ex
button to set up new data ranges shown up in scatter plot
public float get lens radius return lens radius
returns the lens radius
public void set focus y float focus y this focus y focus y bounds y focus y lens radius
sets the focus y
private void action button action performed action event e get the input data from text field changed thumb value double parse double change boundary field get text value of thumb set idx of changed thumb new double changed thumb value convert values to pixels dialog set visible false repaint
set up new data ranges to show
public void remove data set modified listener column appended listener l listener list remove column appended listener class l
removes an column appended listener from the button
protected void fire data set modified changed if logger is loggable level finest logger finest shp to shp fire data set modified changed hi guaranteed to return a non null array object listeners listener list get listener list column appended 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 column appended listener class column appended listener listeners i 1 data set modified e
notify all listeners that have registered interest for notification on
public object get attribute numeric int numeric index if numeric index this num numeric attributes return data set numeric and spatial numeric index 1 skip attribute names
returns the appropriate array counting only the numerical variables
public void set lens radius float radius lens radius radius if focus radius radius focus radius radius bounds width 2 radius bounds height 2 radius bounds x focus x lens radius bounds y focus y lens radius
sets the lens radius
public float get focus radius return focus radius
returns the focus radius
public void set focus radius float focus radius this focus radius focus radius
sets the focus radius
public int get number numeric attributes return num numeric attributes
returns the number of numerical variables double int and string
public int get num observations return num observations
returns the number of observations in the data set for which there are
public void set number of thumbs int num thumbs range slider set number of thumbs num thumbs repaint
put your documentation comment here
public float get focal height return focal height
returns the focal height
public int get spatial type return spatial type
returns the type of spatial data in the data set
public void set focal height float focal height if focal height 0 focal height 0 else if focal height 9 focal height 9 this focal height focal height
sets the focal height
public void set maximum scale float scale if scale 0 set focal height 0 else set focal height 10 10 scale
change the maximum scale
protected void fire data set changed data set for apps data 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 this data set listener listeners i 1 data set changed e
notify all listeners that have registered interest for notification on
public void add auxiliary data set listener auxiliary data set listener l listener list add auxiliary data set listener class l
adds a auxiliary data set listener
public void remove auxiliary data set listener auxiliary data set listener l listener list remove auxiliary data set listener class l
removes a auxiliary data set listener
public float get maximum scale return 10f 10f focal height
returns the maximum scale
public short get distance metric return distance metric
returns the distance metric
public short get lens type return lens type
returns the lens type
public void set distance metric short distance metrics distance metric distance metrics switch distance metrics case distance l1 metric new distance l1 break case distance l2 metric new distance l2 break case distance linf metric new distance linf break
sets the distance metric
public void set lens type short lens type this lens type lens type switch lens type case lens gaussian lens profile new profile guassian break case lens cosine lens profile new profile cos break case lens hemisphere lens profile new profile cos break case lens inverse cosine lens profile new profile inverse new profile cos break case lens linear lens profile new profile linear break
sets the lens type
public integer get view id integer id integer get id assume it use integer as id return new integer id int value 1
internally id is 0 based
public int compare to object o category another ctg category o float a min another ctg get min if get min a min return 1 else if get min a min return 1 else return 0
this is for paint category in a color bar
public float get tolerance return tolerance
returns the tolerance
public void set tolerance float tolerance if tolerance 1 tolerance 1 this tolerance tolerance
sets the tolerance
public void remove text listener text listener l listener list remove text listener class l
removes an text listener from the component
public void add classification listener classification listener l listener list add classification listener class l
adds an classification listener
public void remove classification listener classification listener l listener list remove classification listener class l
removes an classification listener from the component
public void fire classification changed guaranteed to return a non null array object listeners listener list get listener list classification 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 classification listener class lazily find the classification int new classification find classification lazily create the event if e null e new classification event this new classification classification listener listeners i 1 classification changed e next i
notify all listeners that have registered interest for notification on
private void init app throws exception todo load settings init gui init data store todo load data load system data
initialize the application
private scmaction get action scmcommit commit string path scmaction action null scmpath scm path new scmpath path for scmaction current action commit get actions if current action get path equals scm path return current action todo we should not pass here throw new runtime exception commit must contains all modification path not found return action
return the commit action detected parsing the commit log corresponding to
public object invoke aspect object aspect join point context context throws illegal access exception invocation target exception object arguments this construct invocation arguments aspect context return this advice block invoke aspect arguments
invokes this advice block with a join point context
public void bdpre cadastral throws exception prepared statement stmt null try con conexao do bd get connection string sql create table pre cadastral nome varchar 100 id varchar 10 primary key senha varchar 10 stmt con prepare statement sql stmt execute con close catch sqlexception sqle system out println sqle get message throw new sqlexception erro ao criar um dos banco de dados catch exception e system out println e get message throw new exception erro ao criar um dos banco de dados finally stmt close
cria o bd pre cadastral
public void bdusuario throws exception prepared statement stmt null try con conexao do bd get connection string sql create table usuario nome varchar 40 endereco varchar 70 email varchar 60 cadastro varchar 20 primary key telefone varchar 30 cpf varchar 40 rg varchar 40 sexo enum masculino feminino stmt con prepare statement sql stmt execute con close catch sqlexception sqle system out println sqle get message throw new sqlexception erro ao criar um dos banco de dados catch exception e system out println e get message throw new exception erro ao criar um dos banco de dados finally stmt close
cria o bd usuario
public string retrieve throws exception prepared statement stmt null result set rs null try stmt con prepare statement select login from logins string lista de logins rs stmt execute query while rs next lista de logins login rs get string 1 n n return lista de logins catch sqlexception sqle system out println sqle get message throw new sqlexception sqle get message catch exception e system out println e get message throw new exception e get message finally rs close stmt close
lista todos os logins armazenados no bd
public void bdlogins throws exception prepared statement stmt null try con conexao do bd get connection string sql create table logins login varchar 30 primary key senha varchar 6 cadastro varchar 15 stmt con prepare statement sql stmt execute con close catch sqlexception sqle system out println sqle get message throw new sqlexception erro ao criar um dos banco de dados catch exception e system out println e get message throw new exception erro ao criar um dos banco de dados finally stmt close
cria o bd logins
public void change database throws exception prepared statement stmt null try con2 conexao criador get connection string sql use stars stmt con2 prepare statement sql stmt execute con2 close catch sqlexception sqle system out println sqle get message throw new sqlexception erro ao trocar o database catch exception e system out println e get message throw new exception erro ao trocar o database finally stmt close
troca o data base para o data base do projeto
public void close connection throws exception con close
fecha a conexao
public void create actions
creates all the actions
public void create actions actions put edit question new edit question actions put remove question new remove question
creates all the actions
public void create actions file actions new jpbfile actions file actions create actions actions put all file actions get actions map exam actions new jpbexam actions exam actions create actions actions put all exam actions get actions map question actions new jpbquestion actions question actions create actions actions put all question actions get actions map
creates all the actions
public void create actions actions put exam properties new show exam properties actions put exam templates new show exam templates actions put compile build new compile build
creates all the actions
public abstract action get action string action command return null
return action to the specific action command