Java Code Examples for javax.swing.JPanel#getClientProperty()
The following examples show how to use
javax.swing.JPanel#getClientProperty() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: ProfilerWindow.java From netbeans with Apache License 2.0 | 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
Source File: ProfilerWindow.java From visualvm with GNU General Public License v2.0 | 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 3
Source File: QPanelUI.java From pumpernickel with MIT License | 5 votes |
private Outline getOutline(JPanel c, boolean ideal) { String key = ideal ? PROPERTY_CACHED_SCRATCH_OUTLINE : PROPERTY_CACHED_REAL_OUTLINE; Outline outline = (Outline) c.getClientProperty(key); int effectiveWidth = ideal ? 1000 : c.getWidth(); int effectiveHeight = ideal ? 1000 : c.getHeight(); if (outline == null || !outline.isValid(effectiveWidth, effectiveHeight)) { outline = new Outline(effectiveWidth, effectiveHeight); c.putClientProperty(key, outline); } return outline; }
Example 4
Source File: SBOLInputDialog.java From iBioSim with Apache License 2.0 | 5 votes |
@Override protected JPanel initMainPanel() { //Get information for main design layout and load them up List<TopLevel> topLevelObjs = new ArrayList<TopLevel>(); if(showRootDefs.isSelected() && showCompDefs.isSelected()) { topLevelObjs.addAll(sbolDesigns.getRootComponentDefinitions()); } if(showRootDefs.isSelected() && showModDefs.isSelected()) { topLevelObjs.addAll(sbolDesigns.getRootModuleDefinitions()); } //Show an a list of designs user can choose from TopLevelTableModel tableModel = new TopLevelTableModel(topLevelObjs); JPanel panel = createTablePanel(tableModel, "Select Design(s) (" + tableModel.getRowCount() + ")"); table = (JTable) panel.getClientProperty("table"); table.setSelectionMode(ListSelectionModel.MULTIPLE_INTERVAL_SELECTION); tableLabel = (JLabel) panel.getClientProperty("label"); updateTable(); return panel; }
Example 5
Source File: FeaturesView.java From netbeans with Apache License 2.0 | 4 votes |
public final ProfilerFeature getSelectedFeature() { if (tabs == null) return null; JPanel container = (JPanel)tabs.getSelectedComponent(); return (ProfilerFeature)container.getClientProperty(ProfilerFeature.class); }
Example 6
Source File: FeaturesView.java From visualvm with GNU General Public License v2.0 | 4 votes |
public final ProfilerFeature getSelectedFeature() { if (tabs == null) return null; JPanel container = (JPanel)tabs.getSelectedComponent(); return (ProfilerFeature)container.getClientProperty(ProfilerFeature.class); }