advancedcontrols.java
来自「WAP ide 代码」· Java 代码 · 共 1,055 行 · 第 1/3 页
JAVA
1,055 行
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 + =
减小字号Ctrl + -
显示快捷键?