Package Framework

Examples of Framework.ParameterHolder


        ClientEventManager.postEvent( e.getComponent(), "DisplayStateChange", qq_Params);  
    }
    public void windowIconified(WindowEvent e) {
        _log.debug("["+this+"] Iconified window: " + e.getWindow().toString());
        Hashtable<String, Object> qq_Params = new Hashtable<String, Object>();
        qq_Params.put( "x", new ParameterHolder(0) );
        qq_Params.put( "y", new ParameterHolder(0) );
        qq_Params.put( "modifier", new ParameterHolder(Constants.DS_ICONIZED) );
        qq_Params.put( "DisplayNode", new ParameterHolder(null) );
        qq_Params.put( "row", new ParameterHolder(0) );
        qq_Params.put( "column", new ParameterHolder(0) );
        qq_Params.put( "OldState", new ParameterHolder(0) );
        qq_Params.put( "NewState", new ParameterHolder(Constants.DS_ICONIZED) );
        ClientEventManager.postEvent( e.getComponent(), "DisplayStateChange", qq_Params);  
    }
View Full Code Here


        if (logger.isDebugEnabled()) {
          logger.debug("Mapping Row to Object [" + beanWrapper.getWrappedClass().getName() + "]");
        }

        for (int i = 0; i < columnNamesToMap.length; i++) {
          ParameterHolder beanWrapperHolder = new ParameterHolder(beanWrapper);
            PropertyDescriptor descriptor = getDescriptorAndBeanForColumnName(columnNamesToMap[i], beanWrapperHolder);
            BeanWrapper localWrapper = ((BeanWrapper) beanWrapperHolder.getObject());

            if (descriptor == null) {
                logger.error("Skipping unknown property \"" + columnNamesToMap[i] + "\"");
                continue;
            }
View Full Code Here

        Hashtable<String, Object> params = pParams;
        if (params == null) {
            params = new Hashtable<String, Object>();
        }
        params.put("child", new ParameterHolder(pChild));

        // TF:27/9/07:Revamped this logic as our renderers are now in panels.
        ArrayField owningArray = ArrayFieldCellHelper.getArrayField(pChild);
        int row = 0;
        int column = 0;
        // Extract the X and Y co-ordinate from the event which may be in array coordinates
        ParameterHolder pX = (ParameterHolder)params.get("x");
        ParameterHolder pY = (ParameterHolder)params.get("y");

        /*
         * There are 2 cases when considering children events of array fields:
         * 1) The component cell renderer/editor is attached to the array field as a child. This is typically when the
         *     editor is active. In this case the click we get is in the coordinate space of the child, but the row
         *     and column are not set properly. We can map the coordinate space of the child to the coordinate space
         *     of the array and then determine the row and column from there.
         *
         * 2) The component cell renderer/editor is not attached to the array field. In this case, the component will
         *     have a client property set which refers to the array and the location is in the coordinate space of the
         *     array. We can use this to determine the row and column and then map the coordinate down to the
         *     coordinate space of the child.
         */
        while (mum != null){
            if (mum == owningArray) {
                if (pX != null && pY != null) {
                    // We are a direct child of the table, remap the coordinate space to the array to get the row and column
                    Point p = new Point(UIutils.milsToPixels(pX.getInt()), UIutils.milsToPixels(pY.getInt()));
                    Point arrayPoint = SwingUtilities.convertPoint(pChild, p, mum);
                    row = owningArray.rowAtPoint(arrayPoint);
                    column = owningArray.columnAtPoint(arrayPoint);
                    // Store the real row and column in the array. This isn't actually done in Forte, but makes life
                    // much easier if we want to determine which cell generated the click.
                    params.put( "row", new ParameterHolder(row+1) );
                    params.put( "column", new ParameterHolder(column+1) );
                }
                owningArray = null;
            }
            pList.add(new EventHandle(mum, pEventName, params));
            // TF:18/06/2008:Fixed this so menus work properly
            if (mum instanceof JPopupMenu)
                mum = (Container)((JPopupMenu)mum).getInvoker();
            else
                mum = mum.getParent();
        }

        if (owningArray != null) {
            // Now the X and Y coordinates are in the array space, we need to translate them to the child coordinate space and get
            // the correct row and column
            if (pX != null && pY != null) {
                Point p = new Point(UIutils.milsToPixels(pX.getInt()), UIutils.milsToPixels(pY.getInt()));
                row = owningArray.rowAtPoint(p);
                column = owningArray.columnAtPoint(p);
                // Store the real row and column in the array. This isn't actually done in Forte, but makes life
                // much easier if we want to determine which cell generated the click.
                params.put( "row", new ParameterHolder(row+1) );
                params.put( "column", new ParameterHolder(column+1) );

                Rectangle r = owningArray.getCellRect(row, column, false);
                p.x -= r.x;
                p.y -= r.y;
                // Now X and Y are in owningArray coordinate space, need to translate them into pChild's
//              Point childLoc = SwingUtilities.convertPoint(owningArray, p, pChild);
                Point childLoc = p;
                pX.setInt(UIutils.pixelsToMils(childLoc.x));
                pY.setInt(UIutils.pixelsToMils(childLoc.y));
            }
            // Go through and post this to the parent of the array also.
            mum = owningArray;
            while (mum != null){
                pList.add(new EventHandle(mum, pEventName, params));
View Full Code Here

        if (postTarget instanceof OutlineFieldJTree) {
            postTarget = ((OutlineFieldJTree)postTarget).getOutlineField();
        }
        Hashtable<String, ParameterHolder> qq_Params = new Hashtable<String, ParameterHolder>();
        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(selectedRow) );
        else
            qq_Params.put( "NewRowNumber", new ParameterHolder(0) );
        ClientEventManager.postEvent( postTarget, "AfterCurrentNodeChange", qq_Params );
    }
View Full Code Here

 
          if (losingFocusField instanceof JComponent) {
              Object table = ArrayFieldCellHelper.getArrayField(losingFocusField);
 
              if (table != null && table instanceof JTable) {
                  params.put( "ArrayField", new ParameterHolder(table) );
              }
          }
          params.put("reason", new ParameterHolder(realReason));
          while (losingFocusField != null) {
            if (gainingFocusField != null && losingFocusField instanceof Container && ((Container)losingFocusField).isAncestorOf(gainingFocusField)) {
              // This component is the parent of the other component too, so it's not really losing focus. Nor are it's parents
              return;
            }
View Full Code Here

 
          if (gainingFocusField instanceof JComponent) {
              Object table = ArrayFieldCellHelper.getArrayField(gainingFocusField);
 
              if (table != null && table instanceof JTable) {
                  params.put( "ArrayField", new ParameterHolder(table) );
              }
          }
          params.put("reason", new ParameterHolder(realReason));
          while (gainingFocusField != null) {
            if (losingFocusField != null && gainingFocusField instanceof Container && ((Container)gainingFocusField).isAncestorOf(losingFocusField)) {
              // This component is the parent of the other component too, so it's not really losing focus. Nor are it's parents
              return;
            }
View Full Code Here

  int rowBeingEdited = -1;

  protected void postAfterFocusGain(int pReason, Component pObject) {
    if (ForteKeyboardFocusManager.getTraversalReason() != Constants.FC_SUPRESS) {
      Hashtable<String, ParameterHolder> params = new Hashtable<String, ParameterHolder>();
      params.put("reason", new ParameterHolder(pReason));
      ClientEventManager.postEvent(pObject, "AfterFocusGain", params);
    }
  }
View Full Code Here

        setRowForEvents(pNewRow-1);
      }
    };
    if (pReason != Constants.FC_SUPRESS) {
      Hashtable<String, Object> params = new Hashtable<String, Object>();
      params.put("reason", new ParameterHolder(pReason));
      EventHandle handle = new EventHandle(pObject, "AfterFocusGain", params);
      handle.setForceReceiptOfEvent(windowThread);
      handle.setCommencementNotifier(action);
      ClientEventManager.postEvent(handle);
    }
View Full Code Here

        public void run() {
          isAddRowEventPending = false;
        }
      }, this, "AfterRowAppend");
      Hashtable<String, Object> params = new Hashtable<String, Object>();
      params.put("row", new ParameterHolder(pRow));
      params.put("newObject", new ParameterHolder(newObject));
      EventHandle handle = new EventHandle(pObject, "AfterRowAppend", params);
      Window topLevel = (Window)this.getTopLevelAncestor();
      Thread windowThread = WindowManager.getOwningThread(topLevel);
      handle.setForceReceiptOfEvent(windowThread);
      handle.setCommencementNotifier(new Runnable() {
View Full Code Here

  }

  protected void postAfterRowEntry(int pRow, Component pObject) {
    if (ForteKeyboardFocusManager.getTraversalReason() != Constants.FC_SUPRESS) {
      Hashtable<String, ParameterHolder> params = new Hashtable<String, ParameterHolder>();
      params.put("row", new ParameterHolder(pRow));
      ClientEventManager.postEvent(pObject, "AfterRowEntry", 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.