[SWINGX-319] Misc util methods from NetBeans that deserve a home in Swing Created: 06/Jun/06  Updated: 31/Mar/11

Status: Open
Project: swingx
Component/s: Util
Affects Version/s: 0.9.0
Fix Version/s: None

Type: Improvement Priority: Major
Reporter: timboudreau Assignee: Karl Schaefer
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Operating System: All
Platform: All


Attachments: Java Source File Utilities.java    
Issue Links:
Dependency
blocks SWINGX-824 Clean up swingx.util Open
Issuezilla Id: 319

 Description   

I've extracted a bunch of general purpose utility methods from NetBeans - specifically from
org.openide.util.Utilities, all of which are generally useful - things like a canonical way to determine what
OS you're running on and similar.

I'm attaching a file with the more generally useful of them - hopefully from here they can one day wend
their way into the JDK. All are stable, well tested and have been around for years in NetBeans.



 Comments   
Comment by timboudreau [ 06/Jun/06 ]

Created an attachment (id=64)
Static utility methods from NetBeans

Comment by kleopatra [ 11/Jul/06 ]

moved as-is into swingx util package (because I needed the OS specific
accelerators, nice

TBD: reconcile with swingx utility classes for jvm, os detection.

Jeanette

Comment by kleopatra [ 11/Jul/06 ]


changed platform to all

Comment by rbair [ 11/Jul/06 ]

Just wanted to add my support for getting these methods. Thanks very much Tim!

Comment by kleopatra [ 11/Jul/06 ]

Tim, forgot the thanks, so here they are <g>

Actually it was your older comment in Javalobby about tangled OS specifics
(tsseee, even after a nearly a decade of swingx there are dark corners I never
ventured into) with shortcuts which made me look into this contribution - and
there they were, the cute methods I needed to fix another issue (#252-jdnc)

Jeanette

Comment by Karl Schaefer [ 17/Nov/07 ]

We should solve these multiple classes with the same purpose by 1.0.





[SWINGX-782] Provide first class NetBeans Support Created: 23/Feb/08  Updated: 21/Mar/11

Status: Open
Project: swingx
Component/s: Util
Affects Version/s: 0.9.0
Fix Version/s: None

Type: New Feature Priority: Major
Reporter: lkishalmi Assignee: Unassigned
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Operating System: All
Platform: All


Issuezilla Id: 782

 Description   

I think it would be great if SwingX could provide NetBeans Plugins. These
Plugins shall provide the following functionality:

  • Make swingx.jar available as a Class Library with javadoc (or even with sources)
  • Make SwingX components available on NetBeans GUI Builder Palette.
  • Provide a Library which allows other NetBeans modules to use SwingX components.

This feature doesn't requires any code only a bunch of XML files shall be
provided. I've already have this feature implemented and willing to contribute
it to SwingX projects.



 Comments   
Comment by rah003 [ 24/Feb/08 ]

If you have all the files necessary, please sign JCA/SCA (see swinglabs.org for
details) and attach the files to this issue.





[SWINGX-824] Clean up swingx.util Created: 20/Mar/08  Updated: 31/Mar/11

Status: Open
Project: swingx
Component/s: Util
Affects Version/s: 0.9.0
Fix Version/s: None

Type: Bug Priority: Major
Reporter: Karl Schaefer Assignee: Karl Schaefer
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Operating System: All
Platform: All


Issue Links:
Dependency
depends on SWINGX-1044 JVM should use type-safe enumeration ... Open
depends on SWINGX-319 Misc util methods from NetBeans that ... Open
Issuezilla Id: 824

 Description   

This package contains classes which need to be reevaluated for inclusion.



 Comments   
Comment by rah003 [ 09/Jun/08 ]

Moving all open 0.9.3 issues to 0.9.x

Comment by Karl Schaefer [ 07/Jul/08 ]

Began clean up.

Comment by rah003 [ 13/Sep/08 ]

Moving all open issues from 0.9.4 to the next version.

Comment by rah003 [ 31/Dec/08 ]

Moving all open issues to the next version.





[SWINGX-1044] JVM should use type-safe enumeration pattern Created: 20/Feb/09  Updated: 31/Mar/11

Status: Open
Project: swingx
Component/s: Util
Affects Version/s: 0.9.0
Fix Version/s: None

Type: Bug Priority: Major
Reporter: Karl Schaefer Assignee: Karl Schaefer
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Operating System: All
Platform: All


Issue Links:
Dependency
blocks SWINGX-824 Clean up swingx.util Open
Issuezilla Id: 1,044

 Description   

Per Effective Java, JVM should use a type safe pattern as opposed to int
constants. We should also make JVM extensible a la HTML.Tag to allow users to
define their own JVM constants. That would be important if the user wanted to
ensure that version x.y was available as JVM is currently very coarse grain.

Karl






[SWINGX-1497] SwingXUtilities: tree-walking methods should include componentPopups Created: 17/Jun/12  Updated: 17/Jun/12

Status: Open
Project: swingx
Component/s: Util
Affects Version/s: None
Fix Version/s: None

Type: Improvement Priority: Major
Reporter: kleopatra Assignee: Unassigned
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

... just as core SwingUtilities does it






[SWINGX-1566] SwingXUtilities.getAncestor doesn't walk the invoker if source is JPopupMenu Created: 04/Jul/13  Updated: 04/Jul/13

Status: Open
Project: swingx
Component/s: Util
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Major
Reporter: kleopatra Assignee: Karl Schaefer
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

When the starting component is a popup, the method walks the parent chain - my expectation is that it would start right away along its invoker chain. Here's an sketch of a test I would expect to pass

JPopupMenu menu = new JPopupMenu();
tree.setComponentPopupMenu(menu);
PopupMenuListener l = ...
    @Override
    public void popupMenuWillBecomeVisible(PopupMenuEvent e) {
        JXTree found = SwingXUtilities.getAncestor(JXTree.class, 
               (JPopupMenu) e.getSource());
         assertEquals(tree, found);
    } 
};
menu.addPopupMenuListener(l);

actually, it fails because found == null.

Could be fixed by doing a type check against JPopupMenu right from the start

Container parent = (c instanceof JPopupMenu) ? c.getInvoker() : c.getParent()
while(....

@Karl, assigning to you as I think you implemented it? Just pass it back to me if you don't want it or close if you think it's not-an-issue

Cheers
Jeanette






[SWINGX-285] contrib: AutoSelectPopupMenu Created: 10/Mar/06  Updated: 21/Mar/11

Status: Open
Project: swingx
Component/s: Util
Affects Version/s: 0.9.0
Fix Version/s: None

Type: Task Priority: Minor
Reporter: ymenager Assignee: Unassigned
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Operating System: All
Platform: All


Attachments: Java Source File AutoSelectPopupMenu.java     Java Source File AutoSelectPopupMenu.java     Java Source File AutoSelectPopupMenu.java    
Issuezilla Id: 285

 Description   

This is a popupmenu that automatically selects rows in a JTree, JList, JTable



 Comments   
Comment by ymenager [ 10/Mar/06 ]

Created an attachment (id=57)
AutoSelectPopupMenu.java

Comment by ymenager [ 10/Mar/06 ]

Oh, and it's functionality can be demo-ed by using the included main() in the class.

Comment by ymenager [ 10/Mar/06 ]

Created an attachment (id=58)
Just found a bug in last submitted patch, here's fixed version

Comment by ymenager [ 04/Jul/06 ]

Created an attachment (id=68)
Added hide/enable items on no selection

Comment by ymenager [ 04/Jul/06 ]

I've just uploaded a new version of AutoSelectPopupMenu.

This contains new functionality to add menu elements that should be hidden or
disabled when the autoselection didn't select any item (just run main() method
to see a demo)

Comment by rbair [ 16/Nov/06 ]

Hey,

I tried out the attached file, but must be missing something. What is auto selected? I click on a row, then
right clicked to get the popup. Then what?

Comment by ymenager [ 16/Nov/06 ]

Actually you bypassed it's functionality by clicking on the row first

What it does, is when you right click on a list to popup a menu, it will
automatically select the row. So rather than do two steps (1-select row, 2-right
click for popup), you only need to do one. Also if you click on an empty row (or
in the case of a tree, somewhere else than a node), it will automatically
deselect any selected row.

And as a bonus, it allows to specify certains menu items that will be
automatically enabled/disable or hidden/shown depending on if there are any
selected rows or not.

That's a very tipical behaviour for UIs that have tree/list/tables with context
sensitive menu

Comment by Karl Schaefer [ 17/Nov/07 ]

Will take time to evaluate after 1.0.





[SWINGX-1498] SwingXUtilities: support invalidating a component tree Created: 17/Jun/12  Updated: 17/Jun/12

Status: Open
Project: swingx
Component/s: Util
Affects Version/s: None
Fix Version/s: None

Type: New Feature Priority: Minor
Reporter: kleopatra Assignee: kleopatra
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

occasionally, it's important to invalid a complete component tree below a container (f.i. when global layout constraints have been changed). The core method invalidateComponentTree (on Container) is not accessible because it's package private (and maybe not good enough: doesn't take popups nor other menu items into account).

Simple support is to add just another tree-walking method to SwingXUtilities, invaliding all.






Generated at Sun Jul 05 06:05:26 UTC 2015 using JIRA 6.2.3#6260-sha1:63ef1d6dac3f4f4d7db4c1effd405ba38ccdc558.