20 package net.sf.gridarta.gui.map.mapview;
22 import java.awt.Point;
23 import javax.swing.JScrollPane;
24 import javax.swing.JViewport;
25 import javax.swing.ScrollPaneConstants;
34 import org.jetbrains.annotations.NotNull;
35 import org.jetbrains.annotations.Nullable;
70 public void mapCursorChangedPos(@NotNull
final Point location) {
75 public void mapCursorChangedMode() {
80 public void mapCursorChangedGameObject(@Nullable
final MapSquare<G, A, R> mapSquare, @Nullable
final G gameObject) {
85 public void mapCursorChangedSize() {
103 scrollPane =
new JScrollPane(ScrollPaneConstants.VERTICAL_SCROLLBAR_AS_NEEDED, ScrollPaneConstants.HORIZONTAL_SCROLLBAR_AS_NEEDED);
109 scrollPane.getVerticalScrollBar().setUnitIncrement(yScrollDistance);
110 scrollPane.getHorizontalScrollBar().setUnitIncrement(xScrollDistance);
111 scrollPane.getViewport().setScrollMode(JViewport.SIMPLE_SCROLL_MODE);
122 scrollPane.getViewport().setViewPosition(viewPosition);