input stringlengths 10 828 | output stringlengths 5 107 |
|---|---|
private interaction interface create canvas mlscene graph interface scene graph system out println create canvas mlscene graph interface scene graph interaction interface cgl null cgl interaction interface scene graph create canvas3 d 100 100 return cgl | adds the scene graph to a canvas |
public binding manager interface get binding manager return new glbinding manager | returns the binding manager |
public graphics handler interface get graphics handler return graphics handler | returns the graphics handler |
public mlscene graph interface get mlscene graph return current mlscene graph | returns the mlscene graph |
public void set mlscene graph mlscene graph interface ml current mlscene graph ml | sets the metaphor layout scene graph |
protected void set layout mlscene graph interface scene graph layout interface lay new no layout lay set gui vizz gui scene graph set current layout lay | sets the initial layout and metaphor |
public void expand visual node iterator sgni scene graph scene graph nodes visual node interface node null while sgni has next node sgni next if node is marked node expand node unmark node | this method expands all marked nodes if they can be expanded |
public void select all visual node iterator sgni scene graph scene graph nodes visual node interface node null while sgni has next node sgni next select node node true false false | sets all nodes as marked |
public void deselect all visual node iterator sgni scene graph scene graph nodes visual node interface node null while sgni has next node sgni next select node node false false false | sets all nodes as unmarked |
public void set current layout layout interface l current layout l | set the current layout |
public void set current metaphor metaphor interface m current metaphor m | set the current metaphor |
public layout interface get current layout return current layout | get the current layout |
public metaphor interface get current metaphor return current metaphor | get the current metaphor |
public visual graph interface get scene graph return scene graph | return the scene graph |
public interaction interface get interaction return interaction | retrieve the interaction |
public void remove scene edge edge interface edge vizz gui get jframe get data graph adapter remove edge edge scene graph remove edge edge | remove visual scene edges |
private void remove edges node interface node edge iterator ni data graph edges while ni has next ni next edge interface edge ni get edge boolean is the edge vizz gui get jframe get data graph adapter edge contains node edge node if is the edge scene graph remove edge edge | remove all neighbor edges |
public void hide node type type values type boolean hide node iterator ni data graph nodes while ni has next ni next node interface node ni get node type values type node type values node get property graph properties type if type node null continue if type to string equals type node to string visual node interface vn scene graph get node node if nodetype doesnt exist anymore deleted tps if vn null return vn set visible hide | hide all nodes of a certain type |
public void hide edge type type values type boolean hide edge iterator ni data graph edges while ni has next ni next edge interface edge ni get edge type values type node type values edge get property graph properties type if type node null continue if type to string equals type node to string visual edge interface vn scene graph get edge edge if edgetype doesnt exist anymore deleted tps if vn null return if hide vn set visibility lock false vn visible hide if hide vn set visibility lock true | hide all edges of a certain type |
public void close vizz gui show gui false | hide the gui |
public guiinterface get gui return vizz gui | return the gui |
public file loader get file loader return file loader | return the file loader |
public void save graph save properties if file path null save graph as return graph load save gml new graph load save gml save gml data graph file path true | save the graph |
public void save graph as save properties graph load save gml new graph load save gml save gml data graph null true | save the graph as |
protected void close graph vdebug println err message closing the graph object panel vizz gui get visualization panel if panel instanceof jpanel vizz gui clear jpanel panel remove all vizz gui get jframe graph active false | close the graph |
public void set progress int current progress update splash screen s progress bar progress bar set value current progress this current progress current progress | method set progress sets the progress bar to a certain value |
public void progress update splash screen s progress bar rectangle progress rect panel for border get bounds progress rect x 0 progress rect y 0 panel for border paint immediately progress rect progress bar set value current progress | method progress increases the progress by one |
public void set max progress int max count progress bar set maximum max count | method set max progress initializes the progress bar to max count |
public void close close and dispose splash screen swing utilities invoke later new runnable public synchronized void run dispose | method close disposes the splash screen |
public int calculate cost int crossings int deltas int cost1 0 int cost2 0 for int i 0 i crossings 0 length 1 i for int j i 1 j crossings 0 length j cost1 crossings i j crossings j i deltas i j cost2 crossings j i return cost1 cost2 | calculates the cost of a layer permutation i |
private void init visual node iterator ni current graph scene graph nodes int random 80 while ni has next visual node interface node ni next if node is visible continue float x float math random random float y float base hight float z float math random random node set final position x y z | we need to randomize the coordinates in the beginning |
private void init visual node iterator ni current graph scene graph nodes int random current graph nodes size 2 while ni has next visual node interface node ni next if node is visible continue double x float math random random double y float math random random double z float math random random node set final position float x float y float z | we need to randomize the coordinates in the beginning |
public int number of crossings int total 0 if all layers null system out println attn all layers null test return 1 for int i 1 i all layers size i vector current layer vector all layers element at i abstract sort algorithm sort algorithm local new algorithm minimize crossings all layers node vector sort algorithm local set graph current graph int deltas sort algorithm local calculate deltas current layer int crossings sort algorithm local calculate crossings current layer i total sort algorithm local calculate cost crossings deltas return total | calculates the total number of crossings between all neighbour layers |
private void switch nodes in layer vector layer int pos1 int pos2 node node1 node layer element at pos1 node node2 node layer element at pos2 float x pos1 node1 get xcoord node1 set coordinates node2 get xcoord node2 set coordinates x pos1 int pos node2 get position node2 set position node1 get position all layers node1 set position pos all layers layer set element at node1 pos2 layer set element at node2 pos1 | exchanges the physical position of two nodes as well as their position |
public void toggle show name show name show name | toggles the annotation of the vertex |
private float get repulsion energy int index oct tree tree if tree null tree index index return 0 0f float dist get dist pos index tree position if tree index 0 dist tree width float energy 0 0f for int i 0 i tree children length i energy get repulsion energy index tree children i return energy return repu factor tree weight float math log dist repu index | returns the repulsion energy between the node with the specified index |
private float get energy int index repulsion energy float energy get repulsion energy index oct tree attraction energy for int i 0 i attr indexes index length i if attr indexes index i index float dist get dist pos attr indexes index i pos index energy attr values index i math pow dist attr exponent attr exponent gravitation energy float dist get dist to bary center index energy gravitation factor repu factor node nr 1 0 5f dist dist return energy | returns the energy of the specified node |
private float add repulsion dir int index oct tree tree float dir if tree null tree index index return 0 0f float dist get dist pos index tree position if tree index 0 dist tree width float dir2 0 0f for int i 0 i tree children length i dir2 add repulsion dir index tree children i dir return dir2 if dist 0 0 float tmp repu factor tree weight repu index dist dist for int j 0 j 3 j dir j tree position j pos index j tmp return tmp return 0 0f | computes the direction of the repulsion force from the tree |
private void compute repu factor repu factor 0 0f for int i 1 i node nr i for int j 0 j attr values i length j repu factor attr values i j repu factor node nr node nr 1 if repu factor 0 0f repu factor 1 0f | computes the factor for repulsion forces code repu factor code |
public boolean edit binding if binding config state null xmleditor switch on binding config state else file f new file my binding path open binding f get absolute path edit binding return true | edit binding specification |
public void accept xmldata changed state info s ignore dtd set edited document as new configuration binding dom s get document node binding n bind new glnode binding edge binding e bind new gledge binding create binding binding dom n bind node bindings create binding binding dom e bind edge bindings binding new glgraph binding n bind e bind | method accept xmldata changed |
public void add property binding graph properties p property binding b bound property put p b | method add property binding sets property binding functions for individual |
private void set standard properties edge interface e iterator all standard properties standard properties iterator while all standard properties has next graph properties p graph properties all standard properties next property binding b property binding bound property get p if b null e set property p b bind proberty for element e | method reset standard properties deletes previous bindings of standard |
public boolean new binding file f file f new file my default binding path open binding f get absolute path edit binding return true | create a new binding specification |
public boolean open binding string filename string my xml config path load from xmlfile binding config state xmleditor create handler this xmleditor start filename my xml config path binding config state return true | open the project from a file |
public void add property binding graph properties p property binding b if b null system err println binding not found for property p else if p null system err println graph property not found for binding b else bound property put p b | method add property binding sets property binding functions for individual |
private void set standard properties node interface n iterator all standard properties standard properties iterator while all standard properties has next graph properties p graph properties all standard properties next property binding b property binding bound property get p if b null n set property p b bind proberty for element n | method set standard properties does bindings of standard graph properties |
public void bind node node interface n set standard properties n set the other view properties to their default property binding iterator all properties n get properties iterator while all properties has next graph properties p graph properties all properties next if p is view property standard properties contains p property binding b property binding bound property get p if b null n set property p b bind proberty for element n | method bind node sets the visual properties of a node to default values |
public string get initial window perspective id return id | identifies the initial perspective the look of the application |
public void initialize iworkbench configurer configurer configurer set save and restore false | enables to save restore the location and size of the application |
public void stop log debug stopping application final iworkbench workbench platform ui get workbench if workbench null return final display display workbench get display display sync exec new runnable public void run if display is disposed workbench close | is called when the application is exited |
private iworkbench adapter get workbench adapter icontact contact iworkbench adapter result if contact instanceof iadaptable result iworkbench adapter iadaptable contact get adapter iworkbench adapter class else result null return result | helper method to adapt an entity to iworkbench adapter |
public boolean is dirty return managed form is dirty | true if the managed form is dirty modified false otherwise |
protected ieditor part get active editor return active editor | get the memorized editor |
private void build table creating the table that will be filled with data table viewer get table table set header visible true table set lines visible true table viewer model create columns table immediately refresh the columns in order to show the data refresh | builds the initial table with all present contacts |
private void make actions double click action new action public void run log debug double clicked on a contact opening editor iselection selection viewer get selection a new editor windows should be opened in order to edit or view an existing contact open editor action delegate open editor platform ui get workbench get active workbench window get active page selection | create and implement the action items |
public object get parent object child if child instanceof icontact return icontact child get parent return null | returns the parent element of a tree element |
public boolean has children object parent if parent instanceof icontact return icontact parent has children return false | this method has to be implemented by each member of the object domain |
public string get column text object element int column index log debug retrieving column text index column index for contact switch column index case 0 return contact element to string case 1 return contact element get private data get phone number case 2 return contact element get office data get phone number case 3 return contact element get private data get email default return | returns the data from the contact which belongs to the given column |
public image get image object obj string image key my image registry group icon if obj instanceof contact image key my image registry contact icon return my image registry get image registry get image key | determines which icons are used for parent tree objects and which icons |
public void create part control composite parent viewer new tree viewer parent swt single swt h scroll swt v scroll drill down adapter new drill down adapter viewer viewer set content provider new tree view content provider this viewer set label provider new tree view label provider this viewer set sorter new contact sorter viewer set input get view site make actions hook context menu hook double click action contribute to action bars | this is a callback that will allow us |
public void write encoding string version string encoding throws ioexception write xml version write version write encoding write encoding write | writes the given encoding of the xml file |
public void pre window open iworkbench window configurer configurer get window configurer set the initial window size configurer set initial size new point 700 650 configurer set show cool bar true configurer set show status line false configurer set show menu bar true configurer set show fast view bars false configurer set title add book | makes initial setting to the window that shows up on startup |
public void add child group group log debug registering new group with group registrar registrar put group get group name group group set parent this group set newly created false contact tree view get instance refresh | registers a new group and makes it available for adding contacts to it |
public void remove child group group log debug unregistering group from group registrar registrar remove group get group name group set parent null contact tree view get instance refresh if contact table view get instance null contact table view get instance refresh | removes a registered group delete |
public group create group log debug creating new group group group new group group set newly created true return null | creates a new group and returns it to the calling method |
protected void load schema get file containing schema file schema file final jfile chooser open dialog new jfile chooser int rv open dialog show open dialog this if rv jfile chooser approve option schema file open dialog get selected file else schema loaded false return load schema schema file | asks user for schema to load and then loads it |
protected void load schema file schema file try schema new schema schema file catch data format exception e joption pane show message dialog this this file is not an xml schema wrong file format joption pane error message schema loaded false return catch file not found exception e joption pane show message dialog this couldn t open the file file not found joption pane error message schema loaded false return catch ioexception e joption pane show message dialog this error reading the file file open error joption pane error message schema loaded false return schema loaded true create new file | loads a schema to use for files |
public boolean authenticate http servlet request request http servlet response response throws ioexception log debug trying to authenticate server properties get singleton instance get permission get class get canonical name if server properties get singleton instance get permission user permitted request response return false return true | authenticates the user |
public study panel get active panel return active panel tracker get active study panel | gets the saved active study panel |
public void study requested open study request event evt if evt get source this return int index find index evt get study uid if index 1 loader panel loader new loader panel add tab loading study loader index index of component loader load study index evt get study uid evt get codebase evt get token else set selected index index | opens a new or pre existing study |
public void window closed window event arg0 if fatal system exit this code get code | if the error was fatal exits the application |
public void window closing window event arg0 if fatal system exit this code get code else this dispose | if the error was fatal exits the application |
public boolean is image loaded if this image null return true null diagnostic image means we are an empty panel return this image get status image status fully loaded | determines whether this panels image is loaded |
protected void draw bandwidth text this bg set color color black this bg set font this small font string curr bandwidth this frmt format this bandwidth get last kbps font metrics fm this bg get font metrics int char height fm get ascent fm get descent this bg fill rect this brec x 1 this brec y fm string width curr 4 char height 4 this bg set color green this bg draw string curr this brec x 3 this brec y 2 fm get ascent | draws the bandwidth text |
private void draw load status graphics2 d g application properties ap application properties get singleton instance font font ap get font font plain 11 g set font font font metrics fm g get font metrics string status this num loaded of this loaded length images loaded rectangle2 d bounds fm get string bounds status g g set color color white g draw string status int this get width 2 0 bounds get width 2 0 int this get height bounds get height 8 | paints the number of images loaded below the scroll bar |
public float get bps long time system current time millis float bits 0 synchronized data list data point to remove new array list data point data size 4 for data point point data if point end time time my window to remove add point else if point start time time my window float relevant percent point end time time my window float point end time point start time bits point bits relevant percent else bits point bits data remove all to remove return bits my window 1000 0f | returns the approximate bandwidth in bits per second |
public diagnostic image get source image return diagnostic image source | returns the source object as a |
public boolean debugging on return debug | determines whethere debugging output is turned on |
public void select series string series uid int length 1 string study uid null for string uid this studies key set diagnostic image series this studies get uid get series uid if series null study uid uid length series length break select series study uid series uid length 2 | makes the specified series within the current study the active one |
public output stream get local file output stream throws ioexception try out ciph get init cipher encrypt mode key catch invalid key exception e ioexception exc new ioexception could not reinitialize cipher exc init cause e throw exc return new cipher output stream new file output stream get file out ciph get | gets an output stream for writing to the local file |
public string get selected series return series uid | gets the series uid for the currently selected series |
private void done purging from cache diagnostic image di long size image list entry entry find entry di if entry null this last mem purge entry priority | called by an |
private void done purging from disk diagnostic image di image list entry entry find entry di if entry null this last disk purge entry priority event dispatcher get singleton instance fire disk loader event new disk loader event di disk event type purged di get study uid di get series uid di get image index system current time millis 1 1 1 | called by an |
public int get nat height return nat height | gets the natural height of the image |
public void set nat height int nat height this nat height nat height | sets the natural height of the image |
public int get nat width return nat width | gets the natural width of the image |
public void set nat width int nat width this nat width nat width | sets the natural width of the image |
private boolean loaders active boolean act false for int i 0 i loaders length i if loaders i active act true break return act | checks whether there are any active loader threads |
public string get acn return acn | gets the accession number |
public void set acn string acn this acn acn | sets the accession number |
public string get inst return inst | gets the name of the institution where the study was taken |
public void set inst string inst this inst inst | sets the name of the institution where the study was taken |
public int get series number return series number | gets the series number |
public void set series number int series number this series number series number | sets the series number |
public void register xebra connection c string k reg put k c | register divconnection c with key k |
public xebra connection retrieve string k current reg get k return current | gets the xebra connection instance associated with the specified key |
public xebra connection get current return current | get the most recently requested xebra connection object |
public boolean is study open string uid return studies contains key uid | returns true if a study with the specified uid is presently open false |
public void abort abort true if di null di abort load try this interrupt catch security exception e do nothing | aborts download of current image |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.