本文整理汇总了Java中java.awt.event.KeyEvent.VK_F2属性的典型用法代码示例。如果您正苦于以下问题:Java KeyEvent.VK_F2属性的具体用法?Java KeyEvent.VK_F2怎么用?Java KeyEvent.VK_F2使用的例子?那么恭喜您, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在类java.awt.event.KeyEvent
的用法示例。
在下文中一共展示了KeyEvent.VK_F2属性的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: processKeyBinding
public void processKeyBinding(final int keyKode) {
if (pressedPanel != null) {
switch (keyKode) {
case KeyEvent.VK_F2:
renameObject();
return;
default:
// p = false;
break;
}
// if (p)
// pressedPanel.onEndBoundsChange();
}
if (KeyEvent.VK_ESCAPE == keyKode) {
if (getState() == END_POINT_ADDING) {
setState(START_POINT_ADDING);
if (panel != null)
panel.getFramework().remove(CURRENT_MOVING_AREA);
repaintAsync();
} else if (getChangingState() == ARROW_CHANGING_STATE) {
if (panel != null)
panel.getFramework().remove(CURRENT_MOVING_AREA);
cancelAdding();
}
}
}
示例2: keyPressed
@Override
public void keyPressed(KeyEvent e) {
if(e.getKeyCode() == KeyEvent.VK_DOWN) {
selectOffsetMenuItem(+1);
}
if(e.getKeyCode() == KeyEvent.VK_UP) {
selectOffsetMenuItem(-1);
}
if(e.getKeyCode() == KeyEvent.VK_LEFT) {
selectOffsetMenu(-1);
}
if(e.getKeyCode() == KeyEvent.VK_RIGHT) {
selectOffsetMenu(+1);
}
if(e.getKeyCode() == KeyEvent.VK_SPACE) {
startEditing();
}
// #116961: start inplace editing when F2 key is pressed on a menu
if(e.getKeyCode() == KeyEvent.VK_F2) {
startEditing();
}
//we aren't getting tabs for some reason
if(e.getKeyCode() == KeyEvent.VK_A) {
if(e.isShiftDown()) {
selectNextMenuItem(-1);
} else {
selectNextMenuItem(+1);
}
}
}
示例3: teclaPressionada
public void teclaPressionada(java.awt.event.KeyEvent evt){
if(evt.getKeyCode() == KeyEvent.VK_F4){
if(!jButtonSalvar.isVisible())
return;
salvar();
}
if(evt.getKeyCode() == KeyEvent.VK_F2){
if(!jButtonIncluir.isVisible())
return;
incluir();
}
if(evt.getKeyCode() == KeyEvent.VK_F5){
if(!jButtonCancelar.isVisible())
return;
cancelar();
}
if(evt.getKeyCode() == KeyEvent.VK_F8){
if(!jButtonExcluir.isVisible())
return;
excluir();
}
if(evt.getKeyCode() == KeyEvent.VK_F6){
if(!jButtonPesquisar.isVisible())
return;
pesquisar();
}
}
示例4: keyPressed
@Override
public void keyPressed(KeyEvent e) {
if (e.getKeyCode()==KeyEvent.VK_ESCAPE) {
possiblyDisposeOfTipWindow();
}
else if (e.getKeyCode()==KeyEvent.VK_F2) {
if (tipWindow!=null && !tipWindow.getFocusableWindowState()) {
tipWindow.actionPerformed(null);
e.consume(); // Don't do bookmarking stuff
}
}
}
示例5: featureListKeyPressed
private void featureListKeyPressed(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_featureListKeyPressed
if (evt.getKeyCode() == KeyEvent.VK_F2) {
if (featureList.getSelectedValue() != null) {
uic.startEdit((Story) featureList.getSelectedValue());
}
}
}
示例6: processKeyEvent
@Override
public void processKeyEvent(final ExecutionUnit process, final KeyEventType type, final KeyEvent e) {
if (!visualizer.isActive()) {
return;
}
if (type != KeyEventType.KEY_PRESSED) {
return;
}
if (model.getSelected() == null) {
return;
}
switch (e.getKeyCode()) {
case KeyEvent.VK_F2:
decorator.editSelected();
e.consume();
break;
case KeyEvent.VK_BACK_SPACE:
if (SystemInfoUtilities.getOperatingSystem() == OperatingSystem.OSX) {
model.deleteAnnotation(model.getSelected());
model.setResized(null);
model.setDragged(null);
e.consume();
}
break;
case KeyEvent.VK_DELETE:
model.deleteAnnotation(model.getSelected());
model.setResized(null);
model.setDragged(null);
e.consume();
break;
case KeyEvent.VK_ESCAPE:
model.setSelected(null);
model.stopDragOrResize(null);
e.consume();
break;
default:
break;
}
}