/** * Create the panel with the supplied property editor, optionally ignoring any * custom panel the editor can provide. * * @param pe the PropertyEditor * @param ignoreCustomPanel whether to make use of any available custom panel */ public PropertyPanel(PropertyEditor pe, boolean ignoreCustomPanel) { m_Editor = pe; if (!ignoreCustomPanel && m_Editor instanceof CustomPanelSupplier) { setLayout(new BorderLayout()); m_CustomPanel = ((CustomPanelSupplier) m_Editor).getCustomPanel(); add(m_CustomPanel, BorderLayout.CENTER); m_HasCustomPanel = true; } else { createDefaultPanel(); } }
/** * Create the panel with the supplied property editor, optionally ignoring any * custom panel the editor can provide. * * @param pe the PropertyEditor * @param ignoreCustomPanel whether to make use of any available custom panel */ public PropertyPanel(PropertyEditor pe, boolean ignoreCustomPanel) { m_Editor = pe; if (!ignoreCustomPanel && m_Editor instanceof CustomPanelSupplier) { setLayout(new BorderLayout()); m_CustomPanel = ((CustomPanelSupplier) m_Editor).getCustomPanel(); add(m_CustomPanel, BorderLayout.CENTER); m_HasCustomPanel = true; } else { createDefaultPanel(); } }