input
stringlengths
10
828
output
stringlengths
5
107
public category get category by name string name return category retrieve by property name name
retrieves the category with a name
public categories get approved categories property rule category rule property rule define equal approved boolean true return get categories rule
gets approved categories
public categories get not approved categories property rule category rule property rule define not equal approved boolean true return get categories rule
gets not approved categories
public categories get categories ordered by name order rule category rule order rule define order name return get categories rule
gets categories ordered by name
public category create category string name category category new category get model category set name name if add category category null return category
creates a category
public comments get comments with source property rule comment rule property rule define not null source return get comments rule
gets comments with source
public urls get category urls string category property rule url rule property rule define equal category category return get urls rule
gets category urls
public urls get urls ordered by category boolean ascending order rule url rule order rule define order category ascending return get urls rule
gets urls ordered by category
public urls get urls ordered by category then name boolean ascending composite comparator url composite property comparator new composite comparator url new property comparator url category new property comparator url name order rule url rule order rule define order composite property comparator ascending return get urls rule
gets urls ordered by category then by name
public interests get interests order rule interest rule return interests order by rule rule
gets interests ordered by an order rule
public questions get questions order rule question rule return questions order by rule rule
gets questions ordered by an order rule
public questions get category questions long category property rule question rule property rule define equal category oid category return get questions rule
gets category questions
public util get util return util super get domain
gets the util domain
private void ok this set visible false this dispose
closes the about dialog
public void action performed action event e if e get source ok button this ok
event to close the about dialog
public void init string language obtain lang main frame new main window main frame set location 0 0 main frame uses the select directory utility that is language dependant nat lang nat lang new nat lang nat lang set natural language language main frame set nat lang nat lang
inits the applet
public void start main frame set visible true
starts the applet
public void stop main frame set visible false
stops the applet
public void destroy main frame dispose
disposes the applet resources
private string obtain lang properties locator configurator new properties locator start class start app config local path string language configurator get property lang string text resources configurator get property text resources para para para get singleton para set natural language language text resources return language
sets the current natural language based on the start configuration
public void set nat lang nat lang nat lang this nat lang nat lang
sets the natural language
private int get displayed number jtext field field int number 0 string field text field get text integer field integer transformer integer field text trim if field integer null number field integer int value return number
gets the number displayed in the given field
private void set displayed number jtext field field int number field set text number empty field select all
sets the number in the given field
private void display jdialog child dimension child size child get preferred size point child location get central location main frame get location main frame get size child size child set location child location child set modal true child set visible true
displays a dialog within a center of the app min window
private void next month int month number get displayed number month field int next month number month number if next month number 12 next month number 1 set displayed number month field next month number year year board get month get year month month year get month next month number board fill month
displays the next month in the board
private void display jframe child dimension child size child get preferred size point child location get central location main frame get location main frame get size child size child set location child location child set visible true
displays a frame within a center of the app min window
private void previous month int month number get displayed number month field int previous month number month number if previous month number 1 previous month number 12 set displayed number month field previous month number year year board get month get year month month year get month previous month number board fill month
displays the previous month in the board
public void set session session session this session session session get history add history observer this
sets the domain model session
private void change year calbadar db calbadar db board get calbadar int year number get displayed number year field if year number 1 year number calbadar db get calbadar calendar get current year number year year calbadar db get calbadar calendar get year year number if year null year calbadar db get calbadar calendar create year year number int month number get displayed number month field month month year get month month number board fill month
displays the new year in the board
public void no history menu edit undo set enabled false
no action history left
private void change month calbadar db calbadar db board get calbadar int month number get displayed number month field if month number 1 month number calbadar db get calbadar calendar get current year get current month number year year board get month get year month month year get month month number board fill month
displays the new month in the board
public void yes history menu edit undo set enabled true
yes the action history is not empty
public void action performed action event e if e get source next button next month else if e get source previous button previous month
next and previous month events
private void set main title string title para get singleton get text product set title title
sets main title
public locale get locale return lang get locale
gets the current locale language
private void set main title string file path string title para get singleton get text product file path set title title
sets main title with a data file path
public string get text string key return lang get text key
gets the text based on the given key for the current language
public void set natural language string language string text resources lang set natural language language text resources
sets the language with the location for text resources
private void display year month month month if month null set displayed number year field month get year get number int value set displayed number month field month get number int value
displays the year and the month
public url get url string local name return file locator get class based url local name
gets the file url given the file local name
public string get path string local name return file locator get class based path local name
gets the file path given the file local name
private void load default data board load default data menu set session board get session display year month board get month
loads the default calendar
public image icon get image icon string local name return file locator get image icon local name
gets the image given the image local name
public calbadar db get calbadar return calbadar db
gets the calbadar db
public month get month return month
gets the board month
private void init cells new cell board length board length this set layout new grid layout board length board length for int v 0 v board length v for int h 0 h board length h cells v h new cell this this add cells v h if v 0 cells v h set color header color sunday monday cells v h set day name para get singleton get text day h else cells v h set color day color
inits the board with cells representing month days
private void empty for int v 1 v board length v for int h 0 h board length h cells v h set color day color cells v h set number 0 cells v h set day name cells v h empty note indicator cells v h set day null
empties the board cells
private void erase day day cell get day if day null notes notes day get notes if notes null note note note notes first if note null try session session cell get board get session entities action action new remove action session action set entities notes action set entity note action execute catch action exception e log error error in daily note window erase e get message text area set text exit
erases the note
public void action performed action event e if e get source ok button ok else if e get source erase button erase else if e get source cancel button exit
user events ok erase cancel
private void fill calendar calendar try year current year calendar get current year month current month current year get current month if current month null fill current month catch exception e system out println fill data error from board fill e get message
fills the board with the current month days
private void exit set visible false dispose
exits the window
public void load default data calbadar db new calbadar db session calbadar db get calbadar get session calbadar db load data calendar calbadar calendar calbadar db get calbadar calendar if calbadar calendar null calbadar db create data calbadar calendar calbadar db get calbadar calendar fill calbadar calendar
loads the calbadar data from the default location
public void window closing window event e this exit
closes the window
public void create default data calbadar db new calbadar db session calbadar db get calbadar get session calbadar db create data calendar calbadar calendar calbadar db get calbadar calendar fill calbadar calendar
creates the calbadar data calbadar with the current year months and
public void load data string file path try xml entities calendars calbadar db get xml calendars if file path null calendars set data file path file path calendars load calendar calbadar calendar calbadar db get calbadar calendar if calbadar calendar null calbadar db create data calbadar calendar calbadar db get calbadar calendar fill calbadar calendar catch exception e system out println load data error from board load data e get message
loads the data from the calendar xml data file
public void save data string file path try xml entities calbadars calbadar db get xml calendars if file path null calbadars set data file path file path calbadars save catch exception e system out println save data error from board save data e get message
saves the data to the calendar xml data file
public void empty data calbadar db empty data session get history empty empty
empties the board
public int get number return label get number
gets the cell number
private void some notes text area set text string selection selection field get text notes selected notes board get month get notes get contain text notes selection if selected notes null note note for iterator x selected notes iterator x has next note note x next string dated note note get day get date text note get text text area set text text area get text dated note n
selects and displays some montly notes based on a user selection
public void set number int number label set number number
sets the cell number
public string get day name return label get day name
gets the cell day name
private void all notes text area set text notes notes board get month get notes note note for iterator x notes iterator x has next note note x next string dated note note get day get date text note get text text area set text text area get text dated note n
displays all montly notes based on a user selection
public void set day name string day name label set day name day name
sets the cell day name
public day get day return day
gets the cell day
public void set day day day this day day if day null model domain model model day get model domain model add observer this
sets the cell day
private void exit this set visible false this dispose
exits the window
public string get note indicator return label get note indicator
gets the cell note indicator
public void set note indicator label set note indicator para get singleton get text note
sets the cell note indicator
public void empty note indicator label set note indicator
empties the cell note indicator
public boolean is note indicator empty if get note indicator equals return true return false
checks if the cell note indicator is empty
public void create note indicator if is note indicator empty if day null notes notes day get notes if notes null note note note notes first if note null set note indicator
creates the cell note indicator
public void update note indicator if day null notes notes day get notes if notes null note note note notes first if note null if note get text equals empty note indicator else set note indicator
updates the cell note indicator
public color get color return this get background
gets the cell color
public void set color color color this set background color
sets the cell color
public void empty label empty
empties the cell
public void mouse pressed mouse event e if day null day get number int value 0 daily note window daily note window new daily note window this int board width board get width int note width daily note window get width int x board width note width daily note window set location x 20 40 daily note window set visible true
event to display the note window for this cell
public void set image image icon image this image image this set icon image
sets the label image
public void set number int number this number number this display
sets the label number
public string get day name return day name
gets the day name
public void set day name string day name this day name day name this display
sets the day name
public string get note indicator return note indicator
gets the note indicator
public void set note indicator string note indicator this note indicator note indicator this display
sets the note indicator
private void display if number 0 if day name equals this set text note indicator else if note indicator equals this set text day name else this set text day name note indicator else number 0 if day name equals if note indicator equals this set text number else this set text number note indicator else if note indicator equals this set text number day name else this set text number day name note indicator
displays the label content
public void empty image null number 0 note indicator
empties the label content
private void create month int number month month new month this month set number number month create days get months add month
creates a month
public month get month integer number return month get months get month number number
gets the month given a month number
public year get year oid oid return retrieve by oid oid
retrieves the year with a given oid
public month get month int number return get month new integer number
gets the month given a month number
public month get current month month month null if is current int current month number easy calendar get one get current month month get month current month number return month
gets the current month but only if this year is the current one
public year get year long oid unique number return get year new oid oid unique number
retrieves the year with a given oid unique number
public int get current month number int number 0 month month get current month if month null number month get number int value return number
gets the current month number
public year get year string property code object property return retrieve by property property code property
retrieves the first year whose property with a property code is equal to
public boolean is current boolean result false if this get number int value easy calendar get one get current year result true return result
checks if this year is the current year
public years get years string property code object property return years select by property property code property
selects years whose property with a property code is equal to a property
public years get years property rule year rule return years select by rule rule
gets years selected by a property rule
public years get years order rule year rule return years order by rule rule
gets years ordered by an order rule
public years get years ordered by number boolean ascending order rule year rule order rule define order number ascending return get years rule
gets years ordered by number
public calendar get calendar oid oid return retrieve by oid oid
retrieves the calendar with a given oid
public calendar get calendar long oid unique number return get calendar new oid oid unique number
retrieves the calendar with a given oid unique number
public void create year create year easy calendar get one get current year
creates a year