IDEMPIERE-3798:Move iDempiere default branch to openjdk 10 (deprecated constant of swing)
This commit is contained in:
parent
61a5fd1c21
commit
af75e7911f
|
@ -20,6 +20,7 @@ import java.awt.BorderLayout;
|
||||||
import java.awt.Component;
|
import java.awt.Component;
|
||||||
import java.awt.FlowLayout;
|
import java.awt.FlowLayout;
|
||||||
import java.awt.Insets;
|
import java.awt.Insets;
|
||||||
|
import java.awt.event.ActionEvent;
|
||||||
import java.awt.event.ActionListener;
|
import java.awt.event.ActionListener;
|
||||||
import java.awt.event.KeyEvent;
|
import java.awt.event.KeyEvent;
|
||||||
|
|
||||||
|
@ -241,7 +242,7 @@ public final class ConfirmPanel extends JPanel
|
||||||
public static final JButton createProcessButton (String text)
|
public static final JButton createProcessButton (String text)
|
||||||
{
|
{
|
||||||
AppsAction aa = new AppsAction (A_PROCESS,
|
AppsAction aa = new AppsAction (A_PROCESS,
|
||||||
KeyStroke.getKeyStroke(KeyEvent.VK_F4, KeyEvent.SHIFT_MASK), text);
|
KeyStroke.getKeyStroke(KeyEvent.VK_F4, ActionEvent.SHIFT_MASK), text);
|
||||||
JButton button = (JButton)aa.getButton();
|
JButton button = (JButton)aa.getButton();
|
||||||
button.setMargin(s_insets);
|
button.setMargin(s_insets);
|
||||||
return button;
|
return button;
|
||||||
|
|
|
@ -301,7 +301,7 @@ public class PerformanceIndicator extends JPanel
|
||||||
// Lazily create the event:
|
// Lazily create the event:
|
||||||
if (e == null)
|
if (e == null)
|
||||||
e = new ActionEvent(this, ActionEvent.ACTION_PERFORMED,
|
e = new ActionEvent(this, ActionEvent.ACTION_PERFORMED,
|
||||||
"pi", event.getWhen(), event.getModifiers());
|
"pi", event.getWhen(), event.getModifiersEx());
|
||||||
listeners[i].actionPerformed(e);
|
listeners[i].actionPerformed(e);
|
||||||
}
|
}
|
||||||
} // fireActionPerformed
|
} // fireActionPerformed
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
package org.adempiere.plaf;
|
package org.adempiere.plaf;
|
||||||
|
|
||||||
import java.awt.event.InputEvent;
|
import java.awt.event.ActionEvent;
|
||||||
import java.beans.PropertyChangeEvent;
|
import java.beans.PropertyChangeEvent;
|
||||||
|
|
||||||
import javax.swing.AbstractButton;
|
import javax.swing.AbstractButton;
|
||||||
|
@ -83,10 +83,10 @@ public class AdempiereButtonListener extends BasicButtonListener
|
||||||
}
|
}
|
||||||
map.clear();
|
map.clear();
|
||||||
String className = b.getClass().getName();
|
String className = b.getClass().getName();
|
||||||
int mask = InputEvent.ALT_MASK; // Default Buttons
|
int mask = ActionEvent.ALT_MASK; // Default Buttons
|
||||||
if (b instanceof JCheckBox // In Tab
|
if (b instanceof JCheckBox // In Tab
|
||||||
|| className.indexOf("VButton") != -1)
|
|| className.indexOf("VButton") != -1)
|
||||||
mask = InputEvent.SHIFT_MASK + InputEvent.CTRL_MASK;
|
mask = ActionEvent.SHIFT_MASK + ActionEvent.CTRL_MASK;
|
||||||
map.put(KeyStroke.getKeyStroke(m, mask, false), "pressed");
|
map.put(KeyStroke.getKeyStroke(m, mask, false), "pressed");
|
||||||
map.put(KeyStroke.getKeyStroke(m, mask, true), "released");
|
map.put(KeyStroke.getKeyStroke(m, mask, true), "released");
|
||||||
map.put(KeyStroke.getKeyStroke(m, 0, true), "released");
|
map.put(KeyStroke.getKeyStroke(m, 0, true), "released");
|
||||||
|
|
|
@ -19,7 +19,6 @@ package org.compiere.apps;
|
||||||
import java.awt.BorderLayout;
|
import java.awt.BorderLayout;
|
||||||
import java.awt.Dialog;
|
import java.awt.Dialog;
|
||||||
import java.awt.Dimension;
|
import java.awt.Dimension;
|
||||||
import java.awt.Event;
|
|
||||||
import java.awt.Frame;
|
import java.awt.Frame;
|
||||||
import java.awt.GridBagConstraints;
|
import java.awt.GridBagConstraints;
|
||||||
import java.awt.GridBagLayout;
|
import java.awt.GridBagLayout;
|
||||||
|
@ -173,14 +172,14 @@ public final class ADialogDialog extends CDialog implements ActionListener
|
||||||
mPrintScreen.addActionListener(this);
|
mPrintScreen.addActionListener(this);
|
||||||
mScreenShot.setIcon(Env.getImageIcon("ScreenShot16.gif"));
|
mScreenShot.setIcon(Env.getImageIcon("ScreenShot16.gif"));
|
||||||
mScreenShot.setText(Msg.getMsg(Env.getCtx(), "ScreenShot"));
|
mScreenShot.setText(Msg.getMsg(Env.getCtx(), "ScreenShot"));
|
||||||
mScreenShot.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_PRINTSCREEN, Event.SHIFT_MASK));
|
mScreenShot.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_PRINTSCREEN, ActionEvent.SHIFT_MASK));
|
||||||
mScreenShot.addActionListener(this);
|
mScreenShot.addActionListener(this);
|
||||||
mPreference.setIcon(Env.getImageIcon("Preference16.gif"));
|
mPreference.setIcon(Env.getImageIcon("Preference16.gif"));
|
||||||
mPreference.setText(Msg.getMsg(Env.getCtx(), "Preference"));
|
mPreference.setText(Msg.getMsg(Env.getCtx(), "Preference"));
|
||||||
mPreference.addActionListener(this);
|
mPreference.addActionListener(this);
|
||||||
mEnd.setIcon(Env.getImageIcon("End16.gif"));
|
mEnd.setIcon(Env.getImageIcon("End16.gif"));
|
||||||
mEnd.setText(Msg.getMsg(Env.getCtx(), "End"));
|
mEnd.setText(Msg.getMsg(Env.getCtx(), "End"));
|
||||||
mEnd.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_X, Event.ALT_MASK));
|
mEnd.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_X, ActionEvent.ALT_MASK));
|
||||||
mEnd.addActionListener(this);
|
mEnd.addActionListener(this);
|
||||||
//
|
//
|
||||||
westPanel.setLayout(westLayout);
|
westPanel.setLayout(westLayout);
|
||||||
|
|
|
@ -19,7 +19,6 @@ package org.compiere.apps;
|
||||||
import java.awt.BorderLayout;
|
import java.awt.BorderLayout;
|
||||||
import java.awt.Cursor;
|
import java.awt.Cursor;
|
||||||
import java.awt.Dimension;
|
import java.awt.Dimension;
|
||||||
import java.awt.Event;
|
|
||||||
import java.awt.Frame;
|
import java.awt.Frame;
|
||||||
import java.awt.GridLayout;
|
import java.awt.GridLayout;
|
||||||
import java.awt.Insets;
|
import java.awt.Insets;
|
||||||
|
@ -427,10 +426,10 @@ public final class AMenu extends CFrame
|
||||||
JMenu mFile = AEnv.getMenu("File");
|
JMenu mFile = AEnv.getMenu("File");
|
||||||
menuBar.add(mFile);
|
menuBar.add(mFile);
|
||||||
AEnv.addMenuItem("PrintScreen", null, KeyStroke.getKeyStroke(KeyEvent.VK_PRINTSCREEN, 0), mFile, this);
|
AEnv.addMenuItem("PrintScreen", null, KeyStroke.getKeyStroke(KeyEvent.VK_PRINTSCREEN, 0), mFile, this);
|
||||||
AEnv.addMenuItem("ScreenShot", null, KeyStroke.getKeyStroke(KeyEvent.VK_PRINTSCREEN, KeyEvent.SHIFT_MASK), mFile, this);
|
AEnv.addMenuItem("ScreenShot", null, KeyStroke.getKeyStroke(KeyEvent.VK_PRINTSCREEN, ActionEvent.SHIFT_MASK), mFile, this);
|
||||||
mFile.addSeparator();
|
mFile.addSeparator();
|
||||||
AEnv.addMenuItem("Logout", null, KeyStroke.getKeyStroke(KeyEvent.VK_L, Event.SHIFT_MASK+Event.ALT_MASK), mFile, this);
|
AEnv.addMenuItem("Logout", null, KeyStroke.getKeyStroke(KeyEvent.VK_L, ActionEvent.SHIFT_MASK + ActionEvent.ALT_MASK), mFile, this);
|
||||||
AEnv.addMenuItem("Exit", null, KeyStroke.getKeyStroke(KeyEvent.VK_X, Event.SHIFT_MASK+Event.ALT_MASK), mFile, this);
|
AEnv.addMenuItem("Exit", null, KeyStroke.getKeyStroke(KeyEvent.VK_X, ActionEvent.SHIFT_MASK+ActionEvent.ALT_MASK), mFile, this);
|
||||||
|
|
||||||
// View
|
// View
|
||||||
JMenu mView = AEnv.getMenu("View");
|
JMenu mView = AEnv.getMenu("View");
|
||||||
|
@ -438,15 +437,15 @@ public final class AMenu extends CFrame
|
||||||
|
|
||||||
if (MRole.getDefault().isAllow_Info_Product())
|
if (MRole.getDefault().isAllow_Info_Product())
|
||||||
{
|
{
|
||||||
AEnv.addMenuItem("InfoProduct", null, KeyStroke.getKeyStroke(KeyEvent.VK_I, Event.ALT_MASK), mView, this);
|
AEnv.addMenuItem("InfoProduct", null, KeyStroke.getKeyStroke(KeyEvent.VK_I, ActionEvent.ALT_MASK), mView, this);
|
||||||
}
|
}
|
||||||
if (MRole.getDefault().isAllow_Info_BPartner())
|
if (MRole.getDefault().isAllow_Info_BPartner())
|
||||||
{
|
{
|
||||||
AEnv.addMenuItem("InfoBPartner", null, KeyStroke.getKeyStroke(KeyEvent.VK_I, Event.ALT_MASK+Event.CTRL_MASK), mView, this);
|
AEnv.addMenuItem("InfoBPartner", null, KeyStroke.getKeyStroke(KeyEvent.VK_I, ActionEvent.ALT_MASK+ActionEvent.CTRL_MASK), mView, this);
|
||||||
}
|
}
|
||||||
if (MRole.getDefault().isShowAcct() && MRole.getDefault().isAllow_Info_Account())
|
if (MRole.getDefault().isShowAcct() && MRole.getDefault().isAllow_Info_Account())
|
||||||
{
|
{
|
||||||
AEnv.addMenuItem("InfoAccount", null, KeyStroke.getKeyStroke(KeyEvent.VK_I, Event.ALT_MASK+Event.CTRL_MASK), mView, this);
|
AEnv.addMenuItem("InfoAccount", null, KeyStroke.getKeyStroke(KeyEvent.VK_I, ActionEvent.ALT_MASK+ActionEvent.CTRL_MASK), mView, this);
|
||||||
}
|
}
|
||||||
if (MRole.getDefault().isAllow_Info_Schedule())
|
if (MRole.getDefault().isAllow_Info_Schedule())
|
||||||
{
|
{
|
||||||
|
@ -511,7 +510,7 @@ public final class AMenu extends CFrame
|
||||||
//Window Menu
|
//Window Menu
|
||||||
m_WindowMenu = new WindowMenu(windowManager, this);
|
m_WindowMenu = new WindowMenu(windowManager, this);
|
||||||
menuBar.add(m_WindowMenu);
|
menuBar.add(m_WindowMenu);
|
||||||
KeyStroke ks = KeyStroke.getKeyStroke(KeyEvent.VK_W, KeyEvent.CTRL_MASK);
|
KeyStroke ks = KeyStroke.getKeyStroke(KeyEvent.VK_W, ActionEvent.CTRL_MASK);
|
||||||
this.getRootPane().getInputMap(JComponent.WHEN_IN_FOCUSED_WINDOW).put(ks, "ShowAllWindow");
|
this.getRootPane().getInputMap(JComponent.WHEN_IN_FOCUSED_WINDOW).put(ks, "ShowAllWindow");
|
||||||
AppsAction action = new AppsAction("ShowAllWindow", ks, false);
|
AppsAction action = new AppsAction("ShowAllWindow", ks, false);
|
||||||
this.getRootPane().getActionMap().put("ShowAllWindow", action);
|
this.getRootPane().getActionMap().put("ShowAllWindow", action);
|
||||||
|
|
|
@ -28,13 +28,11 @@ import java.awt.Color;
|
||||||
import java.awt.Component;
|
import java.awt.Component;
|
||||||
import java.awt.Cursor;
|
import java.awt.Cursor;
|
||||||
import java.awt.Dimension;
|
import java.awt.Dimension;
|
||||||
import java.awt.Event;
|
|
||||||
import java.awt.FlowLayout;
|
import java.awt.FlowLayout;
|
||||||
import java.awt.Image;
|
import java.awt.Image;
|
||||||
import java.awt.Point;
|
import java.awt.Point;
|
||||||
import java.awt.event.ActionEvent;
|
import java.awt.event.ActionEvent;
|
||||||
import java.awt.event.ActionListener;
|
import java.awt.event.ActionListener;
|
||||||
import java.awt.event.InputEvent;
|
|
||||||
import java.awt.event.KeyEvent;
|
import java.awt.event.KeyEvent;
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
import java.sql.PreparedStatement;
|
import java.sql.PreparedStatement;
|
||||||
|
@ -44,6 +42,7 @@ import java.util.ArrayList;
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.Iterator;
|
import java.util.Iterator;
|
||||||
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.Properties;
|
import java.util.Properties;
|
||||||
import java.util.TreeMap;
|
import java.util.TreeMap;
|
||||||
|
@ -357,28 +356,28 @@ public final class APanel extends CPanel
|
||||||
JMenu mFile = AEnv.getMenu("File");
|
JMenu mFile = AEnv.getMenu("File");
|
||||||
menuBar.add(mFile);
|
menuBar.add(mFile);
|
||||||
aPrintScr = addAction("PrintScreen", mFile, KeyStroke.getKeyStroke(KeyEvent.VK_PRINTSCREEN, 0), false);
|
aPrintScr = addAction("PrintScreen", mFile, KeyStroke.getKeyStroke(KeyEvent.VK_PRINTSCREEN, 0), false);
|
||||||
aScrShot = addAction("ScreenShot", mFile, KeyStroke.getKeyStroke(KeyEvent.VK_PRINTSCREEN, Event.SHIFT_MASK), false);
|
aScrShot = addAction("ScreenShot", mFile, KeyStroke.getKeyStroke(KeyEvent.VK_PRINTSCREEN, ActionEvent.SHIFT_MASK), false);
|
||||||
aReport = addAction("Report", mFile, KeyStroke.getKeyStroke(KeyEvent.VK_F11, 0), false);
|
aReport = addAction("Report", mFile, KeyStroke.getKeyStroke(KeyEvent.VK_F11, 0), false);
|
||||||
aPrint = addAction("Print", mFile, KeyStroke.getKeyStroke(KeyEvent.VK_F12, 0), false);
|
aPrint = addAction("Print", mFile, KeyStroke.getKeyStroke(KeyEvent.VK_F12, 0), false);
|
||||||
aPrintPreview = addAction("PrintPreview", mFile, KeyStroke.getKeyStroke(KeyEvent.VK_P, Event.SHIFT_MASK+Event.ALT_MASK), false);
|
aPrintPreview = addAction("PrintPreview", mFile, KeyStroke.getKeyStroke(KeyEvent.VK_P, ActionEvent.SHIFT_MASK+ActionEvent.ALT_MASK), false);
|
||||||
if (MRole.getDefault().isCanExport())
|
if (MRole.getDefault().isCanExport())
|
||||||
{
|
{
|
||||||
aExport = addAction("Export", mFile, null, false);
|
aExport = addAction("Export", mFile, null, false);
|
||||||
}
|
}
|
||||||
mFile.addSeparator();
|
mFile.addSeparator();
|
||||||
aEnd = addAction("End", mFile, KeyStroke.getKeyStroke(KeyEvent.VK_X, Event.ALT_MASK), false);
|
aEnd = addAction("End", mFile, KeyStroke.getKeyStroke(KeyEvent.VK_X, ActionEvent.ALT_MASK), false);
|
||||||
aLogout = addAction("Logout", mFile, KeyStroke.getKeyStroke(KeyEvent.VK_L, Event.SHIFT_MASK+Event.ALT_MASK), false);
|
aLogout = addAction("Logout", mFile, KeyStroke.getKeyStroke(KeyEvent.VK_L, ActionEvent.SHIFT_MASK+ActionEvent.ALT_MASK), false);
|
||||||
aExit = addAction("Exit", mFile, KeyStroke.getKeyStroke(KeyEvent.VK_X, Event.SHIFT_MASK+Event.ALT_MASK), false);
|
aExit = addAction("Exit", mFile, KeyStroke.getKeyStroke(KeyEvent.VK_X, ActionEvent.SHIFT_MASK+ActionEvent.ALT_MASK), false);
|
||||||
// Edit
|
// Edit
|
||||||
JMenu mEdit = AEnv.getMenu("Edit");
|
JMenu mEdit = AEnv.getMenu("Edit");
|
||||||
menuBar.add(mEdit);
|
menuBar.add(mEdit);
|
||||||
aNew = addAction("New", mEdit, KeyStroke.getKeyStroke(KeyEvent.VK_F2, 0), false);
|
aNew = addAction("New", mEdit, KeyStroke.getKeyStroke(KeyEvent.VK_F2, 0), false);
|
||||||
aSave = addAction("Save", mEdit, KeyStroke.getKeyStroke(KeyEvent.VK_F4, 0), false);
|
aSave = addAction("Save", mEdit, KeyStroke.getKeyStroke(KeyEvent.VK_F4, 0), false);
|
||||||
aSaveAndCreate = addAction("SaveCreate", mEdit, KeyStroke.getKeyStroke(KeyEvent.VK_Q, KeyEvent.CTRL_MASK), false);
|
aSaveAndCreate = addAction("SaveCreate", mEdit, KeyStroke.getKeyStroke(KeyEvent.VK_Q, ActionEvent.CTRL_MASK), false);
|
||||||
mEdit.addSeparator();
|
mEdit.addSeparator();
|
||||||
aCopy = addAction("Copy", mEdit, KeyStroke.getKeyStroke(KeyEvent.VK_F2, Event.SHIFT_MASK), false);
|
aCopy = addAction("Copy", mEdit, KeyStroke.getKeyStroke(KeyEvent.VK_F2, ActionEvent.SHIFT_MASK), false);
|
||||||
aDelete = addAction("Delete", mEdit, KeyStroke.getKeyStroke(KeyEvent.VK_F3, 0), false);
|
aDelete = addAction("Delete", mEdit, KeyStroke.getKeyStroke(KeyEvent.VK_F3, 0), false);
|
||||||
aDeleteSelection = addAction("DeleteSelection", mEdit, KeyStroke.getKeyStroke(KeyEvent.VK_D, Event.CTRL_MASK), false);
|
aDeleteSelection = addAction("DeleteSelection", mEdit, KeyStroke.getKeyStroke(KeyEvent.VK_D, ActionEvent.CTRL_MASK), false);
|
||||||
aIgnore = addAction("Ignore", mEdit, KeyStroke.getKeyStroke(KeyEvent.VK_ESCAPE, 0), false);
|
aIgnore = addAction("Ignore", mEdit, KeyStroke.getKeyStroke(KeyEvent.VK_ESCAPE, 0), false);
|
||||||
aRefresh = addAction("Refresh", mEdit, KeyStroke.getKeyStroke(KeyEvent.VK_F5, 0), false);
|
aRefresh = addAction("Refresh", mEdit, KeyStroke.getKeyStroke(KeyEvent.VK_F5, 0), false);
|
||||||
mEdit.addSeparator();
|
mEdit.addSeparator();
|
||||||
|
@ -390,15 +389,15 @@ public final class APanel extends CPanel
|
||||||
menuBar.add(mView);
|
menuBar.add(mView);
|
||||||
if (MRole.getDefault().isAllow_Info_Product())
|
if (MRole.getDefault().isAllow_Info_Product())
|
||||||
{
|
{
|
||||||
aProduct = addAction("InfoProduct", mView, KeyStroke.getKeyStroke(KeyEvent.VK_I, Event.ALT_MASK), false);
|
aProduct = addAction("InfoProduct", mView, KeyStroke.getKeyStroke(KeyEvent.VK_I, ActionEvent.ALT_MASK), false);
|
||||||
}
|
}
|
||||||
if (MRole.getDefault().isAllow_Info_BPartner())
|
if (MRole.getDefault().isAllow_Info_BPartner())
|
||||||
{
|
{
|
||||||
aBPartner = addAction("InfoBPartner", mView, KeyStroke.getKeyStroke(KeyEvent.VK_I, Event.SHIFT_MASK+Event.ALT_MASK), false);
|
aBPartner = addAction("InfoBPartner", mView, KeyStroke.getKeyStroke(KeyEvent.VK_I, ActionEvent.SHIFT_MASK+ActionEvent.ALT_MASK), false);
|
||||||
}
|
}
|
||||||
if (MRole.getDefault().isShowAcct() && MRole.getDefault().isAllow_Info_Account())
|
if (MRole.getDefault().isShowAcct() && MRole.getDefault().isAllow_Info_Account())
|
||||||
{
|
{
|
||||||
aAccount = addAction("InfoAccount",mView, KeyStroke.getKeyStroke(KeyEvent.VK_I, Event.ALT_MASK+Event.CTRL_MASK), false);
|
aAccount = addAction("InfoAccount",mView, KeyStroke.getKeyStroke(KeyEvent.VK_I, ActionEvent.ALT_MASK+ActionEvent.CTRL_MASK), false);
|
||||||
}
|
}
|
||||||
if (MRole.getDefault().isAllow_Info_Schedule())
|
if (MRole.getDefault().isAllow_Info_Schedule())
|
||||||
{
|
{
|
||||||
|
@ -455,13 +454,13 @@ public final class APanel extends CPanel
|
||||||
// Go
|
// Go
|
||||||
JMenu mGo = AEnv.getMenu("Go");
|
JMenu mGo = AEnv.getMenu("Go");
|
||||||
menuBar.add(mGo);
|
menuBar.add(mGo);
|
||||||
aFirst = addAction("First", mGo, KeyStroke.getKeyStroke(KeyEvent.VK_PAGE_UP, Event.ALT_MASK), false);
|
aFirst = addAction("First", mGo, KeyStroke.getKeyStroke(KeyEvent.VK_PAGE_UP, ActionEvent.ALT_MASK), false);
|
||||||
aPrevious = addAction("Previous", mGo, KeyStroke.getKeyStroke(KeyEvent.VK_UP, Event.ALT_MASK), false);
|
aPrevious = addAction("Previous", mGo, KeyStroke.getKeyStroke(KeyEvent.VK_UP, ActionEvent.ALT_MASK), false);
|
||||||
aNext = addAction("Next", mGo, KeyStroke.getKeyStroke(KeyEvent.VK_DOWN, Event.ALT_MASK), false);
|
aNext = addAction("Next", mGo, KeyStroke.getKeyStroke(KeyEvent.VK_DOWN, ActionEvent.ALT_MASK), false);
|
||||||
aLast = addAction("Last", mGo, KeyStroke.getKeyStroke(KeyEvent.VK_PAGE_DOWN, Event.ALT_MASK), false);
|
aLast = addAction("Last", mGo, KeyStroke.getKeyStroke(KeyEvent.VK_PAGE_DOWN, ActionEvent.ALT_MASK), false);
|
||||||
mGo.addSeparator();
|
mGo.addSeparator();
|
||||||
aParent = addAction("Parent", mGo, KeyStroke.getKeyStroke(KeyEvent.VK_LEFT, Event.ALT_MASK), false);
|
aParent = addAction("Parent", mGo, KeyStroke.getKeyStroke(KeyEvent.VK_LEFT, ActionEvent.ALT_MASK), false);
|
||||||
aDetail = addAction("Detail", mGo, KeyStroke.getKeyStroke(KeyEvent.VK_RIGHT, Event.ALT_MASK), false);
|
aDetail = addAction("Detail", mGo, KeyStroke.getKeyStroke(KeyEvent.VK_RIGHT, ActionEvent.ALT_MASK), false);
|
||||||
mGo.addSeparator();
|
mGo.addSeparator();
|
||||||
aZoomAcross = addAction("ZoomAcross", mGo, null, false);
|
aZoomAcross = addAction("ZoomAcross", mGo, null, false);
|
||||||
aRequest = addAction("Request", mGo, null, false);
|
aRequest = addAction("Request", mGo, null, false);
|
||||||
|
@ -490,7 +489,7 @@ public final class APanel extends CPanel
|
||||||
AMenu aMenu = (AMenu)AEnv.getWindow(0);
|
AMenu aMenu = (AMenu)AEnv.getWindow(0);
|
||||||
m_WindowMenu = new WindowMenu(aMenu.getWindowManager(), m_window);
|
m_WindowMenu = new WindowMenu(aMenu.getWindowManager(), m_window);
|
||||||
menuBar.add(m_WindowMenu);
|
menuBar.add(m_WindowMenu);
|
||||||
aShowAllWindow = addAction("ShowAllWindow", null, KeyStroke.getKeyStroke(KeyEvent.VK_W, KeyEvent.CTRL_MASK), false);
|
aShowAllWindow = addAction("ShowAllWindow", null, KeyStroke.getKeyStroke(KeyEvent.VK_W, ActionEvent.CTRL_MASK), false);
|
||||||
|
|
||||||
// Help
|
// Help
|
||||||
JMenu mHelp = AEnv.getMenu("Help");
|
JMenu mHelp = AEnv.getMenu("Help");
|
||||||
|
@ -2042,10 +2041,10 @@ public final class APanel extends CPanel
|
||||||
if(okCancel != null && okCancel == JOptionPane.OK_OPTION)
|
if(okCancel != null && okCancel == JOptionPane.OK_OPTION)
|
||||||
{
|
{
|
||||||
log.fine("ok");
|
log.fine("ok");
|
||||||
Object[] selectedValues = list.getSelectedValues();
|
List<Object> selectedValues = list.getSelectedValuesList();
|
||||||
for (int i = 0; i < selectedValues.length; i++)
|
for (int i = 0; i < selectedValues.size(); i++)
|
||||||
{
|
{
|
||||||
if (log.isLoggable(Level.FINE)) log.fine(selectedValues[i].toString());
|
if (log.isLoggable(Level.FINE)) log.fine(selectedValues.get(i).toString());
|
||||||
}
|
}
|
||||||
int[] indices = list.getSelectedIndices();
|
int[] indices = list.getSelectedIndices();
|
||||||
Arrays.sort(indices);
|
Arrays.sort(indices);
|
||||||
|
@ -2540,7 +2539,7 @@ public final class APanel extends CPanel
|
||||||
if (record_ID == -1) // No Key
|
if (record_ID == -1) // No Key
|
||||||
return;
|
return;
|
||||||
// Control Pressed
|
// Control Pressed
|
||||||
if ((m_lastModifiers & InputEvent.CTRL_MASK) != 0)
|
if ((m_lastModifiers & ActionEvent.CTRL_MASK) != 0)
|
||||||
{
|
{
|
||||||
new RecordAccessDialog(AEnv.getFrame(this), m_curTab.getAD_Table_ID(), record_ID);
|
new RecordAccessDialog(AEnv.getFrame(this), m_curTab.getAD_Table_ID(), record_ID);
|
||||||
}
|
}
|
||||||
|
@ -3072,26 +3071,26 @@ public final class APanel extends CPanel
|
||||||
*/
|
*/
|
||||||
private void initSwitchLineAction() {
|
private void initSwitchLineAction() {
|
||||||
aSwitchLinesDownAction = new SwitchAction("switchLinesDown", KeyStroke.getKeyStroke(
|
aSwitchLinesDownAction = new SwitchAction("switchLinesDown", KeyStroke.getKeyStroke(
|
||||||
KeyEvent.VK_DOWN, Event.SHIFT_MASK), this);
|
KeyEvent.VK_DOWN, ActionEvent.SHIFT_MASK), this);
|
||||||
aSwitchLinesUpAction = new SwitchAction("switchLinesUp", KeyStroke.getKeyStroke(
|
aSwitchLinesUpAction = new SwitchAction("switchLinesUp", KeyStroke.getKeyStroke(
|
||||||
KeyEvent.VK_UP, Event.SHIFT_MASK), this);
|
KeyEvent.VK_UP, ActionEvent.SHIFT_MASK), this);
|
||||||
|
|
||||||
JTable table = m_curGC.getTable();
|
JTable table = m_curGC.getTable();
|
||||||
table.getInputMap(CPanel.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT).put(
|
table.getInputMap(CPanel.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT).put(
|
||||||
KeyStroke.getKeyStroke(KeyEvent.VK_DOWN, Event.SHIFT_MASK), "none");
|
KeyStroke.getKeyStroke(KeyEvent.VK_DOWN, ActionEvent.SHIFT_MASK), "none");
|
||||||
table.getInputMap(CPanel.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT).put(
|
table.getInputMap(CPanel.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT).put(
|
||||||
KeyStroke.getKeyStroke(KeyEvent.VK_UP, Event.SHIFT_MASK), "none");
|
KeyStroke.getKeyStroke(KeyEvent.VK_UP, ActionEvent.SHIFT_MASK), "none");
|
||||||
table.getInputMap(CPanel.WHEN_FOCUSED).put(
|
table.getInputMap(CPanel.WHEN_FOCUSED).put(
|
||||||
KeyStroke.getKeyStroke(KeyEvent.VK_DOWN, Event.SHIFT_MASK), "none");
|
KeyStroke.getKeyStroke(KeyEvent.VK_DOWN, ActionEvent.SHIFT_MASK), "none");
|
||||||
table.getInputMap(CPanel.WHEN_FOCUSED).put(
|
table.getInputMap(CPanel.WHEN_FOCUSED).put(
|
||||||
KeyStroke.getKeyStroke(KeyEvent.VK_UP, Event.SHIFT_MASK), "none");
|
KeyStroke.getKeyStroke(KeyEvent.VK_UP, ActionEvent.SHIFT_MASK), "none");
|
||||||
|
|
||||||
getInputMap(CPanel.WHEN_IN_FOCUSED_WINDOW).put(
|
getInputMap(CPanel.WHEN_IN_FOCUSED_WINDOW).put(
|
||||||
KeyStroke.getKeyStroke(KeyEvent.VK_DOWN, Event.SHIFT_MASK),
|
KeyStroke.getKeyStroke(KeyEvent.VK_DOWN, ActionEvent.SHIFT_MASK),
|
||||||
aSwitchLinesDownAction.getName());
|
aSwitchLinesDownAction.getName());
|
||||||
getActionMap().put(aSwitchLinesDownAction.getName(), aSwitchLinesDownAction);
|
getActionMap().put(aSwitchLinesDownAction.getName(), aSwitchLinesDownAction);
|
||||||
getInputMap(CPanel.WHEN_IN_FOCUSED_WINDOW).put(
|
getInputMap(CPanel.WHEN_IN_FOCUSED_WINDOW).put(
|
||||||
KeyStroke.getKeyStroke(KeyEvent.VK_UP, Event.SHIFT_MASK),
|
KeyStroke.getKeyStroke(KeyEvent.VK_UP, ActionEvent.SHIFT_MASK),
|
||||||
aSwitchLinesUpAction.getName());
|
aSwitchLinesUpAction.getName());
|
||||||
getActionMap().put(aSwitchLinesUpAction.getName(), aSwitchLinesUpAction);
|
getActionMap().put(aSwitchLinesUpAction.getName(), aSwitchLinesUpAction);
|
||||||
}
|
}
|
||||||
|
|
|
@ -20,6 +20,7 @@ import java.awt.BorderLayout;
|
||||||
import java.awt.Component;
|
import java.awt.Component;
|
||||||
import java.awt.FlowLayout;
|
import java.awt.FlowLayout;
|
||||||
import java.awt.Insets;
|
import java.awt.Insets;
|
||||||
|
import java.awt.event.ActionEvent;
|
||||||
import java.awt.event.ActionListener;
|
import java.awt.event.ActionListener;
|
||||||
import java.awt.event.KeyEvent;
|
import java.awt.event.KeyEvent;
|
||||||
|
|
||||||
|
@ -242,7 +243,7 @@ public final class ConfirmPanel extends CPanel
|
||||||
public static final CButton createProcessButton (String text)
|
public static final CButton createProcessButton (String text)
|
||||||
{
|
{
|
||||||
AppsAction aa = new AppsAction (A_PROCESS,
|
AppsAction aa = new AppsAction (A_PROCESS,
|
||||||
KeyStroke.getKeyStroke(KeyEvent.VK_F4, KeyEvent.SHIFT_MASK), text);
|
KeyStroke.getKeyStroke(KeyEvent.VK_F4, ActionEvent.SHIFT_MASK), text);
|
||||||
CButton button = (CButton)aa.getButton();
|
CButton button = (CButton)aa.getButton();
|
||||||
button.setMargin(s_insets);
|
button.setMargin(s_insets);
|
||||||
return button;
|
return button;
|
||||||
|
|
|
@ -134,7 +134,7 @@ public class WindowMenu extends JMenu {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
setEnvText(expose, "ShowAllWindow");
|
setEnvText(expose, "ShowAllWindow");
|
||||||
expose.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_W, KeyEvent.CTRL_MASK));
|
expose.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_W, ActionEvent.CTRL_MASK));
|
||||||
setEnvText(closeOthers, "CloseOtherWindows");
|
setEnvText(closeOthers, "CloseOtherWindows");
|
||||||
addMenuListener(new MenuListener() {
|
addMenuListener(new MenuListener() {
|
||||||
public void menuCanceled (MenuEvent e) {}
|
public void menuCanceled (MenuEvent e) {}
|
||||||
|
|
|
@ -17,7 +17,6 @@
|
||||||
package org.compiere.apps.form;
|
package org.compiere.apps.form;
|
||||||
|
|
||||||
import java.awt.Cursor;
|
import java.awt.Cursor;
|
||||||
import java.awt.Event;
|
|
||||||
import java.awt.GraphicsConfiguration;
|
import java.awt.GraphicsConfiguration;
|
||||||
import java.awt.event.ActionEvent;
|
import java.awt.event.ActionEvent;
|
||||||
import java.awt.event.ActionListener;
|
import java.awt.event.ActionListener;
|
||||||
|
@ -148,11 +147,11 @@ public class FormFrame extends CFrame
|
||||||
JMenu mFile = AEnv.getMenu("File");
|
JMenu mFile = AEnv.getMenu("File");
|
||||||
menuBar.add(mFile);
|
menuBar.add(mFile);
|
||||||
AEnv.addMenuItem("PrintScreen", null, KeyStroke.getKeyStroke(KeyEvent.VK_PRINTSCREEN, 0), mFile, this);
|
AEnv.addMenuItem("PrintScreen", null, KeyStroke.getKeyStroke(KeyEvent.VK_PRINTSCREEN, 0), mFile, this);
|
||||||
AEnv.addMenuItem("ScreenShot", null, KeyStroke.getKeyStroke(KeyEvent.VK_PRINTSCREEN, Event.SHIFT_MASK), mFile, this);
|
AEnv.addMenuItem("ScreenShot", null, KeyStroke.getKeyStroke(KeyEvent.VK_PRINTSCREEN, ActionEvent.SHIFT_MASK), mFile, this);
|
||||||
AEnv.addMenuItem("Report", null, KeyStroke.getKeyStroke(KeyEvent.VK_P, Event.ALT_MASK), mFile, this);
|
AEnv.addMenuItem("Report", null, KeyStroke.getKeyStroke(KeyEvent.VK_P, ActionEvent.ALT_MASK), mFile, this);
|
||||||
mFile.addSeparator();
|
mFile.addSeparator();
|
||||||
AEnv.addMenuItem("End", null, KeyStroke.getKeyStroke(KeyEvent.VK_X, Event.ALT_MASK), mFile, this);
|
AEnv.addMenuItem("End", null, KeyStroke.getKeyStroke(KeyEvent.VK_X, ActionEvent.ALT_MASK), mFile, this);
|
||||||
AEnv.addMenuItem("Exit", null, KeyStroke.getKeyStroke(KeyEvent.VK_X, Event.SHIFT_MASK+Event.ALT_MASK), mFile, this);
|
AEnv.addMenuItem("Exit", null, KeyStroke.getKeyStroke(KeyEvent.VK_X, ActionEvent.SHIFT_MASK+ActionEvent.ALT_MASK), mFile, this);
|
||||||
|
|
||||||
// View
|
// View
|
||||||
JMenu mView = AEnv.getMenu("View");
|
JMenu mView = AEnv.getMenu("View");
|
||||||
|
@ -160,15 +159,15 @@ public class FormFrame extends CFrame
|
||||||
|
|
||||||
if (MRole.getDefault().isAllow_Info_Product())
|
if (MRole.getDefault().isAllow_Info_Product())
|
||||||
{
|
{
|
||||||
AEnv.addMenuItem("InfoProduct", null, KeyStroke.getKeyStroke(KeyEvent.VK_I, Event.ALT_MASK), mView, this);
|
AEnv.addMenuItem("InfoProduct", null, KeyStroke.getKeyStroke(KeyEvent.VK_I, ActionEvent.ALT_MASK), mView, this);
|
||||||
}
|
}
|
||||||
if (MRole.getDefault().isAllow_Info_BPartner())
|
if (MRole.getDefault().isAllow_Info_BPartner())
|
||||||
{
|
{
|
||||||
AEnv.addMenuItem("InfoBPartner", null, KeyStroke.getKeyStroke(KeyEvent.VK_I, Event.ALT_MASK+Event.CTRL_MASK), mView, this);
|
AEnv.addMenuItem("InfoBPartner", null, KeyStroke.getKeyStroke(KeyEvent.VK_I, ActionEvent.ALT_MASK+ActionEvent.CTRL_MASK), mView, this);
|
||||||
}
|
}
|
||||||
if (MRole.getDefault().isShowAcct() && MRole.getDefault().isAllow_Info_Account())
|
if (MRole.getDefault().isShowAcct() && MRole.getDefault().isAllow_Info_Account())
|
||||||
{
|
{
|
||||||
AEnv.addMenuItem("InfoAccount", null, KeyStroke.getKeyStroke(KeyEvent.VK_I, Event.ALT_MASK+Event.CTRL_MASK), mView, this);
|
AEnv.addMenuItem("InfoAccount", null, KeyStroke.getKeyStroke(KeyEvent.VK_I, ActionEvent.ALT_MASK+ActionEvent.CTRL_MASK), mView, this);
|
||||||
}
|
}
|
||||||
if (MRole.getDefault().isAllow_Info_Schedule())
|
if (MRole.getDefault().isAllow_Info_Schedule())
|
||||||
{
|
{
|
||||||
|
|
|
@ -25,7 +25,6 @@ import java.awt.GridBagLayout;
|
||||||
import java.awt.Insets;
|
import java.awt.Insets;
|
||||||
import java.awt.event.ActionEvent;
|
import java.awt.event.ActionEvent;
|
||||||
import java.awt.event.ActionListener;
|
import java.awt.event.ActionListener;
|
||||||
import java.awt.event.InputEvent;
|
|
||||||
import java.awt.event.KeyEvent;
|
import java.awt.event.KeyEvent;
|
||||||
import java.awt.event.WindowAdapter;
|
import java.awt.event.WindowAdapter;
|
||||||
import java.awt.event.WindowEvent;
|
import java.awt.event.WindowEvent;
|
||||||
|
@ -646,7 +645,7 @@ public final class Find extends CDialog
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
advancedTable.getActionMap().put(im.get(tab), tabActionWrapper);
|
advancedTable.getActionMap().put(im.get(tab), tabActionWrapper);
|
||||||
KeyStroke shiftTab = KeyStroke.getKeyStroke(KeyEvent.VK_TAB, InputEvent.SHIFT_MASK);
|
KeyStroke shiftTab = KeyStroke.getKeyStroke(KeyEvent.VK_TAB, ActionEvent.SHIFT_MASK);
|
||||||
final Action shiftTabAction = advancedTable.getActionMap().get(im.get(shiftTab));
|
final Action shiftTabAction = advancedTable.getActionMap().get(im.get(shiftTab));
|
||||||
Action shiftTabActionWrapper = new AbstractAction()
|
Action shiftTabActionWrapper = new AbstractAction()
|
||||||
{
|
{
|
||||||
|
|
|
@ -39,6 +39,7 @@ import java.sql.PreparedStatement;
|
||||||
import java.sql.ResultSet;
|
import java.sql.ResultSet;
|
||||||
import java.sql.SQLException;
|
import java.sql.SQLException;
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
|
import java.util.List;
|
||||||
import java.util.logging.Level;
|
import java.util.logging.Level;
|
||||||
|
|
||||||
import javax.swing.DefaultListCellRenderer;
|
import javax.swing.DefaultListCellRenderer;
|
||||||
|
@ -525,11 +526,11 @@ public class VSortTab extends CPanel implements APanelTab
|
||||||
void migrateValueAcrossLists (AWTEvent event)
|
void migrateValueAcrossLists (AWTEvent event)
|
||||||
{
|
{
|
||||||
Object source = event.getSource();
|
Object source = event.getSource();
|
||||||
Object[] selObjects = (source == bAdd || source == noList) ?
|
List<Object> selObjects = (source == bAdd || source == noList) ?
|
||||||
noList.getSelectedValues() : yesList.getSelectedValues();
|
noList.getSelectedValuesList() : yesList.getSelectedValuesList();
|
||||||
for (int i = 0; i < selObjects.length; i++)
|
for (int i = 0; i < selObjects.size(); i++)
|
||||||
{
|
{
|
||||||
ListItem selObject = (ListItem)selObjects[i];
|
ListItem selObject = (ListItem)selObjects.get(i);
|
||||||
if (selObject == null || !selObject.isUpdateable())
|
if (selObject == null || !selObject.isUpdateable())
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
|
@ -554,10 +555,10 @@ public class VSortTab extends CPanel implements APanelTab
|
||||||
*/
|
*/
|
||||||
void migrateValueWithinYesList (AWTEvent event)
|
void migrateValueWithinYesList (AWTEvent event)
|
||||||
{
|
{
|
||||||
Object[] selObjects = yesList.getSelectedValues();
|
List<Object> selObjects = yesList.getSelectedValuesList();
|
||||||
if (selObjects == null)
|
if (selObjects == null)
|
||||||
return;
|
return;
|
||||||
int length = selObjects.length;
|
int length = selObjects.size();
|
||||||
if (length == 0)
|
if (length == 0)
|
||||||
return;
|
return;
|
||||||
// Object selObject = selObjects[0];
|
// Object selObject = selObjects[0];
|
||||||
|
@ -572,7 +573,7 @@ public class VSortTab extends CPanel implements APanelTab
|
||||||
if (source == bUp)
|
if (source == bUp)
|
||||||
{
|
{
|
||||||
for (int i = 0; i < length; i++) {
|
for (int i = 0; i < length; i++) {
|
||||||
ListItem selObject = (ListItem)selObjects[i];
|
ListItem selObject = (ListItem)selObjects.get(i);
|
||||||
int index = indices[i];
|
int index = indices[i];
|
||||||
if (index == 0)
|
if (index == 0)
|
||||||
break;
|
break;
|
||||||
|
@ -589,7 +590,7 @@ public class VSortTab extends CPanel implements APanelTab
|
||||||
else if (source == bDown)
|
else if (source == bDown)
|
||||||
{
|
{
|
||||||
for (int i = length - 1; i >= 0; i--) {
|
for (int i = length - 1; i >= 0; i--) {
|
||||||
ListItem selObject = (ListItem)selObjects[i];
|
ListItem selObject = (ListItem)selObjects.get(i);
|
||||||
int index = indices[i];
|
int index = indices[i];
|
||||||
if (index >= yesModel.size () - 1)
|
if (index >= yesModel.size () - 1)
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -165,7 +165,7 @@ public class VLookup extends JComponent
|
||||||
Action action = (binding==null) ? null : am.get(binding);
|
Action action = (binding==null) ? null : am.get(binding);
|
||||||
if(action!=null){
|
if(action!=null){
|
||||||
return SwingUtilities.notifyAction(action, ks, e, editorComp,
|
return SwingUtilities.notifyAction(action, ks, e, editorComp,
|
||||||
e.getModifiers());
|
e.getModifiersEx());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
|
|
|
@ -825,7 +825,7 @@ public final class VNumber extends JComponent
|
||||||
int modifiers = 0;
|
int modifiers = 0;
|
||||||
AWTEvent currentEvent = EventQueue.getCurrentEvent();
|
AWTEvent currentEvent = EventQueue.getCurrentEvent();
|
||||||
if (currentEvent instanceof InputEvent)
|
if (currentEvent instanceof InputEvent)
|
||||||
modifiers = ((InputEvent)currentEvent).getModifiers();
|
modifiers = ((InputEvent)currentEvent).getModifiersEx();
|
||||||
else if (currentEvent instanceof ActionEvent)
|
else if (currentEvent instanceof ActionEvent)
|
||||||
modifiers = ((ActionEvent)currentEvent).getModifiers();
|
modifiers = ((ActionEvent)currentEvent).getModifiers();
|
||||||
ActionEvent ae = new ActionEvent (this, ActionEvent.ACTION_PERFORMED,
|
ActionEvent ae = new ActionEvent (this, ActionEvent.ACTION_PERFORMED,
|
||||||
|
|
|
@ -514,7 +514,7 @@ public final class VTreePanel extends CPanel
|
||||||
|
|
||||||
// *** Tree ***
|
// *** Tree ***
|
||||||
if (e.getSource() instanceof JTree
|
if (e.getSource() instanceof JTree
|
||||||
|| (e.getSource() == treeSearch && e.getModifiers() != 0)) // InputEvent.CTRL_MASK
|
|| (e.getSource() == treeSearch && e.getModifiersEx() != 0)) // InputEvent.CTRL_MASK
|
||||||
{
|
{
|
||||||
TreePath tp = tree.getSelectionPath();
|
TreePath tp = tree.getSelectionPath();
|
||||||
if (tp == null)
|
if (tp == null)
|
||||||
|
|
|
@ -16,7 +16,7 @@
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
package org.compiere.plaf;
|
package org.compiere.plaf;
|
||||||
|
|
||||||
import java.awt.event.InputEvent;
|
import java.awt.event.ActionEvent;
|
||||||
import java.beans.PropertyChangeEvent;
|
import java.beans.PropertyChangeEvent;
|
||||||
|
|
||||||
import javax.swing.AbstractButton;
|
import javax.swing.AbstractButton;
|
||||||
|
@ -86,10 +86,10 @@ public class CompiereButtonListener extends BasicButtonListener
|
||||||
}
|
}
|
||||||
map.clear();
|
map.clear();
|
||||||
String className = b.getClass().getName();
|
String className = b.getClass().getName();
|
||||||
int mask = InputEvent.ALT_MASK; // Default Buttons
|
int mask = ActionEvent.ALT_MASK; // Default Buttons
|
||||||
if (b instanceof JCheckBox // In Tab
|
if (b instanceof JCheckBox // In Tab
|
||||||
|| className.indexOf("VButton") != -1)
|
|| className.indexOf("VButton") != -1)
|
||||||
mask = InputEvent.SHIFT_MASK + InputEvent.CTRL_MASK;
|
mask = ActionEvent.SHIFT_MASK + ActionEvent.CTRL_MASK;
|
||||||
map.put(KeyStroke.getKeyStroke(m, mask, false), "pressed");
|
map.put(KeyStroke.getKeyStroke(m, mask, false), "pressed");
|
||||||
map.put(KeyStroke.getKeyStroke(m, mask, true), "released");
|
map.put(KeyStroke.getKeyStroke(m, mask, true), "released");
|
||||||
map.put(KeyStroke.getKeyStroke(m, 0, true), "released");
|
map.put(KeyStroke.getKeyStroke(m, 0, true), "released");
|
||||||
|
|
|
@ -18,7 +18,7 @@ package org.compiere.plaf;
|
||||||
|
|
||||||
import java.awt.AWTKeyStroke;
|
import java.awt.AWTKeyStroke;
|
||||||
import java.awt.KeyboardFocusManager;
|
import java.awt.KeyboardFocusManager;
|
||||||
import java.awt.event.InputEvent;
|
import java.awt.event.ActionEvent;
|
||||||
import java.awt.event.KeyEvent;
|
import java.awt.event.KeyEvent;
|
||||||
import java.beans.PropertyChangeEvent;
|
import java.beans.PropertyChangeEvent;
|
||||||
import java.util.HashSet;
|
import java.util.HashSet;
|
||||||
|
@ -63,7 +63,7 @@ public class CompiereTextAreaUI extends BasicTextAreaUI
|
||||||
/** The Editor */
|
/** The Editor */
|
||||||
private JTextComponent m_editor = null;
|
private JTextComponent m_editor = null;
|
||||||
/** Tab Stroke */
|
/** Tab Stroke */
|
||||||
private static KeyStroke s_stroke = KeyStroke.getKeyStroke (KeyEvent.VK_TAB, InputEvent.CTRL_MASK);
|
private static KeyStroke s_stroke = KeyStroke.getKeyStroke (KeyEvent.VK_TAB, ActionEvent.CTRL_MASK);
|
||||||
/** Tab Action */
|
/** Tab Action */
|
||||||
private static Action s_action = new DefaultEditorKit.InsertTabAction();
|
private static Action s_action = new DefaultEditorKit.InsertTabAction();
|
||||||
|
|
||||||
|
@ -109,7 +109,7 @@ public class CompiereTextAreaUI extends BasicTextAreaUI
|
||||||
//
|
//
|
||||||
forwardTraversalKeys.add (KeyStroke.getKeyStroke (KeyEvent.VK_TAB, 0));
|
forwardTraversalKeys.add (KeyStroke.getKeyStroke (KeyEvent.VK_TAB, 0));
|
||||||
forwardTraversalKeys.remove(s_stroke);
|
forwardTraversalKeys.remove(s_stroke);
|
||||||
backwardTraversalKeys.add (KeyStroke.getKeyStroke (KeyEvent.VK_TAB, InputEvent.SHIFT_MASK));
|
backwardTraversalKeys.add (KeyStroke.getKeyStroke (KeyEvent.VK_TAB, ActionEvent.SHIFT_MASK));
|
||||||
//
|
//
|
||||||
LookAndFeel.installProperty (m_editor, "focusTraversalKeysForward", forwardTraversalKeys);
|
LookAndFeel.installProperty (m_editor, "focusTraversalKeysForward", forwardTraversalKeys);
|
||||||
LookAndFeel.installProperty (m_editor, "focusTraversalKeysBackward", backwardTraversalKeys);
|
LookAndFeel.installProperty (m_editor, "focusTraversalKeysBackward", backwardTraversalKeys);
|
||||||
|
|
|
@ -79,7 +79,7 @@ public class CompiereToolTipUI extends MetalToolTipUI
|
||||||
int condition = comp.getConditionForKeyStroke (keys[i]);
|
int condition = comp.getConditionForKeyStroke (keys[i]);
|
||||||
if (condition == JComponent.WHEN_IN_FOCUSED_WINDOW)
|
if (condition == JComponent.WHEN_IN_FOCUSED_WINDOW)
|
||||||
{
|
{
|
||||||
String prefix = KeyEvent.getKeyModifiersText (mod);
|
String prefix = KeyEvent.getModifiersExText (mod);
|
||||||
if (prefix.length() > 1)
|
if (prefix.length() > 1)
|
||||||
{
|
{
|
||||||
if (controlKeyStr.length() > 0)
|
if (controlKeyStr.length() > 0)
|
||||||
|
|
|
@ -14,7 +14,6 @@
|
||||||
|
|
||||||
package org.compiere.pos;
|
package org.compiere.pos;
|
||||||
|
|
||||||
import java.awt.Event;
|
|
||||||
import java.awt.event.ActionEvent;
|
import java.awt.event.ActionEvent;
|
||||||
import java.awt.event.ActionListener;
|
import java.awt.event.ActionListener;
|
||||||
import java.awt.event.FocusEvent;
|
import java.awt.event.FocusEvent;
|
||||||
|
@ -131,7 +130,7 @@ public class SubCurrentLine extends PosSubPanel implements ActionListener, Focus
|
||||||
|
|
||||||
String buttonSize = "w 50!, h 50!,";
|
String buttonSize = "w 50!, h 50!,";
|
||||||
//
|
//
|
||||||
f_bSearch = createButtonAction ("Product", KeyStroke.getKeyStroke(KeyEvent.VK_I, Event.CTRL_MASK));
|
f_bSearch = createButtonAction ("Product", KeyStroke.getKeyStroke(KeyEvent.VK_I, ActionEvent.CTRL_MASK));
|
||||||
f_bSearch.setName("ProductSearch");
|
f_bSearch.setName("ProductSearch");
|
||||||
add (f_bSearch, buttonSize );
|
add (f_bSearch, buttonSize );
|
||||||
|
|
||||||
|
@ -179,7 +178,7 @@ public class SubCurrentLine extends PosSubPanel implements ActionListener, Focus
|
||||||
add (f_down, buttonSize);
|
add (f_down, buttonSize);
|
||||||
|
|
||||||
|
|
||||||
f_delete = createButtonAction("Cancel", KeyStroke.getKeyStroke(KeyEvent.VK_DELETE, Event.SHIFT_MASK));
|
f_delete = createButtonAction("Cancel", KeyStroke.getKeyStroke(KeyEvent.VK_DELETE, ActionEvent.SHIFT_MASK));
|
||||||
add (f_delete, buttonSize);
|
add (f_delete, buttonSize);
|
||||||
|
|
||||||
//
|
//
|
||||||
|
|
|
@ -22,7 +22,6 @@ import java.awt.BorderLayout;
|
||||||
import java.awt.Component;
|
import java.awt.Component;
|
||||||
import java.awt.Cursor;
|
import java.awt.Cursor;
|
||||||
import java.awt.Dimension;
|
import java.awt.Dimension;
|
||||||
import java.awt.Event;
|
|
||||||
import java.awt.GraphicsConfiguration;
|
import java.awt.GraphicsConfiguration;
|
||||||
import java.awt.Point;
|
import java.awt.Point;
|
||||||
import java.awt.Rectangle;
|
import java.awt.Rectangle;
|
||||||
|
@ -522,21 +521,21 @@ public class Viewer extends CFrame
|
||||||
JMenu mFile = AEnv.getMenu("File");
|
JMenu mFile = AEnv.getMenu("File");
|
||||||
menuBar.add(mFile);
|
menuBar.add(mFile);
|
||||||
AEnv.addMenuItem("PrintScreen", null, KeyStroke.getKeyStroke(KeyEvent.VK_PRINTSCREEN, 0), mFile, this);
|
AEnv.addMenuItem("PrintScreen", null, KeyStroke.getKeyStroke(KeyEvent.VK_PRINTSCREEN, 0), mFile, this);
|
||||||
AEnv.addMenuItem("ScreenShot", null, KeyStroke.getKeyStroke(KeyEvent.VK_PRINTSCREEN, Event.SHIFT_MASK), mFile, this);
|
AEnv.addMenuItem("ScreenShot", null, KeyStroke.getKeyStroke(KeyEvent.VK_PRINTSCREEN, ActionEvent.SHIFT_MASK), mFile, this);
|
||||||
AEnv.addMenuItem("Report", null, KeyStroke.getKeyStroke(KeyEvent.VK_P, Event.ALT_MASK), mFile, this);
|
AEnv.addMenuItem("Report", null, KeyStroke.getKeyStroke(KeyEvent.VK_P, ActionEvent.ALT_MASK), mFile, this);
|
||||||
mFile.addSeparator();
|
mFile.addSeparator();
|
||||||
AEnv.addMenuItem("PrintCustomize", "Preference", null, mFile, this);
|
AEnv.addMenuItem("PrintCustomize", "Preference", null, mFile, this);
|
||||||
AEnv.addMenuItem("Translate", null, null, mFile, this);
|
AEnv.addMenuItem("Translate", null, null, mFile, this);
|
||||||
AEnv.addMenuItem("Find", null, KeyStroke.getKeyStroke(KeyEvent.VK_F, Event.CTRL_MASK), mFile, this);
|
AEnv.addMenuItem("Find", null, KeyStroke.getKeyStroke(KeyEvent.VK_F, ActionEvent.CTRL_MASK), mFile, this);
|
||||||
mFile.addSeparator();
|
mFile.addSeparator();
|
||||||
AEnv.addMenuItem("PageSetup", null, null, mFile, this);
|
AEnv.addMenuItem("PageSetup", null, null, mFile, this);
|
||||||
AEnv.addMenuItem("Print", null, KeyStroke.getKeyStroke(KeyEvent.VK_P, Event.CTRL_MASK), mFile, this);
|
AEnv.addMenuItem("Print", null, KeyStroke.getKeyStroke(KeyEvent.VK_P, ActionEvent.CTRL_MASK), mFile, this);
|
||||||
if (m_isCanExport)
|
if (m_isCanExport)
|
||||||
AEnv.addMenuItem("Export", null, null, mFile, this);
|
AEnv.addMenuItem("Export", null, null, mFile, this);
|
||||||
mFile.addSeparator();
|
mFile.addSeparator();
|
||||||
AEnv.addMenuItem("End", null, KeyStroke.getKeyStroke(KeyEvent.VK_X, Event.ALT_MASK), mFile, this);
|
AEnv.addMenuItem("End", null, KeyStroke.getKeyStroke(KeyEvent.VK_X, ActionEvent.ALT_MASK), mFile, this);
|
||||||
AEnv.addMenuItem("Logout", null, KeyStroke.getKeyStroke(KeyEvent.VK_L, Event.SHIFT_MASK+Event.ALT_MASK), mFile, this);
|
AEnv.addMenuItem("Logout", null, KeyStroke.getKeyStroke(KeyEvent.VK_L, ActionEvent.SHIFT_MASK+ActionEvent.ALT_MASK), mFile, this);
|
||||||
AEnv.addMenuItem("Exit", null, KeyStroke.getKeyStroke(KeyEvent.VK_X, Event.SHIFT_MASK+Event.ALT_MASK), mFile, this);
|
AEnv.addMenuItem("Exit", null, KeyStroke.getKeyStroke(KeyEvent.VK_X, ActionEvent.SHIFT_MASK+ActionEvent.ALT_MASK), mFile, this);
|
||||||
|
|
||||||
// View
|
// View
|
||||||
JMenu mView = AEnv.getMenu("View");
|
JMenu mView = AEnv.getMenu("View");
|
||||||
|
@ -544,15 +543,15 @@ public class Viewer extends CFrame
|
||||||
|
|
||||||
if (MRole.getDefault().isAllow_Info_Product())
|
if (MRole.getDefault().isAllow_Info_Product())
|
||||||
{
|
{
|
||||||
AEnv.addMenuItem("InfoProduct", null, KeyStroke.getKeyStroke(KeyEvent.VK_I, Event.ALT_MASK), mView, this);
|
AEnv.addMenuItem("InfoProduct", null, KeyStroke.getKeyStroke(KeyEvent.VK_I, ActionEvent.ALT_MASK), mView, this);
|
||||||
}
|
}
|
||||||
if (MRole.getDefault().isAllow_Info_BPartner())
|
if (MRole.getDefault().isAllow_Info_BPartner())
|
||||||
{
|
{
|
||||||
AEnv.addMenuItem("InfoBPartner", null, KeyStroke.getKeyStroke(KeyEvent.VK_I, Event.ALT_MASK+Event.CTRL_MASK), mView, this);
|
AEnv.addMenuItem("InfoBPartner", null, KeyStroke.getKeyStroke(KeyEvent.VK_I, ActionEvent.ALT_MASK+ActionEvent.CTRL_MASK), mView, this);
|
||||||
}
|
}
|
||||||
if (MRole.getDefault().isShowAcct() && MRole.getDefault().isAllow_Info_Account())
|
if (MRole.getDefault().isShowAcct() && MRole.getDefault().isAllow_Info_Account())
|
||||||
{
|
{
|
||||||
AEnv.addMenuItem("InfoAccount", null, KeyStroke.getKeyStroke(KeyEvent.VK_I, Event.ALT_MASK+Event.CTRL_MASK), mView, this);
|
AEnv.addMenuItem("InfoAccount", null, KeyStroke.getKeyStroke(KeyEvent.VK_I, ActionEvent.ALT_MASK+ActionEvent.CTRL_MASK), mView, this);
|
||||||
}
|
}
|
||||||
if (MRole.getDefault().isAllow_Info_Schedule())
|
if (MRole.getDefault().isAllow_Info_Schedule())
|
||||||
{
|
{
|
||||||
|
@ -601,10 +600,10 @@ public class Viewer extends CFrame
|
||||||
// Go
|
// Go
|
||||||
JMenu mGo = AEnv.getMenu("Go");
|
JMenu mGo = AEnv.getMenu("Go");
|
||||||
menuBar.add(mGo);
|
menuBar.add(mGo);
|
||||||
AEnv.addMenuItem("First", "First", KeyStroke.getKeyStroke(KeyEvent.VK_PAGE_UP, Event.ALT_MASK), mGo, this);
|
AEnv.addMenuItem("First", "First", KeyStroke.getKeyStroke(KeyEvent.VK_PAGE_UP, ActionEvent.ALT_MASK), mGo, this);
|
||||||
AEnv.addMenuItem("PreviousPage", "Previous", KeyStroke.getKeyStroke(KeyEvent.VK_UP, Event.ALT_MASK), mGo, this);
|
AEnv.addMenuItem("PreviousPage", "Previous", KeyStroke.getKeyStroke(KeyEvent.VK_UP, ActionEvent.ALT_MASK), mGo, this);
|
||||||
AEnv.addMenuItem("NextPage", "Next", KeyStroke.getKeyStroke(KeyEvent.VK_DOWN, Event.ALT_MASK), mGo, this);
|
AEnv.addMenuItem("NextPage", "Next", KeyStroke.getKeyStroke(KeyEvent.VK_DOWN, ActionEvent.ALT_MASK), mGo, this);
|
||||||
AEnv.addMenuItem("Last", "Last", KeyStroke.getKeyStroke(KeyEvent.VK_PAGE_DOWN, Event.ALT_MASK), mGo, this);
|
AEnv.addMenuItem("Last", "Last", KeyStroke.getKeyStroke(KeyEvent.VK_PAGE_DOWN, ActionEvent.ALT_MASK), mGo, this);
|
||||||
|
|
||||||
// Tools
|
// Tools
|
||||||
JMenu mTools = AEnv.getMenu("Tools");
|
JMenu mTools = AEnv.getMenu("Tools");
|
||||||
|
|
|
@ -26,7 +26,7 @@
|
||||||
package org.compiere.swing;
|
package org.compiere.swing;
|
||||||
|
|
||||||
import java.awt.Color;
|
import java.awt.Color;
|
||||||
import java.awt.event.InputEvent;
|
import java.awt.event.ActionEvent;
|
||||||
import java.awt.event.KeyEvent;
|
import java.awt.event.KeyEvent;
|
||||||
|
|
||||||
import javax.swing.Action;
|
import javax.swing.Action;
|
||||||
|
@ -331,7 +331,7 @@ public class CButton extends JButton implements CEditor {
|
||||||
JComponent.WHEN_IN_FOCUSED_WINDOW, map);
|
JComponent.WHEN_IN_FOCUSED_WINDOW, map);
|
||||||
}
|
}
|
||||||
map.clear();
|
map.clear();
|
||||||
int mask = InputEvent.ALT_MASK + InputEvent.CTRL_MASK; // Default
|
int mask = ActionEvent.ALT_MASK + ActionEvent.CTRL_MASK; // Default
|
||||||
// Buttons
|
// Buttons
|
||||||
map.put(KeyStroke.getKeyStroke(mnemonic, mask, false), "pressed");
|
map.put(KeyStroke.getKeyStroke(mnemonic, mask, false), "pressed");
|
||||||
map.put(KeyStroke.getKeyStroke(mnemonic, mask, true), "released");
|
map.put(KeyStroke.getKeyStroke(mnemonic, mask, true), "released");
|
||||||
|
|
|
@ -26,7 +26,7 @@
|
||||||
package org.compiere.swing;
|
package org.compiere.swing;
|
||||||
|
|
||||||
import java.awt.Color;
|
import java.awt.Color;
|
||||||
import java.awt.event.InputEvent;
|
import java.awt.event.ActionEvent;
|
||||||
|
|
||||||
import javax.swing.Action;
|
import javax.swing.Action;
|
||||||
import javax.swing.Icon;
|
import javax.swing.Icon;
|
||||||
|
@ -334,10 +334,10 @@ public class CCheckBox extends JCheckBox implements CEditor {
|
||||||
}
|
}
|
||||||
map.clear();
|
map.clear();
|
||||||
String className = this.getClass().getName();
|
String className = this.getClass().getName();
|
||||||
int mask = InputEvent.ALT_MASK; // Default Buttons
|
int mask = ActionEvent.ALT_MASK; // Default Buttons
|
||||||
if (this instanceof JCheckBox // In Tab
|
if (this instanceof JCheckBox // In Tab
|
||||||
|| className.indexOf("VButton") != -1)
|
|| className.indexOf("VButton") != -1)
|
||||||
mask = InputEvent.SHIFT_MASK + InputEvent.CTRL_MASK;
|
mask = ActionEvent.SHIFT_MASK + ActionEvent.CTRL_MASK;
|
||||||
map.put(KeyStroke.getKeyStroke(mnemonic, mask, false), "pressed");
|
map.put(KeyStroke.getKeyStroke(mnemonic, mask, false), "pressed");
|
||||||
map.put(KeyStroke.getKeyStroke(mnemonic, mask, true), "released");
|
map.put(KeyStroke.getKeyStroke(mnemonic, mask, true), "released");
|
||||||
map.put(KeyStroke.getKeyStroke(mnemonic, 0, true), "released");
|
map.put(KeyStroke.getKeyStroke(mnemonic, 0, true), "released");
|
||||||
|
|
|
@ -24,7 +24,6 @@ import java.awt.HeadlessException;
|
||||||
import java.awt.Window;
|
import java.awt.Window;
|
||||||
import java.awt.event.ActionEvent;
|
import java.awt.event.ActionEvent;
|
||||||
import java.awt.event.ActionListener;
|
import java.awt.event.ActionListener;
|
||||||
import java.awt.event.InputEvent;
|
|
||||||
import java.awt.event.KeyEvent;
|
import java.awt.event.KeyEvent;
|
||||||
import java.awt.event.MouseEvent;
|
import java.awt.event.MouseEvent;
|
||||||
import java.awt.event.MouseListener;
|
import java.awt.event.MouseListener;
|
||||||
|
@ -255,7 +254,7 @@ public class CDialog extends JDialog
|
||||||
protected static DialogAction s_dialogAction = new DialogAction(ACTION_DISPOSE);
|
protected static DialogAction s_dialogAction = new DialogAction(ACTION_DISPOSE);
|
||||||
/** ALT-EXCAPE */
|
/** ALT-EXCAPE */
|
||||||
protected static KeyStroke s_disposeKeyStroke =
|
protected static KeyStroke s_disposeKeyStroke =
|
||||||
KeyStroke.getKeyStroke(KeyEvent.VK_PAUSE, InputEvent.ALT_MASK);
|
KeyStroke.getKeyStroke(KeyEvent.VK_PAUSE, ActionEvent.ALT_MASK);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Adempiere Dialog Action
|
* Adempiere Dialog Action
|
||||||
|
|
|
@ -18,7 +18,6 @@ package org.compiere.swing;
|
||||||
|
|
||||||
import java.awt.Color;
|
import java.awt.Color;
|
||||||
import java.awt.Component;
|
import java.awt.Component;
|
||||||
import java.awt.Event;
|
|
||||||
import java.awt.event.ActionEvent;
|
import java.awt.event.ActionEvent;
|
||||||
import java.awt.event.KeyEvent;
|
import java.awt.event.KeyEvent;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
@ -221,10 +220,10 @@ public class CTabbedPane extends JTabbedPane
|
||||||
{
|
{
|
||||||
if (index < 9)
|
if (index < 9)
|
||||||
getInputMap(WHEN_IN_FOCUSED_WINDOW)
|
getInputMap(WHEN_IN_FOCUSED_WINDOW)
|
||||||
.put(KeyStroke.getKeyStroke(KeyEvent.VK_1+index, Event.ALT_MASK), ACTION_SELECT);
|
.put(KeyStroke.getKeyStroke(KeyEvent.VK_1+index, ActionEvent.ALT_MASK), ACTION_SELECT);
|
||||||
else if (index == 9)
|
else if (index == 9)
|
||||||
getInputMap(WHEN_IN_FOCUSED_WINDOW)
|
getInputMap(WHEN_IN_FOCUSED_WINDOW)
|
||||||
.put(KeyStroke.getKeyStroke(KeyEvent.VK_0, Event.ALT_MASK), ACTION_SELECT);
|
.put(KeyStroke.getKeyStroke(KeyEvent.VK_0, ActionEvent.ALT_MASK), ACTION_SELECT);
|
||||||
}
|
}
|
||||||
//
|
//
|
||||||
} // insertTab
|
} // insertTab
|
||||||
|
@ -261,7 +260,7 @@ public class CTabbedPane extends JTabbedPane
|
||||||
char keyCode = m_mnemonic.get(index);
|
char keyCode = m_mnemonic.get(index);
|
||||||
if (keyCode != 0)
|
if (keyCode != 0)
|
||||||
getInputMap(WHEN_IN_FOCUSED_WINDOW)
|
getInputMap(WHEN_IN_FOCUSED_WINDOW)
|
||||||
.remove(KeyStroke.getKeyStroke(keyCode, Event.ALT_MASK));
|
.remove(KeyStroke.getKeyStroke(keyCode, ActionEvent.ALT_MASK));
|
||||||
m_mnemonic.set(index, (char)0);
|
m_mnemonic.set(index, (char)0);
|
||||||
//
|
//
|
||||||
if (!text.startsWith("<html>"))
|
if (!text.startsWith("<html>"))
|
||||||
|
|
Loading…
Reference in New Issue