input stringlengths 10 828 | output stringlengths 5 107 |
|---|---|
public void set date date date if date null text field set text date format format date current date date | set the selected date |
public void set enabled boolean bool if enabled bool enabled bool text field set enabled bool button set enabled bool | set wether this component should be enabled |
public void add new frame final sinternal frame frame desktop add frame 0 try desktop invite new component visitor public void visit scomponent c ign public void visit scontainer c if c instanceof sinternal frame return sinternal frame ff sinternal frame c if ff frame ff is maximized ff set maximized false set our frame maximized then frame set maximized true catch exception e system err println e | add a new frame |
public void internal frame opened sinternal frame event e | invoked when an internal frame has been opened |
public void internal frame closed sinternal frame event e close | invoked when an internal frame has been closed |
public void internal frame iconified sinternal frame event e | invoked when an internal frame is iconified |
public void internal frame deiconified sinternal frame event e | invoked when an internal frame is de iconified |
public void internal frame maximized sinternal frame event e | invoked when an internal frame is maximized |
public void internal frame unmaximized sinternal frame event e | invoked when an internal frame is unmaximized |
private int fraction decimals double number fixme is there a simple and more efficient way number format fmt new decimal format string fraction str fmt format math ieeeremainder number 1 0 return fraction str length 2 | returns the number of decimals needed to display the given |
private double parse number stext field field string text field get text trim if text length 0 text 0 double result double na n try result double parse double text field set background null catch exception e field set background color red return result | parse a number in a text field |
public string get row style int row return is row selected row table selected row row 2 0 table row1 table row2 | returns the css style for a row td style xxx |
public void first scontainer parent check layout parent for int i 0 i parent get component count i if i 0 parent get component i set visible false else parent get component i set visible true | flips to the first card of the container |
public void next scontainer parent check layout parent int ncomponents parent get component count for int i 0 i ncomponents i scomponent comp parent get component i if comp is visible comp set visible false comp parent get component i 1 ncomponents i 1 0 comp set visible true return | flips to the next card of the specified container |
public void previous scontainer parent check layout parent int ncomponents parent get component count for int i 0 i ncomponents i scomponent comp parent get component i if comp is visible comp set visible false comp parent get component i 0 i 1 ncomponents 1 comp set visible true return | flips to the previous card of the specified container |
public void last scontainer parent check layout parent int ncomponents parent get component count for int i 0 i ncomponents i if i ncomponents 1 parent get component i set visible false else parent get component i set visible true | flips to the last card of the container |
public void show scomponent comp for iterator en tab values iterator en has next scomponent c scomponent en next c set visible false comp set visible true | flips to the component |
public void show object constraint scomponent visible component scomponent tab get constraint if visible component null for iterator en tab values iterator en has next scomponent c scomponent en next c set visible false visible component set visible true | flips to the component |
public void show scontainer parent object name check layout parent scomponent next scomponent tab get name if next null next is visible for int i 0 i parent get component count i parent get component i set visible false next set visible true | flips to the component that was added to this layout with the |
public void set position scomponent c int position get component list remove c get component list add position c | sets the position for the specified component |
public int get index of scomponent c int i count count get component count for i 0 i count i if c get component i return i return 1 | returns the index of the specified component |
public int get position scomponent c return get index of c | get the position of the component |
public sclickable get clickable int clickable return clickables clickable | to set your favorite icons and text of the clickable |
public void add tree will expand listener tree will expand listener tel add event listener tree will expand listener class tel | adds a listener for code tree will expand code events |
public void set border int pixel border pixel | set the thickness of the border |
public void remove tree will expand listener tree will expand listener tel remove event listener tree will expand listener class tel | removes a listener for code tree will expand code events |
public layout cg get cg return cg | return the look and feel delegate |
public void update cg set cg layout cg session manager get session get cgmanager get cg this | notification from the cgfactory that the l f |
public void set orientation int new orientation if orientation new orientation switch new orientation case vertical case horizontal int old orientation orientation orientation new orientation reload if change reload manager reload code old orientation new orientation fire property change orientation property old orientation new orientation break default throw new illegal argument exception new orientation is not a legal orientation | sets the progress bars orientation to code new orientation code |
public void set enabled boolean x super set enabled x scomponent children get components for int i 0 i children length i children i set enabled x | enables the component so that the knob position can be changed |
public void set string painted boolean b pending specify that string not painted when in indeterminate mode or just leave that to the l f boolean old value paint string paint string b reload if change reload manager reload code old value paint string fire property change string painted property old value paint string | sets the value of the code string painted code property |
public void set width int width this iwidth width if width 1 this width width px else this height null | set width in pixel |
public void set height int height this iheight height if height 1 this height height px else this height null | set height in pixel |
protected int get int string size try return new decimal format parse size new parse position 0 int value catch exception e logger warn can not parse size e return 1 | extract number from string |
public int get int width if iwidth 1 iwidth get int width return iwidth | get just the width as number without trailing |
public int get int height if iheight 1 iheight get int height return iheight | get just the height as number without trailing |
public void push dialog sdialog dialog super add component dialog null get component count int count get component count logger debug push dialog count dialog set frame this reload reload manager reload code | push a new dialog on top of the stack |
public boolean equals object obj if obj null return false return width equals sdimension obj width height equals sdimension obj height | checks whether two dimension objects have equal values |
public sdialog pop dialog int count get component count if count 1 throw new illegal state exception there s no dialog left sdialog dialog sdialog get component count 1 super remove dialog logger debug pop dialog count dialog set frame sframe null reload reload manager reload code return dialog | remove the dialog that is on top of the stack |
public string get string if progress string null return progress string else if format null format number format get percent instance return format format new double get percent complete | returns the current value of the progress string |
public scontainer get content pane return content pane | returns the content pane of this root container |
public void remove scomponent c throw new illegal argument exception use get content pane remove component | use get content pane |
public void set string string s string old value progress string progress string s reload if change reload manager reload code old value progress string fire property change string property old value progress string | sets the value of the progress string |
protected void fire tree expanded tree path path fire tree expansion event new tree expansion event this path true | notify all listeners that have registered interest for |
public void set prefix final string prefix if logger is debug enabled logger debug externalizer prefix changed from this prefix to prefix this prefix prefix | string prefixed to every created externlizer identifier via |
public string externalize object obj externalizer externalizer return externalize obj externalizer session | externalizes make a java object available for a browser an object with |
public void set border painted boolean b boolean old value paint border paint border b reload if change reload manager reload code old value paint border fire property change border painted property old value paint border | sets the code border painted code property which is |
public string externalize object obj externalizer externalizer collection headers return externalize obj externalizer headers session | externalizes make a java object available for a browser an object with |
public void set parent scontainer p parent p if p null set parent frame p get parent frame else set parent frame null | sets the parent container |
public string externalize object obj externalizer externalizer int flags if obj null externalizer null throw new illegal state exception no externalizer return externalize obj externalizer null null flags | externalizes make a java object available for a browser an object with |
public void fire tree collapsed tree path path fire tree expansion event new tree expansion event this path false | notify all listeners that have registered interest for |
private string strip identifier string identifier if identifier null identifier length 1 return null int pos identifier index of org wings sconstants uid divider if pos 1 identifier identifier substring pos 1 if identifier length 1 return null return identifier | stripts the identifier from attachments to the external names |
protected void set parent frame sframe parent frame if this parent frame parent frame if this parent frame null unregister this parent frame parent frame if this parent frame null register | sets the parent frame |
public void add externalizer externalizer externalizer if externalizer null class c externalizer get supported classes if c null for int i 0 i c length i if c i null externalizer by class put c i externalizer string mime types externalizer get supported mime types if mime types null for int i 0 i mime types length i if mime types i null mime types i trim length 0 externalizer by mime type put mime types i trim to lower case externalizer | adds an externalizer |
public void set filled color color c filled color c | sets the color in which the fille region is painted |
public void add externalizer externalizer externalizer string mime type if externalizer null mime type null externalizer by mime type put mime type externalizer | adds an externalizer |
public string externalize externalized resource ext info string identifier string reverse externalized get ext info if identifier null identifier ext info get id if identifier null identifier identifier else identifier create identifier string extension ext info get extension if extension null identifier extension ext info set id identifier store externalized resource identifier ext info reverse externalized put ext info identifier return identifier session encoding | externalizes make a java object available for a browser the object in |
public externalizer get externalizer class c externalizer externalizer null if c null externalizer get superclass externalizer c if externalizer null externalizer get interface externalizer c return externalizer | returns an object externalizer for a class |
public string get id string url if url null url length 0 return url string result if url char at 0 result url else result url substring 0 url length session encoding length return result | externalizes make a java object available for a browser the object in |
public externalizer get externalizer string mime type externalizer externalizer null if mime type null mime type length 0 externalizer externalizer externalizer by mime type get mime type if externalizer null if mime type index of 0 externalizer get externalizer mime type substring 0 mime type index of return externalizer | returns an object externalizer for a mime type |
public color get filled color return filled color | returns the color in which the fille region is painted |
public void set unfilled color color c unfilled color c | sets the color in which the unfilled region is painted |
public void set preferred size sdimension preferred size this preferred size preferred size | set the preferred size of the receiving component in pixel |
public color get unfilled color return unfilled color | returns the color in which the unfilled region is painted |
public void set layout mode int orientation switch orientation case sconstants vertical case sconstants horizontal layout mode orientation reset icons init layout break default throw new illegal argument exception layout mode must be one of vertical horizontal | set how to layout components |
public string get cgclass id return cg class id | returns the name of the look and feel class that renders this component |
public void reset icons for int i 0 i clickables length i clickables i set icons default icons layout mode i | sets the default icons |
public sdimension get preferred size return preferred size | get the preferred size of this component |
public void set direct pages int count if direct pages count direct pages count init scrollers | sets the amount of page clickables to code count code |
public void set cg progress bar cg cg super set cg cg | sets the look and feel object that renders this component |
protected void fire component change event scomponent event a event maybe the better way to do this is to user the get listener list and iterate through all listeners this saves the creation of an array but it must cast to the apropriate listener object listeners get listener list for int i listeners length 2 i 0 i 2 if listeners i scomponent listener class lazily create the event process component event scomponent listener listeners i 1 a event | reports a component change |
public void write device d | shouldnt be called |
public scomponent add component scomponent c object constraints int index if c get parent this return null else return super add component c constraints index | if the specified component is already a child of this then we dont |
protected boolean is rendered as form input return get show as form component get icon null | indicates if this component is rendered as a native from input |
protected boolean parse selection toggle string toggle parameter a button image in a form has no value so just toggle selection if get show as form component return is selected end of if if 1 equals toggle parameter return true else if 0 equals toggle parameter return false don t change return is selected | in form components the parameter value of an button is the button |
protected void process component event scomponent listener listener scomponent event e int id e get id switch id case scomponent event component resized listener component resized e break case scomponent event component moved listener component moved e break case scomponent event component shown listener component shown e break case scomponent event component hidden listener component hidden e break | processes component events occurring on this component by |
public void set model table model tm if model null model remove table model listener this reload if change reload manager reload code model tm model tm if model null model new default table model model add table model listener this | p sets the model of the table |
public void set extent int value super set extent value unit increment value block increment value make sure we have a valid value set value get value | set the visible amount of the scroller |
public void set visible amount int value super set visible amount value unit increment value block increment value make sure we have a valid value set value get value | set the visible amount of the scroller |
public void set value int value super set value value value get extent | set the current value of the scroller |
public void set locale locale l get session set locale l | set the locale |
public void install cg scomponent component long start system current time millis cgmanager manager component get session get cgmanager string class name component get class get name class name class name substring class name last index of 1 configure component class name manager logger debug install cg done in system current time millis start ms | install the appropriate cg for code component code |
public void uninstall cg scomponent c | uninstall the cg from code component code |
public string get name for string string string unique name null if string to name contains key string string identifier generate name ident prefix string unique name identifier int counter 1 while name to string contains key unique name unique name identifier counter counter string to name put string unique name name to string put unique name string record new names in the proper sequence names add unique name else unique name string string to name get string return unique name | add a string to the pool and retrieve its unique |
public iterator get names return names iterator | returns all identifiers |
public string get quoted string string name return java string quote string name to string get name | lookup a string by identifier suitable quoted to be included |
private string generate name string prefix string s string buffer buffer new string buffer we only want to have one underscore in a row boolean just underscore prefix char at prefix length 1 for int i 0 i s length buffer length ident length i if character is java identifier part s char at i buffer append s char at i just underscore false else if just underscore buffer append just underscore true remove any underscore at the end if just underscore buffer set length buffer length 0 buffer length 1 0 return prefix buffer to string | generates a java variable name with at most ident length characters |
public void set model bounded range model new model pending setting the same model to multiple bars is broken listeners bounded range model old model get model if new model old model if old model null old model remove change listener change listener change listener null model new model if new model null change listener create change listener new model add change listener change listener if model null model set extent 0 reload reload manager reload code | sets the data model used by the code sprogress bar code |
private boolean is delimiter char c return c c c | decide whether character is sgml delimiter or equals |
public void set style string value reload if change reload manager reload code style value this style value | set the class of the laf provided style |
public void set show as form component boolean show as form component this show as form component show as form component | indicates if this component if it is inside a |
public void set selection model stree selection model selection model if this selection model null this selection model remove tree selection listener forward selection event if selection model null selection model add tree selection listener forward selection event if selection model null this selection model sdefault tree selection model no selection model else this selection model selection model | sets the trees selection model |
public boolean get show as form component return show as form component get resides in form | is this component rendered as form component |
public void set cached boolean c cached c | set whether the property manager should cache the value instantiated |
public void set value int n bounded range model brm get model int old value brm get value brm set value n | sets the progress bars current value |
public void set disabled style string value reload if change reload manager reload code disabled style value this disabled style value | set the class of the laf provided style |
public string to string file cwd string buffer result new string buffer result append print relative cwd this file result append append pos to string return result to string | print relative to the given working directory |
public stree selection model get selection model return selection model | returns the model for selections |
public void open string file name throws ioexception file f new file file name open relative files relative to the current file if f is absolute current file null f new file current file get parent file name f f get canonical file if open files contains key f throw new ioexception get file stack trace cannot recursively include files file name file stack push current file current file f in new column reader f open files put current file in | open a new file |
public string get file stack trace string buffer result new string buffer int files in stack file stack size if files in stack 1 result append get file position to string cwd append here in the file that is n for int pos files in stack 1 pos 0 pos file file file file stack element at pos column reader open reader column reader open files get file result append open reader get file position to string cwd result append included from here n result append get file position to string cwd return result to string | returns a stack trace of current file positions |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.