input
stringlengths
10
828
output
stringlengths
5
107
public void paint graphics g viewport viewport int radius in pixels int viewport get xdistance in pixels radius viewport get ydistance in pixels radius 2 int diameter in pixels radius in pixels 2 g set color color g fill oval int viewport get xpixel coordinate center x radius in pixels int viewport get ypixel coordinate center y radius in pixels diameter in pixels diameter in pixels
paints this circle
public boolean contains point double x double y return false
always returns false as a line has no area
private void process bring to front final shell shell os show window shell handle os sw restore os show window shell handle os sw show os set window pos shell handle os hwnd topmost 0 0 0 0 os swp nosize os swp nomove os set window pos shell handle os hwnd notopmost 0 0 0 0 os swp nosize os swp nomove os bring window to top shell handle os set foreground window shell handle os set focus shell handle os update window shell handle
process bring to front
private int prepare hotkey mask final boolean alt final boolean ctrl final boolean shift int x11 mask 0 if alt x11 mask x11 mod1 mask if ctrl x11 mask x11 control mask if shift x11 mask x11 shift mask return x11 mask
prepare hotkey mask
private void register hotkey with user notification final int id final int mask final int key if register hotkey id mask key hotkey registered false show tray tool tip command command command new show tray tool tip command this hotkey in use try different notification show tray tool tip command notification type information if initialized application command publisher publish command command else application command queue add command else hotkey registered true
register hotkey with user notification
private void unregister hotkey with user notification final int id final int mask final int key if unregister hotkey id mask key show tray tool tip command command command new show tray tool tip command this failed to unregister hotkey error show tray tool tip command notification type error if initialized application command publisher publish command command else application command queue add command else hotkey registered false
unregister hotkey with user notification
private image get image final input stream stream throws ioexception try display display display get current image data data new image data stream if data transparent pixel 0 return new image display data data get transparency mask return new image display data finally stream close
gets the image
private void show suggestion dialog display sync exec new runnable public void run if suggestion dialog initialized suggestion dialog open suggestion dialog set status suggestions dialog progress info default suggestion dialog initialized true if suggestion dialog is visible suggestion dialog set visible true window manager bring to front suggestion dialog
change suggestion dialog visibility
public void set widget factory final widget factory widget factory widget factory static facade widget factory widget factory
sets the widget factory
public void set keyboard layout manager final keyboard layout manager keyboard layout manager keyboard layout manager static facade keyboard layout manager keyboard layout manager
sets the keyboard layout manager
public void set translation manager final translation manager translation manager translation manager static facade translation manager translation manager
sets the translation manager
private void show about dialog display sync exec new runnable public void run if about dialog null about dialog new about dialog display about dialog add dispose listener new dispose listener public void widget disposed final dispose event arg0 about dialog null about dialog set location display get monitors 0 get client area width about dialog get size x 2 display get monitors 0 get client area height about dialog get size y 2 about dialog open else about dialog set focus
show about dialog
public void set resource manager final resource manager resource manager resource manager static facade resource manager resource manager
sets the resource manager
public void set window manager final window manager window manager window manager static facade window manager window manager
sets the window manager
public void set application properties manager final application properties manager application properties manager application properties manager static facade application properties manager application properties manager
sets the application properties manager
private response transform xml to object final input stream input stream try xmlstream reader xsr xsr xmlinput factory new instance create xmlstream reader input stream jaxbelement response o o unmarshaller unmarshal xsr response class return o get value catch jaxbexception e throw new runtime exception e catch xmlstream exception e throw new runtime exception e
transform xml to object
private e extract final e items this items e x items take index items take index null take index inc take index count return x
extracts element at current take position advances and signals
protected void notify hotkey change listners final int key code hotkey changed event e e new hotkey changed event this e key code key code e widget this for hotkey change listner hotkey chage listner listners hotkey chage listner hotkey changed e
notify hotkey change listners
public void put e e throws interrupted exception if e null throw new null pointer exception final e items this items final reentrant lock lock this lock lock lock interruptibly try if count items length extract insert e finally lock unlock
inserts the specified element at the tail of this queue waiting for
public boolean offer e e long timeout time unit unit throws interrupted exception if e null throw new null pointer exception final reentrant lock lock this lock lock lock interruptibly try if count items length insert e return true else extract insert e return true finally lock unlock
inserts the specified element at the tail of this queue waiting up to
public void clear final e items this items final reentrant lock lock this lock lock lock try int i take index int k count while k 0 items i null i inc i count 0 put index 0 take index 0 finally lock unlock
atomically removes all of the elements from this queue
public capabilities get ca capabilities throws ioexception non transactional return get ca capabilities false
retrieves the set of scep capabilities from the ca
public cert store get ca certificate throws ioexception non transactional ca and ra public key distribution final get ca cert req new get ca cert profile new ca certificate content handler final transport trans transport create transport transport method get url final cert store store trans send request req verify ca select issuer certificate store return store
retrieves the ca certificate
public enrolment transaction enrol certification request csr throws ioexception transactional certificate enrollment final transport transport create transport cert store store get ca certificate x509 certificate encrypt cert select encryption certificate store x509 certificate verify cert select verification certificate store pkcs pki envelope encoder env encoder new pkcs pki envelope encoder encrypt cert pki message encoder encoder new pki message encoder pri key identity env encoder final enrolment transaction t new enrolment transaction transport encoder get decoder csr t set issuer verify cert return t
enrolls the provided csr into a pki
private transport create transport throws ioexception final transport t if get ca capabilities true is post supported t transport create transport transport method post url else t transport create transport transport method get url return t
creates a new transport based on the capabilities of the server
public fail info get fail info if state state cert non existant throw new illegal state exception no failure has been received check state return fail info
retrieve the reason for failure
public boolean offer nonce nonce if size size nonce removed nonce backing queue poll if logger is trace enabled logger trace removed removed nonce from head of queue return backing queue offer nonce
inserts the specified nonce into this queue if possible
public void add capability capability capabilities add capability
add the provided capability to this capabilities set
public boolean contains capability capability return capabilities contains capability
returns code true code if the server supports the provided
public boolean is post supported return capabilities contains capability post pki operation
returns tt true tt if post is supported tt false tt otherwise
public x509 certificate get certificate return ca certificate
returns the ca certificate
public boolean is renewal supported return capabilities contains capability renewal
returns tt true tt if certificate renewal is supported tt false tt otherwise
public string get strongest cipher final string cipher if cipher exists desede capabilities contains capability triple des cipher desede else cipher des return cipher
returns the strongest cipher algorithm supported by the server and client
public string get strongest message digest final string digest if digest exists sha 512 capabilities contains capability sha 512 digest sha 512 else if digest exists sha 256 capabilities contains capability sha 256 digest sha 256 else if digest exists sha 1 capabilities contains capability sha 1 digest sha 1 else digest md5 return digest
returns the strongest message digest algorithm supported by the server and client
public signed data parse asn1 encodable signed data throws ioexception try content info ci content info get instance signed data asn1 sequence seq asn1 sequence ci get content return new signed data seq catch exception e throw new ioexception e
parses the provided asn1 object and extracts a degenerate signed data
public void set border int border type pdf pcell set border border type
enables disables the border on the specified sides
public void add empty cell throws table was full exception check create this writer add empty cell table border width cell counter check flush
add an empty cell
public void add cell string content throws table was full exception check create if is full throw new table was full exception else cell counter this writer add cell table content cell font size border width 1 check flush
add a cell with dbcs content use tables borderwidth fontsize and etc
public void add ansi cell string content throws table was full exception check create if is full throw new table was full exception else cell counter this writer add ansi cell table content cell font size border width 1 check flush
add a cell with ansi char content use tables borderwidth fontsize and etc
public void add cell cell cell throws table was full exception check create cell counter cell get colspan if is full throw new table was full exception else this writer add cell table cell check flush
add a cell by cell object use its attributes
public void add cross row cell string content float max cell width throws table was full exception cell cell new cell content cell set colspan 1 cell set max width max cell width check create float string width writer get string width cell get content cell get font size if string width cell get max width cell counter 1 int string width cell get max width this columns else cell counter if is full throw new table was full exception else this writer add cell table cell check flush
add a cell wrap the content into next row
public void flush if flushed float bottom this writer flush table table position get left position get top position set top bottom if replicator position null replicator position set top math min replicator position get top position get top flushed true
render this table
public void draw rectangle position position float line width int split size float width position get width split size float height position get height float left position get left for int i 1 i split size i try pdf writer cb save state pdf writer cb set rgbcolor stroke 0 0 0 pdf writer cb set line width line width pdf writer cb rectangle left position get bottom width height pdf writer cb stroke finally pdf writer cb restore state left width
split the rectangle in vertical
public float flush table pdf ptable table float left x float top y table set table event null return table write selected rows 0 1 left x top y pdf writer cb
flush the table in memeory
public void close synchronized this stop true this notify all
closes this server
public void set value string value if value length max string size throw new illegal argument exception string larger than maximum allowed this value value
sets the string value
public string get string attribute value k key return get attribute value key new string attribute value
convenience method for fetching string values
public long get int32 attribute value k key attribute value value get attribute value key if value instanceof int32 attribute value throw new illegal argument exception key key does not map to an int32 value return int32 attribute value value get value
convenience method for fetching int32 values
public void add value attribute value value check add value preconditions value item type value get type id value list add value
adds an item to the list
public void add attribute k key string value add attribute key new string attribute value value
convenience method to add an attribute with a string value
public void add attribute k key long value add attribute key new int32 attribute value value
convenience method to add an attribute with a 32 bit unsigned int value
public void read file file throws ioexception file not found exception file input stream stream null try stream new file input stream file read stream finally if stream null stream close
reads the specified
public void read input stream stream throws ioexception read new input stream reader stream
reads ini data from the specified input stream using the default character set
public void read reader reader throws ioexception read new buffered reader reader
reads ini data from the specificed reader instance
public void read buffered reader in throws ioexception this will hold the name of the current section string curr section null clear the content data reset read the file and store the data string str while str in read line null curr section process str curr section
reads ini data from the specificed buffered reader instance
public void write file file throws ioexception file not found exception write new file output stream file
writes the ini data to the specified
public void write output stream stream throws ioexception write new output stream writer stream
writes the ini data to the specified output stream
public void write writer writer throws ioexception write new buffered writer writer
writes the ini data to the specified writer
public void write buffered writer out throws ioexception set string sects contents key set for string sect sects write the section name out write sect line feed get the list of values hash map string string values contents get sect get the set of properties for this section set string props values key set for string prop props get the value for this property string value values get prop add to the string out write prop value line feed add a blank line after the section out write line feed out flush
writes the ini data to the specified buffered writer
public string to string string token this type this arg this line this column return token
returns the token as a string
public token get next token token ret value null if current token token set getlength this current token current token 1 ret value this token set get token current token return ret value
reads the next token acting as an interator
public token get current token token ret value this token set get token current token return ret value
returns the current token
private facade home lookup home throws naming exception lookup the beans home using jndi context ctx get initial context try object home ctx lookup jndi name return facade home narrow home facade home class catch naming exception ne log the client was unable to lookup the ejbhome please make sure log that you have deployed the ejb with the jndi name jndi name on the web logic server at url throw ne
lookup the ejbs home in the jndi tree
private context get initial context throws naming exception try get an initial context hashtable string string h new hashtable string string h put context initial context factory weblogic jndi wlinitial context factory h put context provider url url return new initial context h catch naming exception ne log we were unable to get a connection to the web logic server at url log please make sure that the server is running throw ne
using a properties object will work on jdk 1
public void ejb create throws create exception log ejb create called try initial context ic new initial context catch naming exception ne throw new create exception failed to find environment value ne
this method corresponds to the create method in the home interface
private inventory home lookup home throws naming exception lookup the beans home using jndi context ctx get initial context try object home ctx lookup jndi name return inventory home narrow home inventory home class catch naming exception ne log the client was unable to lookup the ejbhome please make sure log that you have deployed the ejb with the jndi name jndi name on the web logic server at url throw ne
lookup the ejbs home in the jndi tree
private transaction home lookup home throws naming exception lookup the beans home using jndi context ctx get initial context try object home ctx lookup jndi name return transaction home narrow home transaction home class catch naming exception ne log the client was unable to lookup the ejbhome please make sure log that you have deployed the ejb with the jndi name jndi name on the web logic server at url throw ne
lookup the ejbs home in the jndi tree
public void ejb create throws create exception log ejb create called try initial context ic new initial context integer tl integer ic lookup java comp env max limit integer t2 integer ic lookup java comp env min limit max limit tl int value min limit t2 int value catch naming exception ne throw new create exception failed to find environment value ne
this method corresponds to the create method in the home interface
private security home lookup security home throws naming exception lookup the beans home using jndi context ctx get initial context try object home ctx lookup jndi name security return security home narrow home security home class catch naming exception ne log the client was unable to lookup the ejbhome please make sure log that you have deployed the ejb with the jndi name jndi name security on the web logic server at url throw ne
lookup the ejbs home in the jndi tree
private security home lookup home throws naming exception lookup the beans home using jndi context ctx get initial context try object home ctx lookup jndi name return security home narrow home security home class catch naming exception ne log the client was unable to lookup the ejbhome please make sure log that you have deployed the ejb with the jndi name jndi name on the web logic server at url throw ne
lookup the ejbs home in the jndi tree
private profile home lookup profile home throws naming exception lookup the beans home using jndi context ctx get initial context try object home ctx lookup jndi name profile return profile home narrow home profile home class catch naming exception ne log the client was unable to lookup the ejbhome please make sure log that you have deployed the ejb with the jndi name jndi name profile on the web logic server at url throw ne
lookup the ejbs home in the jndi tree
private transaction home lookup transaction home throws naming exception lookup the beans home using jndi context ctx get initial context try object home ctx lookup jndi name transaction return transaction home narrow home transaction home class catch naming exception ne log the client was unable to lookup the ejbhome please make sure log that you have deployed the ejb with the jndi name jndi name transaction on the web logic server at url throw ne
lookup the ejbs home in the jndi tree
private profile home lookup home throws naming exception lookup the beans home using jndi context ctx get initial context try object home ctx lookup jndi name return profile home narrow home profile home class catch naming exception ne log the client was unable to lookup the ejbhome please make sure log that you have deployed the ejb with the jndi name jndi name on the web logic server at url throw ne
lookup the ejbs home in the jndi tree