Package net.helipilot50.stocktrade.displayproject.controls

Examples of net.helipilot50.stocktrade.displayproject.controls.ScrollList$ScrollListCellRenderer$DashedLineBorder


     * rows is more than the passed value, the number of rows will be
     * set to the number of rows used. This method is thread-safe and may be
     * called on or off the GUI thread
     */
    public void setRows(final int pRows) {
        ActionMgr.addAction(new PendingAction(null) {
            @Override
            public String toString() {
                return GridField.this.getName() + ".setRows(" + pRows + ")";
            }
            @Override
View Full Code Here


     * columns is more than the passed value, the number of columns will be
     * set to the number of columns used. This method is thread-safe and may be
     * called on or off the GUI thread
     */
    public void setColumns(final int pColumns) {
        ActionMgr.addAction(new PendingAction(null) {
            @Override
            public String toString() {
                return GridField.this.getName() + ".setColumns(" + pColumns + ")";
            }
            @Override
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

  @Override
  // ITC_CONV:Start:TF:25-Mar-08:Handle SkipOnTab focus traversal
  public Component getComponentAfter(Container aContainer, Component aComponent) {

    // Traversing out of an ArrayField is handled via code inside the ArrayField. CraigM 29/08/2007.
    ArrayField af = ArrayFieldCellHelper.getArrayField(aComponent);
    if (af != null && isSwingDisplayerIgnoreArrayField() == false) {
      return af; // Stay in the ArrayField
    }
    Component result = super.getComponentAfter(aContainer, aComponent);
    while (result instanceof JComponent && SkipOnTab.get((JComponent)result)) {
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

                    ScrollBar.getMinimumValue(bar),
                    ScrollBar.getMaximumValue(bar),
                    ScrollBar.getViewSize(bar));
              }
              else if (newComponent instanceof ScrollList) {
                ScrollList sl = (ScrollList)newComponent;
                ScrollList orig = (ScrollList)origComponent;
                topLevelManager.bindComponent(sl, BindingManager.getDataObjectPath(origComponent),
                    ElementList.get(orig),
                    orig.getSelectionModel().getSelectionMode() == ListSelectionModel.SINGLE_SELECTION);
              }
              else {
                topLevelManager.bindComponent(newComponent, BindingManager.getDataObjectPath(origComponent));
              }
            }
View Full Code Here

    private ListFieldFactory() {
        super();
    }

    public static ScrollList newScrollList(){
        ScrollList jl = new ScrollList();
        return jl;
    }
View Full Code Here

              Dimension minimum = super.getMinimumSize();
             
              if (minimum == null) {
                minimum = new Dimension(10,10);
              }
              ScrollList scrollList = (ScrollList)underlyingComponent;
              List<ListElement> items = scrollList.getElementList();
             
              // TF:19/07/2009:The size for an empty list or a null list is 80 pixels in Forte, including the scrollbar
              if (items == null || items.size() == 0) {
                minimum.width = 80;
              }
              else {
                minimum.width = scrollList.getWidthForData();
                if (this.verticalScrollBar.isVisible()) {
                  minimum.width += this.verticalScrollBar.getWidth();
                }
              }
//              minimum.width = Math.max(minimum.width, ((ScrollList)((JViewport)this.getComponent(0)).getComponent(0)).getWidthForModel());
View Full Code Here

        for (ActionListener listener : listeners){
            if (listener instanceof PrintActionListener){
                target.addActionListener(new PrintActionListener(((PrintActionListener)listener).getWindow()));
            } else
            if (listener instanceof AboutMenuListener){
                target.addActionListener(new AboutMenuListener());
            }
        }
        CloneHelper.cloneClientProperties(source, target);
        return target;
    }
View Full Code Here

TOP

Related Classes of net.helipilot50.stocktrade.displayproject.controls.ScrollList$ScrollListCellRenderer$DashedLineBorder

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.