当前位置: 首页>>代码示例>>Java>>正文


Java KeyEvent.VK_F2属性代码示例

本文整理汇总了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();
        }
    }
}
 
开发者ID:Vitaliy-Yakovchuk,项目名称:ramus,代码行数:26,代码来源:MovingArea.java

示例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);
        }
    }
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:31,代码来源:KeyboardMenuNavigator.java

示例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();
    }
}
 
开发者ID:iuryamicussi,项目名称:TrabalhoCrisParte2,代码行数:28,代码来源:Template.java

示例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
		}
	}
}
 
开发者ID:Thecarisma,项目名称:powertext,代码行数:12,代码来源:FocusableTip.java

示例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());
        }
    }
}
 
开发者ID:CognizantQAHub,项目名称:Cognizant-Intelligent-Test-Scripter,代码行数:7,代码来源:UI2.java

示例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;
	}

}
 
开发者ID:transwarpio,项目名称:rapidminer,代码行数:41,代码来源:AnnotationEventHook.java


注:本文中的java.awt.event.KeyEvent.VK_F2属性示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。