use of java.awt.event.MouseListener in project LauncherV3 by TechnicPack.
the class InstallerFrame method addGlassPane.
private void addGlassPane() {
glassPane = new JPanel() {
@Override
public void paintComponent(Graphics g) {
super.paintComponent(g);
g.setColor(LauncherFrame.COLOR_CENTRAL_BACK);
g.fillRect(0, 0, getWidth(), getHeight());
}
};
glassPane.addMouseListener(new MouseListener() {
@Override
public void mouseClicked(MouseEvent e) {
e.consume();
}
@Override
public void mousePressed(MouseEvent e) {
e.consume();
}
@Override
public void mouseReleased(MouseEvent e) {
e.consume();
}
@Override
public void mouseEntered(MouseEvent e) {
e.consume();
}
@Override
public void mouseExited(MouseEvent e) {
e.consume();
}
});
glassPane.setOpaque(false);
glassPane.setLayout(new GridBagLayout());
JLabel spinner = new JLabel(resources.getIcon("loader.gif"));
glassPane.add(spinner);
setGlassPane(glassPane);
}
use of java.awt.event.MouseListener in project com.revolsys.open by revolsys.
the class MouseOverlay method mouseEntered.
@Override
public void mouseEntered(final MouseEvent e) {
updateEventPoint(e);
requestFocusInWindow();
for (final Component overlay : getOverlays()) {
if (overlay instanceof MouseListener) {
final MouseListener listener = (MouseListener) overlay;
listener.mouseEntered(e);
if (e.isConsumed()) {
return;
}
}
}
}
use of java.awt.event.MouseListener in project com.revolsys.open by revolsys.
the class MouseOverlay method mouseClicked.
@Override
public void mouseClicked(final MouseEvent e) {
updateEventPoint(e);
requestFocusInWindow();
for (final Component overlay : getOverlays()) {
if (overlay instanceof MouseListener) {
final MouseListener listener = (MouseListener) overlay;
listener.mouseClicked(e);
if (e.isConsumed()) {
return;
}
}
}
}
use of java.awt.event.MouseListener in project com.revolsys.open by revolsys.
the class MouseOverlay method mouseReleased.
@Override
public void mouseReleased(final MouseEvent e) {
updateEventPoint(e);
requestFocusInWindow();
for (final Component overlay : getOverlays()) {
if (overlay instanceof MouseListener) {
final MouseListener listener = (MouseListener) overlay;
listener.mouseReleased(e);
if (e.isConsumed()) {
return;
}
}
}
}
use of java.awt.event.MouseListener in project com.revolsys.open by revolsys.
the class MouseOverlay method mouseExited.
@Override
public void mouseExited(final MouseEvent event) {
MouseOverlay.x = -1;
MouseOverlay.y = -1;
MouseOverlay.point = GeometryFactory.DEFAULT_3D.point();
this.mapPanel.mouseExitedCloseSelected(event);
for (final Component overlay : getOverlays()) {
if (overlay instanceof MouseListener) {
final MouseListener listener = (MouseListener) overlay;
listener.mouseExited(event);
if (event.isConsumed()) {
return;
}
}
}
}
Aggregations