improved api

This commit is contained in:
Fredrik Osterlind 2011-11-01 09:30:30 +01:00
parent c96eb826d7
commit ac39443f9c

View File

@ -42,6 +42,7 @@ import java.util.Collection;
import javax.swing.JMenuItem;
import javax.swing.JPopupMenu;
import javax.swing.JScrollPane;
import javax.swing.JTextArea;
import javax.swing.SwingUtilities;
import javax.swing.plaf.basic.BasicInternalFrameUI;
@ -67,7 +68,7 @@ public class Notes extends VisPlugin {
public Notes(Simulation simulation, GUI gui) {
super("Notes", gui);
add(BorderLayout.CENTER, notes);
add(BorderLayout.CENTER, new JScrollPane(notes));
/* Popup menu */
if (Notes.this.getUI() instanceof BasicInternalFrameUI) {
@ -102,6 +103,14 @@ public class Notes extends VisPlugin {
this.setSize(300, 300);
}
public String getNotes() {
return notes.getText();
}
public void setNotes(String text) {
this.notes.setText(text);
}
private void setDecorationsVisible(boolean visible) {
if (!(Notes.this.getUI() instanceof BasicInternalFrameUI)) {
return;