
org.jbundle.main.calendar.screen.AppointmentGridScreen Maven / Gradle / Ivy
/**
* @(#)AppointmentGridScreen.
* Copyright © 2013 jbundle.org. All rights reserved.
* GPL3 Open Source Software License.
*/
package org.jbundle.main.calendar.screen;
import java.util.*;
import org.jbundle.base.db.*;
import org.jbundle.thin.base.util.*;
import org.jbundle.thin.base.db.*;
import org.jbundle.base.db.event.*;
import org.jbundle.base.db.filter.*;
import org.jbundle.base.field.*;
import org.jbundle.base.field.convert.*;
import org.jbundle.base.field.event.*;
import org.jbundle.base.screen.model.*;
import org.jbundle.base.screen.model.util.*;
import org.jbundle.base.model.*;
import org.jbundle.base.util.*;
import org.jbundle.model.*;
import org.jbundle.model.db.*;
import org.jbundle.model.screen.*;
import org.jbundle.main.calendar.db.*;
/**
* AppointmentGridScreen - .
*/
public class AppointmentGridScreen extends GridScreen
{
/**
* Default constructor.
*/
public AppointmentGridScreen()
{
super();
}
/**
* Constructor.
* @param record The main record for this screen.
* @param itsLocation The location of this component within the parent.
* @param parentScreen The parent screen.
* @param fieldConverter The field this screen field is linked to.
* @param iDisplayFieldDesc Do I display the field desc?.
*/
public AppointmentGridScreen(Record record, ScreenLocation itsLocation, BasePanel parentScreen, Converter fieldConverter, int iDisplayFieldDesc, Map properties)
{
this();
this.init(record, itsLocation, parentScreen, fieldConverter, iDisplayFieldDesc, properties);
}
/**
* Initialize class fields.
*/
public void init(Record record, ScreenLocation itsLocation, BasePanel parentScreen, Converter fieldConverter, int iDisplayFieldDesc, Map properties)
{
super.init(record, itsLocation, parentScreen, fieldConverter, iDisplayFieldDesc, properties);
}
/**
* Override this to open the main file.
*
You should pass this record owner to the new main file (ie., new MyNewTable(thisRecordOwner)).
* @return The new record.
*/
public Record openMainRecord()
{
return new Appointment(this);
}
/**
* Override this to open the other files in the query.
*/
public void openOtherRecords()
{
super.openOtherRecords();
new CalendarControl(this);
}
/**
* Add all the screen listeners.
*/
public void addListeners()
{
super.addListeners();
this.getMainRecord().getField(Appointment.CALENDAR_CATEGORY_ID).addListener(new InitFieldHandler(this.getRecord(CalendarControl.CALENDAR_CONTROL_FILE).getField(CalendarControl.APPOINTMENT_CATEGORY_ID)));
}
/**
* SetupSFields Method.
*/
public void setupSFields()
{
this.getRecord(Appointment.APPOINTMENT_FILE).getField(Appointment.START_DATE_TIME).setupDefaultView(this.getNextLocation(ScreenConstants.NEXT_LOGICAL, ScreenConstants.ANCHOR_DEFAULT), this, ScreenConstants.DEFAULT_DISPLAY);
this.getRecord(Appointment.APPOINTMENT_FILE).getField(Appointment.END_DATE_TIME).setupDefaultView(this.getNextLocation(ScreenConstants.NEXT_LOGICAL, ScreenConstants.ANCHOR_DEFAULT), this, ScreenConstants.DEFAULT_DISPLAY);
this.getRecord(Appointment.APPOINTMENT_FILE).getField(Appointment.DESCRIPTION).setupDefaultView(this.getNextLocation(ScreenConstants.NEXT_LOGICAL, ScreenConstants.ANCHOR_DEFAULT), this, ScreenConstants.DEFAULT_DISPLAY);
this.getRecord(Appointment.APPOINTMENT_FILE).getField(Appointment.CALENDAR_CATEGORY_ID).setupDefaultView(this.getNextLocation(ScreenConstants.NEXT_LOGICAL, ScreenConstants.ANCHOR_DEFAULT), this, ScreenConstants.DEFAULT_DISPLAY);
}
}