public TEditorWindow(final TApplication parent, final String title) {
super(parent, title, 0, 0, parent.getScreen().getWidth(),
- parent.getScreen().getHeight() - 2, RESIZABLE);
+ parent.getDesktopBottom() - parent.getDesktopTop(), RESIZABLE);
editField = addEditor("", 0, 0, getWidth() - 2, getHeight() - 2);
setupAfterEditor();
final String contents) {
super(parent, title, 0, 0, parent.getScreen().getWidth(),
- parent.getScreen().getHeight() - 2, RESIZABLE);
+ parent.getDesktopBottom() - parent.getDesktopTop(), RESIZABLE);
filename = title;
editField = addEditor(contents, 0, 0, getWidth() - 2, getHeight() - 2);
final File file) throws IOException {
super(parent, file.getName(), 0, 0, parent.getScreen().getWidth(),
- parent.getScreen().getHeight() - 2, RESIZABLE);
+ parent.getDesktopBottom() - parent.getDesktopTop(), RESIZABLE);
filename = file.getName();
String contents = readFileData(file);
// Clicked on vertical scrollbar
editField.setVisibleRowNumber(getVerticalValue());
}
-
- // TODO: horizontal scrolling
+ if (mouse.isMouse1() && mouseOnHorizontalScroller(mouse)) {
+ // Clicked on horizontal scrollbar
+ editField.setVisibleColumnNumber(getHorizontalValue());
+ setHorizontalValue(editField.getVisibleColumnNumber());
+ }
}
/**
// Clicked/dragged on vertical scrollbar
editField.setVisibleRowNumber(getVerticalValue());
}
-
- // TODO: horizontal scrolling
+ if (mouse.isMouse1() && mouseOnHorizontalScroller(mouse)) {
+ // Clicked/dragged on horizontal scrollbar
+ editField.setVisibleColumnNumber(getHorizontalValue());
+ setHorizontalValue(editField.getVisibleColumnNumber());
+ }
}
}