// monospace.
textHeight = fm.getMaxAscent() + maxDescent - leading;
- // TODO: is this still necessary?
if (gotTerminus == true) {
textHeight++;
}
// Pull the system property for triple buffering.
if (System.getProperty("jexer.Swing.tripleBuffer") != null) {
- if (System.getProperty("jexer.Swing.tripleBuffer").
- equals("false")) {
-
+ if (System.getProperty("jexer.Swing.tripleBuffer").equals("true")) {
+ SwingComponent.tripleBuffer = true;
+ } else {
SwingComponent.tripleBuffer = false;
}
}
SwingTerminal.this.sessionInfo =
new SwingSessionInfo(SwingTerminal.this.swing,
SwingTerminal.this.textWidth,
- SwingTerminal.this.textHeight);
+ SwingTerminal.this.textHeight,
+ windowWidth, windowHeight);
SwingTerminal.this.setDimensions(sessionInfo.getWindowWidth(),
sessionInfo.getWindowHeight());
}
/**
- * Public constructor creates a new JFrame to render to.
+ * Public constructor renders to an existing JComponent.
*
* @param component the Swing component to render to
* @param windowWidth the number of text columns to start with
synchronized (eventQueue) {
eventQueue.add(new TKeypressEvent(keypress));
}
- synchronized (listener) {
- listener.notifyAll();
+ if (listener != null) {
+ synchronized (listener) {
+ listener.notifyAll();
+ }
}
}
synchronized (eventQueue) {
eventQueue.add(new TCommandEvent(cmAbort));
}
- synchronized (listener) {
- listener.notifyAll();
+ if (listener != null) {
+ synchronized (listener) {
+ listener.notifyAll();
+ }
}
}
sessionInfo.getWindowWidth(), sessionInfo.getWindowHeight());
eventQueue.add(windowResize);
}
- synchronized (listener) {
- listener.notifyAll();
+ if (listener != null) {
+ synchronized (listener) {
+ listener.notifyAll();
+ }
}
}
synchronized (eventQueue) {
eventQueue.add(mouseEvent);
}
- synchronized (listener) {
- listener.notifyAll();
+ if (listener != null) {
+ synchronized (listener) {
+ listener.notifyAll();
+ }
}
}
synchronized (eventQueue) {
eventQueue.add(mouseEvent);
}
- synchronized (listener) {
- listener.notifyAll();
+ if (listener != null) {
+ synchronized (listener) {
+ listener.notifyAll();
+ }
}
}
synchronized (eventQueue) {
eventQueue.add(mouseEvent);
}
- synchronized (listener) {
- listener.notifyAll();
+ if (listener != null) {
+ synchronized (listener) {
+ listener.notifyAll();
+ }
}
}
synchronized (eventQueue) {
eventQueue.add(mouseEvent);
}
- synchronized (listener) {
- listener.notifyAll();
+ if (listener != null) {
+ synchronized (listener) {
+ listener.notifyAll();
+ }
}
}
synchronized (eventQueue) {
eventQueue.add(mouseEvent);
}
- synchronized (listener) {
- listener.notifyAll();
+ if (listener != null) {
+ synchronized (listener) {
+ listener.notifyAll();
+ }
}
}