Class LnThrottleStringIO

    • Method Detail

      • sendStringToLayout

        protected void sendStringToLayout​(java.lang.String value)
                                   throws JmriException
        Sends the string to the layout. The string [u]must not[/u] be longer than the value of getMaximumLength() unless that value is zero. Some microcomputers have little memory and it's very important that this method is never called with too long strings.
        Specified by:
        sendStringToLayout in class AbstractStringIO
        Parameters:
        value - the desired string value
        Throws:
        JmriException - general error when setting the value fails
      • getMaximumLength

        public int getMaximumLength()
        Get the maximum length of string that this StringIO can handle.
        Returns:
        the maximum length or 0 if arbitrary lengths are accepted.
      • cutLongStrings

        protected boolean cutLongStrings()
        Cut long strings instead of throwing an exception? For example, if the StringIO is a display, it could be desired to accept too long strings. On the other hand, if the StringIO is used to send a command, a too long string is an error.
        Specified by:
        cutLongStrings in class AbstractStringIO
        Returns:
        true if long strings should be cut