This commit is contained in:
@@ -83,15 +83,6 @@ public class BasePlatePanel extends DevicePanel {
|
||||
repaint();
|
||||
}
|
||||
|
||||
boolean selectable;
|
||||
public boolean getSelectable() {
|
||||
return selectable;
|
||||
}
|
||||
|
||||
public void setSelectable(boolean selectable) {
|
||||
this.selectable = selectable;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* This method is called from within the constructor to initialize the form. WARNING: Do NOT
|
||||
@@ -140,7 +131,7 @@ public class BasePlatePanel extends DevicePanel {
|
||||
case single:
|
||||
platePlotRect = plotRect;
|
||||
puckPlotRect = null;
|
||||
getDevice().draw(g2d, platePlotRect, true, false, true, DrawMode.center, img);
|
||||
getDevice().draw(g2d, platePlotRect, (img==null), false, true, DrawMode.center, img);
|
||||
break;
|
||||
case horizontal:
|
||||
platePlotRect = new Rectangle(plotRect.x, plotRect.y, plotRect.width / 2, plotRect.height);
|
||||
@@ -211,7 +202,7 @@ public class BasePlatePanel extends DevicePanel {
|
||||
}
|
||||
|
||||
private void checkMouseEvent(MouseEvent e, boolean pressed) {
|
||||
if (isEnabled() && selectable) {
|
||||
if (isEnabled() && (getDevice()!=null) && getDevice().isSelectable()) {
|
||||
try {
|
||||
Sample sample = getSample(e.getX(), e.getY());
|
||||
Puck puck = getPuck(e.getX(), e.getY());
|
||||
@@ -252,7 +243,7 @@ public class BasePlatePanel extends DevicePanel {
|
||||
|
||||
@Override
|
||||
public void mouseClicked(MouseEvent e) {
|
||||
if (isEnabled()) {
|
||||
if (isEnabled()&& (getDevice()!=null)) {
|
||||
if (e.getButton() == java.awt.event.MouseEvent.BUTTON1) {
|
||||
Sample sample = getSample(e.getX(), e.getY());
|
||||
Puck puck = getPuck(e.getX(), e.getY());
|
||||
|
||||
Reference in New Issue
Block a user