Exemplo n.º 1
0
    /** refreshes the parents */
    protected void refreshParents() {

      if (componentToRefresh != null) {

        componentToRefresh.repaint();
      }
    }
Exemplo n.º 2
0
  private void updateSelectedObj() {
    // System.out.println("VtabbedToolPanel updateValue ");

    Component comp = getSelectedObj();
    if (comp != null) {
      if (comp instanceof ExpListenerIF) ((ExpListenerIF) comp).updateValue();
      if (comp instanceof EditListenerIF) {
        ((EditListenerIF) comp).setEditMode(inEditMode);
        comp.repaint();
      }
    }
  }
Exemplo n.º 3
0
  /**
   * Display a file chooser dialog box.
   *
   * @param owner <code>Component</code> which 'owns' the dialog
   * @param mode Can be either <code>OPEN</code>, <code>SCRIPT</code> or <code>SAVE</code>
   * @return The path to selected file, null otherwise
   */
  public static String chooseFile(Component owner, int mode) {
    JFileChooser chooser = getFileChooser(owner, mode);
    chooser.setMultiSelectionEnabled(false);

    if (chooser.showDialog(owner, null) == JFileChooser.APPROVE_OPTION) {
      /*Jext*/ AbstractEditorPanel.setProperty(
          "lastdir." + mode, chooser.getSelectedFile().getParent());
      return chooser.getSelectedFile().getAbsolutePath();
    } else owner.repaint();

    return null;
  }
 private void onClick() {
   try {
     DialogTabularParameter dlg =
         new DialogTabularParameter(cmpCaller, mbModal, mstrTitle, mvtDefinition, mvtValue);
     // DialogTableParameter dlg = new
     // DialogTableParameter(cmpCaller,mbModal,mstrTitle,mvtDefinition,mvtValue);
     WindowManager.centeredWindow(dlg);
     cmpCaller.repaint();
     setValue(mvtValue);
   } catch (Exception e) {
     e.printStackTrace();
     MessageBox.showMessageDialog(this, e, Global.APP_NAME, MessageBox.ERROR_MESSAGE);
   }
 }
 /**
  * Invoked when the animated icon indicates that it is time for a repaint.
  *
  * @param context Component to refresh
  * @param key Substructure identification key
  */
 protected void repaint(Component context, Object key) {
   Rectangle rect = getRepaintRect(context, key);
   if (rect != null) {
     context.repaint(rect.x, rect.y, rect.width, rect.height);
   }
 }