/** * Get the Value of this field as a double. * @return The value of this field. */ public double getValue() { // Get this field's value Integer longField = (Integer)this.getData(); // Get the physical data if (longField == null) return 0; return (double)longField.intValue(); } /*
/** * Get the Value of this field as a double. * @return The value of this field. */ public double getValue() { // Get this field's value Integer longField = (Integer)this.getData(); // Get the physical data if (longField == null) return 0; return (double)longField.intValue(); } /*
/** * Get the Value of this field as a double. * @return The value of this field. */ public double getValue() { // Get this field's value Integer longField = (Integer)this.getData(); // Get the physical data if (longField == null) return 0; return (double)longField.intValue(); } /*
/** * Write the physical data in this field to a stream file. * @param daOut Output stream to add this field to. * @return boolean Success? */ public boolean write(DataOutputStream daOut, boolean bFixedLength) { try { Integer inData = (Integer)this.getData(); int iData; if (inData == null) iData = NAN; else iData = inData.intValue(); daOut.writeInt(iData); return true; } catch (IOException ex) { ex.printStackTrace(); return false; } } /**
/** * Write the physical data in this field to a stream file. * @param daOut Output stream to add this field to. * @return boolean Success? */ public boolean write(DataOutputStream daOut, boolean bFixedLength) { try { Integer inData = (Integer)this.getData(); int iData; if (inData == null) iData = NAN; else iData = inData.intValue(); daOut.writeInt(iData); return true; } catch (IOException ex) { ex.printStackTrace(); return false; } } /**
/** * Write the physical data in this field to a stream file. * @param daOut Output stream to add this field to. * @return boolean Success? */ public boolean write(DataOutputStream daOut, boolean bFixedLength) { try { Integer inData = (Integer)this.getData(); int iData; if (inData == null) iData = NAN; else iData = inData.intValue(); daOut.writeInt(iData); return true; } catch (IOException ex) { ex.printStackTrace(); return false; } } /**
/** * Compare field to this and return < > or = (-,+,0). * @return The compare value. */ public int compareTo(Field field) { if (field instanceof BaseField) if (!this.isSameType((BaseField)field)) return super.compareTo(field); int long1 = Integer.MIN_VALUE, long2 = Integer.MIN_VALUE; Integer tempLong = (Integer)this.getData(); // Get the physical data if (tempLong != null) long1 = tempLong.intValue(); tempLong = (Integer)field.getData(); // Get the physical data if (tempLong != null) long2 = tempLong.intValue(); if (long1 == long2) return 0; if (long1 < long2) return -1; else return 1; } /**
/** * Compare field to this and return < > or = (-,+,0). * @return The compare value. */ public int compareTo(Field field) { if (field instanceof BaseField) if (!this.isSameType((BaseField)field)) return super.compareTo(field); int long1 = Integer.MIN_VALUE, long2 = Integer.MIN_VALUE; Integer tempLong = (Integer)this.getData(); // Get the physical data if (tempLong != null) long1 = tempLong.intValue(); tempLong = (Integer)field.getData(); // Get the physical data if (tempLong != null) long2 = tempLong.intValue(); if (long1 == long2) return 0; if (long1 < long2) return -1; else return 1; } /**
/** * Compare field to this and return < > or = (-,+,0). * @return The compare value. */ public int compareTo(Field field) { if (field instanceof BaseField) if (!this.isSameType((BaseField)field)) return super.compareTo(field); int long1 = Integer.MIN_VALUE, long2 = Integer.MIN_VALUE; Integer tempLong = (Integer)this.getData(); // Get the physical data if (tempLong != null) long1 = tempLong.intValue(); tempLong = (Integer)field.getData(); // Get the physical data if (tempLong != null) long2 = tempLong.intValue(); if (long1 == long2) return 0; if (long1 < long2) return -1; else return 1; } /**
/** * 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; } /**
/** * 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; } /**