Package net.sourceforge.uiq3.fp10
Class Printer
- java.lang.Object
-
- net.sourceforge.uiq3.fx602p.Interface
-
- net.sourceforge.uiq3.fp10.Printer
-
-
Field Summary
Fields Modifier and Type Field Description protected @NotNull StringBuilder
Data
Printoutprivate static int
Line_Length
Length of an FP-10 lineprivate static Logger
Logger
Class logger instance.static String
New_Line
New line stringprivate @NotNull Calculator
Owner
Calculator to which the interface is connected toprivate PropertyChangeSupport
propertyChangeSupport
Handle property changes.private static String
TAG
Class logger tag.-
Fields inherited from interface net.sourceforge.uiq3.printer.IPrinter
Default_Printout_Size, PRINTOUT_PROPERTY
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
Printer(@NotNull Calculator Owner)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addPropertyChangeListener(@NotNull String propertyName, PropertyChangeListener listener)
Add a PropertyChangeListener for a specific property.void
addPropertyChangeListener(PropertyChangeListener listener)
Add a PropertyChangeListener to the listener list.void
clearPrintout()
clear printout@NotNull String
getPrintout()
get printout for clipboardint
getPrintoutLength()
get printout for clipboardvoid
Print_Alpha()
Print displayed alpha text to simulated printer (max 40 characters)void
Print_Display()
Print displayed register to simulated printer.void
Print_File_Name(@NotNull String Java_File_Name)
Print filename.void
Print_M(@NotNull String Java_File_Name)
Writes memory register to simulated cassette interface.private void
Print_Step_Count(@NotNull StringBuilder Buffer, int Count)
Print the ...xxxsteps line.void
Print_Steps(@NotNull String Java_File_Name)
Print program stepsvoid
printLine()
Print empty linevoid
printLine(short @NotNull [] Line)
Print a single line to simulated printervoid
printLine(@NotNull String Line)
Print a single line to simulated printervoid
removePropertyChangeListener(@NotNull String propertyName, PropertyChangeListener listener)
Remove a PropertyChangeListener for a specific property.void
removePropertyChangeListener(PropertyChangeListener listener)
Remove a PropertyChangeListener from the listener list.void
setPrintout(@NotNull String Printout)
set the printout from saved data@NotNull String
toString()
-
Methods inherited from class net.sourceforge.uiq3.fx602p.Interface
Convert_To_Java, Convert_To_Java, Enable, Is_Enabled
-
-
-
-
Field Detail
-
Line_Length
private static final int Line_Length
Length of an FP-10 line- See Also:
- Constant Field Values
-
Logger
private static final Logger Logger
Class logger instance.
-
TAG
private static final String TAG
Class logger tag.
-
New_Line
public static final String New_Line
New line string
-
Owner
@NotNull private final @NotNull Calculator Owner
Calculator to which the interface is connected to
-
Data
@NotNull protected @NotNull StringBuilder Data
Printout
-
propertyChangeSupport
private final PropertyChangeSupport propertyChangeSupport
Handle property changes.
-
-
Constructor Detail
-
Printer
protected Printer(@NotNull @NotNull Calculator Owner)
- Parameters:
Owner
- Calculator to which the interface is connected to
-
-
Method Detail
-
addPropertyChangeListener
public void addPropertyChangeListener(PropertyChangeListener listener)
Add a PropertyChangeListener to the listener list. The listener is registered for all properties. The same listener object may be added more than once, and will be called as many times as it is added. Iflistener
is null, no exception is thrown and no action is taken.- Specified by:
addPropertyChangeListener
in interfacenet.sourceforge.uiq3.IPropertyNotifier
- Parameters:
listener
- The PropertyChangeListener to be added
-
addPropertyChangeListener
public void addPropertyChangeListener(@NotNull @NotNull String propertyName, @NotNull PropertyChangeListener listener)
Add a PropertyChangeListener for a specific property. The listener will be invoked only when a call on firePropertyChange names that specific property. The same listener object may be added more than once. For each property, the listener will be invoked the number of times it was added for that property.- Specified by:
addPropertyChangeListener
in interfacenet.sourceforge.uiq3.IPropertyNotifier
- Parameters:
propertyName
- The name of the property to listen on.listener
- The PropertyChangeListener to be added- Since:
- 1.2
-
removePropertyChangeListener
public void removePropertyChangeListener(@NotNull PropertyChangeListener listener)
Remove a PropertyChangeListener from the listener list. This removes a PropertyChangeListener that was registered for all properties. Iflistener
was added more than once to the same event source, it will be notified one less time after being removed. Iflistener
is null, or was never added, no exception is thrown and no action is taken.- Specified by:
removePropertyChangeListener
in interfacenet.sourceforge.uiq3.IPropertyNotifier
- Parameters:
listener
- The PropertyChangeListener to be removed
-
removePropertyChangeListener
public void removePropertyChangeListener(@NotNull @NotNull String propertyName, @NotNull PropertyChangeListener listener)
Remove a PropertyChangeListener for a specific property. If `listener` was added more than once to the same event source for the specified property, it will be notified one less time after being removed.- Specified by:
removePropertyChangeListener
in interfacenet.sourceforge.uiq3.IPropertyNotifier
- Parameters:
propertyName
- The name of the property that was listened on.listener
- The PropertyChangeListener to be removed- Since:
- 1.2
-
clearPrintout
public void clearPrintout()
Description copied from interface:IPrinter
clear printout
- Specified by:
clearPrintout
in interfaceIPrinter
- See Also:
clearPrintout()
-
Print_Alpha
public void Print_Alpha()
Print displayed alpha text to simulated printer (max 40 characters)- Throws:
Error
- mostly file not found
-
Print_Display
public void Print_Display()
Print displayed register to simulated printer.
-
Print_File_Name
public void Print_File_Name(@NotNull @NotNull String Java_File_Name)
Print filename.- Parameters:
Java_File_Name
- the java filename
-
printLine
public void printLine()
Print empty line- Specified by:
printLine
in interfaceIPrinter
- See Also:
printLine(java.lang.String)
-
printLine
public void printLine(short @NotNull [] Line)
Print a single line to simulated printer
-
printLine
public void printLine(@NotNull @NotNull String Line)
Description copied from interface:IPrinter
Print a single line to simulated printer- Specified by:
printLine
in interfaceIPrinter
- Parameters:
Line
- Line to print- See Also:
printLine(java.lang.String)
-
Print_M
public void Print_M(@NotNull @NotNull String Java_File_Name)
Writes memory register to simulated cassette interface.- Parameters:
Java_File_Name
- the java filename
-
Print_Step_Count
private void Print_Step_Count(@NotNull @NotNull StringBuilder Buffer, int Count)
Print the ...xxxsteps line.- Parameters:
Buffer
- buffer to print toCount
- steps to print
-
Print_Steps
public void Print_Steps(@NotNull @NotNull String Java_File_Name)
Print program steps- Parameters:
Java_File_Name
- the java filename
-
getPrintout
@NotNull @TestOnly public @NotNull String getPrintout()
get printout for clipboard- Specified by:
getPrintout
in interfaceIPrinter
- Returns:
- all program steps
-
setPrintout
@TestOnly public void setPrintout(@NotNull @NotNull String Printout)
set the printout from saved data
- Specified by:
setPrintout
in interfaceIPrinter
- Parameters:
Printout
- new printout
-
getPrintoutLength
public int getPrintoutLength()
get printout for clipboard- Specified by:
getPrintoutLength
in interfaceIPrinter
- Returns:
- all program steps
-
-