use of org.compiere.apps.AppsAction in project adempiere by adempiere.
the class VCreateFromDialog method jbInit.
protected void jbInit() throws Exception {
getContentPane().add(parameterPanel, BorderLayout.NORTH);
JScrollPane dataPane = new JScrollPane();
getContentPane().add(dataPane, BorderLayout.CENTER);
dataPane.getViewport().add(dataTable, null);
AppsAction selectAllAction = new AppsAction(SELECT_ALL, KeyStroke.getKeyStroke(KeyEvent.VK_A, java.awt.event.InputEvent.ALT_MASK), null);
CButton selectAllButton = (CButton) selectAllAction.getButton();
selectAllButton.setMargin(new Insets(0, 10, 0, 10));
selectAllButton.setDefaultCapable(true);
selectAllButton.addActionListener(this);
confirmPanel.addButton(selectAllButton);
CPanel southPanel = new CPanel();
getContentPane().add(southPanel, BorderLayout.SOUTH);
BorderLayout southLayout = new BorderLayout();
southPanel.setLayout(southLayout);
southPanel.add(confirmPanel, BorderLayout.CENTER);
southPanel.add(statusBar, BorderLayout.SOUTH);
dataTable.setMultiSelection(true);
}
use of org.compiere.apps.AppsAction in project adempiere by adempiere.
the class POSSubPanel method createButtonAction.
// dispose
/**
* Create Action Button
* @param action action
* @return button
*/
protected CButton createButtonAction(String action, KeyStroke accelerator) {
String acceleratorText = "";
if (action != null && accelerator != null) {
if (accelerator != null) {
int modifiers = accelerator.getModifiers();
if (modifiers >= 0) {
acceleratorText = "(" + KeyEvent.getKeyModifiersText(modifiers);
//acceleratorText += "+";
}
acceleratorText += KeyEvent.getKeyText(accelerator.getKeyCode());
}
posPanel.addStatusBarInfo(action + acceleratorText + ")");
}
//AppsAction(action, accelerator, false);
AppsAction act = new AppsAction(action, accelerator, acceleratorText, false);
act.setDelegate(this);
CButton button = (CButton) act.getButton();
button.setPreferredSize(new Dimension(WIDTH, HEIGHT));
button.setMinimumSize(new Dimension(WIDTH, HEIGHT));
button.setMaximumSize(new Dimension(WIDTH, HEIGHT));
return button;
}
use of org.compiere.apps.AppsAction in project adempiere by adempiere.
the class VBrowser method setupToolBar.
//cmd_deleteSelection
/**
* Instance tool bar
*/
private void setupToolBar() {
bOk = ConfirmPanel.createOKButton(false);
bOk.addActionListener(this);
bSearch = ConfirmPanel.createRefreshButton(true);
bSearch.addActionListener(this);
bCancel = ConfirmPanel.createCancelButton(false);
bCancel.addActionListener(this);
bZoom = ConfirmPanel.createZoomButton(true);
bZoom.addActionListener(this);
bExport = ConfirmPanel.createExportButton(true);
bExport.addActionListener(this);
bDelete = ConfirmPanel.createDeleteButton(true);
bDelete.addActionListener(this);
AppsAction selectAllAction = new AppsAction("SelectAll", null, Msg.getMsg(Env.getCtx(), "SelectAll"));
selectAllAction.setDelegate(this);
bSelectAll = (CButton) selectAllAction.getButton();
toolsBar = new javax.swing.JToolBar();
}
use of org.compiere.apps.AppsAction in project adempiere by adempiere.
the class VCreateFromPanel method jbInit.
/**
* Create UI
*/
protected void jbInit() {
// Set Layout
setLayout(new BorderLayout());
// Add Parameter
JScrollPane dataPane = new JScrollPane();
dataPane.getViewport().add(dataTable, null);
AppsAction selectAllAction = new AppsAction(SELECT_ALL, KeyStroke.getKeyStroke(KeyEvent.VK_A, java.awt.event.InputEvent.ALT_MASK), null);
CButton selectAllButton = (CButton) selectAllAction.getButton();
selectAllButton.setMargin(new Insets(0, 10, 0, 10));
selectAllButton.setDefaultCapable(true);
selectAllButton.addActionListener(this);
confirmPanel.addButton(selectAllButton);
CPanel southPanel = new CPanel();
BorderLayout southLayout = new BorderLayout();
southPanel.setLayout(southLayout);
southPanel.add(confirmPanel, BorderLayout.CENTER);
southPanel.add(statusBar, BorderLayout.SOUTH);
dataTable.setMultiSelection(true);
// Add to Main
add(parameterPanel, BorderLayout.NORTH);
add(dataPane, BorderLayout.CENTER);
add(southPanel, BorderLayout.SOUTH);
}
use of org.compiere.apps.AppsAction in project adempiere by adempiere.
the class POSQuery method createButtonAction.
/**
* Create Action Button
* @param action action
* @return button
*/
protected CButton createButtonAction(String action, KeyStroke accelerator) {
String acceleratorText = "";
if (action != null && accelerator != null) {
int modifiers = accelerator.getModifiers();
if (modifiers >= 0) {
acceleratorText = "(" + KeyEvent.getKeyModifiersText(modifiers);
//acceleratorText += "+";
}
acceleratorText += KeyEvent.getKeyText(accelerator.getKeyCode());
addStatusBarInfo(action + acceleratorText + ")");
}
AppsAction act = new AppsAction(action, accelerator, false);
act.setDelegate(this);
CButton button = (CButton) act.getButton();
button.setPreferredSize(new Dimension(BUTTON_WIDTH, BUTTON_HEIGHT));
button.setMinimumSize(getPreferredSize());
button.setMaximumSize(getPreferredSize());
button.setFocusable(false);
return button;
}
Aggregations