Example #1
0
/**
 * Base class for all Query related panels.
 *
 * @author <a href="mailto:[email protected]">Farrukh S. Najmi</a>
 */
public abstract class QueryPanel extends JPanel implements PropertyChangeListener {

  protected JavaUIResourceBundle resourceBundle = JavaUIResourceBundle.getInstance();

  private TitledBorder border;
  private FindParamsPanel findParamsPanel;
  protected Configuration cfg;
  protected QueryUtil qu = QueryUtil.getInstance();

  /** Class Constructor. */
  public QueryPanel(final FindParamsPanel findParamsPanel, Configuration cfg) {
    this.cfg = cfg;
    this.findParamsPanel = findParamsPanel;
    border = BorderFactory.createTitledBorder(resourceBundle.getString("title.searchCriteria"));
    this.setBorder(border);
  }

  protected abstract void processConfiguration();

  /** Clears or resets the UI. */
  public abstract void clear() throws JAXRException;

  /** Invoke the find action. Delegates to parent. */
  void find() {
    findParamsPanel.find();
  }

  boolean isFederated() {
    return findParamsPanel.isFederated();
  }

  /** Execute the query using parameters defined by the fields in QueryPanel. */
  abstract BulkResponse executeQuery();

  public abstract void propertyChange(PropertyChangeEvent ev);

  /** Processes a change in the bound property RegistryBrowser.PROPERTY_LOCALE. */
  protected void processLocaleChange(Locale newLocale) {
    resourceBundle = JavaUIResourceBundle.getInstance();

    setLocale(newLocale);
    applyComponentOrientation(ComponentOrientation.getOrientation(newLocale));
  }

  /** Updates the UI strings based on the locale of the ResourceBundle. */
  protected void updateUIText() {
    border.setTitle(resourceBundle.getString("title.searchCriteria"));
  }
}
Example #2
0
 /** Updates the UI strings based on the locale of the ResourceBundle. */
 protected void updateUIText() {
   border.setTitle(resourceBundle.getString("title.searchCriteria"));
 }
Example #3
0
  /** Processes a change in the bound property RegistryBrowser.PROPERTY_LOCALE. */
  protected void processLocaleChange(Locale newLocale) {
    resourceBundle = JavaUIResourceBundle.getInstance();

    setLocale(newLocale);
    applyComponentOrientation(ComponentOrientation.getOrientation(newLocale));
  }
Example #4
0
 /** Class Constructor. */
 public QueryPanel(final FindParamsPanel findParamsPanel, Configuration cfg) {
   this.cfg = cfg;
   this.findParamsPanel = findParamsPanel;
   border = BorderFactory.createTitledBorder(resourceBundle.getString("title.searchCriteria"));
   this.setBorder(border);
 }