Package jmri.implementation
Class DefaultStringIO
- java.lang.Object
- 
- jmri.implementation.AbstractNamedBean
- 
- jmri.implementation.AbstractStringIO
- 
- jmri.implementation.DefaultStringIO
 
 
 
- 
- All Implemented Interfaces:
- java.lang.Comparable<NamedBean>,- PropertyChangeProvider,- NamedBean,- StringIO
 
 public class DefaultStringIO extends AbstractStringIO Base implementation of the StringIO interface.
- 
- 
Nested Class Summary- 
Nested classes/interfaces inherited from interface jmri.NamedBeanNamedBean.BadNameException, NamedBean.BadSystemNameException, NamedBean.BadUserNameException, NamedBean.DisplayOptions, NamedBean.DuplicateSystemNameException
 
- 
 - 
Field Summary- 
Fields inherited from class jmri.implementation.AbstractNamedBeanlistenerRefs, mSystemName, register
 - 
Fields inherited from interface jmri.NamedBeanDISPLAY_NAME_FORMAT, INCONSISTENT, PROPERTY_COMMENT, PROPERTY_ENABLED, PROPERTY_KNOWN_STATE, PROPERTY_STATE, PROPERTY_USERNAME, QUOTED_NAME_FORMAT, UNKNOWN
 
- 
 - 
Constructor SummaryConstructors Constructor Description DefaultStringIO(java.lang.String systemName)DefaultStringIO(java.lang.String systemName, java.lang.String userName)
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description protected booleancutLongStrings()Cut long strings instead of throwing an exception?protected voidsendStringToLayout(java.lang.String value)Sends the string to the layout.- 
Methods inherited from class jmri.implementation.AbstractStringIOcompareSystemNameSuffix, getBeanType, getCommandedStringValue, getKnownStringValue, getState, setCommandedStringValue, setState, setString
 - 
Methods inherited from class jmri.implementation.AbstractNamedBeanaddPropertyChangeListener, addPropertyChangeListener, addPropertyChangeListener, addPropertyChangeListener, describeState, dispose, equals, firePropertyChange, getComment, getDisplayName, getDisplayName, getListenerRef, getListenerRefs, getNumPropertyChangeListeners, getProperty, getPropertyChangeListeners, getPropertyChangeListeners, getPropertyChangeListenersByReference, getPropertyKeys, getSystemName, getUserName, hashCode, removeProperty, removePropertyChangeListener, removePropertyChangeListener, setComment, setProperty, setUserName, toString, toStringSuffix, updateListenerRef, vetoableChange
 - 
Methods inherited from class java.lang.Objectclone, finalize, getClass, notify, notifyAll, wait, wait, wait
 - 
Methods inherited from interface jmri.NamedBeanaddPropertyChangeListener, addPropertyChangeListener, compareTo, describeState, dispose, getComment, getDisplayName, getDisplayName, getListenerRef, getListenerRefs, getNumPropertyChangeListeners, getProperty, getPropertyChangeListenersByReference, getPropertyKeys, getRecommendedToolTip, getSystemName, getUsageReport, getUserName, removeProperty, setComment, setProperty, setUserName, toString, updateListenerRef, vetoableChange
 - 
Methods inherited from interface jmri.beans.PropertyChangeProvideraddPropertyChangeListener, addPropertyChangeListener, getPropertyChangeListeners, getPropertyChangeListeners, removePropertyChangeListener, removePropertyChangeListener
 - 
Methods inherited from interface jmri.StringIOgetMaximumLength, requestUpdateFromLayout
 
- 
 
- 
- 
- 
Constructor Detail- 
DefaultStringIOpublic DefaultStringIO(@Nonnull java.lang.String systemName) 
 - 
DefaultStringIOpublic DefaultStringIO(@Nonnull java.lang.String systemName, java.lang.String userName) 
 
- 
 - 
Method Detail- 
sendStringToLayoutprotected void sendStringToLayout(@Nonnull 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.For systems that don't provide another form of feedback, this call is responsible for setting the known state to the new commanded state, and firing all listeners. - Specified by:
- sendStringToLayoutin class- AbstractStringIO
- Parameters:
- value- the desired string value
- Throws:
- JmriException- general error when setting the value fails
 
 - 
cutLongStringsprotected 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:
- cutLongStringsin class- AbstractStringIO
- Returns:
- true if long strings should be cut
 
 
- 
 
-