當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。