Java Code Examples for javax.swing.JPanel.getClientProperty()

The following are Jave code examples for showing how to use getClientProperty() of the javax.swing.JPanel class. You can vote up the examples you like. Your votes will be used in our system to get more good examples.
+ Save this method
Example 1
Project: incubator-netbeans   File: ProfilerWindow.java   View Source Code Vote up 5 votes
public HelpCtx getHelpCtx() {
    ProfilerFeature selected = featuresView == null ? null :
                               featuresView.getSelectedFeature();
    
    JPanel selectedUI = selected == null ? null : selected.getResultsUI();
    if (selectedUI == null && selected != null) selectedUI = selected.getSettingsUI();
    
    String helpCtx = selectedUI == null ? null :
                     (String)selectedUI.getClientProperty("HelpCtx.Key"); // NOI18N
    if (helpCtx == null) helpCtx = "ProfileWindow.HelpCtx"; // NOI18N
    
    return new HelpCtx(helpCtx);
}
 
Example 2
Project: incubator-netbeans   File: FeaturesView.java   View Source Code Vote up 4 votes
public final ProfilerFeature getSelectedFeature() {
    if (tabs == null) return null;
    JPanel container = (JPanel)tabs.getSelectedComponent();
    return (ProfilerFeature)container.getClientProperty(ProfilerFeature.class);
}