mirror of
https://github.com/bancika/diy-layout-creator
synced 2026-11-10 17:22:09 +10:00
better status bar text when dragging a component from the tree
This commit is contained in:
@@ -923,8 +923,8 @@ public class Presenter implements IPlugInPort {
|
||||
minY = rect.y;
|
||||
if (rect.y + rect.height > maxY)
|
||||
maxY = rect.y + rect.height;
|
||||
} else
|
||||
LOG.info("Area is null for " + c.getName() + " of type "
|
||||
} else if (currentProject.getComponents().contains(c))
|
||||
LOG.debug("Area is null for " + c.getName() + " of type "
|
||||
+ c.getClass().getName());
|
||||
}
|
||||
if (drawingManager.getZoomLevel() != 1 && applyZoom) {
|
||||
@@ -2161,7 +2161,7 @@ public class Presenter implements IPlugInPort {
|
||||
// messageDispatcher.dispatchMessage(EventType.SELECTION_SIZE_CHANGED,
|
||||
// calculateSelectionDimension());
|
||||
messageDispatcher.dispatchMessage(EventType.SLOT_CHANGED, instantiationManager.getComponentTypeSlot(),
|
||||
instantiationManager.getFirstControlPoint());
|
||||
instantiationManager.getFirstControlPoint(), forceInstatiate);
|
||||
} catch (Exception e) {
|
||||
LOG.error("Could not set component type slot", e);
|
||||
view.showMessage("Could not set component type slot. Check log for details.", "Error", IView.ERROR_MESSAGE);
|
||||
|
||||
@@ -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