/** * Pop this command off the history stack. * NOTE: Do not use this method in most cases, use the method in BaseApplet. * @return The history command on top of the stack. */ public String popHistory(int quanityToPop, boolean bPopFromBrowser) { String strHistory = null; for (int i = 0; i < quanityToPop; i++) { strHistory = null; if (m_vHistory != null) if (m_vHistory.size() > 0) strHistory = (String)m_vHistory.remove(m_vHistory.size() - 1); } if (bPopFromBrowser) if (this.getAppletScreen() != null) if (this.getAppletScreen().getTask() instanceof BaseAppletReference) ((BaseAppletReference)this.getAppletScreen().getTask()).popBrowserHistory(quanityToPop, strHistory != null, this.getTitle()); // Let browser know about the new screen return strHistory; } /**
/** * Push this command onto the history stack. * @param strHistory The history command to push onto the stack. */ public void pushHistory(String strHistory, boolean bPushToBrowser) { if (m_vHistory == null) m_vHistory = new Vector<String>(); m_vHistory.addElement(strHistory); String strHelp = Utility.fixDisplayURL(strHistory, true, true, true, this); if (this.getAppletScreen() != null) if (this.getAppletScreen().getScreenFieldView() != null) this.getAppletScreen().getScreenFieldView().showDocument(strHelp, MenuConstants.HELP_WINDOW_CHANGE); if (bPushToBrowser) if (this.getAppletScreen() != null) if (this.getAppletScreen().getTask() instanceof BaseAppletReference) ((BaseAppletReference)this.getAppletScreen().getTask()).pushBrowserHistory(strHistory, this.getTitle(), bPushToBrowser); // Let browser know about the new screen } /**
/** * Get the top applet screen. * @return The applet screen. */ public AppletScreen getAppletScreen() { // The root window is the ChildScreen if (this.getParentScreen() != null) return getParentScreen().getAppletScreen(); else return null; // This is the top level screen! } /**
/** * Get the top applet screen. * @return The applet screen. */ public AppletScreen getAppletScreen() { // The root window is the ChildScreen if (this.getParentScreen() != null) return getParentScreen().getAppletScreen(); else return null; // This is the top level screen! } /**
/** * Push this command onto the history stack. * @param strHistory The history command to push onto the stack. */ public void pushHistory(String strHistory, boolean bPushToBrowser) { if (m_vHistory == null) m_vHistory = new Vector<String>(); m_vHistory.addElement(strHistory); String strHelp = Utility.fixDisplayURL(strHistory, true, true, true, this); if (this.getAppletScreen() != null) if (this.getAppletScreen().getScreenFieldView() != null) this.getAppletScreen().getScreenFieldView().showDocument(strHelp, MenuConstants.HELP_WINDOW_CHANGE); if (bPushToBrowser) if (this.getAppletScreen() != null) if (this.getAppletScreen().getTask() instanceof BaseApplet) if (((BaseApplet)this.getAppletScreen().getTask()).getBrowserManager() != null) // Let browser know about the new screen ((BaseApplet)this.getAppletScreen().getTask()).getBrowserManager().pushBrowserHistory(strHistory, this.getTitle()); // Let browser know about the new screen } /**
/** * Pop this command off the history stack. * NOTE: Do not use this method in most cases, use the method in BaseApplet. * @return The history command on top of the stack. */ public String popHistory(int quanityToPop, boolean bPushToBrowser) { String strHistory = null; for (int i = 0; i < quanityToPop; i++) { strHistory = null; if (m_vHistory != null) if (m_vHistory.size() > 0) strHistory = (String)m_vHistory.remove(m_vHistory.size() - 1); } if (bPushToBrowser) if (this.getAppletScreen() != null) if (this.getAppletScreen().getTask() instanceof BaseApplet) if (((BaseApplet)this.getAppletScreen().getTask()).getBrowserManager() != null) // Let browser know about the new screen ((BaseApplet)this.getAppletScreen().getTask()).getBrowserManager().popBrowserHistory(quanityToPop, strHistory != null, this.getTitle()); // Let browser know about the new screen return strHistory; } /**
/** * Process the "Help" toolbar command. * @param bUseSameWindow Use the same window? * @retrun true if successful. */ public boolean onHelp(int iOptions) { String strPrevAction = this.getScreenURL(); if ((strPrevAction == null) || (strPrevAction.length() == 0)) return false; // Can't handle help if I'm not the target screen. // Note: The following is a hack to make the demo screen stop displaying after the first help is pressed if (this.getProperty("displayInitialHelp") != null) if ((this.getProperty("helplanguage") != null) && (this.getProperty("helplanguage").length() > 0)) if (this.getTask() != null) if (this.getTask().getApplication() != null) this.getTask().getApplication().setProperty("helplanguage", this.getTask().getApplication().getLanguage(true)); strPrevAction = Utility.fixDisplayURL(strPrevAction, true, true, true, this); BaseApplet applet = null; if (this.getAppletScreen() != null) if (this.getAppletScreen().getScreenFieldView() != null) applet = (BaseApplet)this.getAppletScreen().getScreenFieldView().getControl(); if (applet != null) iOptions = applet.getHelpPageOptions(iOptions); if ((MenuConstants.HELP_WEB_OPTION & iOptions) == MenuConstants.HELP_WEB_OPTION) return this.getScreenFieldView().showDocument(strPrevAction, iOptions & 1); // Not standalone else return this.getAppletScreen().showHelpScreen(strPrevAction, iOptions); } /**
/** * Process the "Help" toolbar command. * @param bUseSameWindow Use the same window? * @retrun true if successful. */ public boolean onHelp(int iOptions) { String strPrevAction = this.getScreenURL(); if ((strPrevAction == null) || (strPrevAction.length() == 0)) return false; // Can't handle help if I'm not the target screen. // Note: The following is a hack to make the demo screen stop displaying after the first help is pressed if (this.getProperty("displayInitialHelp") != null) if ((this.getProperty("helplanguage") != null) && (this.getProperty("helplanguage").length() > 0)) if (this.getTask() != null) if (this.getTask().getApplication() != null) this.getTask().getApplication().setProperty("helplanguage", this.getTask().getApplication().getLanguage(true)); strPrevAction = Utility.fixDisplayURL(strPrevAction, true, true, true, this); BaseAppletReference applet = null; if (this.getAppletScreen() != null) if (this.getAppletScreen().getScreenFieldView() != null) applet = (BaseAppletReference)this.getAppletScreen().getScreenFieldView().getControl(); if (applet != null) iOptions = applet.getHelpPageOptions(iOptions); if ((MenuConstants.HELP_WEB_OPTION & iOptions) == MenuConstants.HELP_WEB_OPTION) return this.getScreenFieldView().showDocument(strPrevAction, iOptions & 1); // Not standalone else return this.getAppletScreen().showHelpScreen(strPrevAction, iOptions); } /**
public Object doGetData() { Object data = super.doGetData(); if ((data == null) || (DBConstants.BLANK.equals(data))) { if (NONE_BUTTON == null) { String NONE = "None"; if (getRecord().getRecordOwner() instanceof BaseScreen) if (((BaseScreen)getRecord().getRecordOwner()).getParentScreen() != null) if (((BaseScreen)getRecord().getRecordOwner()).getParentScreen().getAppletScreen() != null) NONE_BUTTON = ((BaseApplet)((BaseScreen)getRecord().getRecordOwner()).getParentScreen().getAppletScreen().getScreenFieldView().getControl()).loadImageIcon(NONE, null); } return NONE_BUTTON; } return data; } };
ScreenComponent blink = createScreenComponent(ScreenModel.BLINK_IMAGE, itsLocation, targetScreen, converter, iDisplayFieldDesc, properties); blink.setRequestFocusEnabled(false); // By default, make user click with mouse if (((BasePanel)targetScreen).getAppletScreen() != null) if (((BasePanel)targetScreen).getAppletScreen().getTask() instanceof org.jbundle.thin.base.screen.BaseApplet) org.jbundle.thin.base.screen.BaseApplet applet = (org.jbundle.thin.base.screen.BaseApplet)((BasePanel)targetScreen).getAppletScreen().getTask(); String strProductType = this.getProductType(); ((ExtendedComponent)blink).addIcon(applet.loadImageIcon(BookingConstants.BUTTON_LOCATION + strProductType, strProductType), 0);
public Object doGetData() { Object data = super.doGetData(); if ((data == null) || (DBConstants.BLANK.equals(data))) { if (NONE_BUTTON == null) { String NONE = "None"; if (getRecord().getRecordOwner() instanceof BaseScreen) if (((BaseScreen)getRecord().getRecordOwner()).getParentScreen() != null) if (((BaseScreen)getRecord().getRecordOwner()).getParentScreen().getAppletScreen() != null) NONE_BUTTON = ((BaseApplet)((BaseScreen)getRecord().getRecordOwner()).getParentScreen().getAppletScreen().getScreenFieldView().getControl()).loadImageIcon(NONE, null); } return NONE_BUTTON; } return data; } };
/** * When they ask for data, make sure the main icon is correct (for grid usage). */ public Object getData() { Object data = super.getData(); String strProductType = this.getProductType(); if (this.getComponent(0) instanceof org.jbundle.base.screen.model.opt.SBlinkImageView) { // Always org.jbundle.base.screen.model.opt.SBlinkImageView blink = (org.jbundle.base.screen.model.opt.SBlinkImageView)this.getComponent(0); BasePanel targetScreen = blink.getParentScreen(); if (targetScreen != null) if (targetScreen.getAppletScreen() != null) { org.jbundle.thin.base.screen.BaseApplet applet = (org.jbundle.thin.base.screen.BaseApplet)targetScreen.getAppletScreen().getTask(); if ((blink.getImageIcon(IntegerField.ZERO) == null) || (!strProductType.equalsIgnoreCase(blink.getImageIcon(IntegerField.ZERO).toString()))) { blink.addIcon(applet.loadImageIcon(BookingConstants.BUTTON_LOCATION + strProductType, strProductType), 0); } BookingDetailModel recCustSaleDetail = (BookingDetailModel)((BaseField)this.getField()).getRecord(); if (recCustSaleDetail.getField(BookingDetailModel.PRODUCT_STATUS_ID).getValue() == ProductStatus.CANCELED) blink.addIcon(applet.loadImageIcon(ThinMenuConstants.CANCEL, ThinMenuConstants.CANCEL), 0); } } return data; } /**
ScreenComponent blink = createScreenComponent(ScreenModel.BLINK_IMAGE, itsLocation, targetScreen, converter, iDisplayFieldDesc, properties); blink.setRequestFocusEnabled(false); // By default, make user click with mouse if (((BasePanel)targetScreen).getAppletScreen() != null) if (((BasePanel)targetScreen).getAppletScreen().getTask() instanceof org.jbundle.thin.base.screen.BaseApplet) org.jbundle.thin.base.screen.BaseApplet applet = (org.jbundle.thin.base.screen.BaseApplet)((BasePanel)targetScreen).getAppletScreen().getTask(); String strProductType = this.getProductType(); ((ExtendedComponent)blink).addIcon(applet.loadImageIcon(BookingConstants.BUTTON_LOCATION + strProductType, strProductType), 0);
/** * When they ask for data, make sure the main icon is correct (for grid usage). */ public Object getData() { Object data = super.getData(); String strProductType = this.getProductType(); if (this.getComponent(0) instanceof org.jbundle.base.screen.model.opt.SBlinkImageView) { // Always org.jbundle.base.screen.model.opt.SBlinkImageView blink = (org.jbundle.base.screen.model.opt.SBlinkImageView)this.getComponent(0); BasePanel targetScreen = blink.getParentScreen(); if (targetScreen != null) if (targetScreen.getAppletScreen() != null) { org.jbundle.thin.base.screen.BaseApplet applet = (org.jbundle.thin.base.screen.BaseApplet)targetScreen.getAppletScreen().getTask(); if ((blink.getImageIcon(IntegerField.ZERO) == null) || (!strProductType.equalsIgnoreCase(blink.getImageIcon(IntegerField.ZERO).toString()))) { blink.addIcon(applet.loadImageIcon(BookingConstants.BUTTON_LOCATION + strProductType, strProductType), 0); } BookingDetailModel recCustSaleDetail = (BookingDetailModel)((BaseField)this.getField()).getRecord(); if (recCustSaleDetail.getField(BookingDetailModel.PRODUCT_STATUS_ID).getValue() == ProductStatus.CANCELED) blink.addIcon(applet.loadImageIcon(ThinMenuConstants.CANCEL, ThinMenuConstants.CANCEL), 0); } } return data; } /**