Skip Navigation

com.sabre.redapp.example.swt Sample

The com.sabre.redapp.example.swt sample demonstrates workbench elements within Sabre Red 360.

The following describes the files that this sample includes:

  • Activator.java gets an instance of the plug-in.

  • VacationEditor.java is the definition or implementation of the vacation editor.

  • VacationEditorInput.java returns the identifier of the appropriate IElementFactory.

  • VacationElementFactory.java is a class that creates a new AbstractEditorInput class.

  • AgentModel.java gets the agent objects.

  • DBManager.java creates the table in the database for the vacations of agents.

  • VacationModel.java sorts or queries the agent vacation data.

  • CreateUpdateVacationDialog.java creates the dialog in which agents add their vacation data.

  • ShowAgentsDialog.java also creates the content of the dialog.

  • AbstractModelObject.java is a class that creates the listener for the command.

  • Agent.java gets an agent’s information.

  • Vacation.java defines the vacation data.

  • DataBrowser.java is a class that creates the layout for the composite, the data browser.

Running the Sample

  1. In Eclipse, import the com.sabre.redapp.example.swt plug-in into your workspace and add it to your run configuration.

  2. Launch Sabre Red 360 from your run configuration and log in with your CERT Sabre ID.

  3. From the Tools > Other menu on the launcher bar, choose Vacation List. Add, edit, and delete names from the spreadsheet as desired.

The figure below shows the SWT sample plug-in.

image43