Search in sources :

Example 1 with AMenuStartItem

use of org.compiere.apps.AMenuStartItem in project adempiere by adempiere.

the class WFPanel method start.

//	actionPerformed
/**************************************************************************
	 * 	Start Node
	 * 	@param node node
	 */
public void start(WFNode node) {
    log.fine("Node=" + node);
    MWFNode model = node.getModel();
    //	Info Text
    StringBuffer msg = new StringBuffer("<HTML>");
    msg.append("<H2>").append(model.getName(true)).append("</H2>");
    String s = model.getDescription(true);
    if (s != null && s.length() > 0)
        msg.append("<B>").append(s).append("</B>");
    s = model.getHelp(true);
    if (s != null && s.length() > 0)
        msg.append("<BR>").append(s);
    msg.append("</HTML>");
    infoTextPane.setText(msg.toString());
    infoTextPane.setCaretPosition(0);
    //	Load Window
    if (m_menu != null)
        //	async load
        (new AMenuStartItem(model.getAD_WF_Node_ID(), false, model.getName(true), m_menu)).start();
    //
    m_activeNode = node;
    //
    int AD_Client_ID = Env.getAD_Client_ID(Env.getCtx());
    boolean first = m_wf.isFirst(m_activeNode.getAD_WF_Node_ID(), AD_Client_ID);
    boolean last = m_wf.isLast(m_activeNode.getAD_WF_Node_ID(), AD_Client_ID);
    wfStart.setEnabled(!first);
    wfBack.setEnabled(!first);
    wfNext.setEnabled(!last);
    wfEnd.setEnabled(!last);
}
Also used : AMenuStartItem(org.compiere.apps.AMenuStartItem) MWFNode(org.compiere.wf.MWFNode) Point(java.awt.Point)

Aggregations

Point (java.awt.Point)1 AMenuStartItem (org.compiere.apps.AMenuStartItem)1 MWFNode (org.compiere.wf.MWFNode)1