Package net.helipilot50.stocktrade.displayproject.controls

Examples of net.helipilot50.stocktrade.displayproject.controls.TabFolder


     * 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

   * @param tabLayoutPolicy
   *            the policy used to layout the tabs
   * @return The created <code>JTabbedPane</code> like a Forte TabFolder
   */
  public static TabFolder newTabFolder(String name, int tabLayoutPolicy) {
    TabFolder tp = new TabFolder();
    tp.setName(name);
    tp.setTabLayoutPolicy(tabLayoutPolicy);
    // PM 9/7/07 allows inhert background colour
    tp.setBackground(null);
    // TF:9/11/07:Refactored this method to initialise the state properly
    // for coded widgets, instead of declared widgets
    WidgetState.set(tp, Constants.FS_UPDATE);

    return tp;
View Full Code Here

    }

  public void performAction() {
        if (pages != null) {
          //PM:14/01/2009:moved code to TabFolder
          TabFolder tabPane = (TabFolder)_component;
          tabPane.setPages(pages);
        } else {
            // add or delete a page
            switch (action) {
            case TabPages.ADD:
              _addPage();
View Full Code Here

        // TF:25/06/2009:Added special handling for a TabFolder. We just want to get all the components
        // in the tab folder and recurse down into them. Luckily, TabFolders include a method that will
        // give us all the components, irrespective of whether they are visible or not.
        if (comp instanceof TabFolder) {
          TabFolder pane = (TabFolder)comp;
          for (Component c : pane.getAllPages()) {
            processComponent(c, state);
          }
        }
        // TF:26/05/2009:Changed this to process the JTabbed panes diffferent to the other components.
        // A JTabbedPane can have 3 component prior to it's real components, depending on how it's
        // been set up. (Eg SCROLL_TAB_LAYOUT has 3 components, WRAP_TAB_LAYOUT doesnt)
        else if (comp instanceof JTabbedPane) {
          JTabbedPane pane = (JTabbedPane)comp;
          int tabs = pane.getTabCount();
          // TF:26/05/2009:Unfortunately, as we're setting the visibility, this may change
          // the component count and indexes, so remember the pages first.
          List<Component> tabPages = new ArrayList<Component>(tabs);
          for (int i = 0; i < tabs; i++) {
            tabPages.add(pane.getComponentAt(i));
          }
          for (Component c : tabPages) {
            processComponent(c, state);
          }
        }
View Full Code Here

                    ((JList)this._component).setSelectedIndex(value-1);
                  }
                 
                  // CraigM:16/01/2009 - Corrected to cater for hidden pages
                  else if (this._component instanceof TabFolder) {
                    TabFolder tf = (TabFolder)this._component;
                    int realIndex = tf.getTabIndex(value-1);
 
                    if (realIndex != -1) {
                          tf.setSelectedIndex(realIndex);
                      }
                  }
                  else {
                      UnsupportedOperationException errorVar = new UnsupportedOperationException("getIndexValue() is not implemented for components of type " + this._component.getClass());
                      ErrorMgr.addError(errorVar);
View Full Code Here

TOP

Related Classes of net.helipilot50.stocktrade.displayproject.controls.TabFolder

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.