Package org.qi4j.regression.qi94

Examples of org.qi4j.regression.qi94.IssueTest$ItemType


    }
    else if( value instanceof ItemType )
    {

      ItemType itemType = (ItemType) value;

      super.setText( itemType.getTitle() );
    }
    else
    {
      //---else, this is first time and there is no data so it is a DefaultMutableTreeNode
    }
View Full Code Here


    {
      return ImageFactory.getImageIcon( ImageNames.ICON_PROJECT );
    }
    else if( this.lastSelectedNode instanceof ItemType )
    {
      ItemType itemType = (ItemType) this.lastSelectedNode;

      if( itemType.getType() == TaskType.EMAIL )
      {
        return ImageFactory.getImageIcon( ImageNames.ICON_MAIL );
      }
      else if( itemType.getType() == TaskType.MEETING )
      {
        return ImageFactory.getImageIcon( ImageNames.ICON_MEETING );
      }
      else if( itemType.getType() == TaskType.PHONE )
      {
        return ImageFactory.getImageIcon( ImageNames.ICON_TELEPHONE );
      }
      else if( itemType.getType() == TaskType.TASK )
      {
        return ImageFactory.getImageIcon( ImageNames.ICON_TASK );
      }
      else
      {
        logger.finest( "Need to add icon for TaskType: " + itemType.getType() );
        return super.getLeafIcon();
      }
    }
    else
    {
View Full Code Here

   *
   * @param taskType
   *******************************************************************************/
  public void changeCurrentNodeType( TaskType taskType )
  {
    ItemType itemType= (ItemType) this.getSelectedNode();
    itemType.setType( taskType );
  }
View Full Code Here

    if( selectedNode != null )
    {
      logger.finer( "adding node to: '" + selectedNode.getTitle() + "'" );

      ItemType newNode = new ItemType();
      newNode.setTitle( "New Item" );
      newNode.setType( TaskType.TASK );

      GregorianCalendar g = new GregorianCalendar();
      g.setTime( new Date() );
      try
      {
        newNode.setDateCreated( DatatypeFactory.newInstance().newXMLGregorianCalendar( g ) );
      }
      catch( DatatypeConfigurationException e )
      {
        logger.severe( "Trying to create a date on the TaskNode.  " + e );
      }
View Full Code Here

  @Override
  protected Transferable createTransferable( JComponent jComponent )
  {   
    JTree jTree = (JTree) jComponent;
   
    ItemType itemType = (ItemType) jTree.getSelectionPath().getLastPathComponent();   
    this.parent = (BaseType) jTree.getSelectionPath().getParentPath().getLastPathComponent();

    this.originalPath= jTree.getSelectionPath().getParentPath();
   
    return new BaseTypeTransferable( itemType );
View Full Code Here

    JTree jTree = (JTree) jComponent;   
    BaseType target = (BaseType) jTree.getSelectionPath().getLastPathComponent();   

    try
    {
      ItemType source = (ItemType) transferable.getTransferData( ITEM_TYPE_DATA_FLAVOR );
      target.getItem().add( source );
     
     
      //System.out.println( "BEFORE---this.parent.getItem().size()= " + this.parent.getItem().size() );
     
View Full Code Here

         
          List<ItemRefType> itemrefs = new ArrayList<ItemRefType>();
          for(Item i:itemset.getItems()) {
            if(!allItems.contains(i)) {           
              allItems.add(i);
              ItemType pmmlItem = _40Factory.eINSTANCE.createItemType();
              pmmlItem.setId(String.valueOf(allItems.indexOf(i)));
              pmmlItem.setValue(i.toString());
              ruleModel.getItem().add(pmmlItem);

            }
          ItemRefType itemref = _40Factory.eINSTANCE.createItemRefType();
          itemref.setItemRef(String.valueOf(allItems.indexOf(i)));
View Full Code Here

TOP

Related Classes of org.qi4j.regression.qi94.IssueTest$ItemType

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.