parameterizing..
This commit is contained in:
parent
c61e771418
commit
d6e0af4637
|
@ -87,7 +87,7 @@ public class CField extends JComboBox
|
||||||
* @param cFieldPopup the popup dialog
|
* @param cFieldPopup the popup dialog
|
||||||
* @param title title for popup
|
* @param title title for popup
|
||||||
*/
|
*/
|
||||||
public CField (CFieldEditor editor, Class cFieldPopup, String title)
|
public CField (CFieldEditor editor, Class<?> cFieldPopup, String title)
|
||||||
{
|
{
|
||||||
super(new Object[] {"1", "2"});
|
super(new Object[] {"1", "2"});
|
||||||
if (editor != null)
|
if (editor != null)
|
||||||
|
@ -98,7 +98,7 @@ public class CField extends JComboBox
|
||||||
// Check popup
|
// Check popup
|
||||||
if (cFieldPopup != null)
|
if (cFieldPopup != null)
|
||||||
{
|
{
|
||||||
Class[] interfaces = cFieldPopup.getInterfaces();
|
Class<?>[] interfaces = cFieldPopup.getInterfaces();
|
||||||
boolean found = false;
|
boolean found = false;
|
||||||
for (int i = 0; i < interfaces.length; i++)
|
for (int i = 0; i < interfaces.length; i++)
|
||||||
{
|
{
|
||||||
|
@ -115,7 +115,7 @@ public class CField extends JComboBox
|
||||||
} // CField
|
} // CField
|
||||||
|
|
||||||
private CFieldEditor m_editor = null;
|
private CFieldEditor m_editor = null;
|
||||||
private Class m_popupClass = null;
|
private Class<?> m_popupClass = null;
|
||||||
private String m_title = null;
|
private String m_title = null;
|
||||||
private Object m_oldValue = null;
|
private Object m_oldValue = null;
|
||||||
|
|
||||||
|
@ -170,14 +170,14 @@ public class CField extends JComboBox
|
||||||
CFieldPopup popup = null;
|
CFieldPopup popup = null;
|
||||||
if (win instanceof Dialog)
|
if (win instanceof Dialog)
|
||||||
{
|
{
|
||||||
Constructor constructor = m_popupClass.getConstructor
|
Constructor<?> constructor = m_popupClass.getConstructor
|
||||||
(new Class[] {Dialog.class, String.class, Boolean.class});
|
(new Class<?>[] {Dialog.class, String.class, Boolean.class});
|
||||||
popup = (CFieldPopup)constructor.newInstance(new Object[]
|
popup = (CFieldPopup)constructor.newInstance(new Object[]
|
||||||
{(Dialog)win, m_title, new Boolean(true)});
|
{(Dialog)win, m_title, new Boolean(true)});
|
||||||
}
|
}
|
||||||
else if (win instanceof Frame)
|
else if (win instanceof Frame)
|
||||||
{
|
{
|
||||||
Constructor constructor = m_popupClass.getConstructor
|
Constructor<?> constructor = m_popupClass.getConstructor
|
||||||
(new Class[] {Frame.class, String.class, Boolean.class});
|
(new Class[] {Frame.class, String.class, Boolean.class});
|
||||||
popup = (CFieldPopup)constructor.newInstance(new Object[]
|
popup = (CFieldPopup)constructor.newInstance(new Object[]
|
||||||
{(Frame)win, m_title, new Boolean(true)});
|
{(Frame)win, m_title, new Boolean(true)});
|
||||||
|
|
Loading…
Reference in New Issue