protected void mouseClicked(!!int x, int y, int button!!) throws IOException {
super.mouseClicked(x, y, button); // This line throws IOException which is why this method has to have the 'throws' declaration
for(Frame frame : guiManager.getFrames()) {
if(!frame.isVisible())
continue;
if(!frame.isMinimized() && !frame.getArea().contains(x, y)) {
for(Component component : frame.getChildren()) {
for(Rectangle area : component.getTheme().getUIForComponent(component).getInteractableRegions(component)) {
if(area.contains(x - frame.getX() - component.getX(), y - frame.getY() - component.getY())) {
frame.onMousePress(x - frame.getX(), y - frame.getY(), button);
guiManager.bringForward(frame);
return;
}
}
}
}
}
Those with !! are marked.
protected void mouseClicked(!!int x, int y, int button!!) throws IOException {
super.mouseClicked(x, y, button); // This line throws IOException which is why this method has to have the 'throws' declaration
for(Frame frame : guiManager.getFrames()) {
if(!frame.isVisible())
continue;
if(!frame.isMinimized() && !frame.getArea().contains(x, y)) {
for(Component component : frame.getChildren()) {
for(Rectangle area : component.getTheme().getUIForComponent(component).getInteractableRegions(component)) {
if(area.contains(x - frame.getX() - component.getX(), y - frame.getY() - component.getY())) {
frame.onMousePress(x - frame.getX(), y - frame.getY(), button);
guiManager.bringForward(frame);
return;
}
}
}
}
}
Those with !! are marked.