📄 advancedcontrols.java
字号:
int x = theActualControl.getX() + evt.getX() - xPos;
int y = theActualControl.getY() + evt.getY() - yPos;
ResizeBox.setLocation(x, y);
theActualControl.setLocation(x, y);
comp.repaint();
}
/** Call this method during a drag and drop event */
public void Dragging(JToggleButton theActualControl, java.awt.event.MouseEvent evt) {
int x = theActualControl.getX() + evt.getX() - xPos;
int y = theActualControl.getY() + evt.getY() - yPos;
ResizeBox.setLocation(x, y);
theActualControl.setLocation(x, y);
comp.repaint();
}
/** Call this method during a drag and drop event */
public void Dragging(JPanel theActualControl, java.awt.event.MouseEvent evt) {
int x = theActualControl.getX() + evt.getX() - xPos;
int y = theActualControl.getY() + evt.getY() - yPos;
ResizeBox.setLocation(x, y);
theActualControl.setLocation(x, y);
comp.repaint();
}
/** Call this method during a drag and drop event */
public void Dragging(JTabbedPane theActualControl, java.awt.event.MouseEvent evt) {
int x = theActualControl.getX() + evt.getX() - xPos;
int y = theActualControl.getY() + evt.getY() - yPos;
ResizeBox.setLocation(x, y);
theActualControl.setLocation(x, y);
comp.repaint();
}
/** Call this method during a drag and drop event */
public void Dragging(JScrollPane theActualControl, java.awt.event.MouseEvent evt) {
int x = theActualControl.getX() + evt.getX() - xPos;
int y = theActualControl.getY() + evt.getY() - yPos;
ResizeBox.setLocation(x, y);
theActualControl.setLocation(x, y);
comp.repaint();
}
/** Call this method when the control is pressed */
public void Pressing(JLabel theActualControl, java.awt.event.MouseEvent evt) {
theActualControl.setVisible(false);
ResizeBox.setCursor(new Cursor(1));
xPos = evt.getX();
yPos = evt.getY();
HideAnchors();
ShowResizeBox(theActualControl.getX(), theActualControl.getY(), theActualControl.getWidth(), theActualControl.getHeight());
}
/** Call this method when the control is pressed */
public void Pressing(JButton theActualControl, java.awt.event.MouseEvent evt) {
theActualControl.setVisible(false);
ResizeBox.setCursor(new Cursor(1));
xPos = evt.getX();
yPos = evt.getY();
HideAnchors();
ShowResizeBox(theActualControl.getX(), theActualControl.getY(), theActualControl.getWidth(), theActualControl.getHeight());
}
/** Call this method when the control is pressed */
public void Pressing(JCheckBox theActualControl, java.awt.event.MouseEvent evt) {
theActualControl.setVisible(false);
ResizeBox.setCursor(new Cursor(1));
xPos = evt.getX();
yPos = evt.getY();
HideAnchors();
ShowResizeBox(theActualControl.getX(), theActualControl.getY(), theActualControl.getWidth(), theActualControl.getHeight());
}
/** Call this method when the control is pressed */
public void Pressing(JRadioButton theActualControl, java.awt.event.MouseEvent evt) {
theActualControl.setVisible(false);
ResizeBox.setCursor(new Cursor(1));
xPos = evt.getX();
yPos = evt.getY();
HideAnchors();
ShowResizeBox(theActualControl.getX(), theActualControl.getY(), theActualControl.getWidth(), theActualControl.getHeight());
}
/** Call this method when the control is pressed */
public void Pressing(JComboBox theActualControl, java.awt.event.MouseEvent evt) {
theActualControl.setVisible(false);
ResizeBox.setCursor(new Cursor(1));
xPos = evt.getX();
yPos = evt.getY();
HideAnchors();
ShowResizeBox(theActualControl.getX(), theActualControl.getY(), theActualControl.getWidth(), theActualControl.getHeight());
}
/** Call this method when the control is pressed */
public void Pressing(JList theActualControl, java.awt.event.MouseEvent evt) {
theActualControl.setVisible(false);
ResizeBox.setCursor(new Cursor(1));
xPos = evt.getX();
yPos = evt.getY();
HideAnchors();
ShowResizeBox(theActualControl.getX(), theActualControl.getY(), theActualControl.getWidth(), theActualControl.getHeight());
}
/** Call this method when the control is pressed */
public void Pressing(JTextField theActualControl, java.awt.event.MouseEvent evt) {
theActualControl.setVisible(false);
ResizeBox.setCursor(new Cursor(1));
xPos = evt.getX();
yPos = evt.getY();
HideAnchors();
ShowResizeBox(theActualControl.getX(), theActualControl.getY(), theActualControl.getWidth(), theActualControl.getHeight());
}
/** Call this method when the control is pressed */
public void Pressing(JTextArea theActualControl, java.awt.event.MouseEvent evt) {
theActualControl.setVisible(false);
ResizeBox.setCursor(new Cursor(1));
xPos = evt.getX();
yPos = evt.getY();
HideAnchors();
ShowResizeBox(theActualControl.getX(), theActualControl.getY(), theActualControl.getWidth(), theActualControl.getHeight());
}
/** Call this method when the control is pressed */
public void Pressing(JToggleButton theActualControl, java.awt.event.MouseEvent evt) {
theActualControl.setVisible(false);
ResizeBox.setCursor(new Cursor(1));
xPos = evt.getX();
yPos = evt.getY();
HideAnchors();
ShowResizeBox(theActualControl.getX(), theActualControl.getY(), theActualControl.getWidth(), theActualControl.getHeight());
}
/** Call this method when the control is pressed */
public void Pressing(JPanel theActualControl, java.awt.event.MouseEvent evt) {
theActualControl.setVisible(false);
ResizeBox.setCursor(new Cursor(1));
xPos = evt.getX();
yPos = evt.getY();
HideAnchors();
ShowResizeBox(theActualControl.getX(), theActualControl.getY(), theActualControl.getWidth(), theActualControl.getHeight());
}
/** Call this method when the control is pressed */
public void Pressing(JTabbedPane theActualControl, java.awt.event.MouseEvent evt) {
theActualControl.setVisible(false);
ResizeBox.setCursor(new Cursor(1));
xPos = evt.getX();
yPos = evt.getY();
HideAnchors();
ShowResizeBox(theActualControl.getX(), theActualControl.getY(), theActualControl.getWidth(), theActualControl.getHeight());
}
/** Call this method when the control is pressed */
public void Pressing(JScrollPane theActualControl, java.awt.event.MouseEvent evt) {
theActualControl.setVisible(false);
ResizeBox.setCursor(new Cursor(1));
xPos = evt.getX();
yPos = evt.getY();
HideAnchors();
ShowResizeBox(theActualControl.getX(), theActualControl.getY(), theActualControl.getWidth(), theActualControl.getHeight());
}
/** Call this method when the control is released */
public void Releasing(JLabel theActualControl, java.awt.event.MouseEvent evt) {
theActualControl.setVisible(true);
ResizeBox.setCursor(new Cursor(0));
comp.repaint();
ResizeBox.setVisible(false);
ShowAnchors(theActualControl.getX(), theActualControl.getY(), theActualControl.getWidth(), theActualControl.getHeight());
}
/** Call this method when the control is released */
public void Releasing(JButton theActualControl, java.awt.event.MouseEvent evt) {
theActualControl.setVisible(false);
ResizeBox.setCursor(new Cursor(1));
xPos = evt.getX();
yPos = evt.getY();
HideAnchors();
ShowResizeBox(theActualControl.getX(), theActualControl.getY(), theActualControl.getWidth(), theActualControl.getHeight());
}
/** Call this method when the control is released */
public void Releasing(JCheckBox theActualControl, java.awt.event.MouseEvent evt) {
theActualControl.setVisible(false);
ResizeBox.setCursor(new Cursor(1));
xPos = evt.getX();
yPos = evt.getY();
HideAnchors();
ShowResizeBox(theActualControl.getX(), theActualControl.getY(), theActualControl.getWidth(), theActualControl.getHeight());
}
/** Call this method when the control is released */
public void Releasing(JRadioButton theActualControl, java.awt.event.MouseEvent evt) {
theActualControl.setVisible(false);
ResizeBox.setCursor(new Cursor(1));
xPos = evt.getX();
yPos = evt.getY();
HideAnchors();
ShowResizeBox(theActualControl.getX(), theActualControl.getY(), theActualControl.getWidth(), theActualControl.getHeight());
}
/** Call this method when the control is released */
public void Releasing(JComboBox theActualControl, java.awt.event.MouseEvent evt) {
theActualControl.setVisible(false);
ResizeBox.setCursor(new Cursor(1));
xPos = evt.getX();
yPos = evt.getY();
HideAnchors();
ShowResizeBox(theActualControl.getX(), theActualControl.getY(), theActualControl.getWidth(), theActualControl.getHeight());
}
/** Call this method when the control is released */
public void Releasing(JList theActualControl, java.awt.event.MouseEvent evt) {
theActualControl.setVisible(false);
ResizeBox.setCursor(new Cursor(1));
xPos = evt.getX();
yPos = evt.getY();
HideAnchors();
ShowResizeBox(theActualControl.getX(), theActualControl.getY(), theActualControl.getWidth(), theActualControl.getHeight());
}
/** Call this method when the control is released */
public void Releasing(JTextField theActualControl, java.awt.event.MouseEvent evt) {
theActualControl.setVisible(false);
ResizeBox.setCursor(new Cursor(1));
xPos = evt.getX();
yPos = evt.getY();
HideAnchors();
ShowResizeBox(theActualControl.getX(), theActualControl.getY(), theActualControl.getWidth(), theActualControl.getHeight());
}
/** Call this method when the control is released */
public void Releasing(JTextArea theActualControl, java.awt.event.MouseEvent evt) {
theActualControl.setVisible(false);
ResizeBox.setCursor(new Cursor(1));
xPos = evt.getX();
yPos = evt.getY();
HideAnchors();
ShowResizeBox(theActualControl.getX(), theActualControl.getY(), theActualControl.getWidth(), theActualControl.getHeight());
}
/** Call this method when the control is released */
public void Releasing(JToggleButton theActualControl, java.awt.event.MouseEvent evt) {
theActualControl.setVisible(false);
ResizeBox.setCursor(new Cursor(1));
xPos = evt.getX();
yPos = evt.getY();
HideAnchors();
ShowResizeBox(theActualControl.getX(), theActualControl.getY(), theActualControl.getWidth(), theActualControl.getHeight());
}
/** Call this method when the control is released */
public void Releasing(JPanel theActualControl, java.awt.event.MouseEvent evt) {
theActualControl.setVisible(false);
ResizeBox.setCursor(new Cursor(1));
xPos = evt.getX();
yPos = evt.getY();
HideAnchors();
ShowResizeBox(theActualControl.getX(), theActualControl.getY(), theActualControl.getWidth(), theActualControl.getHeight());
}
/** Call this method when the control is released */
public void Releasing(JTabbedPane theActualControl, java.awt.event.MouseEvent evt) {
theActualControl.setVisible(false);
ResizeBox.setCursor(new Cursor(1));
xPos = evt.getX();
yPos = evt.getY();
HideAnchors();
ShowResizeBox(theActualControl.getX(), theActualControl.getY(), theActualControl.getWidth(), theActualControl.getHeight());
}
/** Call this method when the control is released */
public void Releasing(JScrollPane theActualControl, java.awt.event.MouseEvent evt) {
theActualControl.setVisible(false);
ResizeBox.setCursor(new Cursor(1));
xPos = evt.getX();
yPos = evt.getY();
HideAnchors();
ShowResizeBox(theActualControl.getX(), theActualControl.getY(), theActualControl.getWidth(), theActualControl.getHeight());
}
/** Call this method to initialize the control to be resized or moved */
public void SetControl(JLabel theControl) {
theControlLabel = (JComponent) theControl;
}
/** Call this method to initialize the control to be resized or moved */
public void SetControl(JButton theControl) {
theControlLabel = (JComponent) theControl;
}
/** Call this method to initialize the control to be resized or moved */
public void SetControl(JCheckBox theControl) {
theControlLabel = (JComponent) theControl;
}
/** Call this method to initialize the control to be resized or moved */
public void SetControl(JRadioButton theControl) {
theControlLabel = (JComponent) theControl;
}
/** Call this method to initialize the control to be resized or moved */
public void SetControl(JComboBox theControl) {
theControlLabel = (JComponent) theControl;
}
/** Call this method to initialize the control to be resized or moved */
public void SetControl(JList theControl) {
theControlLabel = (JComponent) theControl;
}
/** Call this method to initialize the control to be resized or moved */
public void SetControl(JTextField theControl) {
theControlLabel = (JComponent) theControl;
}
/** Call this method to initialize the control to be resized or moved */
public void SetControl(JTextArea theControl) {
theControlLabel = (JComponent) theControl;
}
/** Call this method to initialize the control to be resized or moved */
public void SetControl(JToggleButton theControl) {
theControlLabel = (JComponent) theControl;
}
/** Call this method to initialize the control to be resized or moved */
public void SetControl(JPanel theControl) {
theControlLabel = (JComponent) theControl;
}
/** Call this method to initialize the control to be resized or moved */
public void SetControl(JTabbedPane theControl) {
theControlLabel = (JComponent) theControl;
}
/** Call this method to initialize the control to be resized or moved */
public void SetControl(JScrollPane theControl) {
theControlLabel = (JComponent) theControl;
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -