Commit fe6a5c19 authored by Dr. Michael Petter's avatar Dr. Michael Petter

pageup/down

parent 3c269d81
Pipeline #1746 passed with stage
in 29 seconds
...@@ -409,16 +409,28 @@ public class PaintControls extends GradientPanel { ...@@ -409,16 +409,28 @@ public class PaintControls extends GradientPanel {
} }
} }
else if (event.getSource() == whiteboardPrevious){ else if (event.getSource() == whiteboardPrevious){
paintListener.previousWhiteboard(); if (whiteboardEnable.isSelected()) {
if(mouseButton.isSelected()){ paintListener.previousWhiteboard();
freeButton.setSelected(true); if(mouseButton.isSelected()){
} freeButton.setSelected(true);
}
}
else
{
paintListener.triggerPageUp();
}
} }
else if (event.getSource() == whiteboardNext){ else if (event.getSource() == whiteboardNext){
paintListener.nextWhiteboard(); if (whiteboardEnable.isSelected()) {
if(mouseButton.isSelected()){ paintListener.nextWhiteboard();
freeButton.setSelected(true); if(mouseButton.isSelected()){
} freeButton.setSelected(true);
}
}
else
{
paintListener.triggerPageDown();
}
} }
} }
}; };
......
...@@ -431,6 +431,15 @@ public class PaintListener extends RFBKeyAndMouseListener implements KeyEventDis ...@@ -431,6 +431,15 @@ public class PaintListener extends RFBKeyAndMouseListener implements KeyEventDis
} }
public void triggerPageDown() {
super.keyPressed(new KeyEvent(player,KeyEvent.KEY_PRESSED,System.currentTimeMillis(),0,KeyEvent.VK_PAGE_DOWN,KeyEvent.CHAR_UNDEFINED));
}
public void triggerPageUp() {
super.keyPressed(new KeyEvent(player,KeyEvent.KEY_PRESSED,System.currentTimeMillis(),0,KeyEvent.VK_PAGE_UP,KeyEvent.CHAR_UNDEFINED));
}
@Override @Override
public void keyPressed(KeyEvent evt) { public void keyPressed(KeyEvent evt) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment