Class LineDisplay

All Implemented Interfaces:
JposBaseInterface, LineDisplayInterface

public class LineDisplay extends LineDisplayProperties
Class implementing the LineDisplayInterface for the sample combi device.
  • Constructor Details

    • LineDisplay

      public LineDisplay(Device dev)
      Constructor. Gets instance of Device to be used as communication object. Device index for sample is always 0.
      Parameters:
      dev - Instance of Device this object belongs to.
  • Method Details

    • deviceEnabled

      public void deviceEnabled(boolean enable) throws jpos.JposException
      Description copied from interface: JposBaseInterface
      Final part of setting DeviceEnabled. Can be overwritten within derived classes. Performs initOnEnable method of corresponding property set in addition to setting DeviceEnabled. This method will be called only if the following plausibility checks lead to a positive result:
      • Device has not been closed,
      • ExclusiveUse equals ExclusiveYes: Device is claimed,
      • DeviceEnabled != enabled.
      Specified by:
      deviceEnabled in interface JposBaseInterface
      Overrides:
      deviceEnabled in class JposCommonProperties
      Parameters:
      enable - True to enable, false to disable
      Throws:
      jpos.JposException - If an error occurs during enable or disable
    • claim

      public void claim(int timeout) throws jpos.JposException
      Description copied from interface: JposBaseInterface
      Final part of setting claim. Can be overwritten within derived classes. This method will be called only if the following plausibility checks lead to a positive result:
      • Device has not been closed,
      • The device is not claimed,
      • ExclusiveUse dos not equal ExclusiveNo,
      • timeout is negative not equal to FOREVER.
      Specified by:
      claim in interface JposBaseInterface
      Overrides:
      claim in class JposCommonProperties
      Parameters:
      timeout - see UPOS specification, method Claim
      Throws:
      jpos.JposException - If an error occurs while claiming the device
    • release

      public void release() throws jpos.JposException
      Description copied from interface: JposBaseInterface
      Final part of release method. Can be overwritten in derived class, if necessary. This method will be called only if the following plausibility checks lead to a positive result:
      • Device is claimed,
      • ExclusiveUse equals ExclusiveYes: Device is not enabled.
      Specified by:
      release in interface JposBaseInterface
      Overrides:
      release in class JposCommonProperties
      Throws:
      jpos.JposException - See UPOS specification, method Release
    • checkHealth

      public void checkHealth(int level) throws jpos.JposException
      Description copied from interface: JposBaseInterface
      Final part of CheckHealth method. Can be overwritten in derived class, if necessary. Keep in mind that dvice class specific checks (e.g. check of Claimed or DeviceEnabled) must be done within derived classes. This method will be called only if the following plausibility checks lead to a positive result:
      • Device is neither enabled nor claimed.
      Specified by:
      checkHealth in interface JposBaseInterface
      Overrides:
      checkHealth in class JposCommonProperties
      Parameters:
      level - See UPOS specification, method CheckHealth
      Throws:
      jpos.JposException - See UPOS specification, method CheckHealth
    • clearText

      public void clearText() throws jpos.JposException
      Description copied from interface: LineDisplayInterface
      Final part of ClearText method. Can be overwritten in derived class, if necessary. This method will be called only if the following plausibility checks lead to a positive result:
      • Device is enabled,
      • MarqueeType is DISP_MT_NONE or DISP_MT_INIT.
      Specified by:
      clearText in interface LineDisplayInterface
      Overrides:
      clearText in class LineDisplayProperties
      Throws:
      jpos.JposException - If an error occurs.
    • characterSet

      public void characterSet(int charset) throws jpos.JposException
      Description copied from interface: LineDisplayInterface
      Final part of setting CharacterSet. Can be overwritten within derived classes, if necessary. This method will be called only if the following plausibility checks lead to a positive result:
      • Device has not been closed,
      • The new value is one of the values specified in CharacterSetList,
      • internal property AllowAlwaysSetProperties is true or charset equals the previous value of CharacterSet.
      Specified by:
      characterSet in interface LineDisplayInterface
      Overrides:
      characterSet in class LineDisplayProperties
      Parameters:
      charset - New CharacterSet value
      Throws:
      jpos.JposException - If an error occurs during enable or disable
    • deviceBrightness

      public void deviceBrightness(int b) throws jpos.JposException
      Description copied from interface: LineDisplayInterface
      Final part of setting DeviceBrightness. Can be overwritten within derived classes, if necessary. This method will be called only if the following plausibility checks lead to a positive result:
      • Device has not been closed,
      • The new value is ≥ 0 and ≤ 100,
      • internal property AllowAlwaysSetProperties is true or brightness equals the previous value of DeviceBrightness.
      Specified by:
      deviceBrightness in interface LineDisplayInterface
      Overrides:
      deviceBrightness in class LineDisplayProperties
      Parameters:
      b - New DeviceBrightness value
      Throws:
      jpos.JposException - If an error occurs during enable or disable
    • scrollText

      public void scrollText(int direction, int units) throws jpos.JposException
      Description copied from interface: LineDisplayInterface
      Final part of ScrollText method. Can be overwritten in derived class, if necessary. This method will be called only if the following plausibility checks lead to a positive result:
      • Device is enabled,
      • MarqueeType equals DISP_MT_NONE,
      • InterCharacterWait equals 0,
      • direction is DISP_ST_UP, DISP_ST_DOWN, DISP_ST_LEFT or DISP_ST_RIGHT.
      • units ≥ 0,
      Specified by:
      scrollText in interface LineDisplayInterface
      Overrides:
      scrollText in class LineDisplayProperties
      Parameters:
      direction - Scrolling direction.
      units - Number of columns or rows to scroll.
      Throws:
      jpos.JposException - If an error occurs.
    • displayText

      public DisplayText displayText(String text, int attribute) throws jpos.JposException
      Description copied from interface: LineDisplayInterface
      Validation part of DisplayText method. Can be overwritten in derived class, if necessary. This method will be called only if the following plausibility checks lead to a positive result:
      • Device is enabled,
      • data is not null,
      • MarqueeType equals DISP_MT_NONE or DISP_MT_INIT.
      In addition to validation, this method must update CursorRow and CursorColumn on success if InterCharacterWait is not zero and MarqueeType is MT_NONE (teletype mode).
      Specified by:
      displayText in interface LineDisplayInterface
      Overrides:
      displayText in class LineDisplayProperties
      Parameters:
      text - Display data.
      attribute - Display attributes.
      Returns:
      DisplayText object for use in final part.
      Throws:
      jpos.JposException - If an error occurs.
    • interCharacterWait

      public void interCharacterWait(int b) throws jpos.JposException
      Description copied from interface: LineDisplayInterface
      Final part of setting InterCharacterWait. Can be overwritten within derived classes, if necessary. This method will be called only if the following plausibility checks lead to a positive result:
      • Device has not been closed,
      • CapICharWait is false: The new value is 0,
      • CapICharWait is true: The new value is ≥ 0,
      • internal property AllowAlwaysSetProperties is true or millisec equals the previous value of InterCharacterWait.
      Specified by:
      interCharacterWait in interface LineDisplayInterface
      Overrides:
      interCharacterWait in class LineDisplayProperties
      Parameters:
      b - New InterCharacterWait value
      Throws:
      jpos.JposException - If an error occurs during enable or disable
    • displayText

      public void displayText(DisplayText request) throws jpos.JposException
      Description copied from interface: LineDisplayInterface
      Final part of displayText method. Can be overwritten within derived classes, if necessary. The parameters of the method will be passed via a DisplayText object. This method will be called when the corresponding operation shall be performed, either synchronously or asynchronously (if InterCharacterWait is > 0). All plausibility checks have been made before, only runtime errors can occur.
      Specified by:
      displayText in interface LineDisplayInterface
      Overrides:
      displayText in class LineDisplayProperties
      Parameters:
      request - Output request object returned by validation method that contains all parameters to be used by DisplayText.
      Throws:
      jpos.JposException - If an error occurs.
    • refreshWindow

      public void refreshWindow(int index) throws jpos.JposException
      Description copied from interface: LineDisplayInterface
      Final part of RefreshWindow method. Can be overwritten in derived class, if necessary. This method will be called only if the following plausibility checks lead to a positive result:
      • Device is enabled,
      • MarqueeType equals DISP_MT_NONE or DISP_MT_INIT,
      • window is between 0 and DeviceWindows.
      Specified by:
      refreshWindow in interface LineDisplayInterface
      Overrides:
      refreshWindow in class LineDisplayProperties
      Parameters:
      index - The window to be refreshed.
      Throws:
      jpos.JposException - If an error occurs.