.JARa's Bilingual Weblog

Life's better with NetBeans
photo of Jara

Which component holds the focus in NetBeans?/Která komponenta držící fokus v NetBeans? ( 20081001 Středa říjen 01, 2008 )
English flag Many times I needed to know which component really holds the focus in NetBeans IDE. I am not aware of any document where is this feature mentioned and it takes me always some time to remember which shortcut can be used for printing such information to output. So that I decided to write it down to my blog to have it always available there. So the desired shortcut is Ctrl-Shift-Break.
If you started NetBeans from console then it is easy to check the output there. Otherwise go to main menu View|IDE Log and check the Output window content. There appear lines like this:

*** ShortcutAndMenuKeyEventProcessor: current focus owner = org.openide.explorer.view.TreeView$ExplorerTree[,0,0,188x289,
alignmentX=0.0,alignmentY=0.0,border=javax.swing.border.EmptyBorder@1e51abf,flags=16777576,maximumSize=,minimumSize=,
preferredSize=,editable=true,invokesStopCellEditing=false,largeModel=true,rootVisible=false,rowHeight=18,scrollsOnExpand=true,
showsRootHandles=true,toggleClickCount=0,visibleRowCount=20]

I have one more comment on this feature: unfortunately it is not working on Mac OS X (at least on my machine).


Czech flag Mnohokrát jsem potřeboval zjistit která komponenta v NetBeans IDE drží fokus. Nejsem si vědom že by funkcionalit pro získání fokusu byla dokumentována a vždy mi nějakou chvíli trvá než si vzpomenu na klávesovou zkratku pro vypsání potřebné informace na výstup. Takže jsem se rozhodl zapsat si ji do svého blogu abych měl tuto zkratku vždy po ruce. Jde o shortcut Ctrl-Shift-Break.
Pokud běžíte NetBeans z konzoly pak je jednoduché najít v ní příslušný výpis. Jinak otevřete hlavní menu View|IDE Log a zkontrolujte jeho obsah v okně Output. Objeví se tam text podobný těm na následujících řádkách:

*** ShortcutAndMenuKeyEventProcessor: current focus owner = org.openide.explorer.view.TreeView$ExplorerTree[,0,0,188x289,
alignmentX=0.0,alignmentY=0.0,border=javax.swing.border.EmptyBorder@1e51abf,flags=16777576,maximumSize=,minimumSize=,
preferredSize=,editable=true,invokesStopCellEditing=false,largeModel=true,rootVisible=false,rowHeight=18,scrollsOnExpand=true,
showsRootHandles=true,toggleClickCount=0,visibleRowCount=20]

Mám k tomu ještě jeden komentář: bohužel to nefunguje na Mac OS X (alespoň na mém počítači).


Posted by jara ( X 01 2008, 02:04:06 dop. CEST ) Permalink Comments [0]


Trackback URL: http://blogs.sun.com/jara/entry/which_component_holds_the_focus
Comments:

Post a Comment:

Name:
E-Mail:
URL:

Your Comment:

HTML Syntax: NOT allowed
Archives
Search
Contact
Links
Visits map
Referrers

   Disclaimer: This blog contains my own opinions which may differ from viewpoints of Sun Microsystems.