org.eclipse.swt.widgets.Label.addMouseMoveListener()方法的使用及代码示例

x33g5p2x  于2022-01-23 转载在 其他  
字(5.0k)|赞(0)|评价(0)|浏览(164)

本文整理了Java中org.eclipse.swt.widgets.Label.addMouseMoveListener()方法的一些代码示例,展示了Label.addMouseMoveListener()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Label.addMouseMoveListener()方法的具体详情如下:
包路径:org.eclipse.swt.widgets.Label
类名称:Label
方法名:addMouseMoveListener

Label.addMouseMoveListener介绍

暂无

代码示例

代码示例来源:origin: org.eclipse.mylyn.commons/workbench

@Override
public void mouseDown(MouseEvent e) {
  labelButton.setImage(pressedImage);
  fMoveListener = new MouseMoveListener() {
    private boolean fMouseInButton = true;
    public void mouseMove(MouseEvent e) {
      boolean mouseInButton = isMouseInButton(e);
      if (mouseInButton != fMouseInButton) {
        fMouseInButton = mouseInButton;
        labelButton.setImage(mouseInButton ? pressedImage : inactiveImage);
      }
    }
  };
  labelButton.addMouseMoveListener(fMoveListener);
}

代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.jdt.ui

@Override
public void mouseDown(MouseEvent e) {
  clearButton.setImage(pressedImage);
  fMoveListener= new MouseMoveListener() {
    private boolean fMouseInButton= true;
    @Override
    public void mouseMove(MouseEvent e1) {
      boolean mouseInButton= isMouseInButton(e1);
      if (mouseInButton != fMouseInButton) {
        fMouseInButton= mouseInButton;
        clearButton.setImage(mouseInButton ? pressedImage : inactiveImage);
      }
    }
  };
  clearButton.addMouseMoveListener(fMoveListener);
}

代码示例来源:origin: org.eclipse.jdt/org.eclipse.jdt.ui

@Override
public void mouseDown(MouseEvent e) {
  clearButton.setImage(pressedImage);
  fMoveListener= new MouseMoveListener() {
    private boolean fMouseInButton= true;
    @Override
    public void mouseMove(MouseEvent e1) {
      boolean mouseInButton= isMouseInButton(e1);
      if (mouseInButton != fMouseInButton) {
        fMouseInButton= mouseInButton;
        clearButton.setImage(mouseInButton ? pressedImage : inactiveImage);
      }
    }
  };
  clearButton.addMouseMoveListener(fMoveListener);
}

代码示例来源:origin: org.eclipse.platform/org.eclipse.ui.workbench

@Override
public void mouseDown(MouseEvent e) {
  clearButton.setImage(pressedImage);
  fMoveListener= new MouseMoveListener() {
    private boolean fMouseInButton= true;
    @Override
    public void mouseMove(MouseEvent e) {
      boolean mouseInButton= isMouseInButton(e);
      if (mouseInButton != fMouseInButton) {
        fMouseInButton= mouseInButton;
        clearButton.setImage(mouseInButton ? pressedImage : inactiveImage);
      }
    }
  };
  clearButton.addMouseMoveListener(fMoveListener);
}

代码示例来源:origin: BiglySoftware/BiglyBT

protected final void createGap(int width) {
  width = (int)(width * width_multiplier );
  // We create a label just so we can attach the menu to it.
  assertConstructing();
  Label result = new Label(splash, SWT.NONE);
  result.setBackground(Colors.blues[Colors.BLUES_LIGHTEST]);
  result.setForeground(Colors.blues[Colors.BLUES_DARKEST]);
  result.setText("");
  result.addMouseListener(this.mListener);
  result.addMouseMoveListener(this.mMoveListener);
  result.setLocation(this.xSize, 0);
  result.setSize(width, hSize);
  result.setMenu(this.menu);
  this.xSize += width;
}

代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.ui.forms

private void hookHoverListeners() {
  HoverListener listener = new HoverListener();
  addMouseTrackListener(listener);
  addMouseMoveListener(listener);
  titleLabel.addMouseTrackListener(listener);
  titleLabel.addMouseMoveListener(listener);
  addPaintListener(new PaintListener() {
    @Override
    public void paintControl(PaintEvent e) {
      onPaint(e);
    }
  });
}

代码示例来源:origin: org.eclipse.platform/org.eclipse.ui.forms

private void hookHoverListeners() {
  HoverListener listener = new HoverListener();
  addMouseTrackListener(listener);
  addMouseMoveListener(listener);
  titleLabel.addMouseTrackListener(listener);
  titleLabel.addMouseMoveListener(listener);
  addPaintListener(e -> onPaint(e));
}

代码示例来源:origin: BiglySoftware/BiglyBT

protected final Label createFixedLabel(int width) {
  assertConstructing();
  Label result = new Label(splash, SWT.NONE);
  result.setBackground(Colors.white);
  result.setSize(width, SWT.DEFAULT );
  result.setLocation(this.xSize, 0);
  result.addMouseListener(this.mListener);
  result.addMouseMoveListener(this.mMoveListener);
  result.setMenu(this.menu);
  if (this.hSize == -1) {
    int hSizeText = result.getSize().y;
    int hSizeImage = this.lDrag.getSize().y;
    this.hSize = hSizeText > hSizeImage ? hSizeText : hSizeImage;
  }
  this.xSize += width;
  return( result );
}

代码示例来源:origin: BiglySoftware/BiglyBT

protected final Label createFixedTextLabel(String msg_key, boolean add_colon, boolean bold) {
  assertConstructing();
  Label result = new Label(splash, SWT.NONE);
  result.setBackground(Colors.blues[Colors.BLUES_LIGHTEST]);
  result.setForeground(Colors.blues[Colors.BLUES_DARKEST]);
  result.setText(MessageText.getString(msg_key) + ((add_colon) ? ":" : ""));
  if (bold) {
    if (this.bold_font == null) {
      this.bold_font = createBoldFont(result.getFont());
    }
    result.setFont(this.bold_font);
  }
  result.addMouseListener(this.mListener);
  result.addMouseMoveListener(this.mMoveListener);
  result.pack();
  result.setLocation(this.xSize, 0);
  result.setMenu(this.menu);
  if (this.hSize == -1) {
    int hSizeText = result.getSize().y;
    int hSizeImage = this.lDrag.getSize().y;
    this.hSize = hSizeText > hSizeImage ? hSizeText : hSizeImage;
  }
  this.xSize += result.getSize().x + 3;
  return( result );
}

代码示例来源:origin: BiglySoftware/BiglyBT

splash.addMouseMoveListener(mMoveListener);
lDrag.addMouseListener(mListener);
lDrag.addMouseMoveListener(mMoveListener);

代码示例来源:origin: BiglySoftware/BiglyBT

label.addMouseMoveListener(mMoveListener);

相关文章