|
|
|
@ -11,7 +11,13 @@ import com.fr.design.designer.beans.location.Direction;
|
|
|
|
|
import com.fr.design.designer.beans.location.Location; |
|
|
|
|
import com.fr.design.designer.beans.models.SelectionModel; |
|
|
|
|
import com.fr.design.designer.beans.models.StateModel; |
|
|
|
|
import com.fr.design.designer.creator.*; |
|
|
|
|
import com.fr.design.designer.creator.XChartEditor; |
|
|
|
|
import com.fr.design.designer.creator.XCreator; |
|
|
|
|
import com.fr.design.designer.creator.XCreatorUtils; |
|
|
|
|
import com.fr.design.designer.creator.XEditorHolder; |
|
|
|
|
import com.fr.design.designer.creator.XElementCase; |
|
|
|
|
import com.fr.design.designer.creator.XLayoutContainer; |
|
|
|
|
import com.fr.design.designer.creator.XWFitLayout; |
|
|
|
|
import com.fr.design.designer.creator.cardlayout.XCardSwitchButton; |
|
|
|
|
import com.fr.design.designer.creator.cardlayout.XWCardLayout; |
|
|
|
|
import com.fr.design.form.util.XCreatorConstants; |
|
|
|
@ -22,14 +28,20 @@ import com.fr.design.icon.IconPathConstants;
|
|
|
|
|
import com.fr.design.utils.ComponentUtils; |
|
|
|
|
import com.fr.design.utils.gui.GUICoreUtils; |
|
|
|
|
import com.fr.design.utils.gui.LayoutUtils; |
|
|
|
|
|
|
|
|
|
import com.fr.share.ShareConstants; |
|
|
|
|
import com.fr.stable.Constants; |
|
|
|
|
|
|
|
|
|
import com.fr.stable.StringUtils; |
|
|
|
|
import javax.swing.*; |
|
|
|
|
|
|
|
|
|
import javax.swing.BorderFactory; |
|
|
|
|
import javax.swing.JComponent; |
|
|
|
|
import javax.swing.JPopupMenu; |
|
|
|
|
import javax.swing.JWindow; |
|
|
|
|
import javax.swing.SwingUtilities; |
|
|
|
|
import javax.swing.event.MouseInputAdapter; |
|
|
|
|
import java.awt.*; |
|
|
|
|
import java.awt.Color; |
|
|
|
|
import java.awt.Container; |
|
|
|
|
import java.awt.Cursor; |
|
|
|
|
import java.awt.Rectangle; |
|
|
|
|
import java.awt.event.MouseEvent; |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
@ -165,10 +177,13 @@ public class EditingMouseListener extends MouseInputAdapter {
|
|
|
|
|
if (designer.isDrawLineMode()) { |
|
|
|
|
designer.updateDrawLineMode(e); |
|
|
|
|
} else { |
|
|
|
|
int relativeX = Math.max(0, designer.getRelativeX(e.getX())); |
|
|
|
|
int relativeY = Math.max(0, designer.getRelativeY(e.getY())); |
|
|
|
|
|
|
|
|
|
if (selectionModel.hasSelectionComponent() |
|
|
|
|
&& selectionModel.getSelection().getRelativeBounds().contains( |
|
|
|
|
designer.getArea().getHorizontalValue() + e.getX(), |
|
|
|
|
designer.getArea().getVerticalValue() + e.getY())) { |
|
|
|
|
designer.getHorizontalScaleValue() + relativeX, |
|
|
|
|
designer.getVerticalScaleValue() + relativeY)) { |
|
|
|
|
lastPressEvent = e; |
|
|
|
|
lastXCreator = selectionModel.getSelection().getSelectedCreator(); |
|
|
|
|
} else { |
|
|
|
|