Package net.helipilot50.stocktrade.displayproject.actions

Examples of net.helipilot50.stocktrade.displayproject.actions.PendingAction


            reflectOpenChange(value);
        }
    }

    private void reflectOpenChange(final boolean value) {
        ActionMgr.addAction(new PendingAction(null) {
            @Override
            public String toString() {
                return "DisplayNode.reflectChange(" + value + ")";
            }
            @Override
View Full Code Here


     * Note that because this method can often be called repeatedly in quick succession we don't necessarily
     * want to process the GUI actions which will involve a thread context switch. If there really is a need
     * to update the screen immediately, explicitly invoke {@link UIutils.processGUIActions()}
     */
    public void updateFieldFromData(){
        ActionMgr.addAction(new PendingAction(null) {
            @Override
            public String toString() {
                return "DisplayNode.updateFieldFromData()";
            }
            @Override
View Full Code Here

     * Removes value from its present parent (if it has a parent), sets the child's parent to this node,
     * and then adds the child to this node's child array at index 0. value must not be null and must not be an ancestor of this node.
     * @param value
     */
    public void setFirstChild(final DisplayNode value) {
        ActionMgr.addAction(new PendingAction(null) {
            @Override
            public String toString() {
                return "DisplayNode.setFirstChild(" + value + ")";
            }
            @Override
View Full Code Here

     * Set the node's last child node
     * @param value
     */
    public void setLastChild(final DisplayNode value) {
        if (value != null) {
            ActionMgr.addAction(new PendingAction(null) {
                @Override
                public String toString() {
                    return "DisplayNode.setLastChild(" + value + ")";
                }
                public void performAction() {
View Full Code Here

     * this node prior to be added to this node's parent.
     * @param value
     */
    public void setNextSibling(final DisplayNode value) {
        if (value != null) {
            ActionMgr.addAction(new PendingAction(null) {
                @Override
                public void performAction() {
                    if (getParent() != null) {
                        int index = getParent().getIndex(DisplayNode.this);
                        if (index >= 0) {
View Full Code Here

     * the passed node's parent, to mimic the forte behaviour.
     * @param value
     */
    public void setPrevSibling(final DisplayNode value) {
        if (value != null) {
            ActionMgr.addAction(new PendingAction(null) {
                @Override
                public void performAction() {
                    if (getParent() != null) {
                        int index = getParent().getIndex(DisplayNode.this);
                        if (index >= 0) {
View Full Code Here

    /**
     * Set the parent of this display node. Uses a pending action for delayed write
     * @param pParent
     */
    public void setParent(final DisplayNode pParent) {
        ActionMgr.addAction(new PendingAction(null) {
            @Override
            public void performAction() {
                DisplayNode currentParent = (DisplayNode)getParent();
                if (pParent != currentParent) {
                    //Remove this from its current Parent
View Full Code Here

        // TF:8/8/07:Made a shallow clone in case there is a really big object attached to the list element
        Array_Of_ListElement<ListElement> clonedList = CloneHelper.clone(les, false);
        Object currentValue = this.list.getValue();
        ListElement valueToReselect = null;
        if (currentValue instanceof ListElement && clonedList != null && this.list.getSelectionHolder() instanceof TypeAwareValueModel) {
          TypeAwareValueModel tavm = (TypeAwareValueModel)this.list.getSelectionHolder();
          // We need to find an item in the new list which is the same as an item in the old list,
          // depending on the type being considered. For example, if the list is mapped to an int,
          // we need to find an element in the new list with the same IntegerValue.
          Class<?> clazz = tavm.getValueType();
          ListElement currentSelection = (ListElement)currentValue;
          for (ListElement item : clonedList) {
            if (clazz.equals(Integer.TYPE) ||
                clazz.equals(Short.TYPE) ||
                NumericData.class.isAssignableFrom(clazz) ||
View Full Code Here

      }
      else if (list.getSelectionHolder() == null) {
        requiresDefault = true;
      }
      else {
        ValueModel model = list.getSelectionHolder();
        if (model instanceof TypeAwareValueModel) {
          if (DataValue.class.isAssignableFrom(((TypeAwareValueModel)model).getValueType())) {
            requiresDefault = false;
          }
          else {
            requiresDefault = true;
          }
        }
        else {
          requiresDefault = (model.getValue() == null);
        }
      }
      if (requiresDefault) {
        // TF:05/11/2008:Fixed this up so it actually sets the underlying model
        getSelectionModel().setSelectionInterval(0, 0);
View Full Code Here

          }
        }
        else {
          ListSelectionModel model = getSelectionModel();
          if (!(model instanceof ReadOnlyButtonModel)) {
            this.setSelectionModel(new ReadOnlyListSelectionModel(model));
          }
        }
        this.isCalledFromSetEditable = false;
        this.firePropertyChange("editable", !editable, editable);
      }
View Full Code Here

TOP

Related Classes of net.helipilot50.stocktrade.displayproject.actions.PendingAction

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.