Package org.zaval.awt.peer

Examples of org.zaval.awt.peer.TreeNode


       if ( e.target == delDialog && e.arg instanceof Button &&
             ((Button)e.arg).getLabel().equals( DELETE_BUTTONS[0])){
          String key = tree.getSelectedText();
          if ( key != null ){
             isDirty = true;
             TreeNode tn = tree.getNode( wasSelectedKey );
             if ( tn != null ) tn = tn.parent;
             tree.remove( key );
             adjustIndicator( tn );
             tree.repaint();

             bundle.getBundle().removeKeysBeginningWith(key);

             wasSelectedKey = null;
             setTranslations();
          }
       }
       if ( e.target == delDialog && e.arg instanceof Button &&
             ((Button)e.arg).getLabel().equals( DELETE_BUTTONS[1])){
          String key = tree.getSelectedText();
          if ( key != null ){
             isDirty = true;
             TreeNode tn = tree.getNode( wasSelectedKey );
             if(tree.enumChild(tn) == null || tree.enumChild(tn).length == 0){
               if ( tn != null ) tn = tn.parent;
               tree.remove( key );
               adjustIndicator( tn );
               tree.repaint();
View Full Code Here


            lang.equals(NATIVE_LANGUAGE);
    }

    private void addToTree( String s )
    {
       TreeNode tnew = tree.getNode( s );
       if ( tnew != null ) return;
       int ind = getIndexOfLast(s, "" + KEY_SEPARATOR + KEY_SEPARATOR_2 );

       tnew = new TreeNode( s );
       if ( ind < 0 ){
          tnew.caption = s;
          tree.insertRoot( s );
       }
       else{
          String tname = s.substring( 0, ind );
          addToTree( tname );
          TreeNode ttpar = tree.getNode( tname );
          tnew.caption = s.substring( ind + 1 );
          tree.insert( tnew, ttpar, LevelTree.CHILD );
       }
       tree.setImages( tnew.getText(), OPEN_IMAGE, CLOSE_IMAGE );
    }
View Full Code Here

TOP

Related Classes of org.zaval.awt.peer.TreeNode

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.