java.awt.event.KeyEvent.isConsumed()方法的使用及代码示例

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

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

KeyEvent.isConsumed介绍

暂无

代码示例

代码示例来源:origin: runelite/runelite

@Override
@Replace("keyReleased")
public final synchronized void keyReleased(KeyEvent keyEvent)
{
  client.getCallbacks().keyReleased(keyEvent);
  if (!keyEvent.isConsumed())
  {
    rs$keyReleased(keyEvent);
  }
}

代码示例来源:origin: runelite/runelite

@Override
@Replace("keyPressed")
public final synchronized void keyPressed(KeyEvent keyEvent)
{
  client.getCallbacks().keyPressed(keyEvent);
  if (!keyEvent.isConsumed())
  {
    rs$keyPressed(keyEvent);
  }
}

代码示例来源:origin: runelite/runelite

@Override
@Replace("keyTyped")
public final void keyTyped(KeyEvent keyEvent)
{
  client.getCallbacks().keyTyped(keyEvent);
  if (!keyEvent.isConsumed())
  {
    rs$keyTyped(keyEvent);
  }
}

代码示例来源:origin: org.netbeans.modules/org-netbeans-modules-cnd-debugger-common2

@Override
  public void keyPressed(java.awt.event.KeyEvent evt) {
  if (evt.isConsumed())
    return;
  if (evt.getKeyChar() == KeyEvent.VK_DELETE) {
    evt.consume();
    deleteAction();
    //closeAction(dialog, CANCEL_OPTION);
  }
  }
});

代码示例来源:origin: xyz.cofe/docking-frames-core

public boolean keyPressed( DockElement element, KeyEvent event ){
    if( element == AbstractDockable.this ){
      for( KeyListener listener : getKeyListeners() ){
        listener.keyPressed( event );
      }
      return event.isConsumed();
    }
    else{
      return false;
    }
  }
};

代码示例来源:origin: org.netbeans.modules/org-netbeans-modules-cnd

private void handleEscape(java.awt.event.KeyEvent evt) {
  // Add your handling code here:
  if (evt.isConsumed()) {
    return;
  }
  if (evt.getKeyChar() == KeyEvent.VK_ESCAPE) {
    evt.consume();
    closeAction(dialog, CANCEL_OPTION);
  }
}

代码示例来源:origin: sc.fiji/fiji-lib

@Override
public final void keyReleased(KeyEvent e) {
  if (!e.isConsumed())
    listener.keyReleased(e);
}

代码示例来源:origin: sc.fiji/Simple_Neurite_Tracer

@Override
public void keyTyped(final KeyEvent e) {
  for (final KeyListener kl : listeners) {
    if (e.isConsumed())
      break;
    kl.keyTyped(e);
  }
}

代码示例来源:origin: sc.fiji/fiji-lib

@Override
  public final void keyTyped(KeyEvent e) {
    if (!e.isConsumed())
      listener.keyTyped(e);
  }
}

代码示例来源:origin: xyz.cofe/docking-frames-core

public boolean keyTyped( DockElement element, KeyEvent event ){
  if( element == AbstractDockable.this ){
    for( KeyListener listener : getKeyListeners() ){
      listener.keyTyped( event );
    }
    return event.isConsumed();
  }
  else{
    return false;
  }
}

代码示例来源:origin: vasl-developers/vasl

public void keyReleased(KeyEvent e) {
    if (!e.isConsumed()) {
      keyCommand(KeyStroke.getKeyStrokeForEvent(e));
    }
  }
}

代码示例来源:origin: org.netbeans.api/org-openide-explorer

@Override
protected void processKeyEvent(KeyEvent e) {
  qs.processKeyEvent(e);
  if (!e.isConsumed()) {
    super.processKeyEvent(e);
  }
}

代码示例来源:origin: org.netbeans.modules/org-netbeans-modules-notifications

@Override
protected void processKeyEvent(KeyEvent e) {
  fireProcessKeyEvent(e);
  if (!e.isConsumed()) {
    super.processKeyEvent(e);
  }
}

代码示例来源:origin: com.jidesoft/jide-oss

public void keyPressed(KeyEvent e) {
  if (e.isConsumed()) {
    return;
  }
  if (!_tree.isCheckBoxEnabled()) {
    return;
  }
  if (e.getModifiers() == 0 && e.getKeyChar() == KeyEvent.VK_SPACE)
    toggleSelections();
}

代码示例来源:origin: xyz.cofe/docking-frames-core

public void keyReleased( KeyEvent event ) {
  if( event.isConsumed() )
    return;
  
  if( KeyStroke.getKeyStrokeForEvent( event ).equals( initSelection.getValue() )){
    select();
    event.consume();
  }
}

代码示例来源:origin: xyz.cofe/docking-frames-core

public void keyTyped( KeyEvent event ) {
  if( event.isConsumed() )
    return;
  
  if( KeyStroke.getKeyStrokeForEvent( event ).equals( initSelection.getValue() )){
    select();
    event.consume();
  }
}

代码示例来源:origin: org.bitbucket.goalhub.simpleide/jedit

@Override
public void processKeyEvent(KeyEvent evt) {
  getInputHandler().processKeyEvent(evt, 1 /* source=TEXTAREA (1) */,
      false);
  if (!evt.isConsumed())
    super.processKeyEvent(evt);
} // }}}

代码示例来源:origin: org.opentcs.thirdparty.dockingframes/docking-frames-core

public void keyPressed( KeyEvent event ) {
  if( event.isConsumed() )
    return;
  
  if( KeyStroke.getKeyStrokeForEvent( event ).equals( initSelection.getValue() )){
    select();
    event.consume();
  }
}

代码示例来源:origin: xyz.cofe/docking-frames-core

public void keyPressed( KeyEvent event ) {
  if( event.isConsumed() )
    return;
  
  if( KeyStroke.getKeyStrokeForEvent( event ).equals( initSelection.getValue() )){
    select();
    event.consume();
  }
}

代码示例来源:origin: org.opentcs.thirdparty.jhotdraw/jhotdraw

@Override
public void keyPressed(KeyEvent evt) {
  multicaster.keyPressed(evt);
  if (!evt.isConsumed()) {
    super.keyPressed(evt);
    // Forward key presses to the handler
    if (dragLocation != null) {
      multicaster.trackStep(anchor, dragLocation,
          evt.getModifiersEx(), getView());
    }
  }
}

相关文章