Package net.sf.gum.xml.v1

Examples of net.sf.gum.xml.v1.BaseType


    }
    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

        if( this.projectName.getText().trim().length() > 0 )
        {
          log.log( Level.FINEST, "Adding new project" );

          ProjectType projectType = new ProjectType();
          projectType.setTitle( this.projectName.getText().trim() );
          // this.gumData.getProject().add( projectType );
        }
      }

      this.newButton.setVisible( true );
View Full Code Here

    if( this.gumData == null )
    {
      this.gumData = new GumData();

      //TODO do this until the New Project functionality gets added...
      ProjectType p = new ProjectType();
      p.setTitle( "Big Brutus" );


//      List<ProjectType> projectTypes = this.gumData.getProject();


      ProjectType p2 = new ProjectType();
      p2.setTitle( "Mangy" );
     
      List<ProjectType> projectTypes = this.gumData.getProject();
      projectTypes.add( p );
      projectTypes.add( p2 );
      this.taskTree.setProjectType( p );
View Full Code Here

    Component component = super.getTreeCellRendererComponent( tree, value, selected, expanded, leaf, row, hasFocus );

    if( value instanceof ProjectType )
    {
      ProjectType p = (ProjectType) value;

      super.setText( p.getTitle() );
      //super.setBackgroundNonSelectionColor( Color.BLUE );

    }
    else if( value instanceof ItemType )
    {
View Full Code Here

TOP

Related Classes of net.sf.gum.xml.v1.BaseType

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.