mirror of
https://github.com/macocianradu/javaGUItoolkit.git
synced 2026-03-18 13:40:04 +00:00
changed how resources are loaded to be compatible with artifacts
added possibility to disable elements
This commit is contained in:
BIN
resources/icons/forbidden_black.png
Normal file
BIN
resources/icons/forbidden_black.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 286 B |
BIN
resources/icons/forbidden_red.png
Normal file
BIN
resources/icons/forbidden_red.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 480 B |
BIN
resources/icons/forbidden_white.png
Normal file
BIN
resources/icons/forbidden_white.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 303 B |
BIN
resources/images/clover.png
Normal file
BIN
resources/images/clover.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 42 KiB |
@@ -9,7 +9,7 @@
|
|||||||
Size="1.0f, 1.0f"
|
Size="1.0f, 1.0f"
|
||||||
Name="Main Grid">
|
Name="Main Grid">
|
||||||
<Text
|
<Text
|
||||||
Text="Ioana E Cea Mai Tare"
|
Text="Text Scris In Text Box"
|
||||||
Name="Text"
|
Name="Text"
|
||||||
Alignment="left"
|
Alignment="left"
|
||||||
Row="0"
|
Row="0"
|
||||||
@@ -24,25 +24,25 @@
|
|||||||
Size="0.5f, 0.3f"
|
Size="0.5f, 0.3f"
|
||||||
Margins="10"
|
Margins="10"
|
||||||
Name="Image"
|
Name="Image"
|
||||||
Image="heart"/>
|
Image="clover"/>
|
||||||
<RadioButtons
|
<RadioButtons
|
||||||
Name="Radio Buttons"
|
Name="Radio Buttons"
|
||||||
Size="0.4f, 0.3f">
|
Size="0.4f, 0.3f">
|
||||||
<RadioButton
|
<RadioButton
|
||||||
Text="Iubesc"
|
Text="Up"
|
||||||
Name="Iubesc"
|
Name="Up"
|
||||||
Size="300, 20"
|
Size="300, 20"
|
||||||
Icon="circle"
|
Icon="circle"
|
||||||
/>
|
/>
|
||||||
<RadioButton
|
<RadioButton
|
||||||
Text="Ioana"
|
Text="Middle"
|
||||||
Name="Ioana"
|
Name="Middle"
|
||||||
Size="300, 20"
|
Size="300, 20"
|
||||||
Icon="circle"
|
Icon="circle"
|
||||||
/>
|
/>
|
||||||
<RadioButton
|
<RadioButton
|
||||||
Text="Mult"
|
Text="Down"
|
||||||
Name="Mult"
|
Name="Down"
|
||||||
Size="300, 20"
|
Size="300, 20"
|
||||||
Icon="circle"
|
Icon="circle"
|
||||||
/>
|
/>
|
||||||
@@ -60,7 +60,7 @@
|
|||||||
<DropDown
|
<DropDown
|
||||||
BackgroundColor="#222222"
|
BackgroundColor="#222222"
|
||||||
Name="DropDown"
|
Name="DropDown"
|
||||||
Label="Text Alignment"
|
Label="Image Position"
|
||||||
Location="0.0f, 0.5f"
|
Location="0.0f, 0.5f"
|
||||||
ContentHeight="30"
|
ContentHeight="30"
|
||||||
ContentWidth="100"
|
ContentWidth="100"
|
||||||
@@ -73,6 +73,7 @@
|
|||||||
ContentHeight="30"
|
ContentHeight="30"
|
||||||
ContentWidth="100">
|
ContentWidth="100">
|
||||||
<Button
|
<Button
|
||||||
|
Disable="true"
|
||||||
Name="topLeft"
|
Name="topLeft"
|
||||||
Label="Left"/>
|
Label="Left"/>
|
||||||
<Button
|
<Button
|
||||||
|
|||||||
@@ -12,6 +12,7 @@ import java.awt.event.MouseEvent;
|
|||||||
import java.awt.image.BufferedImage;
|
import java.awt.image.BufferedImage;
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
|
import java.io.InputStream;
|
||||||
|
|
||||||
public class Button extends MenuItem {
|
public class Button extends MenuItem {
|
||||||
private String label;
|
private String label;
|
||||||
@@ -74,6 +75,11 @@ public class Button extends MenuItem {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void setPaintColor(Color color) {
|
||||||
|
super.setPaintColor(color);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void paint(Image imageBuffer)
|
public void paint(Image imageBuffer)
|
||||||
{
|
{
|
||||||
@@ -132,7 +138,9 @@ public class Button extends MenuItem {
|
|||||||
|
|
||||||
public void setIcon(String url) {
|
public void setIcon(String url) {
|
||||||
try{
|
try{
|
||||||
icon = ImageIO.read(new File("resources\\icons\\" + url + ".png"));
|
InputStream iconStream = getClass().getClassLoader().getResourceAsStream("icons/" + url + ".png");
|
||||||
|
assert iconStream != null;
|
||||||
|
icon = ImageIO.read(iconStream);
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -8,6 +8,7 @@ import java.awt.*;
|
|||||||
import java.awt.image.BufferedImage;
|
import java.awt.image.BufferedImage;
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
|
import java.io.InputStream;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
@@ -71,7 +72,9 @@ public class CheckBoxList extends Visual {
|
|||||||
|
|
||||||
public void setIcon(String url) {
|
public void setIcon(String url) {
|
||||||
try {
|
try {
|
||||||
icon = ImageIO.read(new File("resources\\icons\\" + url + ".png"));
|
InputStream iconStream = getClass().getClassLoader().getResourceAsStream("icons/" + url + ".png");
|
||||||
|
assert iconStream != null;
|
||||||
|
icon = ImageIO.read(iconStream);
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -13,6 +13,7 @@ import java.awt.event.MouseEvent;
|
|||||||
import java.awt.image.BufferedImage;
|
import java.awt.image.BufferedImage;
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
|
import java.io.InputStream;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
@@ -256,7 +257,9 @@ public class DropDown extends MenuItem implements Menu{
|
|||||||
|
|
||||||
public void setIcon(String url) {
|
public void setIcon(String url) {
|
||||||
try{
|
try{
|
||||||
icon = ImageIO.read(new File("resources\\icons\\" + url + ".png"));
|
InputStream iconStream = getClass().getClassLoader().getResourceAsStream("icons/" + url + ".png");
|
||||||
|
assert iconStream != null;
|
||||||
|
icon = ImageIO.read(iconStream);
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -7,6 +7,7 @@ import java.awt.*;
|
|||||||
import java.awt.image.BufferedImage;
|
import java.awt.image.BufferedImage;
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
|
import java.io.InputStream;
|
||||||
|
|
||||||
public class Picture extends Visual {
|
public class Picture extends Visual {
|
||||||
private BufferedImage bufferedImage;
|
private BufferedImage bufferedImage;
|
||||||
@@ -28,7 +29,9 @@ public class Picture extends Visual {
|
|||||||
|
|
||||||
public void setImage(String url) {
|
public void setImage(String url) {
|
||||||
try{
|
try{
|
||||||
bufferedImage = ImageIO.read(new File("resources\\images\\" + url + ".png"));
|
InputStream iconStream = getClass().getClassLoader().getResourceAsStream("images/" + url + ".png");
|
||||||
|
assert iconStream != null;
|
||||||
|
bufferedImage = ImageIO.read(iconStream);
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -11,6 +11,7 @@ import java.awt.event.MouseEvent;
|
|||||||
import java.awt.image.BufferedImage;
|
import java.awt.image.BufferedImage;
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
|
import java.io.InputStream;
|
||||||
|
|
||||||
public class ToggleButton extends Visual {
|
public class ToggleButton extends Visual {
|
||||||
private String label;
|
private String label;
|
||||||
@@ -125,7 +126,9 @@ public class ToggleButton extends Visual {
|
|||||||
|
|
||||||
public void setIcon(String url) {
|
public void setIcon(String url) {
|
||||||
try{
|
try{
|
||||||
icon = ImageIO.read(new File("resources\\icons\\" + url + ".png"));
|
InputStream iconStream = getClass().getClassLoader().getResourceAsStream("icons/" + url + ".png");
|
||||||
|
assert iconStream != null;
|
||||||
|
icon = ImageIO.read(iconStream);
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -11,6 +11,8 @@ import guiTree.events.KeyListener;
|
|||||||
import guiTree.events.MouseListener;
|
import guiTree.events.MouseListener;
|
||||||
import guiTree.events.MouseWheelListener;
|
import guiTree.events.MouseWheelListener;
|
||||||
|
|
||||||
|
import javax.imageio.ImageIO;
|
||||||
|
import javax.swing.*;
|
||||||
import java.awt.*;
|
import java.awt.*;
|
||||||
import java.awt.event.KeyEvent;
|
import java.awt.event.KeyEvent;
|
||||||
import java.awt.event.MouseEvent;
|
import java.awt.event.MouseEvent;
|
||||||
@@ -18,6 +20,7 @@ import java.awt.event.MouseWheelEvent;
|
|||||||
import java.awt.image.BufferedImage;
|
import java.awt.image.BufferedImage;
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
|
import java.io.InputStream;
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.concurrent.locks.ReentrantLock;
|
import java.util.concurrent.locks.ReentrantLock;
|
||||||
@@ -73,6 +76,7 @@ public class Visual {
|
|||||||
private Boolean pressed;
|
private Boolean pressed;
|
||||||
private static ReentrantLock validating = new ReentrantLock();
|
private static ReentrantLock validating = new ReentrantLock();
|
||||||
private Boolean hardwareAccelerated;
|
private Boolean hardwareAccelerated;
|
||||||
|
private Boolean disabled;
|
||||||
|
|
||||||
/*--------------------------------------------------------------------
|
/*--------------------------------------------------------------------
|
||||||
Constructors
|
Constructors
|
||||||
@@ -113,6 +117,8 @@ public class Visual {
|
|||||||
absoluteX = 0;
|
absoluteX = 0;
|
||||||
absoluteY = 0;
|
absoluteY = 0;
|
||||||
|
|
||||||
|
disabled = false;
|
||||||
|
|
||||||
hardwareAccelerated = useGPU;
|
hardwareAccelerated = useGPU;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -293,7 +299,9 @@ public class Visual {
|
|||||||
|
|
||||||
public void setFont(String font, Float size, Integer style) {
|
public void setFont(String font, Float size, Integer style) {
|
||||||
try {
|
try {
|
||||||
this.font = Font.createFont(Font.TRUETYPE_FONT, new File("resources\\fonts\\" + font + ".ttf"));
|
InputStream fontStream = getClass().getClassLoader().getResourceAsStream("fonts/" + font + ".ttf");
|
||||||
|
assert fontStream != null;
|
||||||
|
this.font = Font.createFont(Font.TRUETYPE_FONT, fontStream);
|
||||||
this.font = this.font.deriveFont(style, size);
|
this.font = this.font.deriveFont(style, size);
|
||||||
update();
|
update();
|
||||||
} catch (FontFormatException | IOException e) {
|
} catch (FontFormatException | IOException e) {
|
||||||
@@ -344,6 +352,13 @@ public class Visual {
|
|||||||
attributeMap.put(attribute, value);
|
attributeMap.put(attribute, value);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void setDisable(Boolean disable) {
|
||||||
|
disabled = disable;
|
||||||
|
if(disable) {
|
||||||
|
setPaintColor(Color.LIGHT_GRAY);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/*--------------------------------------------------------------------
|
/*--------------------------------------------------------------------
|
||||||
Attributes Getters
|
Attributes Getters
|
||||||
---------------------------------------------------------------------*/
|
---------------------------------------------------------------------*/
|
||||||
@@ -434,6 +449,10 @@ public class Visual {
|
|||||||
return attributeMap.get(attribute);
|
return attributeMap.get(attribute);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public Boolean isDisabled() {
|
||||||
|
return disabled;
|
||||||
|
}
|
||||||
|
|
||||||
/*--------------------------------------------------------------------
|
/*--------------------------------------------------------------------
|
||||||
Tree Methods
|
Tree Methods
|
||||||
---------------------------------------------------------------------*/
|
---------------------------------------------------------------------*/
|
||||||
@@ -620,30 +639,39 @@ public class Visual {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void mouseClicked(MouseEvent mouseEvent) {
|
void mouseClicked(MouseEvent mouseEvent) {
|
||||||
|
Debugger.log("Clicked " + entered.name, Debugger.Tag.LISTENER);
|
||||||
|
if(entered.disabled) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
for(MouseListener mouseListener: entered.mouseListeners) {
|
for(MouseListener mouseListener: entered.mouseListeners) {
|
||||||
mouseListener.mouseClicked(entered.createMouseEvent(mouseEvent));
|
mouseListener.mouseClicked(entered.createMouseEvent(mouseEvent));
|
||||||
}
|
}
|
||||||
Debugger.log("Clicked " + entered.name, Debugger.Tag.LISTENER);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void mouseReleased(MouseEvent mouseEvent) {
|
void mouseReleased(MouseEvent mouseEvent) {
|
||||||
|
entered.pressed = false;
|
||||||
|
Debugger.log("Released " + entered.name, Debugger.Tag.LISTENER);
|
||||||
|
if(entered.disabled) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
for(MouseListener mouseListener: entered.mouseListeners) {
|
for(MouseListener mouseListener: entered.mouseListeners) {
|
||||||
mouseListener.mouseReleased(entered.createMouseEvent(mouseEvent));
|
mouseListener.mouseReleased(entered.createMouseEvent(mouseEvent));
|
||||||
}
|
}
|
||||||
Debugger.log("Released " + entered.name, Debugger.Tag.LISTENER);
|
|
||||||
entered.pressed = false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void mousePressed(MouseEvent mouseEvent) {
|
void mousePressed(MouseEvent mouseEvent) {
|
||||||
for(MouseListener mouseListener: entered.mouseListeners) {
|
Debugger.log("Pressed " + entered.name, Debugger.Tag.LISTENER);
|
||||||
mouseListener.mousePressed(entered.createMouseEvent(mouseEvent));
|
|
||||||
}
|
|
||||||
entered.pressed = true;
|
entered.pressed = true;
|
||||||
if(focused != null) {
|
if(focused != null) {
|
||||||
focused.update();
|
focused.update();
|
||||||
}
|
}
|
||||||
focused = entered;
|
focused = entered;
|
||||||
Debugger.log("Pressed " + entered.name, Debugger.Tag.LISTENER);
|
if(entered.disabled) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
for(MouseListener mouseListener: entered.mouseListeners) {
|
||||||
|
mouseListener.mousePressed(entered.createMouseEvent(mouseEvent));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void mouseEntered(MouseEvent mouseEvent) {
|
void mouseEntered(MouseEvent mouseEvent) {
|
||||||
@@ -659,10 +687,7 @@ public class Visual {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
entered = this;
|
entered = this;
|
||||||
for(MouseListener mouseListener: mouseListeners) {
|
fireEnteredListener(entered, mouseEvent);
|
||||||
mouseListener.mouseEntered(createMouseEvent(mouseEvent));
|
|
||||||
}
|
|
||||||
Debugger.log("Entered " + entered.name, Debugger.Tag.LISTENER);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void mouseExited(MouseEvent mouseEvent) {
|
void mouseExited(MouseEvent mouseEvent) {
|
||||||
@@ -672,18 +697,18 @@ public class Visual {
|
|||||||
if(entered.pressed) {
|
if(entered.pressed) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
for (MouseListener mouseListener : entered.mouseListeners) {
|
fireExitedListener(entered, mouseEvent);
|
||||||
mouseListener.mouseExited(entered.createMouseEvent(mouseEvent));
|
|
||||||
}
|
|
||||||
Debugger.log("Exited " + entered.name, Debugger.Tag.LISTENER);
|
|
||||||
entered = null;
|
entered = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
void mouseDragged(MouseEvent mouseEvent) {
|
void mouseDragged(MouseEvent mouseEvent) {
|
||||||
|
Debugger.log("Dragged " + entered.name, Debugger.Tag.LISTENER);
|
||||||
|
if(entered.disabled) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
for (MouseListener mouseListener : entered.mouseListeners) {
|
for (MouseListener mouseListener : entered.mouseListeners) {
|
||||||
mouseListener.mouseDragged(entered.createMouseEvent(mouseEvent));
|
mouseListener.mouseDragged(entered.createMouseEvent(mouseEvent));
|
||||||
}
|
}
|
||||||
Debugger.log("Dragged " + entered.name, Debugger.Tag.LISTENER);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void mouseMoved(MouseEvent mouseEvent) {
|
void mouseMoved(MouseEvent mouseEvent) {
|
||||||
@@ -694,10 +719,7 @@ public class Visual {
|
|||||||
int mouseY = mouseEvent.getY();
|
int mouseY = mouseEvent.getY();
|
||||||
if(entered != null) {
|
if(entered != null) {
|
||||||
if (!entered.isInside(mouseX, mouseY)) {
|
if (!entered.isInside(mouseX, mouseY)) {
|
||||||
for (MouseListener mouseListener : entered.mouseListeners) {
|
fireExitedListener(entered, mouseEvent);
|
||||||
mouseListener.mouseExited(entered.createMouseEvent(mouseEvent));
|
|
||||||
}
|
|
||||||
Debugger.log("Exited " + entered.name, Debugger.Tag.LISTENER);
|
|
||||||
entered = this;
|
entered = this;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -709,19 +731,12 @@ public class Visual {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (this != entered && entered != null) {
|
if (this != entered && entered != null) {
|
||||||
for (MouseListener mouseListener : entered.mouseListeners) {
|
fireExitedListener(entered, mouseEvent);
|
||||||
mouseListener.mouseExited(entered.createMouseEvent(mouseEvent));
|
|
||||||
}
|
|
||||||
entered = this;
|
entered = this;
|
||||||
for (MouseListener mouseListener : mouseListeners) {
|
fireEnteredListener(entered, mouseEvent);
|
||||||
mouseListener.mouseEntered(createMouseEvent(mouseEvent));
|
|
||||||
}
|
|
||||||
Debugger.log("Entered " + this.name, Debugger.Tag.LISTENER);
|
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
for (MouseListener mouseListener : mouseListeners) {
|
fireMovedListener(this, mouseEvent);
|
||||||
mouseListener.mouseMoved(createMouseEvent(mouseEvent));
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
Debugger.log("Moved " + this.name, Debugger.Tag.LISTENER);
|
Debugger.log("Moved " + this.name, Debugger.Tag.LISTENER);
|
||||||
}
|
}
|
||||||
@@ -834,6 +849,50 @@ public class Visual {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void fireExitedListener(Visual v, MouseEvent mouseEvent) {
|
||||||
|
Debugger.log("Exited " + v.name, Debugger.Tag.LISTENER);
|
||||||
|
if(v.disabled) {
|
||||||
|
setCursor(new Cursor(Cursor.DEFAULT_CURSOR));
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
for(MouseListener listener: v.mouseListeners) {
|
||||||
|
listener.mouseExited(mouseEvent);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void fireEnteredListener(Visual v, MouseEvent mouseEvent) {
|
||||||
|
Debugger.log("Entered " + v.name, Debugger.Tag.LISTENER);
|
||||||
|
if(v.disabled) {
|
||||||
|
InputStream iconStream = getClass().getClassLoader().getResourceAsStream("icons/forbidden_red.png");
|
||||||
|
try {
|
||||||
|
assert iconStream != null;
|
||||||
|
BufferedImage forbiddenIcon = ImageIO.read(iconStream);
|
||||||
|
BufferedImage actualCursor = new BufferedImage(32, 32, BufferedImage.TYPE_INT_ARGB);
|
||||||
|
Graphics2D cursorGraphics = actualCursor.createGraphics();
|
||||||
|
cursorGraphics.setColor(new Color(0, 0, 0, 0));
|
||||||
|
cursorGraphics.fillRect(0, 0, actualCursor.getWidth(), actualCursor.getHeight());
|
||||||
|
cursorGraphics.drawImage(forbiddenIcon, 0, 0, null);
|
||||||
|
cursorGraphics.dispose();
|
||||||
|
setCursor(Toolkit.getDefaultToolkit().createCustomCursor(actualCursor, new Point(0, 0), "forbidden cursor"));
|
||||||
|
} catch (IOException e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
for(MouseListener listener: v.mouseListeners) {
|
||||||
|
listener.mouseEntered(mouseEvent);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void fireMovedListener(Visual v, MouseEvent mouseEvent) {
|
||||||
|
if(v.disabled) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
for(MouseListener listener: v.mouseListeners) {
|
||||||
|
listener.mouseMoved(mouseEvent);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public void update() {
|
public void update() {
|
||||||
if(!dirty) {
|
if(!dirty) {
|
||||||
validating.lock();
|
validating.lock();
|
||||||
|
|||||||
Reference in New Issue
Block a user