plough
7 years ago
12 changed files with 186 additions and 14 deletions
@ -0,0 +1,37 @@
|
||||
package com.fr.design.designer.beans.actions; |
||||
|
||||
import com.fr.base.BaseUtils; |
||||
import com.fr.design.mainframe.FormDesigner; |
||||
import com.fr.general.Inter; |
||||
|
||||
import javax.swing.*; |
||||
import java.awt.event.InputEvent; |
||||
import java.awt.event.KeyEvent; |
||||
|
||||
import static com.fr.design.gui.syntax.ui.rtextarea.RTADefaultInputMap.DEFAULT_MODIFIER; |
||||
|
||||
/** |
||||
* 下移一层(控件树内) |
||||
* Created by plough on 2017/12/4. |
||||
*/ |
||||
|
||||
public class MoveDownAction extends FormEditAction { |
||||
|
||||
public MoveDownAction(FormDesigner t) { |
||||
super(t); |
||||
this.setName(Inter.getLocText("FR-Designer_Move_Down")); |
||||
this.setMnemonic('T'); |
||||
this.setSmallIcon(BaseUtils.readIcon("/com/fr/design/images/control/down.png")); |
||||
this.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_OPEN_BRACKET, DEFAULT_MODIFIER)); |
||||
} |
||||
|
||||
@Override |
||||
public boolean executeActionReturnUndoRecordNeeded() { |
||||
FormDesigner editPane = getEditingComponent(); |
||||
if (editPane == null) { |
||||
return false; |
||||
} |
||||
return editPane.cut(); |
||||
} |
||||
|
||||
} |
@ -0,0 +1,37 @@
|
||||
package com.fr.design.designer.beans.actions; |
||||
|
||||
import com.fr.base.BaseUtils; |
||||
import com.fr.design.mainframe.FormDesigner; |
||||
import com.fr.general.Inter; |
||||
|
||||
import javax.swing.*; |
||||
import java.awt.event.InputEvent; |
||||
import java.awt.event.KeyEvent; |
||||
|
||||
import static com.fr.design.gui.syntax.ui.rtextarea.RTADefaultInputMap.DEFAULT_MODIFIER; |
||||
|
||||
/** |
||||
* 置于底层(控件树内) |
||||
* Created by plough on 2017/12/4. |
||||
*/ |
||||
|
||||
public class MoveToBottomAction extends FormEditAction { |
||||
|
||||
public MoveToBottomAction(FormDesigner t) { |
||||
super(t); |
||||
this.setName(Inter.getLocText("FR-Designer_Move_To_Bottom")); |
||||
this.setMnemonic('T'); |
||||
this.setSmallIcon(BaseUtils.readIcon("/com/fr/design/images/control/down.png")); |
||||
this.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_OPEN_BRACKET, DEFAULT_MODIFIER + InputEvent.ALT_MASK)); |
||||
} |
||||
|
||||
@Override |
||||
public boolean executeActionReturnUndoRecordNeeded() { |
||||
FormDesigner editPane = getEditingComponent(); |
||||
if (editPane == null) { |
||||
return false; |
||||
} |
||||
return editPane.cut(); |
||||
} |
||||
|
||||
} |
@ -0,0 +1,37 @@
|
||||
package com.fr.design.designer.beans.actions; |
||||
|
||||
import com.fr.base.BaseUtils; |
||||
import com.fr.design.mainframe.FormDesigner; |
||||
import com.fr.general.Inter; |
||||
|
||||
import javax.swing.*; |
||||
import java.awt.event.InputEvent; |
||||
import java.awt.event.KeyEvent; |
||||
|
||||
import static com.fr.design.gui.syntax.ui.rtextarea.RTADefaultInputMap.DEFAULT_MODIFIER; |
||||
|
||||
/** |
||||
* 置于顶层(控件树内) |
||||
* Created by plough on 2017/12/4. |
||||
*/ |
||||
|
||||
public class MoveToTopAction extends FormEditAction { |
||||
|
||||
public MoveToTopAction(FormDesigner t) { |
||||
super(t); |
||||
this.setName(Inter.getLocText("FR-Designer_Move_To_Top")); |
||||
this.setMnemonic('T'); |
||||
this.setSmallIcon(BaseUtils.readIcon("/com/fr/design/images/control/up.png")); |
||||
this.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_CLOSE_BRACKET, DEFAULT_MODIFIER + InputEvent.ALT_MASK)); |
||||
} |
||||
|
||||
@Override |
||||
public boolean executeActionReturnUndoRecordNeeded() { |
||||
FormDesigner editPane = getEditingComponent(); |
||||
if (editPane == null) { |
||||
return false; |
||||
} |
||||
return editPane.cut(); |
||||
} |
||||
|
||||
} |
@ -0,0 +1,36 @@
|
||||
package com.fr.design.designer.beans.actions; |
||||
|
||||
import com.fr.base.BaseUtils; |
||||
import com.fr.design.mainframe.FormDesigner; |
||||
import com.fr.general.Inter; |
||||
|
||||
import javax.swing.*; |
||||
import java.awt.event.KeyEvent; |
||||
|
||||
import static com.fr.design.gui.syntax.ui.rtextarea.RTADefaultInputMap.DEFAULT_MODIFIER; |
||||
|
||||
/** |
||||
* 同级上移一层(控件树内) |
||||
* Created by plough on 2017/12/4. |
||||
*/ |
||||
|
||||
public class MoveUpAction extends FormEditAction { |
||||
|
||||
public MoveUpAction(FormDesigner t) { |
||||
super(t); |
||||
this.setName(Inter.getLocText("FR-Designer_Move_Up")); |
||||
this.setMnemonic('T'); |
||||
this.setSmallIcon(BaseUtils.readIcon("/com/fr/design/images/control/up.png")); |
||||
this.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_CLOSE_BRACKET, DEFAULT_MODIFIER)); |
||||
} |
||||
|
||||
@Override |
||||
public boolean executeActionReturnUndoRecordNeeded() { |
||||
FormDesigner editPane = getEditingComponent(); |
||||
if (editPane == null) { |
||||
return false; |
||||
} |
||||
return editPane.cut(); |
||||
} |
||||
|
||||
} |
Loading…
Reference in new issue