mirror of
https://github.com/bancika/diy-layout-creator
synced 2026-11-11 01:32:08 +10:00
better status bar text when dragging a component from the tree
This commit is contained in:
@@ -95,7 +95,8 @@ public class StatusBar extends JPanel implements IPlugIn {
|
||||
|
||||
// State variables
|
||||
private ComponentType componentSlot;
|
||||
private Point controlPointSlot;
|
||||
private Point controlPointSlot;
|
||||
private Boolean forceInstatiate;
|
||||
private List<String> componentNamesUnderCursor;
|
||||
private List<String> selectedComponentNames;
|
||||
private List<String> stuckComponentNames;
|
||||
@@ -419,7 +420,8 @@ public class StatusBar extends JPanel implements IPlugIn {
|
||||
break;
|
||||
case SLOT_CHANGED:
|
||||
componentSlot = (ComponentType) params[0];
|
||||
controlPointSlot = (Point) params[1];
|
||||
controlPointSlot = (Point) params[1];
|
||||
forceInstatiate = params.length > 2 ? (Boolean)params[2] : null;
|
||||
refreshStatusText();
|
||||
break;
|
||||
case AVAILABLE_CTRL_POINTS_CHANGED:
|
||||
@@ -458,7 +460,11 @@ public class StatusBar extends JPanel implements IPlugIn {
|
||||
}
|
||||
statusText = "<html>Selection: " + builder.toString() + "</html>";
|
||||
}
|
||||
} else {
|
||||
} else {
|
||||
if (forceInstatiate)
|
||||
statusText = "<html>Drag the mouse over the canvas to place a new <font color='blue'>" + componentSlot.getName()
|
||||
+ "</font></html>";
|
||||
else
|
||||
switch (componentSlot.getCreationMethod()) {
|
||||
case POINT_BY_POINT:
|
||||
String count;
|
||||
|
||||
Reference in New Issue
Block a user