Skip to main content

com.sabre.redapp.example.swing Sample

The com.sabre.redapp.example.swing sample creates a Swing app with one-way communication from the Swing app to SWT. The sample presents the app in both an editor and a view in Sabre Red 360.

The following describes the files that this sample includes:

  • sample.jar contains a sample Swing application.

  • build.bat compiles the sources from this sample plug-in.

  • SwingMainControl.java encapsulates the sample Swing app.

  • ButtonActionListener.java contains the implementation of the altered versions of the class that the sample Swing app uses.

  • SampleDialog.java contains the definition of the dialog that the sample uses.

  • SwingEditor.java contains the definition of the editor.

  • SwingView.java contains the definition of the view.

  • SwingEditorInput.java gets the factory input.

  • SwingElementFactory.java returns the factory input.

  • Activator.java controls the life cycle of the plug-in.

Running the Sample

  1. Modify the build.bat file that this sample includes.

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

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

  4. From the Tools > Other menu on the application launcher bar, choose Sample Swing App Editor or Swing View to display the application GUIs.

image44