use of java.awt.Container in project adempiere by adempiere.
the class Viewer method launchProcessPara.
// cmd_find
/**
* FR [ 295 ]
* Launch Parameters for re-query
* @return isOk
*/
private boolean launchProcessPara() {
if (m_reportEngine.getProcessInfo() == null)
return false;
// Create new Instance
ProcessInfo pi = new ProcessInfo(m_reportEngine.getProcessInfo().getTitle(), m_reportEngine.getProcessInfo().getAD_Process_ID(), m_reportEngine.getProcessInfo().getTable_ID(), m_reportEngine.getProcessInfo().getRecord_ID());
// Launch dialog
ProcessModalDialog para = new ProcessModalDialog(Env.getFrame((Container) this), m_WindowNo, pi);
if (para.isValidDialog()) {
para.validate();
para.pack();
AEnv.showCenterWindow(Env.getWindow(m_WindowNo), para);
if (para.isOK()) {
// execute
ProcessCtl worker = new ProcessCtl(null, m_WindowNo, pi, true, null);
//synchrous
worker.run();
//
ReportEngine re = ReportEngine.get(Env.getCtx(), pi);
//
m_reportEngine.setQuery(re.getQuery());
//
return true;
}
}
// Default
return false;
}
use of java.awt.Container in project adempiere by adempiere.
the class POSTable method growScrollbars.
/**
*
* @return void
*/
public void growScrollbars() {
// fatter scroll bars
Container p = getParent();
if (p instanceof JViewport) {
Container gp = p.getParent();
if (gp instanceof JScrollPane) {
JScrollPane scrollPane = (JScrollPane) gp;
scrollPane.getVerticalScrollBar().setPreferredSize(new Dimension(SCROLLBAR_WIDTH, SCROLLBAR_HEIGHT));
scrollPane.getHorizontalScrollBar().setPreferredSize(new Dimension(SCROLLBAR_WIDTH, SCROLLBAR_HEIGHT));
}
}
}
use of java.awt.Container in project adempiere by adempiere.
the class CompiereUtils method printParents.
/**
* Print Oarent of Component
* @param c component
*/
static void printParents(JComponent c) {
if (c.getName() == null)
c.setName("C" + String.valueOf(s_no++));
System.out.print(c.getName());
System.out.print(" - " + c.getClass().getName());
System.out.println(" ** " + c.isOpaque() + " bg=" + (c.getClientProperty(CompiereLookAndFeel.BACKGROUND) != null));
//
Container container = c.getParent();
while (container != null) {
System.out.print(" - " + container.getName() + " " + container.getClass().getName() + " ** " + container.isOpaque());
if (container instanceof JComponent)
System.out.print(" bg=" + (((JComponent) container).getClientProperty(CompiereLookAndFeel.BACKGROUND) != null));
System.out.println();
container = container.getParent();
}
}
use of java.awt.Container in project adempiere by adempiere.
the class CDialog method dialogInit.
/**
* Initialize.
* Install ALT-Pause
*/
protected void dialogInit() {
super.dialogInit();
setDefaultCloseOperation(JDialog.DISPOSE_ON_CLOSE);
// remove Mn
setTitle(getTitle());
//
Container c = getContentPane();
if (c instanceof JPanel) {
JPanel panel = (JPanel) c;
panel.getActionMap().put(ACTION_DISPOSE, s_dialogAction);
panel.getInputMap(JPanel.WHEN_IN_FOCUSED_WINDOW).put(s_disposeKeyStroke, ACTION_DISPOSE);
}
}
use of java.awt.Container in project adempiere by adempiere.
the class CFrame method frameInit.
/**
* Frame Init.
* Install ALT-Pause
*/
protected void frameInit() {
super.frameInit();
setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);
//
Container c = getContentPane();
if (c instanceof JPanel) {
JPanel panel = (JPanel) c;
panel.getActionMap().put(CDialog.ACTION_DISPOSE, CDialog.s_dialogAction);
panel.getInputMap(JPanel.WHEN_IN_FOCUSED_WINDOW).put(CDialog.s_disposeKeyStroke, CDialog.ACTION_DISPOSE);
}
}
Aggregations