Examples of HotspotPanel


Examples of org.javatari.utils.slickframe.HotspotPanel

    else if  (popinEnabled)((EmbeddedRoom) Room.currentRoom()).reembedScreen();
    else Room.currentRoom().exit();
  }

  private void addHotspots() {
    HotspotPanel hotspotPanel = getContentHotspotPanel();
    hotspotPanel.addHotspot(
      new Rectangle(HotspotPanel.CENTER_HOTSPOT, -27, 24, 28), "Toggle Console Controls",
      new Runnable() { @Override public void run() {
        if (consolePanelWindow != null) consolePanelWindow.toggle();
      }});
    hotspotPanel.addHotspot(
      new Rectangle(-70 -44, -20, 13, 15), "Minimize",
      new Runnable() { @Override public void run() {
        setState(ICONIFIED);
      }});
    hotspotPanel.addHotspot(
      new Rectangle(-52 - 44, -21, 12, 16), "Decrease Size",
      new Runnable() { @Override public void run() {
        monitor.controlActivated(Monitor.Control.SIZE_MINUS);
      }});
    hotspotPanel.addHotspot(
      new Rectangle(-35 - 44, -24, 14, 19), "Increase Size",
      new Runnable() { @Override public void run() {
        monitor.controlActivated(Monitor.Control.SIZE_PLUS);
      }});
    hotspotPanel.addHotspot(
      new Rectangle(-16 -44, -24, 17, 19), "Go Full Screen",
      new Runnable() { @Override public void run() {
        fullScreen(!fullScreen);
      }});
    hotspotPanel.addHotspot(
      new Rectangle(-37, -24, 16, 19), "Open Settings",
      new Runnable() { @Override public void run() {
        Room.currentRoom().openSettings(DesktopScreenWindow.this);
        requestFocus();
      }});
    if (popinEnabled)
      hotspotPanel.addHotspot(
        new Rectangle(7, -25, 23, 20), "Re-attach Screen",
        new Runnable() { @Override public void run() {
          ((EmbeddedRoom) Room.currentRoom()).reembedScreen();
        }});
    else
      hotspotPanel.addHotspot(
        new Rectangle(8, -25, 19, 19), "Shutdown",
        new Runnable() { @Override public void run() {
          Room.currentRoom().exit();
        }});
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.