Hi Daniel, Sorry, dismiss my last message... there was no entry for the client jar in the JNLP file... have to study a bit more ANT here to find a way to have the names of the jars included automatically in the JNLP on building the project...
Kind regards, Alberto A. Smulders HostDat Lda. - Portugal -------- Original-Nachricht -------- Datum: Wed, 20 Sep 2006 13:11:16 +0200 Von: "Albert Smulders" <[EMAIL PROTECTED]> An: [email protected] Betreff: Re: [ULC-developer] ULCTree: ActionEvent not triggered if double click on node with childeren > Hi Daniel, > > Thanks for the solution, it looks like a solution I also made already. > > I included the extension in 2 jar files (for server- and clientside > deployment), together with some other components I made here. > > Your solution and also my solution work great in the development > environment. > > BUT... deploying on our Tomcat server, in both cases (your and mine > solution), I get an IllegalStateException error (please see the attached jpg > screenshots, as I'm not able to copy/paste the error message from the JNLP > window (nor from the java console window as it is blocked by the JNLP window > and closes as soon as I dismiss the JNLP window)). > > It seems a problem with extending ULCTree / UITree, because I get the same > error even extending the tree without any other code... > > Thanks and kind regards, > > Alberto A. Smulders > HostDat Lda. - Portugal > > > > > > ----- Original Message ----- > > > From: "Daniel Grob" <[EMAIL PROTECTED]> > > > To: <[email protected]>; > > > Sent: Tuesday, September 19, 2006 4:36 PM > > > Subject: Re: [ULC-developer] ULCTree: ActionEvent > > > not triggered if double > > > click on node with childeren > > > > > > > > > > Hi Alberto, > > > > > > > > Swing's tree already consumes the double click > > > gesture for non leaf > > > > nodes: the node collapses / expands. Therefore the > > > ULCTree only reacts > > > > on double clicks on leaf nodes to prevent double > > > actions on non leaf > > > nodes. > > > > > > > > However, if you wish to have action events on non > > > leaf nodes you can use > > > > the snippet at the end of my mail. > > > > > > > > Regards Dany > > > > > > > > > > > > > > > > import java.awt.event.MouseAdapter; > > > > import java.awt.event.MouseEvent; > > > > > > > > import javax.swing.SwingUtilities; > > > > import javax.swing.tree.TreePath; > > > > > > > > import > > > com.ulcjava.base.application.AbstractApplication; > > > > import com.ulcjava.base.application.ULCFrame; > > > > import com.ulcjava.base.application.ULCScrollPane; > > > > import com.ulcjava.base.application.ULCTree; > > > > import > > > com.ulcjava.base.application.event.ActionEvent; > > > > import > > > com.ulcjava.base.application.event.IActionListener; > > > > import com.ulcjava.base.client.UITree; > > > > import > > > com.ulcjava.base.development.DevelopmentRunner; > > > > > > > > public class TreeActionOnNonLeafSnippet extends > > > AbstractApplication { > > > > public void start() { > > > > ULCSnippetTree tree = new > > > ULCSnippetTree(); > > > > tree.addActionListener(new > > > IActionListener() { > > > > public void > > > actionPerformed(ActionEvent event) { > > > > System.out.println("Action!"); > > > > } > > > > }); > > > > > > > > ULCFrame frame = new ULCFrame("Snippet"); > > > > > > > > > frame.setDefaultCloseOperation(ULCFrame.TERMINATE_ON_CLOSE); > > > > frame.getContentPane().add(new > > > ULCScrollPane(tree)); > > > > frame.pack(); > > > > frame.setVisible(true); > > > > } > > > > > > > > public static void main(String[] args) { > > > > > > > > > > > > > DevelopmentRunner.setApplicationClass(TreeActionOnNonLeafSnippet.class); > > > > DevelopmentRunner.main(args); > > > > } > > > > > > > > public static class ULCSnippetTree extends > > > ULCTree { > > > > protected String typeString() { > > > > return UISnippetTree.class.getName(); > > > > } > > > > } > > > > > > > > public static class UISnippetTree extends > > > UITree { > > > > protected void postInitializeState() { > > > > super.postInitializeState(); > > > > > > > > ActionHandler actionHandler = new > > > ActionHandler(); > > > > > > > getBasicTree().addMouseListener(actionHandler); > > > > } > > > > > > > > private class ActionHandler extends > > > MouseAdapter { > > > > public void mousePressed(MouseEvent > > > event) { > > > > if (isEnabled() && > > > event.getClickCount() == 2 > > > > && > > > SwingUtilities.isLeftMouseButton(event)) { > > > > TreePath clickedPath = > > > > getBasicTree().getPathForLocation( > > > > event.getX(), > > > event.getY()); > > > > if (clickedPath != null > > > > && > > > !getBasicTree().getModel().isLeaf( > > > > > > > clickedPath.getLastPathComponent())) { > > > > > > > fireActionPerformedULC(null, > > > event.getModifiers()); > > > > } > > > > } > > > > } > > > > } > > > > } > > > > } > > > > > > > > > > > > > > > > Alberto Smulders wrote: > > > > > Hi, > > > > > > > > > > Double clicking on a node other than a leaf node > > > in an ULCTree doesn't > > > > > fire an ActionEvent, only expands/contracts the > > > tree branch. But > > > > > pushing the Enter key while being selected such > > > a node fires an > > > > > ActionEvent. > > > > > Is there a way to get notified of double > > > clicking a node other than > > > > > leaf nodes? > > > > > > > > > > Kind regards, > > > > > > > > > > Alberto A.Smulders > > > > > HostDat Lda. - Portugal > > > > > > > > _______________________________________________ > > > > ULC-developer mailing list > > > > [email protected] > > > > > > > > > http://lists.canoo.com/mailman/listinfo/ulc-developer > > > > > > > > > > > > > > > > __________________________________________________ > > Do You Yahoo!? > > Tired of spam? Yahoo! Mail has the best spam protection around > > http://mail.yahoo.com > > -- > Der GMX SmartSurfer hilft bis zu 70% Ihrer Onlinekosten zu sparen! > Ideal für Modem und ISDN: http://www.gmx.net/de/go/smartsurfer -- NEU: GMX DSL Sofort-Start-Set - blitzschnell ins Internet! Echte DSL-Flatrate ab 0,- Euro* http://www.gmx.net/de/go/dsl _______________________________________________ ULC-developer mailing list [email protected] http://lists.canoo.com/mailman/listinfo/ulc-developer
