/**
* A class created to handle the user's query request and facilitate the collection of
* bits of information (day, month, year, hour, minute) to a {@link GregorianCalendar} date.
*
*/
public class SearchCriteria
{
int startDate;
int startMonth;
int startYear;
int startHour;
int startMin;
int endDate;
int endMonth;
int endYear;
int endHour;
int endMin;
public SearchCriteria(int startDate, int startMonth, int startYear,
int startHour, int startMin, int endDate, int endMonth,
int endYear, int endHour, int endMin)
{
this.startDate = startDate;
this.startMonth = startMonth;
this.startYear = startYear;
this.startHour = startHour;
this.startMin = startMin;
this.endDate = endDate;
this.endMonth = endMonth;
this.endYear = endYear;
this.endHour = endHour;
this.endMin = endMin;
}
public GregorianCalendar getStart()
{
GregorianCalendar cal = new GregorianCalendar();
cal.set(startYear, startMonth, startDate, startHour, startMin);
return cal;
}
public GregorianCalendar getEnd()
{
GregorianCalendar cal = new GregorianCalendar();
cal.set(endYear, endMonth, endDate, endHour, endMin);
return cal;
}
}
>>4-5
omg, you hit English right in the face, way too fucking much.
Name:
Anonymous2009-02-10 19:42
so... much... useless... CODE
Name:
Anonymous2009-02-10 19:58
>>7
You can say that about any programming idiom. Some languages resist the urge to add loads of syntactic sugar, and their designers should be praised for it.
// How does I seperate model and view?
public void updatePrevies(Vector<String> updatedPreviews)
{
for(int i = 0; i < this.getComponentCount(); i++)
{
// check to see if its label corresponds to a label in the list
for(int j = 0; j < updatedPreviews.size(); j++)
{
if(this.getComponent(i).getClass().getName().compareTo("gui.Preview") == 0)
{
if(((gui.Preview)this.getComponent(i)).getPreviewLabel().compareTo(updatedPreviews.elementAt(j)) == 0)
{
((gui.Preview)this.getComponent(i)).updatePreview();
}
}
}
}
}
There was also a similar method to the one above but for removing previews. And a few other classes use the whole "this.getClass().getName().compareTo("gui.Preview") == 0" type things (lol actionListeners ONLY) and a completely pointless and worse reimplementation of date pretty printing. The rest of the application is pretty boring badly written java, with lots of hand made gridbag layouts.
However, this application is separated between a backend/frontend and the backend is surprisingly well written.
Name:
Anonymous2009-02-11 10:53
>>15
It's a syndrome of "Holy fuck this toolkit is retarded as shit, let's get this done and over with". I know this syndrome as I suffer from it too.
Name:
Anonymous2009-02-11 10:56
>>15
BTW Can you show me some of the backend code?