Package net.helipilot50.stocktrade.displayproject.controls

Examples of net.helipilot50.stocktrade.displayproject.controls.ListView$cellRenderer


     * 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

            params.put( "node", new ParameterHolder(((JListView)pControl).getCurrentNode()) );
            params.put( "row", new ParameterHolder(0) );
            params.put( "column", new ParameterHolder(0) );
        }
        else if (pControl != null && pControl instanceof ListView) {
            ListView list = (ListView)pControl;
            params.put( "node", new ParameterHolder(((ListView)pControl).getCurrentNode()) );
            // TF:27/9/07:Made the row and column 1-based indexes instead of 0-based
            // TF:26/3/08:getSelectedRow has changed to be 1-based itself, so we need to change this back to remove the +1
            params.put( "row", new ParameterHolder(list.getSelectedRow()));
//            qq_Params.put( "column", new ParameterHolder(0) );
            params.put( "column", new ParameterHolder(list.getTable().getSelectedColumn()+1) );//CONV_REM:dq Need the column that was selected, not a 0.
        }
        else if (pControl != null && pControl instanceof JTable)
        {
            JTable table = (JTable)pControl;
            if (table.getModel() instanceof TableSorter) {
View Full Code Here

                  }
//                  rl.update();
                  return;
              }
              else if (comp instanceof ListView){ //PM:23/4/08 added support for ListView
                ListView lv = (ListView)comp;
              // TF:Mar 9, 2010:Corrected this for the default set
                int titleSetNum = lv.getTitleSetNum();
                if (titleSetNum <= 0 && defaultSet > 0) {
                  titleSetNum = defaultSet;
                }
                lv.loadColumnHeadings(titleSetNum, mcat);
              }
              else if (comp instanceof OutlineField) {
                OutlineField of = (OutlineField)comp;
                of.setDefaultSet(defaultSet, mcat);
              }
View Full Code Here

            postTarget = info.getTargetField();
          }

          // CraigM:07/07/2008 - Handle multiple selection drag and drop for list views
          if (info.getSourceField() instanceof ListView) {
            ListView lv = (ListView)info.getSourceField();
            Array_Of_DisplayNode<DisplayNode> nodes = lv.getSelectedNodes();
            if (nodes.size() > 1) {
              for (DisplayNode node : nodes) {
                Hashtable<String, Object> newParams = (Hashtable<String, Object>)params.clone();
                newParams.put("sourceData", new ParameterHolder(node));
                ClientEventManager.postEvent(postTarget, eventName, newParams);
View Full Code Here

    if (this.startDrag != null){
      info.setSourceX(UIutils.pixelsToMils(this.startDrag.x));
      info.setSourceY(UIutils.pixelsToMils(this.startDrag.y));
    }
    if (c instanceof JTable) {
      ListView lv = (ListView)c.getClientProperty("qq_ListView");
      if (lv != null){
        info.setSourceDataType(Constants.SD_NODE);
        info.setSourceData(lv.getCurrentNode());
        info.setSourceField(lv);
      } else {
        info.setSourceDataType(Constants.SD_FIELDWIDGET);
        info.setSourceData(c);
      }
View Full Code Here

          }

          // If we are dragging over a ListView, highlight the node we are currently on.
          // Note: Currently only supports the table view.  CraigM: 24/03/2008.
          else if (this.getComponent() instanceof ListView) {
            ListView lv = (ListView)this.getComponent();
           
            // CraigM:08/07/2008 -  If we are not dragging over a list marked for multiple selection.
            if (OutlineFieldHasMultipleSelection.get(lv) == false) {

              // Check we are allowed to highlight a node.  CraigM: 04/04/2008
              if (lv.getIsDropHighlightEnabled()) {
                // Get the top left position, taking into account scrolling
                Point p = lv.getTable().getVisibleRect().getLocation();

                // Take into account the header
                JTableHeader header = lv.getTable().getTableHeader();
                if (header != null) {
                  p.y -= header.getHeight();
                }

                // Set the point based on the mouse position
                p.y += e.getLocation().y;

                // Find the row at that point
                int row = lv.getTable().rowAtPoint(p);

                // Set the row if valid
                if (row >= 0 && row < lv.getTable().getRowCount()) {
                  lv.getTable().setRowSelectionInterval(row, row);
                }
              }
            }
          }
        } else {
View Full Code Here

        super(pComponent);
        this.value = pFont;
    }
    public void performAction() {
        if (this._component instanceof ListView){
            ListView lv = (ListView)this._component;
            JTableHeader header = lv.getTable().getTableHeader();
            if (header != null){
                header.setFont(this.value);
            }
        } else if (this._component instanceof OutlineField){
            OutlineField of = (OutlineField)this._component;
View Full Code Here

TOP

Related Classes of net.helipilot50.stocktrade.displayproject.controls.ListView$cellRenderer

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.