This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 50233 - Help context for TopComponent without text components
Summary: Help context for TopComponent without text components
Status: RESOLVED INVALID
Alias: None
Product: platform
Classification: Unclassified
Component: Window System (show other bugs)
Version: 3.x
Hardware: PC Windows XP
: P4 blocker (vote)
Assignee: Stanislav Aubrecht
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-10-11 16:18 UTC by clover
Modified: 2008-12-22 16:24 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description clover 2004-10-11 16:18:18 UTC
I have TopComponent without any text components 
in it. It has HelpContext associated with it, 
but when F1 is pressed when this TopComponent is 
active, it is invisible for the help system - 
getHelpCtx() method is never called. 

Here is simple example of that behaviour:

import org.openide.*;
import org.openide.windows.*;
import org.openide.util.*;

public class EmptyTopComponent extends 
CloneableTopComponent{

    public EmptyTopComponent() {
        setName("Empty");
    }    
    public HelpCtx getHelpCtx() {
        System.err.println("Help called");
        return HelpCtx.DEFAULT_HELP;
    }    
    public int getPersistenceType() {
        return TopComponent.PERSISTENCE_NEVER;
    }
}
Comment 1 David Simonek 2005-01-19 15:05:54 UTC
Passing to Stan to distribute bugs evenly. Thanks Stane :-)
Comment 2 Stanislav Aubrecht 2005-11-23 12:02:52 UTC
your topcomponent cannot have input focus so it won't receive F1 key events.
add setFocusable( true ) to your constructor and your getHelpCtx() method will
get called.