Package Framework

Examples of Framework.ParameterHolder


    return isWrapperHolder.getBoolean();
  }

  @SuppressWarnings("unchecked")
  public <T> T unwrap(final Class<T> iface) throws SQLException {
    final ParameterHolder THolder = new ParameterHolder();
    useRealStatement(new StatementWorker() {
      public void doWork(PreparedStatement arg0) throws SQLException {
        THolder.setObject(arg0.unwrap(iface));
      }
    });
    return (T)THolder.getObject();
  }
View Full Code Here


                        return;
                    }
                }

                Hashtable<String, Object> qq_Params = new Hashtable<String, Object>();
                qq_Params.put("sourceField", new ParameterHolder(e.getComponent()));

                //The forte will return the X & Y in mils, so covert here
                qq_Params.put("x", new ParameterHolder(UIutils.pixelsToMils(e.getX())));
                qq_Params.put("y", new ParameterHolder(UIutils.pixelsToMils(e.getY())));

                ClientEventManager.postEvent(comp.getTopLevelAncestor(), "PopUpRequest", qq_Params);

                popup.show(comp, e.getX(), e.getY());
            }
View Full Code Here

    private void postAfterKeyPress(KeyEvent e) {
      // Create parameters
      Hashtable<String, Object> qq_Params = new Hashtable<String, Object>();

      // add keypress parameters
      qq_Params.put("key", new ParameterHolder(e.getKeyCode()));
      qq_Params.put("value", new ParameterHolder(e.getKeyChar()));
      qq_Params.put("modifier", new ParameterHolder(e.getModifiers()));

      // add usual parameters
      final Hashtable<String, ParameterHolder> usualParameters = arrayParam();
      if (usualParameters != null) {
        qq_Params.putAll(usualParameters);
View Full Code Here

        if (reason != Constants.FC_SUPRESS) {
            Hashtable<String, ParameterHolder> params = arrayParam();
            if (params == null) {
                params = new Hashtable<String, ParameterHolder>();
            }
            params.put("reason", new ParameterHolder(reason));
            ClientEventManager.postEvent( correctPostingComponent(), "AfterFocusGain", params );
        }
    }
View Full Code Here

        Hashtable<String, ParameterHolder> params = arrayParam() ;
        if (params == null)
            params = new Hashtable<String, ParameterHolder>();
        int realReason = ForteKeyboardFocusManager.getTraversalReason();
        if (realReason != Constants.FC_SUPRESS) {
            params.put("reason", new ParameterHolder(realReason));
            ClientEventManager.postEvent( correctPostingComponent(), "BeforeFocusLoss", params);
        }
        EventManager.endEventChain();
    }
View Full Code Here

    protected Hashtable<String, ParameterHolder> arrayParam(){
        Hashtable<String, ParameterHolder> qq_Params = null;
        if (table != null){
            qq_Params = new Hashtable<String, ParameterHolder>();
            // TF:27/9/07:Made the row and column 1-based indexes instead of 0-based
            qq_Params.put( "row", new ParameterHolder(tableRow+1) );
            qq_Params.put( "column", new ParameterHolder(tableColumn+1) );
            qq_Params.put( "ArrayField", new ParameterHolder(table) );
        }
        return qq_Params;

    }
View Full Code Here

     * @param pTree -
     *            The tree whose root node is to be returned
     * @return the root node of the tree
     */
    public static DisplayNode getRootNode(final JTree pTree) {
        final ParameterHolder rootNode = new ParameterHolder();
        UIutils.invokeOnGuiThread(new Runnable() {
            public void run() {
                TreeModel aModel = pTree.getModel();
                if (aModel != null) {
                    rootNode.setObject(aModel.getRoot());
                }
            }
        });
        Object anObj = rootNode.getObject();
        if (anObj != null && anObj instanceof DisplayNode) {
            return (DisplayNode) anObj;
        }
        else {
            return null;
View Full Code Here

      // CraigM:25/06/2008 - If we are already on the EDT, we can't wait for it to be idle.
      if (SwingUtilities.isEventDispatchThread()) {
        return;
      }
     
        final ParameterHolder holder = new ParameterHolder();
        do {
            try {
                Thread.sleep(20);
            } catch (InterruptedException e) {}
            UIutils.invokeOnGuiThread(new Runnable() {
                public void run() {
                    AWTEvent e = Toolkit.getDefaultToolkit().getSystemEventQueue().peekEvent();
                    holder.setBoolean(e != null);
                }
            });
        } while (holder.getBoolean());

    }
View Full Code Here

   * @param pClassType
   * @return
   */
  @SuppressWarnings("unchecked")
  public <T extends JFrame> T instantiateWindow(final Class<T> pClassType) {
    final ParameterHolder ph = new ParameterHolder();
    UIutils.invokeOnGuiThread(new Runnable()  {
      public void run() {
        try {
          ph.setObject(FrameworkUtils.newInstance(pClassType));
        }
        catch (Exception e) {
          ph.setObject(e);
        }
      }
    });
    if (ph.getObject() instanceof RuntimeException) {
      throw (RuntimeException)ph.getObject();
    }
    else {
      return (T)ph.getObject();
    }
  }
View Full Code Here

        super(root, asksAllowsChildren);
    }
    public void valueChanged(TreeSelectionEvent e) {
        Hashtable<String, Object> qq_Params = new Hashtable<String, Object>();
        if (e.getOldLeadSelectionPath() != null)
            qq_Params.put( "OldNode", new ParameterHolder(e.getOldLeadSelectionPath().getLastPathComponent()) );
        else
            qq_Params.put( "OldNode", new ParameterHolder() ); // Always have a value for "OldNode" to stop any null errors.
        if (e.getNewLeadSelectionPath() != null
            qq_Params.put( "NewNode", new ParameterHolder(e.getNewLeadSelectionPath().getLastPathComponent() ));
        else
            qq_Params.put( "NewNode", new ParameterHolder() ); // Always have a value for "OldNode" to stop any null errors.
        qq_Params.put( "OldRowNumber", new ParameterHolder(0) );
        if (e.getPath() != null)
            qq_Params.put( "NewRowNumber", new ParameterHolder(e.getPath().getPathCount()) );
        else
            qq_Params.put( "NewRowNumber", new ParameterHolder(0) );
        ClientEventManager.postEvent( e.getSource(), "AfterCurrentNodeChange", qq_Params );

    }
View Full Code Here

TOP

Related Classes of Framework.ParameterHolder

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.