[BF 2805376] Move listener classes to inner classes since previous code wasn't fully compatible with Java Web Start and common java coding standards.

https://sourceforge.net/tracker/?func=detail&aid=2805376&group_id=176962&atid=879332
This commit is contained in:
usrdno 2009-07-06 08:20:39 +00:00
parent b3a96f8692
commit 757d689a32
16 changed files with 1091 additions and 1094 deletions

View File

@ -40,6 +40,33 @@ import org.compiere.util.Msg;
*/ */
public class StatusBar extends CPanel implements IStatusBar public class StatusBar extends CPanel implements IStatusBar
{ {
/******************************************************************************
* Mouse Adapter for Status Bar (statusDB)
*/
class StatusBar_mouseAdapter extends java.awt.event.MouseAdapter
{
private StatusBar adaptee;
/**
* Constructor
* @param adaptee adaptee
*/
StatusBar_mouseAdapter(StatusBar adaptee)
{
this.adaptee = adaptee;
}
/**
* Click
* @param e event
*/
public void mouseClicked(MouseEvent e)
{
adaptee.mouseClicked(e);
}
} // StatusBar_mouseAdapter
/** /**
* *
*/ */
@ -240,30 +267,3 @@ public class StatusBar extends CPanel implements IStatusBar
} // addStatusComponent } // addStatusComponent
} // StatusBar } // StatusBar
/******************************************************************************
* Mouse Adapter for Status Bar (statusDB)
*/
class StatusBar_mouseAdapter extends java.awt.event.MouseAdapter
{
private StatusBar adaptee;
/**
* Constructor
* @param adaptee adaptee
*/
StatusBar_mouseAdapter(StatusBar adaptee)
{
this.adaptee = adaptee;
}
/**
* Click
* @param e event
*/
public void mouseClicked(MouseEvent e)
{
adaptee.mouseClicked(e);
}
} // StatusBar_mouseAdapter

View File

@ -83,6 +83,29 @@ public final class VAccountDialog extends CDialog
*/ */
private static final long serialVersionUID = -1980622319541357651L; private static final long serialVersionUID = -1980622319541357651L;
/**
* Mouse Listener
*/
class VAccountDialog_mouseAdapter extends java.awt.event.MouseAdapter
{
VAccountDialog_mouseAdapter(VAccountDialog adaptee)
{
this.adaptee = adaptee;
}
VAccountDialog adaptee;
public void mouseClicked(MouseEvent e)
{
// Table => select
if (e.getSource() instanceof JTable && e.getClickCount() > 1)
{
adaptee.m_changed = true;
adaptee.dispose();
}
}
} // VAccountDialog_mouseListener
/** /**
* Constructor * Constructor
* @param frame frame * @param frame frame
@ -1103,26 +1126,3 @@ public final class VAccountDialog extends CDialog
} // vetoableChange } // vetoableChange
} // VAccountDialog } // VAccountDialog
/**
* Mouse Listener
*/
class VAccountDialog_mouseAdapter extends java.awt.event.MouseAdapter
{
VAccountDialog_mouseAdapter(VAccountDialog adaptee)
{
this.adaptee = adaptee;
}
VAccountDialog adaptee;
public void mouseClicked(MouseEvent e)
{
// Table => select
if (e.getSource() instanceof JTable && e.getClickCount() > 1)
{
adaptee.m_changed = true;
adaptee.dispose();
}
}
} // VAccountDialog_mouseListener

View File

@ -65,6 +65,38 @@ public class VAssignment extends JComponent
*/ */
private static final long serialVersionUID = 796127013756416974L; private static final long serialVersionUID = 796127013756416974L;
/**
* Mouse Listener
*/
final class VAssignment_mouseAdapter extends MouseAdapter
{
/**
* Constructor
* @param adaptee adaptee
*/
VAssignment_mouseAdapter(VAssignment adaptee)
{
this.adaptee = adaptee;
} // VAssignment_mouseAdapter
private VAssignment adaptee;
/**
* Mouse Listener
* @param e event
*/
public void mouseClicked(MouseEvent e)
{
// Double Click
if (e.getClickCount() > 1)
adaptee.actionPerformed(new ActionEvent(e.getSource(), e.getID(), "Mouse"));
// popup menu
if (SwingUtilities.isRightMouseButton(e))
adaptee.popupMenu.show((Component)e.getSource(), e.getX(), e.getY());
} // mouse Clicked
} // VAssignment_mouseAdapter
/** /**
* IDE Constructor * IDE Constructor
*/ */
@ -388,36 +420,3 @@ public class VAssignment extends JComponent
} // propertyChange } // propertyChange
} // VAssignment } // VAssignment
/**
* Mouse Listener
*/
final class VAssignment_mouseAdapter extends MouseAdapter
{
/**
* Constructor
* @param adaptee adaptee
*/
VAssignment_mouseAdapter(VAssignment adaptee)
{
this.adaptee = adaptee;
} // VAssignment_mouseAdapter
private VAssignment adaptee;
/**
* Mouse Listener
* @param e event
*/
public void mouseClicked(MouseEvent e)
{
// Double Click
if (e.getClickCount() > 1)
adaptee.actionPerformed(new ActionEvent(e.getSource(), e.getID(), "Mouse"));
// popup menu
if (SwingUtilities.isRightMouseButton(e))
adaptee.popupMenu.show((Component)e.getSource(), e.getX(), e.getY());
} // mouse Clicked
} // VAssignment_mouseAdapter

View File

@ -69,6 +69,36 @@ public class VDate extends JComponent
*/ */
private static final long serialVersionUID = -9090302458969544529L; private static final long serialVersionUID = -9090302458969544529L;
/*****************************************************************************
* Mouse Listener for Popup Menu
*/
class VDate_mouseAdapter extends java.awt.event.MouseAdapter
{
/**
* Constructor
* @param adaptee adaptee
*/
VDate_mouseAdapter(VDate adaptee)
{
this.adaptee = adaptee;
} // VLookup_mouseAdapter
private VDate adaptee;
/**
* Mouse Listener
* @param e MouseEvent
*/
public void mouseClicked(MouseEvent e)
{
// System.out.println("mouseClicked " + e.getID() + " " + e.getSource().getClass().toString());
// popup menu
if (SwingUtilities.isRightMouseButton(e))
adaptee.popupMenu.show((Component)e.getSource(), e.getX(), e.getY());
} // mouse Clicked
} // VLookup_mouseAdapter
/** /**
* IDE Bean Constructor * IDE Bean Constructor
*/ */
@ -585,34 +615,4 @@ public class VDate extends JComponent
} }
} // fireActionPerformed } // fireActionPerformed
/**/ /**/
} // VDate } // VDate
/*****************************************************************************
* Mouse Listener for Popup Menu
*/
final class VDate_mouseAdapter extends java.awt.event.MouseAdapter
{
/**
* Constructor
* @param adaptee adaptee
*/
VDate_mouseAdapter(VDate adaptee)
{
this.adaptee = adaptee;
} // VLookup_mouseAdapter
private VDate adaptee;
/**
* Mouse Listener
* @param e MouseEvent
*/
public void mouseClicked(MouseEvent e)
{
// System.out.println("mouseClicked " + e.getID() + " " + e.getSource().getClass().toString());
// popup menu
if (SwingUtilities.isRightMouseButton(e))
adaptee.popupMenu.show((Component)e.getSource(), e.getX(), e.getY());
} // mouse Clicked
} // VLookup_mouseAdapter

View File

@ -58,6 +58,33 @@ public class VFile extends JComponent
*/ */
private static final long serialVersionUID = 7246339063197204992L; private static final long serialVersionUID = 7246339063197204992L;
/******************************************************************************
* Mouse Listener for Popup Menu
*/
final class VFile_mouseAdapter extends java.awt.event.MouseAdapter
{
/**
* Constructor
* @param adaptee adaptee
*/
VFile_mouseAdapter(VFile adaptee)
{
m_adaptee = adaptee;
} // VLookup_mouseAdapter
private VFile m_adaptee;
/**
* Mouse Listener
* @param e MouseEvent
*/
public void mouseClicked(MouseEvent e)
{
} // mouse Clicked
} // VFile_mouseAdapter
/** /**
* Constructor * Constructor
* *
@ -382,30 +409,3 @@ public class VFile extends JComponent
} }
} // VFile } // VFile
/******************************************************************************
* Mouse Listener for Popup Menu
*/
final class VFile_mouseAdapter extends java.awt.event.MouseAdapter
{
/**
* Constructor
* @param adaptee adaptee
*/
VFile_mouseAdapter(VFile adaptee)
{
m_adaptee = adaptee;
} // VLookup_mouseAdapter
private VFile m_adaptee;
/**
* Mouse Listener
* @param e MouseEvent
*/
public void mouseClicked(MouseEvent e)
{
} // mouse Clicked
} // VFile_mouseAdapter

View File

@ -59,6 +59,35 @@ public class VLocation extends JComponent
*/ */
private static final long serialVersionUID = -3155246553879767899L; private static final long serialVersionUID = -3155246553879767899L;
/**
* Mouse Listener for Popup Menu
*/
final class VLocation_mouseAdapter extends java.awt.event.MouseAdapter
{
/**
* Constructor
* @param adaptee adaptee
*/
VLocation_mouseAdapter(VLocation adaptee)
{
this.adaptee = adaptee;
} // VLookup_mouseAdapter
private VLocation adaptee;
/**
* Mouse Listener
* @param e MouseEvent
*/
public void mouseClicked(MouseEvent e)
{
// popup menu
if (SwingUtilities.isRightMouseButton(e))
adaptee.popupMenu.show((Component)e.getSource(), e.getX(), e.getY());
} // mouse Clicked
} // VLocation_mouseAdapter
/** /**
* Constructor * Constructor
* *
@ -370,33 +399,4 @@ public class VLocation extends JComponent
} // VLocation } // VLocation
/*****************************************************************************/ /*****************************************************************************/
/**
* Mouse Listener for Popup Menu
*/
final class VLocation_mouseAdapter extends java.awt.event.MouseAdapter
{
/**
* Constructor
* @param adaptee adaptee
*/
VLocation_mouseAdapter(VLocation adaptee)
{
this.adaptee = adaptee;
} // VLookup_mouseAdapter
private VLocation adaptee;
/**
* Mouse Listener
* @param e MouseEvent
*/
public void mouseClicked(MouseEvent e)
{
// popup menu
if (SwingUtilities.isRightMouseButton(e))
adaptee.popupMenu.show((Component)e.getSource(), e.getX(), e.getY());
} // mouse Clicked
} // VLocation_mouseAdapter

File diff suppressed because it is too large Load Diff

View File

@ -105,6 +105,40 @@ public class VLookup extends JComponent
*/ */
private static final long serialVersionUID = -104909868954609498L; private static final long serialVersionUID = -104909868954609498L;
/*****************************************************************************
* Mouse Listener for Popup Menu
*/
final class VLookup_mouseAdapter extends java.awt.event.MouseAdapter
{
/**
* Constructor
* @param adaptee adaptee
*/
VLookup_mouseAdapter(VLookup adaptee)
{
m_adaptee = adaptee;
} // VLookup_mouseAdapter
private VLookup m_adaptee;
/**
* Mouse Listener
* @param e MouseEvent
*/
public void mouseClicked(MouseEvent e)
{
// System.out.println("mouseClicked " + e.getID() + " " + e.getSource().getClass().toString());
// popup menu
if (SwingUtilities.isRightMouseButton(e))
m_adaptee.popupMenu.show((Component)e.getSource(), e.getX(), e.getY());
// Hide the popup if not right click - teo_sarca [ 1734802 ]
else
m_adaptee.popupMenu.setVisible(false);
} // mouse Clicked
} // VLookup_mouseAdapter
@Override @Override
protected boolean processKeyBinding(KeyStroke ks, KeyEvent e, protected boolean processKeyBinding(KeyStroke ks, KeyEvent e,
int condition, boolean pressed) { int condition, boolean pressed) {
@ -1579,37 +1613,4 @@ public class VLookup extends JComponent
} }
} // VLookup } // VLookup
/*****************************************************************************
* Mouse Listener for Popup Menu
*/
final class VLookup_mouseAdapter extends java.awt.event.MouseAdapter
{
/**
* Constructor
* @param adaptee adaptee
*/
VLookup_mouseAdapter(VLookup adaptee)
{
m_adaptee = adaptee;
} // VLookup_mouseAdapter
private VLookup m_adaptee;
/**
* Mouse Listener
* @param e MouseEvent
*/
public void mouseClicked(MouseEvent e)
{
// System.out.println("mouseClicked " + e.getID() + " " + e.getSource().getClass().toString());
// popup menu
if (SwingUtilities.isRightMouseButton(e))
m_adaptee.popupMenu.show((Component)e.getSource(), e.getX(), e.getY());
// Hide the popup if not right click - teo_sarca [ 1734802 ]
else
m_adaptee.popupMenu.setVisible(false);
} // mouse Clicked
} // VLookup_mouseAdapter

View File

@ -57,6 +57,40 @@ public class VMemo extends CTextArea
*/ */
private static final long serialVersionUID = 9218826231484540367L; private static final long serialVersionUID = 9218826231484540367L;
/*****************************************************************************/
/**
* Mouse Listener
*/
final class VMemo_mouseAdapter extends MouseAdapter
{
/**
* Constructor
* @param adaptee
*/
VMemo_mouseAdapter(VMemo adaptee)
{
this.adaptee = adaptee;
} // VMemo_mouseAdapter
private VMemo adaptee;
/**
* Mouse Listener
* @param e
*/
public void mouseClicked(MouseEvent e)
{
// popup menu
if (SwingUtilities.isRightMouseButton(e))
adaptee.popupMenu.show((Component)e.getSource(), e.getX(), e.getY());
} // mouse Clicked
} // VMemo_mouseAdapter
/** /**
* IDE Baan Constructor * IDE Baan Constructor
*/ */
@ -291,40 +325,3 @@ private class CInputVerifier extends InputVerifier {
} // VMemo } // VMemo
/*****************************************************************************/
/**
* Mouse Listener
*/
final class VMemo_mouseAdapter extends MouseAdapter
{
/**
* Constructor
* @param adaptee
*/
VMemo_mouseAdapter(VMemo adaptee)
{
this.adaptee = adaptee;
} // VMemo_mouseAdapter
private VMemo adaptee;
/**
* Mouse Listener
* @param e
*/
public void mouseClicked(MouseEvent e)
{
// popup menu
if (SwingUtilities.isRightMouseButton(e))
adaptee.popupMenu.show((Component)e.getSource(), e.getX(), e.getY());
} // mouse Clicked
} // VMemo_mouseAdapter

View File

@ -66,6 +66,37 @@ public class VPAttribute extends JComponent
*/ */
private static final long serialVersionUID = 108156477716619163L; private static final long serialVersionUID = 108156477716619163L;
/**
* Mouse Listener
*/
final class VPAttribute_mouseAdapter extends MouseAdapter
{
/**
* Constructor
* @param adaptee adaptee
*/
VPAttribute_mouseAdapter(VPAttribute adaptee)
{
m_adaptee = adaptee;
} // VPAttribute_mouseAdapter
private VPAttribute m_adaptee;
/**
* Mouse Listener
* @param e event
*/
public void mouseClicked(MouseEvent e)
{
// Double Click
if (e.getClickCount() > 1)
m_adaptee.actionPerformed(new ActionEvent(e.getSource(), e.getID(), "Mouse"));
// popup menu
if (SwingUtilities.isRightMouseButton(e))
m_adaptee.popupMenu.show((Component)e.getSource(), e.getX(), e.getY());
} // mouse Clicked
} // VPAttribute_mouseAdapter
/** /**
* IDE Constructor * IDE Constructor
@ -437,35 +468,3 @@ public class VPAttribute extends JComponent
} // propertyChange } // propertyChange
} // VPAttribute } // VPAttribute
/**
* Mouse Listener
*/
final class VPAttribute_mouseAdapter extends MouseAdapter
{
/**
* Constructor
* @param adaptee adaptee
*/
VPAttribute_mouseAdapter(VPAttribute adaptee)
{
m_adaptee = adaptee;
} // VPAttribute_mouseAdapter
private VPAttribute m_adaptee;
/**
* Mouse Listener
* @param e event
*/
public void mouseClicked(MouseEvent e)
{
// Double Click
if (e.getClickCount() > 1)
m_adaptee.actionPerformed(new ActionEvent(e.getSource(), e.getID(), "Mouse"));
// popup menu
if (SwingUtilities.isRightMouseButton(e))
m_adaptee.popupMenu.show((Component)e.getSource(), e.getX(), e.getY());
} // mouse Clicked
} // VPAttribute_mouseAdapter

View File

@ -86,6 +86,36 @@ public class VPAttributeDialog extends CDialog
*/ */
private static final long serialVersionUID = -1062346984681892620L; private static final long serialVersionUID = -1062346984681892620L;
/*****************************************************************************
* Mouse Listener for Popup Menu
*/
final class VPAttributeDialog_mouseAdapter extends java.awt.event.MouseAdapter
{
/**
* Constructor
* @param adaptee adaptee
*/
VPAttributeDialog_mouseAdapter(VPAttributeDialog adaptee)
{
m_adaptee = adaptee;
} // VPAttributeDialog_mouseAdapter
private VPAttributeDialog m_adaptee;
/**
* Mouse Listener
* @param e MouseEvent
*/
public void mouseClicked(MouseEvent e)
{
// System.out.println("mouseClicked " + e.getID() + " " + e.getSource().getClass().toString());
// popup menu
if (SwingUtilities.isRightMouseButton(e))
m_adaptee.popupMenu.show((Component)e.getSource(), e.getX(), e.getY());
} // mouse Clicked
} // VPAttributeDialog_mouseAdapter
/** /**
* Product Attribute Instance Dialog * Product Attribute Instance Dialog
* @param frame parent frame * @param frame parent frame
@ -808,33 +838,3 @@ public class VPAttributeDialog extends CDialog
} // isChanged } // isChanged
} // VPAttributeDialog } // VPAttributeDialog
/*****************************************************************************
* Mouse Listener for Popup Menu
*/
final class VPAttributeDialog_mouseAdapter extends java.awt.event.MouseAdapter
{
/**
* Constructor
* @param adaptee adaptee
*/
VPAttributeDialog_mouseAdapter(VPAttributeDialog adaptee)
{
m_adaptee = adaptee;
} // VPAttributeDialog_mouseAdapter
private VPAttributeDialog m_adaptee;
/**
* Mouse Listener
* @param e MouseEvent
*/
public void mouseClicked(MouseEvent e)
{
// System.out.println("mouseClicked " + e.getID() + " " + e.getSource().getClass().toString());
// popup menu
if (SwingUtilities.isRightMouseButton(e))
m_adaptee.popupMenu.show((Component)e.getSource(), e.getX(), e.getY());
} // mouse Clicked
} // VPAttributeDialog_mouseAdapter

View File

@ -63,6 +63,35 @@ public final class VString extends CTextField
/** Max Display Length - 60 */ /** Max Display Length - 60 */
public static final int MAXDISPLAY_LENGTH = org.compiere.model.GridField.MAXDISPLAY_LENGTH; public static final int MAXDISPLAY_LENGTH = org.compiere.model.GridField.MAXDISPLAY_LENGTH;
/******************************************************************************
* Mouse Listener
*/
final class VString_mouseAdapter extends MouseAdapter
{
/**
* Constructor
* @param adaptee adaptee
*/
VString_mouseAdapter(VString adaptee)
{
m_adaptee = adaptee;
} // VString_mouseAdapter
private VString m_adaptee;
/**
* Mouse Listener
* @param e event
*/
public void mouseClicked(MouseEvent e)
{
// popup menu
if (SwingUtilities.isRightMouseButton(e))
m_adaptee.popupMenu.show((Component)e.getSource(), e.getX(), e.getY());
} // mouseClicked
} // VText_mouseAdapter
/** /**
* IDE Bean Constructor for 30 character updateable field * IDE Bean Constructor for 30 character updateable field
*/ */
@ -382,34 +411,4 @@ public final class VString extends CTextField
m_obscureFont = new Font("SansSerif", Font.ITALIC, m_stdFont.getSize()); m_obscureFont = new Font("SansSerif", Font.ITALIC, m_stdFont.getSize());
} }
} // VString } // VString
/******************************************************************************
* Mouse Listener
*/
final class VString_mouseAdapter extends MouseAdapter
{
/**
* Constructor
* @param adaptee adaptee
*/
VString_mouseAdapter(VString adaptee)
{
m_adaptee = adaptee;
} // VString_mouseAdapter
private VString m_adaptee;
/**
* Mouse Listener
* @param e event
*/
public void mouseClicked(MouseEvent e)
{
// popup menu
if (SwingUtilities.isRightMouseButton(e))
m_adaptee.popupMenu.show((Component)e.getSource(), e.getX(), e.getY());
} // mouseClicked
} // VText_mouseAdapter

View File

@ -52,6 +52,37 @@ public class VText extends CTextArea
*/ */
private static final long serialVersionUID = -2479847373606754733L; private static final long serialVersionUID = -2479847373606754733L;
/*****************************************************************************/
/**
* Mouse Listener
*/
final class VText_mouseAdapter extends MouseAdapter
{
/**
* Constructor
* @param adaptee VText
*/
VText_mouseAdapter(VText adaptee)
{
this.adaptee = adaptee;
} // VText_mouseAdapter
private VText adaptee;
/**
* Mouse Listener
* @param e event
*/
public void mouseClicked(MouseEvent e)
{
// popup menu
if (SwingUtilities.isRightMouseButton(e))
adaptee.popupMenu.show((Component)e.getSource(), e.getX(), e.getY());
} // mouse Clicked
} // VText_mouseAdapter
/** /**
* Standard Constructor * Standard Constructor
* @param columnName column name * @param columnName column name
@ -212,34 +243,3 @@ public class VText extends CTextArea
} // setField } // setField
} // VText } // VText
/*****************************************************************************/
/**
* Mouse Listener
*/
final class VText_mouseAdapter extends MouseAdapter
{
/**
* Constructor
* @param adaptee VText
*/
VText_mouseAdapter(VText adaptee)
{
this.adaptee = adaptee;
} // VText_mouseAdapter
private VText adaptee;
/**
* Mouse Listener
* @param e event
*/
public void mouseClicked(MouseEvent e)
{
// popup menu
if (SwingUtilities.isRightMouseButton(e))
adaptee.popupMenu.show((Component)e.getSource(), e.getX(), e.getY());
} // mouse Clicked
} // VText_mouseAdapter

View File

@ -54,6 +54,37 @@ public class VTextLong extends CTextPane
*/ */
private static final long serialVersionUID = 4776186117962407679L; private static final long serialVersionUID = 4776186117962407679L;
/*****************************************************************************/
/**
* Mouse Listener
*/
final class VTextLong_mouseAdapter extends MouseAdapter
{
/**
* Constructor
* @param adaptee VText
*/
VTextLong_mouseAdapter(VTextLong adaptee)
{
this.adaptee = adaptee;
} // VText_mouseAdapter
private VTextLong adaptee;
/**
* Mouse Listener
* @param e event
*/
public void mouseClicked(MouseEvent e)
{
// popup menu
if (SwingUtilities.isRightMouseButton(e))
adaptee.popupMenu.show((Component)e.getSource(), e.getX(), e.getY());
} // mouse Clicked
} // VTextLong_mouseAdapter
/** /**
* Factory: Start Editor * Factory: Start Editor
* @param jc container to get parent frame * @param jc container to get parent frame
@ -218,35 +249,4 @@ public class VTextLong extends CTextPane
} // setField } // setField
} // VTextLong } // VTextLong
/*****************************************************************************/
/**
* Mouse Listener
*/
final class VTextLong_mouseAdapter extends MouseAdapter
{
/**
* Constructor
* @param adaptee VText
*/
VTextLong_mouseAdapter(VTextLong adaptee)
{
this.adaptee = adaptee;
} // VText_mouseAdapter
private VTextLong adaptee;
/**
* Mouse Listener
* @param e event
*/
public void mouseClicked(MouseEvent e)
{
// popup menu
if (SwingUtilities.isRightMouseButton(e))
adaptee.popupMenu.show((Component)e.getSource(), e.getX(), e.getY());
} // mouse Clicked
} // VTextLong_mouseAdapter

View File

@ -63,6 +63,35 @@ public class VURL extends JComponent
*/ */
private static final long serialVersionUID = -5090157084793992376L; private static final long serialVersionUID = -5090157084793992376L;
/******************************************************************************
* Mouse Listener
*/
final class VURL_mouseAdapter extends MouseAdapter
{
/**
* Constructor
* @param adaptee adaptee
*/
VURL_mouseAdapter(VURL adaptee)
{
m_adaptee = adaptee;
} // VString_mouseAdapter
private VURL m_adaptee;
/**
* Mouse Listener
* @param e event
*/
public void mouseClicked(MouseEvent e)
{
// popup menu
if (SwingUtilities.isRightMouseButton(e))
m_adaptee.popupMenu.show((Component)e.getSource(), e.getX(), e.getY());
} // mouseClicked
} // VURL_mouseAdapter
/** /**
* IDE Constructor * IDE Constructor
*/ */
@ -457,36 +486,6 @@ public class VURL extends JComponent
m_infocus = false; m_infocus = false;
setText(getText()); // obscure setText(getText()); // obscure
} // focus Lost } // focus Lost
/******************************************************************************
* Mouse Listener
*/
final class VURL_mouseAdapter extends MouseAdapter
{
/**
* Constructor
* @param adaptee adaptee
*/
VURL_mouseAdapter(VURL adaptee)
{
m_adaptee = adaptee;
} // VString_mouseAdapter
private VURL m_adaptee;
/**
* Mouse Listener
* @param e event
*/
public void mouseClicked(MouseEvent e)
{
// popup menu
if (SwingUtilities.isRightMouseButton(e))
m_adaptee.popupMenu.show((Component)e.getSource(), e.getX(), e.getY());
} // mouseClicked
} // VURL_mouseAdapter
} // VURL } // VURL

View File

@ -117,6 +117,63 @@ import de.schaeffer.compiere.tools.DocumentSearch;
public final class VTreePanel extends CPanel public final class VTreePanel extends CPanel
implements ActionListener, DragGestureListener, DragSourceListener, DropTargetListener implements ActionListener, DragGestureListener, DragSourceListener, DropTargetListener
{ {
/******************************************************************************
* Mouse Clicked
*/
class VTreePanel_mouseAdapter extends java.awt.event.MouseAdapter
{
VTreePanel m_adaptee;
/**
* VTreePanel_mouseAdapter
* @param adaptee
*/
VTreePanel_mouseAdapter(VTreePanel adaptee)
{
m_adaptee = adaptee;
}
/**
* Mouse Clicked
* @param e
*/
public void mouseClicked(MouseEvent e)
{
m_adaptee.mouseClicked(e);
}
} // VTreePanel_mouseAdapter
/**
* Key Pressed
*/
class VTreePanel_keyAdapter extends java.awt.event.KeyAdapter
{
VTreePanel m_adaptee;
/**
* VTreePanel_keyAdapter
* @param adaptee
*/
VTreePanel_keyAdapter(VTreePanel adaptee)
{
m_adaptee = adaptee;
}
/**
* Key Pressed
* @param e
*/
public void keyPressed(KeyEvent e)
{
if (e.getKeyCode() == KeyEvent.VK_ENTER)
m_adaptee.keyPressed(e);
}
} // VTreePanel_keyAdapter
/** /**
* *
*/ */
@ -1199,57 +1256,3 @@ public final class VTreePanel extends CPanel
} // VTreePanel } // VTreePanel
/******************************************************************************
* Mouse Clicked
*/
class VTreePanel_mouseAdapter extends java.awt.event.MouseAdapter
{
VTreePanel m_adaptee;
/**
* VTreePanel_mouseAdapter
* @param adaptee
*/
VTreePanel_mouseAdapter(VTreePanel adaptee)
{
m_adaptee = adaptee;
}
/**
* Mouse Clicked
* @param e
*/
public void mouseClicked(MouseEvent e)
{
m_adaptee.mouseClicked(e);
}
} // VTreePanel_mouseAdapter
/**
* Key Pressed
*/
class VTreePanel_keyAdapter extends java.awt.event.KeyAdapter
{
VTreePanel m_adaptee;
/**
* VTreePanel_keyAdapter
* @param adaptee
*/
VTreePanel_keyAdapter(VTreePanel adaptee)
{
m_adaptee = adaptee;
}
/**
* Key Pressed
* @param e
*/
public void keyPressed(KeyEvent e)
{
if (e.getKeyCode() == KeyEvent.VK_ENTER)
m_adaptee.keyPressed(e);
}
} // VTreePanel_keyAdapter