Refactor
Build and Test j3270 / Build JAR & Run Tests (push) Successful in 44s

This commit is contained in:
2026-08-25 16:05:12 +00:00
parent 36b93df986
commit 7eebd2107c
56 changed files with 308 additions and 308 deletions
+1 -1
View File
@@ -1,5 +1,5 @@
allprojects {
group = 'org.j3270'
group = 'haus.nightmare.j3270'
version = '0.1.0'
repositories {
+1 -1
View File
@@ -77,7 +77,7 @@ fi
# 4. Package executable JAR
echo "Packaging j3270.jar..."
printf "Manifest-Version: 1.0\nMain-Class: org.pubvm.j3270.J3270App\nImplementation-Title: j3270\nImplementation-Version: 0.1.0\nCreated-By: j3270 build_all.sh\n\n" > "$BUILD_DIR/MANIFEST.MF"
printf "Manifest-Version: 1.0\nMain-Class: haus.nightmare.j3270.J3270App\nImplementation-Title: j3270\nImplementation-Version: 0.1.0\nCreated-By: j3270 build_all.sh\n\n" > "$BUILD_DIR/MANIFEST.MF"
"$JAR_BIN" cvfm "$BUILD_DIR/j3270.jar" "$BUILD_DIR/MANIFEST.MF" \
-C "$BUILD_DIR/lib3270j" . \
+2 -2
View File
@@ -7,12 +7,12 @@ dependencies {
}
application {
mainClass = 'org.pubvm.j3270.J3270App'
mainClass = 'haus.nightmare.j3270.J3270App'
}
jar {
manifest {
attributes 'Main-Class': 'org.pubvm.j3270.J3270App',
attributes 'Main-Class': 'haus.nightmare.j3270.J3270App',
'Implementation-Title': 'j3270',
'Implementation-Version': archiveVersion
}
@@ -1,13 +1,13 @@
package org.pubvm.j3270;
package haus.nightmare.j3270;
import org.lib3270j.*;
import org.lib3270j.listener.ConnectionListener;
import org.lib3270j.listener.ScreenUpdateListener;
import org.pubvm.j3270.ui.ConnectDialog;
import org.pubvm.j3270.ui.StatusBar;
import org.pubvm.j3270.ui.TerminalPanel;
import org.pubvm.j3270.ft.FileTransfer;
import org.pubvm.j3270.ft.FileTransferDialog;
import haus.nightmare.lib3270j.*;
import haus.nightmare.lib3270j.listener.ConnectionListener;
import haus.nightmare.lib3270j.listener.ScreenUpdateListener;
import haus.nightmare.j3270.ui.ConnectDialog;
import haus.nightmare.j3270.ui.StatusBar;
import haus.nightmare.j3270.ui.TerminalPanel;
import haus.nightmare.j3270.ft.FileTransfer;
import haus.nightmare.j3270.ft.FileTransferDialog;
import javax.swing.*;
import java.awt.*;
@@ -236,12 +236,12 @@ public class J3270App extends JFrame implements ConnectionListener, ScreenUpdate
private void showConnectDialog() {
ConnectDialog dialog = new ConnectDialog(this);
String initialHost = lastHost != null && !lastHost.isEmpty() ? lastHost : org.pubvm.j3270.config.Settings.getAutoConnectHost();
int initialPort = lastPort > 0 ? lastPort : org.pubvm.j3270.config.Settings.getAutoConnectPort();
String initialHost = lastHost != null && !lastHost.isEmpty() ? lastHost : haus.nightmare.j3270.config.Settings.getAutoConnectHost();
int initialPort = lastPort > 0 ? lastPort : haus.nightmare.j3270.config.Settings.getAutoConnectPort();
dialog.setInitialHost(initialHost);
dialog.setInitialPort(initialPort);
dialog.setInitialTls(org.pubvm.j3270.config.Settings.getAutoConnectTls());
dialog.setInitialVerifyCert(org.pubvm.j3270.config.Settings.getAutoConnectVerifyCert());
dialog.setInitialTls(haus.nightmare.j3270.config.Settings.getAutoConnectTls());
dialog.setInitialVerifyCert(haus.nightmare.j3270.config.Settings.getAutoConnectVerifyCert());
dialog.setVisible(true);
if (dialog.isConfirmed()) {
@@ -253,7 +253,7 @@ public class J3270App extends JFrame implements ConnectionListener, ScreenUpdate
}
private void showSettingsDialog() {
org.pubvm.j3270.ui.SettingsDialog dialog = new org.pubvm.j3270.ui.SettingsDialog(this);
haus.nightmare.j3270.ui.SettingsDialog dialog = new haus.nightmare.j3270.ui.SettingsDialog(this);
dialog.setVisible(true);
}
@@ -266,10 +266,10 @@ public class J3270App extends JFrame implements ConnectionListener, ScreenUpdate
lastPort = config.getPort();
// Save for auto-connect
org.pubvm.j3270.config.Settings.setAutoConnectHost(config.getHost());
org.pubvm.j3270.config.Settings.setAutoConnectPort(config.getPort());
org.pubvm.j3270.config.Settings.setAutoConnectTls(config.isUseTls());
org.pubvm.j3270.config.Settings.setAutoConnectVerifyCert(config.isTlsVerifyCert());
haus.nightmare.j3270.config.Settings.setAutoConnectHost(config.getHost());
haus.nightmare.j3270.config.Settings.setAutoConnectPort(config.getPort());
haus.nightmare.j3270.config.Settings.setAutoConnectTls(config.isUseTls());
haus.nightmare.j3270.config.Settings.setAutoConnectVerifyCert(config.isTlsVerifyCert());
// Disconnect existing connection
disconnect();
@@ -277,7 +277,7 @@ public class J3270App extends JFrame implements ConnectionListener, ScreenUpdate
// Wire interactive certificate verifier if none configured
if (config.getCertificateVerifier() == null) {
config.setCertificateVerifier((chain, authType, exception) ->
org.pubvm.j3270.ui.UntrustedCertificateDialog.showPrompt(this, config.getHost(), config.getPort(), chain, exception)
haus.nightmare.j3270.ui.UntrustedCertificateDialog.showPrompt(this, config.getHost(), config.getPort(), chain, exception)
);
}
@@ -455,7 +455,7 @@ public class J3270App extends JFrame implements ConnectionListener, ScreenUpdate
boolean cliTls = false;
boolean cliNoVerifyCert = false;
Boolean cliTn3270e = null;
org.lib3270j.graphics.GraphicsMode cliGraphicsMode = null;
haus.nightmare.lib3270j.graphics.GraphicsMode cliGraphicsMode = null;
String configFile = null;
java.util.List<String> remainingArgs = new java.util.ArrayList<>();
for (int i = 0; i < args.length; i++) {
@@ -470,11 +470,11 @@ public class J3270App extends JFrame implements ConnectionListener, ScreenUpdate
} else if ("--tn3270e".equals(args[i])) {
cliTn3270e = true;
} else if (args[i].startsWith("--graphics=")) {
cliGraphicsMode = org.lib3270j.graphics.GraphicsMode.fromString(args[i].substring(11));
cliGraphicsMode = haus.nightmare.lib3270j.graphics.GraphicsMode.fromString(args[i].substring(11));
} else if (("--graphics".equals(args[i]) || "-g".equals(args[i])) && i + 1 < args.length && !args[i + 1].startsWith("-")) {
cliGraphicsMode = org.lib3270j.graphics.GraphicsMode.fromString(args[++i]);
cliGraphicsMode = haus.nightmare.lib3270j.graphics.GraphicsMode.fromString(args[++i]);
} else if ("--no-graphics".equals(args[i])) {
cliGraphicsMode = org.lib3270j.graphics.GraphicsMode.NONE;
cliGraphicsMode = haus.nightmare.lib3270j.graphics.GraphicsMode.NONE;
} else if (("-c".equals(args[i]) || "--config".equals(args[i])) && i + 1 < args.length) {
configFile = args[++i];
} else {
@@ -492,7 +492,7 @@ public class J3270App extends JFrame implements ConnectionListener, ScreenUpdate
java.util.logging.Filter appFilter = record -> {
String name = record.getLoggerName();
return name != null && (name.startsWith("org.lib3270j") || name.startsWith("org.pubvm.j3270"));
return name != null && (name.startsWith("haus.nightmare.lib3270j") || name.startsWith("haus.nightmare.j3270"));
};
ConsoleHandler consoleHandler = new ConsoleHandler();
@@ -501,9 +501,9 @@ public class J3270App extends JFrame implements ConnectionListener, ScreenUpdate
consoleHandler.setFilter(appFilter);
globalRoot.addHandler(consoleHandler);
Logger.getLogger("org.pubvm").setLevel(logLevel);
Logger.getLogger("org.pubvm.j3270").setLevel(logLevel);
Logger.getLogger("org.lib3270j").setLevel(logLevel);
Logger.getLogger("haus.nightmare").setLevel(logLevel);
Logger.getLogger("haus.nightmare.j3270").setLevel(logLevel);
Logger.getLogger("haus.nightmare.lib3270j").setLevel(logLevel);
try {
java.util.logging.FileHandler fileHandler = new java.util.logging.FileHandler("j3270.log", 10 * 1024 * 1024, 1, false) {
@@ -525,7 +525,7 @@ public class J3270App extends JFrame implements ConnectionListener, ScreenUpdate
// Load INI config file if specified
if (configFile != null) {
try {
org.pubvm.j3270.config.Settings.loadFromIniFile(configFile);
haus.nightmare.j3270.config.Settings.loadFromIniFile(configFile);
} catch (Exception e) {
System.err.println("Failed to load config file: " + configFile);
System.err.println(e.getMessage());
@@ -547,7 +547,7 @@ public class J3270App extends JFrame implements ConnectionListener, ScreenUpdate
final boolean finalTls = cliTls;
final boolean finalNoVerify = cliNoVerifyCert;
final Boolean finalTn3270e = cliTn3270e;
final org.lib3270j.graphics.GraphicsMode finalGraphicsMode = cliGraphicsMode;
final haus.nightmare.lib3270j.graphics.GraphicsMode finalGraphicsMode = cliGraphicsMode;
SwingUtilities.invokeLater(() -> {
J3270App app = new J3270App();
@@ -584,22 +584,22 @@ public class J3270App extends JFrame implements ConnectionListener, ScreenUpdate
if (finalGraphicsMode != null) {
config.setGraphicsMode(finalGraphicsMode);
} else {
config.setGraphicsMode(org.pubvm.j3270.config.Settings.getGraphicsMode());
config.setGraphicsMode(haus.nightmare.j3270.config.Settings.getGraphicsMode());
}
app.connect(config);
} else {
org.pubvm.j3270.config.Settings.StartupBehavior behavior = org.pubvm.j3270.config.Settings
haus.nightmare.j3270.config.Settings.StartupBehavior behavior = haus.nightmare.j3270.config.Settings
.getStartupBehavior();
switch (behavior) {
case SHOW_CONNECT:
SwingUtilities.invokeLater(app::showConnectDialog);
break;
case AUTO_CONNECT:
String host = org.pubvm.j3270.config.Settings.getAutoConnectHost();
int port = org.pubvm.j3270.config.Settings.getAutoConnectPort();
boolean tls = org.pubvm.j3270.config.Settings.getAutoConnectTls();
boolean verify = org.pubvm.j3270.config.Settings.getAutoConnectVerifyCert();
boolean tn3270e = org.pubvm.j3270.config.Settings.getAutoConnectTn3270e();
String host = haus.nightmare.j3270.config.Settings.getAutoConnectHost();
int port = haus.nightmare.j3270.config.Settings.getAutoConnectPort();
boolean tls = haus.nightmare.j3270.config.Settings.getAutoConnectTls();
boolean verify = haus.nightmare.j3270.config.Settings.getAutoConnectVerifyCert();
boolean tn3270e = haus.nightmare.j3270.config.Settings.getAutoConnectTn3270e();
if (host != null && !host.isEmpty()) {
ConnectionConfig config = new ConnectionConfig(host, port, TerminalModel.IBM_3279_4, tls);
config.setTlsVerifyCert(verify);
@@ -607,7 +607,7 @@ public class J3270App extends JFrame implements ConnectionListener, ScreenUpdate
if (finalGraphicsMode != null) {
config.setGraphicsMode(finalGraphicsMode);
} else {
config.setGraphicsMode(org.pubvm.j3270.config.Settings.getGraphicsMode());
config.setGraphicsMode(haus.nightmare.j3270.config.Settings.getGraphicsMode());
}
app.connect(config);
} else {
@@ -1,4 +1,4 @@
package org.pubvm.j3270.config;
package haus.nightmare.j3270.config;
import java.util.prefs.Preferences;
import java.awt.Color;
@@ -86,13 +86,13 @@ public class Settings {
prefs.putBoolean("autoConnectTn3270e", tn3270e);
}
public static org.lib3270j.graphics.GraphicsMode getGraphicsMode() {
String modeStr = prefs.get("graphicsMode", org.lib3270j.graphics.GraphicsMode.BOTH.name());
return org.lib3270j.graphics.GraphicsMode.fromString(modeStr);
public static haus.nightmare.lib3270j.graphics.GraphicsMode getGraphicsMode() {
String modeStr = prefs.get("graphicsMode", haus.nightmare.lib3270j.graphics.GraphicsMode.BOTH.name());
return haus.nightmare.lib3270j.graphics.GraphicsMode.fromString(modeStr);
}
public static void setGraphicsMode(org.lib3270j.graphics.GraphicsMode mode) {
prefs.put("graphicsMode", (mode != null ? mode : org.lib3270j.graphics.GraphicsMode.BOTH).name());
public static void setGraphicsMode(haus.nightmare.lib3270j.graphics.GraphicsMode mode) {
prefs.put("graphicsMode", (mode != null ? mode : haus.nightmare.lib3270j.graphics.GraphicsMode.BOTH).name());
}
public static Color getColorOverride(int index, Color defaultColor) {
@@ -280,7 +280,7 @@ public class Settings {
case "graphics":
if ("graphicsMode".equalsIgnoreCase(key) || "mode".equalsIgnoreCase(key)) {
setGraphicsMode(org.lib3270j.graphics.GraphicsMode.fromString(value));
setGraphicsMode(haus.nightmare.lib3270j.graphics.GraphicsMode.fromString(value));
} else {
log.warning("Unknown graphics key: " + key);
}
@@ -1,10 +1,10 @@
package org.pubvm.j3270.ft;
package haus.nightmare.j3270.ft;
import org.lib3270j.Telnet3270Client;
import org.lib3270j.ft.FTConfig;
import org.lib3270j.ft.FTConstants.FTState;
import org.lib3270j.ft.FTCut;
import org.lib3270j.ft.FTDft;
import haus.nightmare.lib3270j.Telnet3270Client;
import haus.nightmare.lib3270j.ft.FTConfig;
import haus.nightmare.lib3270j.ft.FTConstants.FTState;
import haus.nightmare.lib3270j.ft.FTCut;
import haus.nightmare.lib3270j.ft.FTDft;
import java.io.File;
import java.io.IOException;
@@ -1,6 +1,6 @@
package org.pubvm.j3270.ft;
package haus.nightmare.j3270.ft;
import org.lib3270j.ft.FTConfig;
import haus.nightmare.lib3270j.ft.FTConfig;
import javax.swing.*;
import javax.swing.border.EmptyBorder;
@@ -1,7 +1,7 @@
package org.pubvm.j3270.ui;
package haus.nightmare.j3270.ui;
import org.lib3270j.ConnectionConfig;
import org.lib3270j.TerminalModel;
import haus.nightmare.lib3270j.ConnectionConfig;
import haus.nightmare.lib3270j.TerminalModel;
import javax.swing.*;
import java.awt.*;
@@ -14,7 +14,7 @@ public class ConnectDialog extends JDialog {
private JTextField hostField;
private JTextField portField;
private JComboBox<TerminalModel> modelCombo;
private JComboBox<org.lib3270j.graphics.GraphicsMode> graphicsCombo;
private JComboBox<haus.nightmare.lib3270j.graphics.GraphicsMode> graphicsCombo;
private JTextField luField;
private JCheckBox tlsCheckBox;
private JCheckBox verifyCertCheckBox;
@@ -107,8 +107,8 @@ public class ConnectDialog extends JDialog {
mainPanel.add(graphicsLabel, gbc);
gbc.gridx = 1;
gbc.weightx = 1.0;
graphicsCombo = new JComboBox<>(org.lib3270j.graphics.GraphicsMode.values());
graphicsCombo.setSelectedItem(org.pubvm.j3270.config.Settings.getGraphicsMode());
graphicsCombo = new JComboBox<>(haus.nightmare.lib3270j.graphics.GraphicsMode.values());
graphicsCombo.setSelectedItem(haus.nightmare.j3270.config.Settings.getGraphicsMode());
graphicsCombo.setBackground(new Color(45, 45, 45));
graphicsCombo.setForeground(fg);
graphicsCombo.setFont(new Font(Font.SANS_SERIF, Font.PLAIN, 13));
@@ -154,7 +154,7 @@ public class ConnectDialog extends JDialog {
tn3270eCheckBox.setBackground(new Color(30, 30, 30));
tn3270eCheckBox.setForeground(fg);
tn3270eCheckBox.setFont(new Font(Font.SANS_SERIF, Font.PLAIN, 13));
tn3270eCheckBox.setSelected(org.pubvm.j3270.config.Settings.getAutoConnectTn3270e());
tn3270eCheckBox.setSelected(haus.nightmare.j3270.config.Settings.getAutoConnectTn3270e());
tn3270eCheckBox.setFocusPainted(false);
mainPanel.add(tn3270eCheckBox, gbc);
@@ -223,7 +223,7 @@ public class ConnectDialog extends JDialog {
if (!lu.isEmpty()) {
result.setLuName(lu);
}
result.setGraphicsMode((org.lib3270j.graphics.GraphicsMode) graphicsCombo.getSelectedItem());
result.setGraphicsMode((haus.nightmare.lib3270j.graphics.GraphicsMode) graphicsCombo.getSelectedItem());
result.setUseTls(tlsCheckBox.isSelected());
result.setTlsVerifyCert(verifyCertCheckBox.isSelected());
result.setTn3270eEnabled(tn3270eCheckBox.isSelected());
@@ -1,9 +1,9 @@
package org.pubvm.j3270.ui;
package haus.nightmare.j3270.ui;
import javax.swing.*;
import org.pubvm.j3270.J3270App;
import org.pubvm.j3270.config.Settings;
import haus.nightmare.j3270.J3270App;
import haus.nightmare.j3270.config.Settings;
import java.awt.*;
import java.awt.event.*;
@@ -31,7 +31,7 @@ public class SettingsDialog extends JDialog {
// Appearance tab
private JComboBox<String> fontBox;
private JSpinner fontSizeSpinner;
private JComboBox<org.lib3270j.graphics.GraphicsMode> graphicsModeBox;
private JComboBox<haus.nightmare.lib3270j.graphics.GraphicsMode> graphicsModeBox;
// Behavior tab
private JComboBox<Settings.StartupBehavior> startupBehaviorBox;
@@ -272,7 +272,7 @@ public class SettingsDialog extends JDialog {
JLabel graphicsLabel = new JLabel("Graphics Mode:");
panel.add(graphicsLabel, gbc);
graphicsModeBox = new JComboBox<>(org.lib3270j.graphics.GraphicsMode.values());
graphicsModeBox = new JComboBox<>(haus.nightmare.lib3270j.graphics.GraphicsMode.values());
graphicsModeBox.setSelectedItem(Settings.getGraphicsMode());
gbc.gridx = 1;
gbc.fill = GridBagConstraints.HORIZONTAL;
@@ -370,7 +370,7 @@ public class SettingsDialog extends JDialog {
hostPanel.setBorder(BorderFactory.createTitledBorder("Host Colors"));
for (int i = 0; i < 16; i++) {
Color init = org.pubvm.j3270.config.Settings.getColorOverride(i, TerminalPanel.DEFAULT_HOST_COLORS[i]);
Color init = haus.nightmare.j3270.config.Settings.getColorOverride(i, TerminalPanel.DEFAULT_HOST_COLORS[i]);
tempHostColors[i] = init;
JPanel cb = new JPanel();
cb.setName("colorSwatch");
@@ -402,7 +402,7 @@ public class SettingsDialog extends JDialog {
for (int i = 0; i < monoKeys.length; i++) {
String mk = monoKeys[i];
Color init = org.pubvm.j3270.config.Settings.getMonoColorOverride(mk, monoDefs[i]);
Color init = haus.nightmare.j3270.config.Settings.getMonoColorOverride(mk, monoDefs[i]);
tempMonoColors.put(mk, init);
JPanel p = new JPanel(new BorderLayout());
@@ -466,7 +466,7 @@ public class SettingsDialog extends JDialog {
for(String act : actions) {
String def = act;
if(def.equals("PAGE_UP")) def = "PAGE_UP"; // fallback example
String current = org.pubvm.j3270.config.Settings.getKeyBinding(act, def);
String current = haus.nightmare.j3270.config.Settings.getKeyBinding(act, def);
tempKeyBindings.put(act, current);
keymapModel.addRow(new Object[]{act, current});
}
@@ -478,13 +478,13 @@ public class SettingsDialog extends JDialog {
defaultBinding = "shift F" + (i - 12);
}
String pf = "PF"+i;
String cur = org.pubvm.j3270.config.Settings.getKeyBinding(pf, defaultBinding);
String cur = haus.nightmare.j3270.config.Settings.getKeyBinding(pf, defaultBinding);
tempKeyBindings.put(pf, cur);
keymapModel.addRow(new Object[]{pf, cur});
}
for(int i=1;i<=3;i++){
String pa = "PA"+i;
String curPa = org.pubvm.j3270.config.Settings.getKeyBinding(pa, "alt "+i);
String curPa = haus.nightmare.j3270.config.Settings.getKeyBinding(pa, "alt "+i);
tempKeyBindings.put(pa, curPa);
keymapModel.addRow(new Object[]{pa, curPa});
}
@@ -626,7 +626,7 @@ public class SettingsDialog extends JDialog {
}
Settings.setFontSize((Integer) fontSizeSpinner.getValue());
if (graphicsModeBox.getSelectedItem() != null) {
Settings.setGraphicsMode((org.lib3270j.graphics.GraphicsMode) graphicsModeBox.getSelectedItem());
Settings.setGraphicsMode((haus.nightmare.lib3270j.graphics.GraphicsMode) graphicsModeBox.getSelectedItem());
}
// Apply Behavior
@@ -648,15 +648,15 @@ public class SettingsDialog extends JDialog {
// Propagate visual changes to the app
// Save Colors
for (int i=0; i<16; i++) {
org.pubvm.j3270.config.Settings.setColorOverride(i, tempHostColors[i]);
haus.nightmare.j3270.config.Settings.setColorOverride(i, tempHostColors[i]);
}
for (Map.Entry<String, Color> entry : tempMonoColors.entrySet()) {
org.pubvm.j3270.config.Settings.setMonoColorOverride(entry.getKey(), entry.getValue());
haus.nightmare.j3270.config.Settings.setMonoColorOverride(entry.getKey(), entry.getValue());
}
// Save Keybindings
for (Map.Entry<String, String> entry : tempKeyBindings.entrySet()) {
org.pubvm.j3270.config.Settings.setKeyBinding(entry.getKey(), entry.getValue());
haus.nightmare.j3270.config.Settings.setKeyBinding(entry.getKey(), entry.getValue());
}
parentApp.getTerminalPanel().reloadSettings();
@@ -1,8 +1,8 @@
package org.pubvm.j3270.ui;
package haus.nightmare.j3270.ui;
import org.lib3270j.ConnectionState;
import org.lib3270j.Telnet3270Client;
import org.lib3270j.screen.ScreenBuffer;
import haus.nightmare.lib3270j.ConnectionState;
import haus.nightmare.lib3270j.Telnet3270Client;
import haus.nightmare.lib3270j.screen.ScreenBuffer;
import javax.swing.*;
import java.awt.*;
@@ -1,16 +1,16 @@
package org.pubvm.j3270.ui;
package haus.nightmare.j3270.ui;
import org.lib3270j.Telnet3270Client;
import org.lib3270j.graphics.GocaConstants;
import org.lib3270j.screen.ExtendedAttribute;
import org.lib3270j.screen.ScreenBuffer;
import haus.nightmare.lib3270j.Telnet3270Client;
import haus.nightmare.lib3270j.graphics.GocaConstants;
import haus.nightmare.lib3270j.screen.ExtendedAttribute;
import haus.nightmare.lib3270j.screen.ScreenBuffer;
import javax.swing.*;
import java.awt.*;
import java.awt.datatransfer.*;
import java.awt.event.*;
import static org.lib3270j.protocol.DS3270Constants.*;
import static haus.nightmare.lib3270j.protocol.DS3270Constants.*;
/**
* Custom JPanel that renders the 3270 screen buffer.
@@ -135,7 +135,7 @@ public class TerminalPanel extends JPanel {
setupFont();
setupCursorBlink();
blockSelectMode = org.pubvm.j3270.config.Settings.getBlockSelectMode();
blockSelectMode = haus.nightmare.j3270.config.Settings.getBlockSelectMode();
// Handle mouse clicks to position cursor, selection, and grab focus
MouseAdapter mouseHandler = new MouseAdapter() {
@@ -266,7 +266,7 @@ public class TerminalPanel extends JPanel {
));
client.getInputProcessor().sendGraphicMouseAid(
org.lib3270j.protocol.DS3270Constants.AID_ENTER,
haus.nightmare.lib3270j.protocol.DS3270Constants.AID_ENTER,
button,
e.isShiftDown(),
e.isControlDown()
@@ -438,7 +438,7 @@ public class TerminalPanel extends JPanel {
JCheckBoxMenuItem blockModeItem = new JCheckBoxMenuItem("Block Select Mode", blockSelectMode);
blockModeItem.addActionListener(ev -> {
blockSelectMode = blockModeItem.isSelected();
org.pubvm.j3270.config.Settings.setBlockSelectMode(blockSelectMode);
haus.nightmare.j3270.config.Settings.setBlockSelectMode(blockSelectMode);
});
popup.add(blockModeItem);
@@ -516,7 +516,7 @@ public class TerminalPanel extends JPanel {
if (bestSize != currentFontSize) {
currentFontSize = bestSize;
org.pubvm.j3270.config.Settings.setFontSize(bestSize);
haus.nightmare.j3270.config.Settings.setFontSize(bestSize);
terminalFont = new Font(terminalFont.getFamily(), Font.PLAIN, bestSize);
updateCellSize();
}
@@ -573,7 +573,7 @@ public class TerminalPanel extends JPanel {
"PAGE_UP", "PAGE_DOWN", "HOME", "END", "ENTER",
"ESCAPE", "INSERT", "DELETE", "BACK_SPACE" };
for (String key : navKeys) {
String binding = org.pubvm.j3270.config.Settings.getKeyBinding(key, key);
String binding = haus.nightmare.j3270.config.Settings.getKeyBinding(key, key);
bindKeyToMap(im, key, binding);
}
@@ -586,7 +586,7 @@ public class TerminalPanel extends JPanel {
} else {
defaultBinding = "shift F" + (i - 12);
}
String binding = org.pubvm.j3270.config.Settings.getKeyBinding("PF" + i, defaultBinding);
String binding = haus.nightmare.j3270.config.Settings.getKeyBinding("PF" + i, defaultBinding);
bindKeyToMap(im, "PF" + i, binding);
}
@@ -594,20 +594,20 @@ public class TerminalPanel extends JPanel {
String pa1Def = "alt 1";
String pa2Def = "alt 2";
String pa3Def = "alt 3";
bindKeyToMap(im, "PA1", org.pubvm.j3270.config.Settings.getKeyBinding("PA1", pa1Def));
bindKeyToMap(im, "PA2", org.pubvm.j3270.config.Settings.getKeyBinding("PA2", pa2Def));
bindKeyToMap(im, "PA3", org.pubvm.j3270.config.Settings.getKeyBinding("PA3", pa3Def));
bindKeyToMap(im, "PA1", haus.nightmare.j3270.config.Settings.getKeyBinding("PA1", pa1Def));
bindKeyToMap(im, "PA2", haus.nightmare.j3270.config.Settings.getKeyBinding("PA2", pa2Def));
bindKeyToMap(im, "PA3", haus.nightmare.j3270.config.Settings.getKeyBinding("PA3", pa3Def));
// Clear
bindKeyToMap(im, "CLEAR", org.pubvm.j3270.config.Settings.getKeyBinding("CLEAR", "alt C"));
bindKeyToMap(im, "CLEAR", haus.nightmare.j3270.config.Settings.getKeyBinding("CLEAR", "alt C"));
// Extended 3270 functions
bindKeyToMap(im, "ERASE_INPUT", org.pubvm.j3270.config.Settings.getKeyBinding("ERASE_INPUT", "alt E"));
bindKeyToMap(im, "NEWLINE", org.pubvm.j3270.config.Settings.getKeyBinding("NEWLINE", "shift ENTER"));
bindKeyToMap(im, "DUP", org.pubvm.j3270.config.Settings.getKeyBinding("DUP", "alt D"));
bindKeyToMap(im, "FIELD_MARK", org.pubvm.j3270.config.Settings.getKeyBinding("FIELD_MARK", "alt M"));
bindKeyToMap(im, "ATTN", org.pubvm.j3270.config.Settings.getKeyBinding("ATTN", "alt A"));
bindKeyToMap(im, "SYSREQ", org.pubvm.j3270.config.Settings.getKeyBinding("SYSREQ", "alt S"));
bindKeyToMap(im, "ERASE_INPUT", haus.nightmare.j3270.config.Settings.getKeyBinding("ERASE_INPUT", "alt E"));
bindKeyToMap(im, "NEWLINE", haus.nightmare.j3270.config.Settings.getKeyBinding("NEWLINE", "shift ENTER"));
bindKeyToMap(im, "DUP", haus.nightmare.j3270.config.Settings.getKeyBinding("DUP", "alt D"));
bindKeyToMap(im, "FIELD_MARK", haus.nightmare.j3270.config.Settings.getKeyBinding("FIELD_MARK", "alt M"));
bindKeyToMap(im, "ATTN", haus.nightmare.j3270.config.Settings.getKeyBinding("ATTN", "alt A"));
bindKeyToMap(im, "SYSREQ", haus.nightmare.j3270.config.Settings.getKeyBinding("SYSREQ", "alt S"));
// Copy/Paste bindings Cmd+C / Cmd+V (macOS) or Ctrl+C / Ctrl+V (others)
int shortcutMask = Toolkit.getDefaultToolkit().getMenuShortcutKeyMaskEx();
@@ -841,8 +841,8 @@ public class TerminalPanel extends JPanel {
}
private void setupFont() {
currentFontSize = org.pubvm.j3270.config.Settings.getFontSize();
String fontFamily = org.pubvm.j3270.config.Settings.getFontFamily();
currentFontSize = haus.nightmare.j3270.config.Settings.getFontSize();
String fontFamily = haus.nightmare.j3270.config.Settings.getFontFamily();
terminalFont = new Font(fontFamily, Font.PLAIN, currentFontSize);
if (terminalFont.getFamily().equals("Dialog") && !fontFamily.equals("Dialog")) {
@@ -854,13 +854,13 @@ public class TerminalPanel extends JPanel {
private void setupColors() {
for (int i = 0; i < 16; i++) {
hostColors[i] = org.pubvm.j3270.config.Settings.getColorOverride(i, DEFAULT_HOST_COLORS[i]);
hostColors[i] = haus.nightmare.j3270.config.Settings.getColorOverride(i, DEFAULT_HOST_COLORS[i]);
}
monoNormal = org.pubvm.j3270.config.Settings.getMonoColorOverride("NORMAL", DEFAULT_MONO_NORMAL);
monoIntensify = org.pubvm.j3270.config.Settings.getMonoColorOverride("INTENSIFY", DEFAULT_MONO_INTENSIFY);
monoProtected = org.pubvm.j3270.config.Settings.getMonoColorOverride("PROTECTED", DEFAULT_MONO_PROTECTED);
monoProtectedHigh = org.pubvm.j3270.config.Settings.getMonoColorOverride("PROTECTED_HIGH", DEFAULT_MONO_PROTECTED_HIGH);
bgColor = org.pubvm.j3270.config.Settings.getMonoColorOverride("BACKGROUND", DEFAULT_BG_COLOR);
monoNormal = haus.nightmare.j3270.config.Settings.getMonoColorOverride("NORMAL", DEFAULT_MONO_NORMAL);
monoIntensify = haus.nightmare.j3270.config.Settings.getMonoColorOverride("INTENSIFY", DEFAULT_MONO_INTENSIFY);
monoProtected = haus.nightmare.j3270.config.Settings.getMonoColorOverride("PROTECTED", DEFAULT_MONO_PROTECTED);
monoProtectedHigh = haus.nightmare.j3270.config.Settings.getMonoColorOverride("PROTECTED_HIGH", DEFAULT_MONO_PROTECTED_HIGH);
bgColor = haus.nightmare.j3270.config.Settings.getMonoColorOverride("BACKGROUND", DEFAULT_BG_COLOR);
setBackground(bgColor);
}
@@ -868,14 +868,14 @@ public class TerminalPanel extends JPanel {
setupColors();
setupKeyBindings();
setupFont();
blockSelectMode = org.pubvm.j3270.config.Settings.getBlockSelectMode();
blockSelectMode = haus.nightmare.j3270.config.Settings.getBlockSelectMode();
revalidate();
repaint();
}
public void setFontSize(int size) {
currentFontSize = size;
org.pubvm.j3270.config.Settings.setFontSize(size);
haus.nightmare.j3270.config.Settings.setFontSize(size);
terminalFont = terminalFont.deriveFont((float) size);
updateCellSize();
resizeGuard = true;
@@ -1120,7 +1120,7 @@ public class TerminalPanel extends JPanel {
int cs = (ea.cs != 0) ? (ea.cs & 0xFF) : (currentFieldEa != null ? (currentFieldEa.cs & 0xFF) : 0);
boolean drawnAsPs = false;
if (cs >= 0x40 && client.getProgramSymbolManager() != null) {
org.lib3270j.graphics.ProgramSymbolSet.SymbolSlot slot = client.getProgramSymbolManager().getSymbol(cs, ea.ec & 0xFF);
haus.nightmare.lib3270j.graphics.ProgramSymbolSet.SymbolSlot slot = client.getProgramSymbolManager().getSymbol(cs, ea.ec & 0xFF);
if (slot != null) {
int symBg = (!bgColor.equals(this.bgColor) || reverse) ? bgColor.getRGB() : 0;
java.awt.image.BufferedImage img = slot.getScaledImage(cellWidth, cellHeight, fgColor.getRGB(), symBg);
@@ -1,4 +1,4 @@
package org.pubvm.j3270.ui;
package haus.nightmare.j3270.ui;
import javax.swing.*;
import java.awt.*;
@@ -1,4 +1,4 @@
package org.lib3270j;
package haus.nightmare.lib3270j;
/**
* Configuration for a 3270 terminal connection.
@@ -12,13 +12,13 @@ public class ConnectionConfig {
private boolean extendedDataStream = true;
private boolean useTls = false;
private boolean tlsVerifyCert = true;
private org.lib3270j.tls.TlsCertificateVerifier certificateVerifier = null;
private haus.nightmare.lib3270j.tls.TlsCertificateVerifier certificateVerifier = null;
private String sslProtocol = "TLS";
private int connectTimeoutMs = 15000;
private int nopIntervalSeconds = 0;
private String terminalName = null; // override terminal type string
private boolean tn3270eEnabled = true;
private org.lib3270j.graphics.GraphicsMode graphicsMode = org.lib3270j.graphics.GraphicsMode.BOTH;
private haus.nightmare.lib3270j.graphics.GraphicsMode graphicsMode = haus.nightmare.lib3270j.graphics.GraphicsMode.BOTH;
public ConnectionConfig() {}
@@ -70,8 +70,8 @@ public class ConnectionConfig {
public boolean isTn3270eEnabled() { return tn3270eEnabled; }
public void setTn3270eEnabled(boolean enabled) { this.tn3270eEnabled = enabled; }
public org.lib3270j.tls.TlsCertificateVerifier getCertificateVerifier() { return certificateVerifier; }
public void setCertificateVerifier(org.lib3270j.tls.TlsCertificateVerifier verifier) { this.certificateVerifier = verifier; }
public haus.nightmare.lib3270j.tls.TlsCertificateVerifier getCertificateVerifier() { return certificateVerifier; }
public void setCertificateVerifier(haus.nightmare.lib3270j.tls.TlsCertificateVerifier verifier) { this.certificateVerifier = verifier; }
public String getSslProtocol() { return sslProtocol; }
public void setSslProtocol(String protocol) { this.sslProtocol = protocol; }
@@ -82,9 +82,9 @@ public class ConnectionConfig {
public int getNopIntervalSeconds() { return nopIntervalSeconds; }
public void setNopIntervalSeconds(int s) { this.nopIntervalSeconds = s; }
public org.lib3270j.graphics.GraphicsMode getGraphicsMode() { return graphicsMode; }
public void setGraphicsMode(org.lib3270j.graphics.GraphicsMode mode) {
this.graphicsMode = (mode != null) ? mode : org.lib3270j.graphics.GraphicsMode.NONE;
public haus.nightmare.lib3270j.graphics.GraphicsMode getGraphicsMode() { return graphicsMode; }
public void setGraphicsMode(haus.nightmare.lib3270j.graphics.GraphicsMode mode) {
this.graphicsMode = (mode != null) ? mode : haus.nightmare.lib3270j.graphics.GraphicsMode.NONE;
}
public String getTerminalName() { return terminalName; }
@@ -1,4 +1,4 @@
package org.lib3270j;
package haus.nightmare.lib3270j;
/**
* Connection state machine states.
@@ -1,8 +1,8 @@
package org.lib3270j;
package haus.nightmare.lib3270j;
import org.lib3270j.screen.ScreenBuffer;
import org.lib3270j.screen.ExtendedAttribute;
import org.lib3270j.listener.*;
import haus.nightmare.lib3270j.screen.ScreenBuffer;
import haus.nightmare.lib3270j.screen.ExtendedAttribute;
import haus.nightmare.lib3270j.listener.*;
import java.util.logging.*;
@@ -15,7 +15,7 @@ public class DiagnosticClient {
static Telnet3270Client client;
public static void main(String[] args) throws Exception {
Logger rootLogger = Logger.getLogger("org.lib3270j");
Logger rootLogger = Logger.getLogger("haus.nightmare.lib3270j");
rootLogger.setLevel(Level.ALL);
Handler handler = new ConsoleHandler();
handler.setLevel(Level.ALL);
@@ -1,13 +1,13 @@
package org.lib3270j;
package haus.nightmare.lib3270j;
import org.lib3270j.charset.EbcdicTranslator;
import org.lib3270j.datastream.DataStreamProcessor;
import org.lib3270j.input.InputProcessor;
import org.lib3270j.listener.ConnectionListener;
import org.lib3270j.listener.ScreenUpdateListener;
import org.lib3270j.screen.ScreenBuffer;
import org.lib3270j.telnet.TelnetConnection;
import org.lib3270j.telnet.TelnetFSM;
import haus.nightmare.lib3270j.charset.EbcdicTranslator;
import haus.nightmare.lib3270j.datastream.DataStreamProcessor;
import haus.nightmare.lib3270j.input.InputProcessor;
import haus.nightmare.lib3270j.listener.ConnectionListener;
import haus.nightmare.lib3270j.listener.ScreenUpdateListener;
import haus.nightmare.lib3270j.screen.ScreenBuffer;
import haus.nightmare.lib3270j.telnet.TelnetConnection;
import haus.nightmare.lib3270j.telnet.TelnetFSM;
import java.io.IOException;
import java.util.logging.Logger;
@@ -126,7 +126,7 @@ public class Telnet3270Client {
public ConnectionConfig getConfig() { return config; }
/** Set a custom or interactive TLS certificate verifier callback. */
public void setTlsCertificateVerifier(org.lib3270j.tls.TlsCertificateVerifier verifier) {
public void setTlsCertificateVerifier(haus.nightmare.lib3270j.tls.TlsCertificateVerifier verifier) {
config.setCertificateVerifier(verifier);
}
@@ -154,7 +154,7 @@ public class Telnet3270Client {
/** Send Enter key. */
public void sendEnter() {
inputProcessor.sendAid(org.lib3270j.protocol.DS3270Constants.AID_ENTER);
inputProcessor.sendAid(haus.nightmare.lib3270j.protocol.DS3270Constants.AID_ENTER);
}
/** Send a PF key (1-24). */
@@ -192,7 +192,7 @@ public class Telnet3270Client {
/** Send Clear key. */
public void sendClear() {
inputProcessor.sendAid(org.lib3270j.protocol.DS3270Constants.AID_CLEAR);
inputProcessor.sendAid(haus.nightmare.lib3270j.protocol.DS3270Constants.AID_CLEAR);
}
/** Move cursor up. */
@@ -224,15 +224,15 @@ public class Telnet3270Client {
/** Reset (unlock keyboard). */
public void reset() { inputProcessor.reset(); }
public org.lib3270j.graphics.ProgramSymbolManager getProgramSymbolManager() {
public haus.nightmare.lib3270j.graphics.ProgramSymbolManager getProgramSymbolManager() {
return dsProcessor.getProgramSymbolManager();
}
public org.lib3270j.graphics.GraphicsPlane getGraphicsPlane() {
public haus.nightmare.lib3270j.graphics.GraphicsPlane getGraphicsPlane() {
return dsProcessor.getGraphicsPlane();
}
public org.lib3270j.graphics.GocaDecoder getGocaDecoder() {
public haus.nightmare.lib3270j.graphics.GocaDecoder getGocaDecoder() {
return dsProcessor.getGocaDecoder();
}
}
@@ -1,6 +1,6 @@
package org.lib3270j;
package haus.nightmare.lib3270j;
import static org.lib3270j.protocol.DS3270Constants.*;
import static haus.nightmare.lib3270j.protocol.DS3270Constants.*;
/**
* Terminal model definitions for IBM 3278 and 3279 terminals.
@@ -1,4 +1,4 @@
package org.lib3270j.charset;
package haus.nightmare.lib3270j.charset;
/**
* EBCDIC Unicode translator.
@@ -1,10 +1,10 @@
package org.lib3270j.datastream;
package haus.nightmare.lib3270j.datastream;
import org.lib3270j.screen.ScreenBuffer;
import org.lib3270j.screen.ExtendedAttribute;
import org.lib3270j.charset.EbcdicTranslator;
import org.lib3270j.listener.ScreenUpdateListener;
import static org.lib3270j.protocol.DS3270Constants.*;
import haus.nightmare.lib3270j.screen.ScreenBuffer;
import haus.nightmare.lib3270j.screen.ExtendedAttribute;
import haus.nightmare.lib3270j.charset.EbcdicTranslator;
import haus.nightmare.lib3270j.listener.ScreenUpdateListener;
import static haus.nightmare.lib3270j.protocol.DS3270Constants.*;
import java.io.ByteArrayOutputStream;
import java.util.List;
@@ -34,15 +34,15 @@ public class DataStreamProcessor {
private OutputSender outputSender;
// File Transfer DFT handler
private org.lib3270j.ft.FTDft ftDft;
private haus.nightmare.lib3270j.ft.FTDft ftDft;
// Input processor reference to manage keyboard locking state
private org.lib3270j.input.InputProcessor inputProcessor;
private haus.nightmare.lib3270j.input.InputProcessor inputProcessor;
// Graphics & Programmed Symbols
private final org.lib3270j.graphics.ProgramSymbolManager programSymbolManager = new org.lib3270j.graphics.ProgramSymbolManager();
private final org.lib3270j.graphics.GraphicsPlane graphicsPlane = new org.lib3270j.graphics.GraphicsPlane(800, 600);
private final org.lib3270j.graphics.GocaDecoder gocaDecoder = new org.lib3270j.graphics.GocaDecoder(graphicsPlane);
private final haus.nightmare.lib3270j.graphics.ProgramSymbolManager programSymbolManager = new haus.nightmare.lib3270j.graphics.ProgramSymbolManager();
private final haus.nightmare.lib3270j.graphics.GraphicsPlane graphicsPlane = new haus.nightmare.lib3270j.graphics.GraphicsPlane(800, 600);
private final haus.nightmare.lib3270j.graphics.GocaDecoder gocaDecoder = new haus.nightmare.lib3270j.graphics.GocaDecoder(graphicsPlane);
private final java.io.ByteArrayOutputStream gocaAccumulator = new java.io.ByteArrayOutputStream();
private int currentGocaSubtype = 0;
@@ -65,15 +65,15 @@ public class DataStreamProcessor {
return qrBuilder;
}
public org.lib3270j.graphics.ProgramSymbolManager getProgramSymbolManager() {
public haus.nightmare.lib3270j.graphics.ProgramSymbolManager getProgramSymbolManager() {
return programSymbolManager;
}
public org.lib3270j.graphics.GraphicsPlane getGraphicsPlane() {
public haus.nightmare.lib3270j.graphics.GraphicsPlane getGraphicsPlane() {
return graphicsPlane;
}
public org.lib3270j.graphics.GocaDecoder getGocaDecoder() {
public haus.nightmare.lib3270j.graphics.GocaDecoder getGocaDecoder() {
return gocaDecoder;
}
@@ -81,15 +81,15 @@ public class DataStreamProcessor {
this.outputSender = sender;
}
public void setFTDft(org.lib3270j.ft.FTDft ftDft) {
public void setFTDft(haus.nightmare.lib3270j.ft.FTDft ftDft) {
this.ftDft = ftDft;
}
public void setInputProcessor(org.lib3270j.input.InputProcessor inputProcessor) {
public void setInputProcessor(haus.nightmare.lib3270j.input.InputProcessor inputProcessor) {
this.inputProcessor = inputProcessor;
}
public org.lib3270j.input.InputProcessor getInputProcessor() {
public haus.nightmare.lib3270j.input.InputProcessor getInputProcessor() {
return inputProcessor;
}
@@ -213,7 +213,7 @@ public class DataStreamProcessor {
ExtendedAttribute ea = screen.getCell(addr);
byte fa = screen.getFieldAttributeAt(addr);
if ((fa & org.lib3270j.protocol.DS3270Constants.FA_MASK) == org.lib3270j.protocol.DS3270Constants.FA_INT_ZERO_NSEL) {
if ((fa & haus.nightmare.lib3270j.protocol.DS3270Constants.FA_MASK) == haus.nightmare.lib3270j.protocol.DS3270Constants.FA_INT_ZERO_NSEL) {
if (ea.ucs4 > 0x20 && ea.ucs4 != 0xFF) {
line.append('*');
hasContent = true;
@@ -813,27 +813,27 @@ public class DataStreamProcessor {
log.fine("SF_TRANSFER_DATA received but ftDft is null");
}
break;
case org.lib3270j.graphics.GocaConstants.SF_LOADPS_DIRECT: // 0x06: Load Programmed Symbols direct
case haus.nightmare.lib3270j.graphics.GocaConstants.SF_LOADPS_DIRECT: // 0x06: Load Programmed Symbols direct
if (fieldLen > 3) {
byte[] psData = new byte[fieldLen - 3];
System.arraycopy(data, pos + 3, psData, 0, psData.length);
programSymbolManager.loadps(psData);
}
break;
case org.lib3270j.graphics.GocaConstants.SF_LOADPS: { // 0x0F: 2-byte Structured Field prefix
case haus.nightmare.lib3270j.graphics.GocaConstants.SF_LOADPS: { // 0x0F: 2-byte Structured Field prefix
if (fieldLen >= 4) {
int sfSubId = data[pos + 3] & 0xFF;
switch (sfSubId) {
case org.lib3270j.graphics.GocaConstants.SF_LOADPS_SUB: // 0x06: Load Programmed Symbols
case haus.nightmare.lib3270j.graphics.GocaConstants.SF_LOADPS_SUB: // 0x06: Load Programmed Symbols
if (fieldLen > 4) {
byte[] psData = new byte[fieldLen - 4];
System.arraycopy(data, pos + 4, psData, 0, psData.length);
programSymbolManager.loadps(psData);
}
break;
case org.lib3270j.graphics.GocaConstants.SF_OBJCNTL_SUB: // 0x11: Object Control (Procedure orders)
case org.lib3270j.graphics.GocaConstants.SF_OBJPICT_SUB: // 0x10: Object Picture (Picture segments)
case org.lib3270j.graphics.GocaConstants.SF_OBJDATA_SUB: { // 0x0F: Object Data (GOCA draw orders)
case haus.nightmare.lib3270j.graphics.GocaConstants.SF_OBJCNTL_SUB: // 0x11: Object Control (Procedure orders)
case haus.nightmare.lib3270j.graphics.GocaConstants.SF_OBJPICT_SUB: // 0x10: Object Picture (Picture segments)
case haus.nightmare.lib3270j.graphics.GocaConstants.SF_OBJDATA_SUB: { // 0x0F: Object Data (GOCA draw orders)
int flags = (fieldLen >= 6) ? (data[pos + 5] & 0xC0) : 0xC0;
int orderOffset = (fieldLen >= 7) ? (pos + 7) : (pos + 4);
int orderLen = Math.max(0, fieldLen - (orderOffset - pos));
@@ -856,7 +856,7 @@ public class DataStreamProcessor {
}
byte[] fullStream = gocaAccumulator.toByteArray();
gocaAccumulator.reset();
if (currentGocaSubtype == org.lib3270j.graphics.GocaConstants.SF_OBJCNTL_SUB) {
if (currentGocaSubtype == haus.nightmare.lib3270j.graphics.GocaConstants.SF_OBJCNTL_SUB) {
gocaDecoder.processProcedureOrders(fullStream, 0, fullStream.length);
} else {
gocaDecoder.decodeStream(fullStream, 0, fullStream.length);
@@ -864,7 +864,7 @@ public class DataStreamProcessor {
notifyScreenUpdated();
} else { // SPAN_ONLY (0xC0)
gocaAccumulator.reset();
if (sfSubId == org.lib3270j.graphics.GocaConstants.SF_OBJCNTL_SUB) {
if (sfSubId == haus.nightmare.lib3270j.graphics.GocaConstants.SF_OBJCNTL_SUB) {
gocaDecoder.processProcedureOrders(data, orderOffset, orderLen);
} else {
gocaDecoder.decodeStream(data, orderOffset, orderLen);
@@ -880,15 +880,15 @@ public class DataStreamProcessor {
}
break;
}
case org.lib3270j.graphics.GocaConstants.SF_OBJCNTL: // 0x24: Object Control (Procedure orders)
case haus.nightmare.lib3270j.graphics.GocaConstants.SF_OBJCNTL: // 0x24: Object Control (Procedure orders)
if (fieldLen > 3) {
graphicsPlane.setScreenDimensions(screen.getCols(), screen.getRows());
gocaDecoder.processProcedureOrders(data, pos + 3, fieldLen - 3);
notifyScreenUpdated();
}
break;
case org.lib3270j.graphics.GocaConstants.SF_OBJDATA: // 0x85: Graphics Object Data / GOCA
case org.lib3270j.graphics.GocaConstants.SF_3270_G: // 0x20: 3270 Graphics
case haus.nightmare.lib3270j.graphics.GocaConstants.SF_OBJDATA: // 0x85: Graphics Object Data / GOCA
case haus.nightmare.lib3270j.graphics.GocaConstants.SF_3270_G: // 0x20: 3270 Graphics
if (fieldLen > 3) {
graphicsPlane.setScreenDimensions(screen.getCols(), screen.getRows());
gocaDecoder.decodeStream(data, pos + 3, fieldLen - 3);
@@ -1,11 +1,11 @@
package org.lib3270j.datastream;
package haus.nightmare.lib3270j.datastream;
import java.io.ByteArrayOutputStream;
import java.util.logging.Logger;
import org.lib3270j.graphics.GraphicsMode;
import org.lib3270j.screen.ScreenBuffer;
import static org.lib3270j.protocol.DS3270Constants.*;
import haus.nightmare.lib3270j.graphics.GraphicsMode;
import haus.nightmare.lib3270j.screen.ScreenBuffer;
import static haus.nightmare.lib3270j.protocol.DS3270Constants.*;
/**
* Builds Query Reply structured fields in response to host Read Partition queries.
@@ -493,7 +493,7 @@ public class QueryReplyBuilder {
for (int i = 0; i < 16; i++) {
out.write(0x00);
out.write(i);
int argb = org.lib3270j.graphics.GocaConstants.GOCA_COLORS[i];
int argb = haus.nightmare.lib3270j.graphics.GocaConstants.GOCA_COLORS[i];
int r = (argb >> 16) & 0xFF;
int g = (argb >> 8) & 0xFF;
int b = argb & 0xFF;
@@ -1,4 +1,4 @@
package org.lib3270j.ft;
package haus.nightmare.lib3270j.ft;
/**
* Configuration for an IND$FILE file transfer session.
@@ -1,4 +1,4 @@
package org.lib3270j.ft;
package haus.nightmare.lib3270j.ft;
/**
* Constants for IND$FILE file transfer protocol.
@@ -183,7 +183,7 @@ public final class FTConstants {
* Decode a CUT-mode base-64 encoded integer from EBCDIC.
* Converts a table6-encoded EBCDIC character to its 6-bit value.
*/
public static int from6(int ebcdicByte, org.lib3270j.charset.EbcdicTranslator translator) {
public static int from6(int ebcdicByte, haus.nightmare.lib3270j.charset.EbcdicTranslator translator) {
char ascii = translator.ebcdicToUnicode(ebcdicByte & 0xFF);
int idx = TABLE6.indexOf(ascii);
return idx >= 0 ? idx : 0;
@@ -199,7 +199,7 @@ public final class FTConstants {
/**
* Encode a 6-bit value into a table6-encoded EBCDIC character.
*/
public static int to6(int value, org.lib3270j.charset.EbcdicTranslator translator) {
public static int to6(int value, haus.nightmare.lib3270j.charset.EbcdicTranslator translator) {
char ascii = TABLE6.charAt(value & 0x3F);
int ebc = translator.unicodeToEbcdic(ascii);
return ebc >= 0 ? ebc : ASC2FT[ascii & 0xFF];
@@ -1,10 +1,10 @@
package org.lib3270j.ft;
package haus.nightmare.lib3270j.ft;
import org.lib3270j.screen.ScreenBuffer;
import org.lib3270j.input.InputProcessor;
import org.lib3270j.charset.EbcdicTranslator;
import static org.lib3270j.ft.FTConstants.*;
import static org.lib3270j.protocol.DS3270Constants.*;
import haus.nightmare.lib3270j.screen.ScreenBuffer;
import haus.nightmare.lib3270j.input.InputProcessor;
import haus.nightmare.lib3270j.charset.EbcdicTranslator;
import static haus.nightmare.lib3270j.ft.FTConstants.*;
import static haus.nightmare.lib3270j.protocol.DS3270Constants.*;
import java.io.*;
import java.nio.charset.StandardCharsets;
@@ -1,8 +1,8 @@
package org.lib3270j.ft;
package haus.nightmare.lib3270j.ft;
import org.lib3270j.input.InputProcessor;
import org.lib3270j.charset.EbcdicTranslator;
import static org.lib3270j.ft.FTConstants.*;
import haus.nightmare.lib3270j.input.InputProcessor;
import haus.nightmare.lib3270j.charset.EbcdicTranslator;
import static haus.nightmare.lib3270j.ft.FTConstants.*;
import java.io.*;
import java.nio.charset.StandardCharsets;
@@ -1,4 +1,4 @@
package org.lib3270j.graphics;
package haus.nightmare.lib3270j.graphics;
/**
* Constants for IBM 3179G / 3270-PC GOCA (Graphics Object Content Architecture)
@@ -1,10 +1,10 @@
package org.lib3270j.graphics;
package haus.nightmare.lib3270j.graphics;
import java.util.ArrayList;
import java.util.List;
import java.util.logging.Logger;
import org.lib3270j.charset.EbcdicTranslator;
import haus.nightmare.lib3270j.charset.EbcdicTranslator;
/**
* Interprets GOCA (Graphics Object Content Architecture) drawing orders
@@ -1,4 +1,4 @@
package org.lib3270j.graphics;
package haus.nightmare.lib3270j.graphics;
/**
* Builds the 56-byte IBM 3179G / 3270G Graphic Input Structured Field.
@@ -1,4 +1,4 @@
package org.lib3270j.graphics;
package haus.nightmare.lib3270j.graphics;
/**
* Graphics modes supported by j3270 / lib3270j.
@@ -1,4 +1,4 @@
package org.lib3270j.graphics;
package haus.nightmare.lib3270j.graphics;
import java.util.ArrayList;
import java.util.Arrays;
@@ -1,4 +1,4 @@
package org.lib3270j.graphics;
package haus.nightmare.lib3270j.graphics;
import java.util.Arrays;
import java.util.logging.Level;
@@ -1,4 +1,4 @@
package org.lib3270j.graphics;
package haus.nightmare.lib3270j.graphics;
/**
* Represents a set of up to 191 custom bitmapped symbols (LCID 0x40 - 0xFE).
@@ -1,9 +1,9 @@
/*
* Decompiled with CFR 0.152.
*/
package org.lib3270j.graphics;
package haus.nightmare.lib3270j.graphics;
import org.lib3270j.graphics.GocaConstants;
import haus.nightmare.lib3270j.graphics.GocaConstants;
public final class VectorSymbolData {
@@ -1,11 +1,11 @@
package org.lib3270j.input;
package haus.nightmare.lib3270j.input;
import org.lib3270j.screen.ScreenBuffer;
import org.lib3270j.screen.ExtendedAttribute;
import org.lib3270j.charset.EbcdicTranslator;
import org.lib3270j.telnet.TelnetFSM;
import org.lib3270j.protocol.TelnetConstants;
import static org.lib3270j.protocol.DS3270Constants.*;
import haus.nightmare.lib3270j.screen.ScreenBuffer;
import haus.nightmare.lib3270j.screen.ExtendedAttribute;
import haus.nightmare.lib3270j.charset.EbcdicTranslator;
import haus.nightmare.lib3270j.telnet.TelnetFSM;
import haus.nightmare.lib3270j.protocol.TelnetConstants;
import static haus.nightmare.lib3270j.protocol.DS3270Constants.*;
import java.io.ByteArrayOutputStream;
import java.util.logging.Logger;
@@ -31,18 +31,18 @@ public class InputProcessor {
this.fsm = fsm;
}
private org.lib3270j.graphics.GraphicsPlane graphicsPlane;
private org.lib3270j.graphics.GocaDecoder gocaDecoder;
private haus.nightmare.lib3270j.graphics.GraphicsPlane graphicsPlane;
private haus.nightmare.lib3270j.graphics.GocaDecoder gocaDecoder;
public void setGraphicsPlane(org.lib3270j.graphics.GraphicsPlane gp) {
public void setGraphicsPlane(haus.nightmare.lib3270j.graphics.GraphicsPlane gp) {
this.graphicsPlane = gp;
}
public void setGocaDecoder(org.lib3270j.graphics.GocaDecoder gd) {
public void setGocaDecoder(haus.nightmare.lib3270j.graphics.GocaDecoder gd) {
this.gocaDecoder = gd;
}
public org.lib3270j.graphics.GocaDecoder getGocaDecoder() {
public haus.nightmare.lib3270j.graphics.GocaDecoder getGocaDecoder() {
return gocaDecoder;
}
@@ -324,7 +324,7 @@ public class InputProcessor {
int gy = gocaDecoder.getGraphicCursorY();
int pickedSeg = gocaDecoder.findPickedSegment(gx, gy);
int pickTag = gocaDecoder.getSegmentTag(pickedSeg);
byte[] sf = org.lib3270j.graphics.GraphicInputBuilder.buildGraphicInput(
byte[] sf = haus.nightmare.lib3270j.graphics.GraphicInputBuilder.buildGraphicInput(
gx, gy, aidCode, true, isShift, isCtrl, pickedSeg, pickTag
);
System.err.println(String.format(
@@ -367,8 +367,8 @@ public class InputProcessor {
ExtendedAttribute faCell = screen.getCell(faPos);
int fa = faCell.fa & 0xFF;
System.out.println("LP: addr=" + address + " faPos=" + faPos + " fa=0x" + String.format("%02X", fa)
+ " selectable=" + org.lib3270j.protocol.DS3270Constants.faIsSelectable(fa));
if (!org.lib3270j.protocol.DS3270Constants.faIsSelectable(fa)) {
+ " selectable=" + haus.nightmare.lib3270j.protocol.DS3270Constants.faIsSelectable(fa));
if (!haus.nightmare.lib3270j.protocol.DS3270Constants.faIsSelectable(fa)) {
return false;
}
@@ -380,28 +380,28 @@ public class InputProcessor {
screen.setCursorAddress(designatorPos);
if (ebcdic == 0x00 || ebcdic == 0x40 || ascii == ' ' || ascii == 0 || (ebcdic != 0x50 && ascii != '&' && ebcdic != 0x6F && ascii != '?' && ebcdic != 0x6E && ascii != '>')) {
faCell.fa |= org.lib3270j.protocol.DS3270Constants.FA_MODIFY;
sendAid(org.lib3270j.protocol.DS3270Constants.AID_SELECT);
faCell.fa |= haus.nightmare.lib3270j.protocol.DS3270Constants.FA_MODIFY;
sendAid(haus.nightmare.lib3270j.protocol.DS3270Constants.AID_SELECT);
return true;
} else if (ebcdic == 0x50 || ascii == '&') {
faCell.fa |= org.lib3270j.protocol.DS3270Constants.FA_MODIFY;
sendAid(org.lib3270j.protocol.DS3270Constants.AID_ENTER);
faCell.fa |= haus.nightmare.lib3270j.protocol.DS3270Constants.FA_MODIFY;
sendAid(haus.nightmare.lib3270j.protocol.DS3270Constants.AID_ENTER);
return true;
} else if (ebcdic == 0x6F || ascii == '?') {
desCell.ec = (byte) 0x6E;
desCell.ucs4 = '>';
faCell.fa |= org.lib3270j.protocol.DS3270Constants.FA_MODIFY;
faCell.fa |= haus.nightmare.lib3270j.protocol.DS3270Constants.FA_MODIFY;
screen.updateDisplaySnapshot();
return true;
} else if (ebcdic == 0x6E || ascii == '>') {
desCell.ec = (byte) 0x6F;
desCell.ucs4 = '?';
faCell.fa &= ~org.lib3270j.protocol.DS3270Constants.FA_MODIFY;
faCell.fa &= ~haus.nightmare.lib3270j.protocol.DS3270Constants.FA_MODIFY;
screen.updateDisplaySnapshot();
return true;
} else {
faCell.fa |= org.lib3270j.protocol.DS3270Constants.FA_MODIFY;
sendAid(org.lib3270j.protocol.DS3270Constants.AID_SELECT);
faCell.fa |= haus.nightmare.lib3270j.protocol.DS3270Constants.FA_MODIFY;
sendAid(haus.nightmare.lib3270j.protocol.DS3270Constants.AID_SELECT);
return true;
}
}
@@ -1,6 +1,6 @@
package org.lib3270j.listener;
package haus.nightmare.lib3270j.listener;
import org.lib3270j.ConnectionState;
import haus.nightmare.lib3270j.ConnectionState;
/**
* Listener for connection state changes and errors.
@@ -1,4 +1,4 @@
package org.lib3270j.listener;
package haus.nightmare.lib3270j.listener;
/**
* Listener for screen buffer changes.
@@ -1,4 +1,4 @@
package org.lib3270j.protocol;
package haus.nightmare.lib3270j.protocol;
/**
* 3270 Data Stream protocol constants.
@@ -1,4 +1,4 @@
package org.lib3270j.protocol;
package haus.nightmare.lib3270j.protocol;
/**
* TN3270E protocol constants per RFC 2355.
@@ -1,4 +1,4 @@
package org.lib3270j.protocol;
package haus.nightmare.lib3270j.protocol;
/**
* Telnet protocol constants from RFC 854 and extensions.
@@ -1,4 +1,4 @@
package org.lib3270j.screen;
package haus.nightmare.lib3270j.screen;
/**
* Extended attribute structure for a single screen buffer position.
@@ -1,8 +1,8 @@
package org.lib3270j.screen;
package haus.nightmare.lib3270j.screen;
import org.lib3270j.TerminalModel;
import org.lib3270j.charset.EbcdicTranslator;
import static org.lib3270j.protocol.DS3270Constants.*;
import haus.nightmare.lib3270j.TerminalModel;
import haus.nightmare.lib3270j.charset.EbcdicTranslator;
import static haus.nightmare.lib3270j.protocol.DS3270Constants.*;
/**
* The 3270 screen buffer.
@@ -1,15 +1,15 @@
package org.lib3270j.telnet;
package haus.nightmare.lib3270j.telnet;
import org.lib3270j.ConnectionState;
import org.lib3270j.ConnectionConfig;
import org.lib3270j.Telnet3270Client;
import haus.nightmare.lib3270j.ConnectionState;
import haus.nightmare.lib3270j.ConnectionConfig;
import haus.nightmare.lib3270j.Telnet3270Client;
import java.io.*;
import java.net.*;
import java.util.logging.Logger;
import java.util.logging.Level;
import static org.lib3270j.protocol.TelnetConstants.*;
import static haus.nightmare.lib3270j.protocol.TelnetConstants.*;
/**
* Manages the raw TCP socket connection to a TN3270 host.
@@ -47,7 +47,7 @@ public class TelnetConnection {
log.info("Connecting with TLS to " + config.getHost() + ":" + config.getPort() +
" (verifyCert=" + config.isTlsVerifyCert() + ")");
try {
javax.net.ssl.SSLContext sslContext = org.lib3270j.tls.TlsTrustManager.createSSLContext(config);
javax.net.ssl.SSLContext sslContext = haus.nightmare.lib3270j.tls.TlsTrustManager.createSSLContext(config);
javax.net.ssl.SSLSocketFactory ssf = sslContext.getSocketFactory();
javax.net.ssl.SSLSocket sslSocket = (javax.net.ssl.SSLSocket) ssf.createSocket();
sslSocket.setKeepAlive(true);
@@ -1,10 +1,10 @@
package org.lib3270j.telnet;
package haus.nightmare.lib3270j.telnet;
import org.lib3270j.*;
import org.lib3270j.datastream.DataStreamProcessor;
import org.lib3270j.protocol.*;
import org.lib3270j.screen.ScreenBuffer;
import org.lib3270j.listener.*;
import haus.nightmare.lib3270j.*;
import haus.nightmare.lib3270j.datastream.DataStreamProcessor;
import haus.nightmare.lib3270j.protocol.*;
import haus.nightmare.lib3270j.screen.ScreenBuffer;
import haus.nightmare.lib3270j.listener.*;
import java.io.ByteArrayOutputStream;
import java.io.IOException;
@@ -14,8 +14,8 @@ import java.util.concurrent.CopyOnWriteArrayList;
import java.util.logging.Logger;
import java.util.logging.Level;
import static org.lib3270j.protocol.TelnetConstants.*;
import static org.lib3270j.protocol.TN3270EConstants.*;
import static haus.nightmare.lib3270j.protocol.TelnetConstants.*;
import static haus.nightmare.lib3270j.protocol.TN3270EConstants.*;
/**
* Telnet finite state machine.
@@ -1,4 +1,4 @@
package org.lib3270j.tls;
package haus.nightmare.lib3270j.tls;
import java.security.cert.CertificateException;
import java.security.cert.X509Certificate;
@@ -1,6 +1,6 @@
package org.lib3270j.tls;
package haus.nightmare.lib3270j.tls;
import org.lib3270j.ConnectionConfig;
import haus.nightmare.lib3270j.ConnectionConfig;
import javax.net.ssl.*;
import java.security.KeyStore;
@@ -1,4 +1,4 @@
package org.lib3270j.charset;
package haus.nightmare.lib3270j.charset;
import org.junit.jupiter.api.Test;
import static org.junit.jupiter.api.Assertions.*;
@@ -1,12 +1,12 @@
package org.lib3270j.datastream;
package haus.nightmare.lib3270j.datastream;
import org.junit.jupiter.api.Test;
import org.lib3270j.TerminalModel;
import org.lib3270j.charset.EbcdicTranslator;
import org.lib3270j.screen.ScreenBuffer;
import org.lib3270j.screen.ExtendedAttribute;
import haus.nightmare.lib3270j.TerminalModel;
import haus.nightmare.lib3270j.charset.EbcdicTranslator;
import haus.nightmare.lib3270j.screen.ScreenBuffer;
import haus.nightmare.lib3270j.screen.ExtendedAttribute;
import static org.junit.jupiter.api.Assertions.*;
import static org.lib3270j.protocol.DS3270Constants.*;
import static haus.nightmare.lib3270j.protocol.DS3270Constants.*;
public class DataStreamProcessorTest {
@@ -69,7 +69,7 @@ public class DataStreamProcessorTest {
@Test
public void testReadBufferPropagatesLastAid() {
org.lib3270j.input.InputProcessor input = new org.lib3270j.input.InputProcessor(screen, translator, null);
haus.nightmare.lib3270j.input.InputProcessor input = new haus.nightmare.lib3270j.input.InputProcessor(screen, translator, null);
processor.setInputProcessor(input);
input.setLastAid(AID_ENTER);
@@ -1,12 +1,12 @@
package org.lib3270j.datastream;
package haus.nightmare.lib3270j.datastream;
import org.junit.jupiter.api.Test;
import org.lib3270j.TerminalModel;
import org.lib3270j.charset.EbcdicTranslator;
import org.lib3270j.graphics.GraphicsMode;
import org.lib3270j.screen.ScreenBuffer;
import haus.nightmare.lib3270j.TerminalModel;
import haus.nightmare.lib3270j.charset.EbcdicTranslator;
import haus.nightmare.lib3270j.graphics.GraphicsMode;
import haus.nightmare.lib3270j.screen.ScreenBuffer;
import static org.junit.jupiter.api.Assertions.*;
import static org.lib3270j.protocol.DS3270Constants.*;
import static haus.nightmare.lib3270j.protocol.DS3270Constants.*;
public class QueryReplyBuilderTest {
@@ -1,4 +1,4 @@
package org.lib3270j.ft;
package haus.nightmare.lib3270j.ft;
import org.junit.jupiter.api.Test;
import static org.junit.jupiter.api.Assertions.*;
@@ -1,4 +1,4 @@
package org.lib3270j.graphics;
package haus.nightmare.lib3270j.graphics;
import org.junit.jupiter.api.Test;
import java.io.ByteArrayOutputStream;
@@ -274,10 +274,10 @@ public class GocaDecoderTest {
@Test
public void testDirectObjectControlSf24() {
org.lib3270j.screen.ScreenBuffer sb = new org.lib3270j.screen.ScreenBuffer(
org.lib3270j.TerminalModel.IBM_3279_4, new org.lib3270j.charset.EbcdicTranslator());
org.lib3270j.datastream.DataStreamProcessor dsp = new org.lib3270j.datastream.DataStreamProcessor(
sb, new org.lib3270j.charset.EbcdicTranslator());
haus.nightmare.lib3270j.screen.ScreenBuffer sb = new haus.nightmare.lib3270j.screen.ScreenBuffer(
haus.nightmare.lib3270j.TerminalModel.IBM_3279_4, new haus.nightmare.lib3270j.charset.EbcdicTranslator());
haus.nightmare.lib3270j.datastream.DataStreamProcessor dsp = new haus.nightmare.lib3270j.datastream.DataStreamProcessor(
sb, new haus.nightmare.lib3270j.charset.EbcdicTranslator());
// First draw something on graphics plane
dsp.getGraphicsPlane().setPixel(10, 10, 0xFFFFFFFF);
@@ -285,10 +285,10 @@ public class GocaDecoderTest {
// Send WSF with SF_OBJCNTL (0x24) containing P_ERASE (0x0A)
byte[] wsf = new byte[] {
(byte) org.lib3270j.protocol.DS3270Constants.CMD_WSF,
(byte) haus.nightmare.lib3270j.protocol.DS3270Constants.CMD_WSF,
0x00, 0x04, // Field length = 4
(byte) org.lib3270j.graphics.GocaConstants.SF_OBJCNTL, // 0x24
(byte) org.lib3270j.graphics.GocaConstants.P_ERASE // 0x0A
(byte) haus.nightmare.lib3270j.graphics.GocaConstants.SF_OBJCNTL, // 0x24
(byte) haus.nightmare.lib3270j.graphics.GocaConstants.P_ERASE // 0x0A
};
dsp.processRecord(wsf, 0, wsf.length, false);
@@ -1,7 +1,7 @@
package org.lib3270j.graphics;
package haus.nightmare.lib3270j.graphics;
import org.junit.jupiter.api.Test;
import org.lib3270j.ConnectionConfig;
import haus.nightmare.lib3270j.ConnectionConfig;
import static org.junit.jupiter.api.Assertions.*;
public class GraphicsModeTest {
@@ -1,4 +1,4 @@
package org.lib3270j.graphics;
package haus.nightmare.lib3270j.graphics;
import org.junit.jupiter.api.Test;
import static org.junit.jupiter.api.Assertions.*;
@@ -1,13 +1,13 @@
package org.lib3270j.input;
package haus.nightmare.lib3270j.input;
import org.junit.jupiter.api.Test;
import org.lib3270j.TerminalModel;
import org.lib3270j.charset.EbcdicTranslator;
import org.lib3270j.datastream.DataStreamProcessor;
import org.lib3270j.screen.ScreenBuffer;
import org.lib3270j.telnet.TelnetFSM;
import haus.nightmare.lib3270j.TerminalModel;
import haus.nightmare.lib3270j.charset.EbcdicTranslator;
import haus.nightmare.lib3270j.datastream.DataStreamProcessor;
import haus.nightmare.lib3270j.screen.ScreenBuffer;
import haus.nightmare.lib3270j.telnet.TelnetFSM;
import static org.junit.jupiter.api.Assertions.*;
import static org.lib3270j.protocol.DS3270Constants.*;
import static haus.nightmare.lib3270j.protocol.DS3270Constants.*;
public class InputProcessorTest {
@@ -135,7 +135,7 @@ public class InputProcessorTest {
@Test
public void testGraphicInputBuilderStructure() {
byte[] sf = org.lib3270j.graphics.GraphicInputBuilder.buildGraphicInput(100, -50, AID_ENTER, false, false, false);
byte[] sf = haus.nightmare.lib3270j.graphics.GraphicInputBuilder.buildGraphicInput(100, -50, AID_ENTER, false, false, false);
assertEquals(56, sf.length);
assertEquals(0x00, sf[0]);
assertEquals(0x34, sf[1]); // Length = 52
@@ -1,8 +1,8 @@
package org.lib3270j.protocol;
package haus.nightmare.lib3270j.protocol;
import org.junit.jupiter.api.Test;
import static org.junit.jupiter.api.Assertions.*;
import static org.lib3270j.protocol.DS3270Constants.*;
import static haus.nightmare.lib3270j.protocol.DS3270Constants.*;
public class DS3270ConstantsTest {
@@ -1,10 +1,10 @@
package org.lib3270j.screen;
package haus.nightmare.lib3270j.screen;
import org.junit.jupiter.api.Test;
import org.lib3270j.TerminalModel;
import org.lib3270j.charset.EbcdicTranslator;
import haus.nightmare.lib3270j.TerminalModel;
import haus.nightmare.lib3270j.charset.EbcdicTranslator;
import static org.junit.jupiter.api.Assertions.*;
import static org.lib3270j.protocol.DS3270Constants.*;
import static haus.nightmare.lib3270j.protocol.DS3270Constants.*;
public class ScreenBufferTest {
@@ -1,14 +1,14 @@
package org.lib3270j.telnet;
package haus.nightmare.lib3270j.telnet;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
import org.lib3270j.ConnectionConfig;
import org.lib3270j.ConnectionState;
import org.lib3270j.TerminalModel;
import org.lib3270j.charset.EbcdicTranslator;
import org.lib3270j.datastream.DataStreamProcessor;
import org.lib3270j.protocol.TelnetConstants;
import org.lib3270j.screen.ScreenBuffer;
import haus.nightmare.lib3270j.ConnectionConfig;
import haus.nightmare.lib3270j.ConnectionState;
import haus.nightmare.lib3270j.TerminalModel;
import haus.nightmare.lib3270j.charset.EbcdicTranslator;
import haus.nightmare.lib3270j.datastream.DataStreamProcessor;
import haus.nightmare.lib3270j.protocol.TelnetConstants;
import haus.nightmare.lib3270j.screen.ScreenBuffer;
import java.io.ByteArrayOutputStream;
import java.util.ArrayList;
@@ -1,8 +1,8 @@
package org.lib3270j.tls;
package haus.nightmare.lib3270j.tls;
import org.junit.jupiter.api.Test;
import org.lib3270j.ConnectionConfig;
import org.lib3270j.TerminalModel;
import haus.nightmare.lib3270j.ConnectionConfig;
import haus.nightmare.lib3270j.TerminalModel;
import javax.net.ssl.SSLContext;
import java.security.cert.CertificateException;