input
stringlengths
10
828
output
stringlengths
5
107
public void set tool tip text final string tool tip text if is text visible text element get parent set tool tip text tool tip text text element set tool tip text tool tip text image element set tool tip text tool tip text else text element get parent set tool tip text null text element set tool tip text null image element set tool tip text tool tip text
sets the receivers tool tip text to the argument
public void set visible final boolean visible content composite set visible visible final grid data data grid data content composite get layout data data exclude visible
sets whether details should be shown
protected breadcrumb item create item final breadcrumb item item new breadcrumb item this container item set label provider get label provider item set content provider get content provider if tool tip label provider null item set tool tip label provider tool tip label provider else item set tool tip label provider get label provider return item
creates a new instance of a breadcrumb item
public int get current width if image element get visible return 0 return image element compute size swt default swt default x
gets the current item width
public iselection provider get drop down selection provider if menu is shown return null return drop down viewer
gets the drop down selection provider
public window get drop down window if is menu shown return null return drop down window
gets the drop down window
public boolean is focus control return parent composite is focus control image element is focus control
returns code true code if the receiver has the user interface focus
public boolean is menu shown return menu is shown
gets a value indicating if this element is expanded
public void open drop down menu if enabled menu is shown return menu is shown true image element set image get arrow image true drop down window new drop down window image element get shell busy indicator show while image element get display new runnable override public void run drop down window open
opens the drop down menu
public void set enabled final boolean enabled this enabled enabled image element set visible enabled
set whether the drop down menu is available
private int build item chain final object element if element null return 0 final itree content provider content provider get content provider final object parent content provider get parent element final int index build item chain parent breadcrumb item item if index items size item items get index if item element null unmap element item element else item create item items add item if equals element item element update element null else item element element item refresh if parent null don t show the models root item set details visible root visible map element element item return index 1
generates the parent chain of the given element
private boolean is ltr return left to right
gets a value indicating if the breadcrumb is in left to right mode
private void disable redraw if is gtk return container set redraw false
disable redrawing of the breadcrumb
private void enable redraw if is gtk return container set redraw true
enable redrawing of the breadcrumb
private int get current width int result 2 for final breadcrumb item item items result item get current width return result
returns the current width of all items in the list
public program load program string program string this program string program string command strings program get list of command strings int current position 0 do current position load next command current position while current position 0 return program
does what it says on the tin
public string get label return parse label param raw param
getter for label
public void add command command command list of commands add command
convenience method to add a command to the list used by the program
public void pitch aloaf map long long dump this dump dump
setter for internal heap object
public int get index for label string label initialize this to the end command just in case int index 0 for command command list of commands if command get full command type equals full command type label if string utils equals command get label label break index return index
gets the index of a label command for a given string label
public int get current command return current command
getter for the current command object being processed
public int get from command return from command
getter for the index of which command object this came from
public void set from command int from command this from command from command
setter for the index of which command object this came from
public command get command instance full command type full command type string params as whitespace command command null switch full command type get command type case arithmetic command new arithmetic command full command type params as whitespace break case dump command new dump command full command type params as whitespace break case flow command new flow command full command type params as whitespace break case io command new iocommand full command type params as whitespace break case stack command new stack command full command type params as whitespace break command set raw param params as whitespace return command
the meat of the loader that generates actual command instances
public long read unsigned int throws ioexception return read int 0x ffffffffl
this is an extra method not specified by data input
public string read utf throws ioexception return data input stream read utf
note this is read in big endian order
public void add trading system trading system system trading system runnable runnable new trading system runnable system runnables add runnable notify item added runnable if core plugin get default get preference store get boolean core plugin feed running runnable start
adds a new trading system to the manager
public void remove trading system trading system system trading system runnable systems get runnables for int i 0 i systems length i if systems i get trading system system runnables remove systems i systems i stop notify item removed systems i
removes a trading system from the manager
public void start all trading system runnable systems get runnables for int i 0 i systems length i systems i start
starts all trading systems
public void stop all trading system runnable systems get runnables for int i 0 i systems length i systems i stop
stops all trading systems
public int get runnables count return runnables size
returns the number of managed trading systems
public void add runnables observer icollection observer observer observers add observer
adds an observer to the collection of observers that receive
public void remove runnables observer icollection observer observer observers remove observer
removes an observer from the collection of observers that receive
protected void notify item added object o object obs observers get listeners for int i 0 i obs length i icollection observer obs i item added o
nofity the collection of observer that a new trading system was
protected void notify item removed object o object obs observers get listeners for int i 0 i obs length i icollection observer obs i item removed o
nofity the collection of observer that a trading system was
protected void update colors table item items table get items for int i 0 i items length i items i set background i 1 0 even background odd background
updates the table rows background colors
public void dispose system delete observer observer system remove strategy collection observer collection observer for iterator iter runnables iterator iter has next strategy runnable runnable strategy runnable iter next runnable dispose
disposes all resources associated to the receiver
public void dispose strategy remove security collection observer security observer
disposes all resources associated to the receiver
public void add security security security icomponent component atsplugin create strategy plugin strategy get plugin id component runnable runnable new component runnable this security component runnables add runnable if is running market manager add security security runnable start notify item added runnable
adds a security to the strategy
protected void add strategy strategy strategy add strategy new strategy runnable this strategy
adds a strategy to the trading system
public void remove security security security component runnable runnable get runnables for int i 0 i runnable length i if runnable i get security security if is running runnable i stop market manager remove security security runnables remove runnable i notify item removed runnable i runnable i dispose
removes a security from the strategy
public void add strategy strategy runnable runnable if running runnable start runnables add runnable notify item added runnable
adds a strategy runnable to the trading system
protected void remove strategy strategy strategy for iterator iter runnables iterator iter has next strategy runnable runnable strategy runnable iter next if runnable strategy strategy remove strategy runnable break
removes a strategy from the trading system
public void remove strategy strategy runnable runnable runnables remove runnable if running runnable stop runnable dispose notify item removed runnable
removes a strategy runnable from the trading system
public trading system get trading system return system
returns the underlying trading system object
public trading system runnable get parent return parent
returns the parent trading system runnable
public iexecution manager get execution manager return execution manager
returns the underlying execution manager
public imarket manager get market manager return market manager
returns the underlying market manager object
protected void update title tooltip final string buffer text new string buffer chart accept new chart visitor adapter public void visit chart chart text append chart get security get description public void visit chart indicator indicator string security id string indicator get parameters get security id if security id null security security security core plugin get repository load security class new integer security id if security null text append security get description set title tool tip text to string
updates the tooltip with the list of all partecipating securities
public int get width return map settings field width
get the width of the field
public int get height return map settings field height
get the height of the field
public void set draw location int x int y draw x x draw y y
manually set the location to draw the map
public float get start height return start height
get the tiles lower height if slanted else return height
public float get end height return end height
get the tiles upper height if slanted else return height
public void find and select tile int x int y double highest 0 0 int x index 1 y index 1 for int i 0 i map settings field width i for int j 0 j map settings field height j if field get i get j was clicked on new point x y highest field get i get j get height x index i y index j if x index 1 y index 1 this set selected tile x index y index else return
select the file that is under the mouse click
public void set tile data int x int y map tile data field get x set y data
set the tile at a certaint position to the new tile
public polygon get top return top
get the polygon that is the top of the tile
public void set selected tile int x int y if x 1 y 1 selected tile null return if selected tile null selected tile set selected false selected tile field get x get y selected tile set selected true
set the selected tile on the map
public point get field location return field location
get this tiles location on the field
public void set map size int width int height array list array list map tile temp field new array list array list map tile for int i 0 i width i temp field add new array list map tile for int j 0 j height j try temp field get i add field get i get j catch exception e temp field get i add new map tile map tile normal 1 1 temp field get i get j set field location new point i j map settings field height height map settings field width width field temp field
method to adjust the size of the map you are editing
public void set field location point p field location p
store the tiles location on the map set when map is made
public void set orientation int orientation if orientation 0 orientation 5 orientation empty this orientation orientation
set the orientation of the tile
public void set start height float start height system out println setting start height n this start height this end height this height this start height start height this height start height end height 2 system out println this start height this end height this height
set the lower height of the tile also updates average height
public void set end height float end height system out println setting end height n this start height this end height this height this end height end height this height start height end height 2 system out println this start height this end height this height
set the upper height of the tile also updates average height
public void set selected boolean selected this selected selected my color map settings selected color
set if the tile is selected of not
private void set color color my color this my color my color
change the color of the top of the tile
public boolean was clicked on point click return top contains click
check to see if this tile was clicked on
public void determine color if is selected set color map settings selected color return else set color map settings top color
decide what color to paint the top of this tile
public void draw int x int y graphics g switch orientation drawing the standard tile not slanted case normal draw normal x y g break use the same drawing method for the north south slants case up to north case up to south draw north south x y g break use the same drawing method for the east west slants case up to east case up to west draw east west x y g break ignore empty tiles case empty break default system out println that orientation doesn t exist
draw this map tile object
public void init components this set size aap get size this add aap at new animation timer fps
add the components to the window and set the size
public void begin animation at start
start the animation timer
public void find move locations map map add locations map location x location y stat stat move range ordinal
method to gather the tiles that this unit can move to calls recursive
public boolean was clicked on point click bug fix when checking to see if you had clicked on a tile after copying and pasting an empty tile top contains click would throw a null pointer exception the reasons for this are unknown possibly due to the top variable being refreshed only when drawn empty tiles are never drawn if top null return false return top contains click
check to see if this tile was clicked on
public void set selected boolean selected this selected selected my color map tile selected color
set if the tile is selected of not
public void determine color if is selected set color map tile selected color return else set color map tile top color
decide what color to paint the top of this tile
public void find and select tile int x int y double highest 0 0 int x index 1 y index 1 for int i 0 i map settings field width i for int j 0 j map settings field height j if field i j was clicked on new point x y highest field i j get height x index i y index j if x index 1 y index 1 this set selected tile x index y index else return
select the file that is under the mouse click
public void set tile data int x int y map tile data field x y data
set the tile at a certaint position to the new tile
public void set selected tile int x int y if x 1 y 1 x map settings field width y map settings field height selected tile null return if selected tile null selected tile set selected false selected tile field x y selected tile set selected true
set the selected tile on the map
public void set map size int width int height map tile temp field new map tile width height for int i 0 i width i for int j 0 j height j temp field i j field i j map settings field height height map settings field width width field temp field
method to adjust the size of the map you are editing
public void rotate cw rotate clockwise
rotate the map clockwise 90 degrees
public void rotate ccw rotate counter clockwise
rotate the map couter clockwise 90 degrees
public void set selected boolean selected this selected selected my outline color white
set if the tile is selected of not
public void set color color new color map get selected tile top color new color
change the color of the top of the tile
public void determine color if is selected my outline color white else my outline color black
decide what color to paint the top of this tile
public void update table model result set rs throws sqlexception vector result table new vector vector columns null while rs next vector row new vector for int i 1 i rs get meta data get column count i row add rs get string rs get meta data get column name i result table add row default table model set data vector result table columns default table model set column count columns size
aktualisiert die tabelle
public boolean is committed int taid string log line boolean committed false try random access file log file new random access file data log koord txt rw while log line log file read line null if log line contains commit all if integer value of log line substring log line index of commit all 11 log line index of taid committed true catch file not found exception e e print stack trace catch ioexception e e print stack trace return committed
pr ft ob die transaktion im log committed ist
public boolean prepare int taid boolean prepared true this log this get next lsn prepared taid return prepared
bereitet commit vor
public boolean update exiftool this clean up this create downloader this downloader start return false
upated exiftool from the internet
public void clean up this logger fine cleaning up this stop scan this save user prefs this set visible false this dispose
stop all running processes
private void choose contacts xml jfile chooser fc new jfile chooser fc set file selection mode jfile chooser files only string path this j text field contacts xml get text if path null path file f new file path fc set selected file f fc set multi selection enabled false int return val fc show open dialog null if return val jfile chooser approve option file file fc get selected file path file get absolute path this logger log level finer user has choosen a file 0 path this j text field contacts xml set text path this save guisettings
open a file chooser to find the contacts
private void kill exiftool tasklist fi imagename eq java taskkill f fi imagename eq exiftool this set command taskkill f fi imagename eq exiftool this run command and wait for false
this works for windows only
private void open help dialog this open help dialog picasatagstopictures resources html help html
open the help
private void prepare exif tool throws exiftool timeout exception if this start exif tool this exiftool running false return else this exiftool running true
call allways befor using read picture
private void open about dialog jdialog about d new jdialog about this picasatagstopictures resources html about html d set visible true
open the about dialog
public string get properties file string dir system get property user dir string f dir file separator key file name return f
file to read and write the user preferences
public list get pids string image name this logger log level fine try to find processes by image name 0 image name list pids this run command image name process controler mode tasklist return pids
works for windows only
private void send feedback string feedback string if this feedback gui null return if this run flag is running return this feedback gui receive feedback feedback string
send a feedback string the gui
private string get properties file string dir system get property user home string dir system get property user dir dir dir file separator picasatags2pictures file separator prefs file d new file dir if d exists this logger finer no need for mkdirs for dir else boolean success d mkdirs if success this logger finer made directory for user preferences dir else this logger warning failed to make directory for user preferences dir return null string f dir file separator key file name return f
file to read and write the user preferences
private void choose directory jfile chooser fc new jfile chooser fc set file selection mode jfile chooser directories only string path this j text fieldl directory get text if path null path file f new file path fc set selected file f fc set multi selection enabled false int return val fc show open dialog null if return val jfile chooser approve option file file fc get selected file path file get absolute path this logger log level finer user has choosen a file 0 path this j text fieldl directory set text path this save user prefs
open a file chooser to choose the pictures directory
private void sleep alittle bit long sleep time 2000 long start time system current time millis while system current time millis start time sleep time continue
during the junit tests the instances of exitool sometimes overl p