本文整理汇总了Java中com.vaadin.event.ShortcutAction.KeyCode类的典型用法代码示例。如果您正苦于以下问题:Java KeyCode类的具体用法?Java KeyCode怎么用?Java KeyCode使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
KeyCode类属于com.vaadin.event.ShortcutAction包,在下文中一共展示了KeyCode类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: MovieDetailsWindow
import com.vaadin.event.ShortcutAction.KeyCode; //导入依赖的package包/类
private MovieDetailsWindow(final Movie movie, final Date startTime,
final Date endTime) {
addStyleName("moviedetailswindow");
Responsive.makeResponsive(this);
setCaption(movie.getTitle());
center();
setCloseShortcut(KeyCode.ESCAPE, null);
setResizable(false);
setClosable(false);
setHeight(90.0f, Unit.PERCENTAGE);
VerticalLayout content = new VerticalLayout();
content.setSizeFull();
setContent(content);
Panel detailsWrapper = new Panel(buildMovieDetails(movie, startTime,
endTime));
detailsWrapper.setSizeFull();
detailsWrapper.addStyleName(ValoTheme.PANEL_BORDERLESS);
detailsWrapper.addStyleName("scroll-divider");
content.addComponent(detailsWrapper);
content.setExpandRatio(detailsWrapper, 1f);
content.addComponent(buildFooter());
}
示例2: GitPushWindow
import com.vaadin.event.ShortcutAction.KeyCode; //导入依赖的package包/类
/**
* The constructor should first build the main layout, set the
* composition root and then do any custom initialization.
*
* The constructor will not be automatically regenerated by the
* visual editor.
* @param git
* @param status
*/
public GitPushWindow(Git git, File target, Status status) {
buildMainLayout();
//setCompositionRoot(mainLayout);
setContent(mainLayout);
//
// Save data
//
this.git = git;
this.target = target;
this.container = new GitStatusContainer(status);
//
// Set our shortcuts
//
this.setCloseShortcut(KeyCode.ESCAPE);
//
// Initialize GUI
//
this.initializeText();
this.initializeTable(status);
this.initializeButtons();
//
// Focus
//
this.textAreaComments.focus();
}
示例3: AttributeAssignmentExpressionEditorWindow
import com.vaadin.event.ShortcutAction.KeyCode; //导入依赖的package包/类
/**
* The constructor should first build the main layout, set the
* composition root and then do any custom initialization.
*
* The constructor will not be automatically regenerated by the
* visual editor.
*/
public AttributeAssignmentExpressionEditorWindow(AttributeAssignmentExpressionType assignment) {
buildMainLayout();
//setCompositionRoot(mainLayout);
setContent(mainLayout);
//
// Save
//
this.assignment = assignment;
//
// Set our shortcuts
//
this.setCloseShortcut(KeyCode.ESCAPE);
//
// Initialize GUI
//
this.initializeText();
this.initializeTable();
this.initializeButton();
//
// Focus
//
this.textFieldAttributeID.focus();
}
示例4: ObligationEditorWindow
import com.vaadin.event.ShortcutAction.KeyCode; //导入依赖的package包/类
/**
* The constructor should first build the main layout, set the
* composition root and then do any custom initialization.
*
* The constructor will not be automatically regenerated by the
* visual editor.
*/
public ObligationEditorWindow(ObligationExpressionType obligation) {
buildMainLayout();
//setCompositionRoot(mainLayout);
setContent(mainLayout);
//
// Save
//
this.obligation = obligation;
//
// Set our shortcuts
//
this.setCloseShortcut(KeyCode.ESCAPE);
//
// Initialize GUI
//
this.initialize();
this.initializeButton();
//
// Focus
//
this.textFieldObligationID.focus();
}
示例5: MatchEditorWindow
import com.vaadin.event.ShortcutAction.KeyCode; //导入依赖的package包/类
/**
* The constructor should first build the main layout, set the
* composition root and then do any custom initialization.
*
* The constructor will not be automatically regenerated by the
* visual editor.
*/
public MatchEditorWindow(MatchType match, Datatype datatype) {
buildMainLayout();
//setCompositionRoot(mainLayout);
setContent(mainLayout);
//
// Save our data
//
this.match = match;
this.datatype = datatype;
//
// Close shortcut
//
this.setCloseShortcut(KeyCode.ESCAPE);
//
// Initialize GUI
//
this.initializeFunctions();
this.initializeButtons();
//
// Set our focus
//
this.tableFunctions.focus();
}
示例6: PIPParamEditorWindow
import com.vaadin.event.ShortcutAction.KeyCode; //导入依赖的package包/类
/**
* The constructor should first build the main layout, set the
* composition root and then do any custom initialization.
*
* The constructor will not be automatically regenerated by the
* visual editor.
*/
public PIPParamEditorWindow(Object config) {
buildMainLayout();
//setCompositionRoot(mainLayout);
setContent(mainLayout);
//
// Save parameters
//
this.config = config;
//
// Initialize
//
this.initialize();
//
// close shortcut
//
this.setCloseShortcut(KeyCode.ESCAPE);
//
// focus
//
this.textFieldName.focus();
}
示例7: EditPDPGroupWindow
import com.vaadin.event.ShortcutAction.KeyCode; //导入依赖的package包/类
/**
* The constructor should first build the main layout, set the
* composition root and then do any custom initialization.
*
* The constructor will not be automatically regenerated by the
* visual editor.
*/
public EditPDPGroupWindow(StdPDPGroup group, List<PDPGroup> list, PAPEngine engine) {
buildMainLayout();
//setCompositionRoot(mainLayout);
setContent(mainLayout);
//
// Save pointers
//
this.group = group;
this.groups = list;
this.papEngine = engine;
//
// Initialize
//
this.initialize();
//
// Shortcuts
//
this.setCloseShortcut(KeyCode.ESCAPE);
this.buttonSave.setClickShortcut(KeyCode.ENTER);
//
// Focus
//
this.textName.focus();
}
示例8: AdviceEditorWindow
import com.vaadin.event.ShortcutAction.KeyCode; //导入依赖的package包/类
/**
* The constructor should first build the main layout, set the
* composition root and then do any custom initialization.
*
* The constructor will not be automatically regenerated by the
* visual editor.
*/
public AdviceEditorWindow(AdviceExpressionType advice) {
buildMainLayout();
//setCompositionRoot(mainLayout);
setContent(mainLayout);
//
// Save
//
this.advice = advice;
//
// Set our shortcuts
//
this.setCloseShortcut(KeyCode.ESCAPE);
//
// Initialize GUI
//
this.initialize();
this.initializeButton();
//
// Focus
//
this.textFieldAdviceID.focus();
}
示例9: ExpressionSelectionWindow
import com.vaadin.event.ShortcutAction.KeyCode; //导入依赖的package包/类
/**
* The constructor should first build the main layout, set the
* composition root and then do any custom initialization.
*
* The constructor will not be automatically regenerated by the
* visual editor.
* @param parentApply
*/
// TODO - Refactor. Unused formal parameter parentApply. Either determine
// whether this is unnecessary and remove it (including removing it from all
// constructor consumers), or use it.
// NOTE: parentApply was originally used by passing to private initializeOption method.
// However, the parameter was unused by that method also.
// Setting to NOPMD for now.
public ExpressionSelectionWindow(ApplyType parentApply, boolean isAttributeAssignment, boolean mustBeBag, boolean mustBeValue) { //NOPMD
buildMainLayout();
//setCompositionRoot(mainLayout);
setContent(mainLayout);
//
// Set our shortcuts
//
this.setCloseShortcut(KeyCode.ESCAPE);
//
// Finish GUI initialization
//
// this.initializeOption(parentApply, isAttributeAssignment, mustBeBag, mustBeValue);
this.initializeOption(isAttributeAssignment, mustBeBag, mustBeValue);
this.initializeButtons();
}
示例10: VariableDefinitionEditorWindow
import com.vaadin.event.ShortcutAction.KeyCode; //导入依赖的package包/类
/**
* The constructor should first build the main layout, set the
* composition root and then do any custom initialization.
*
* The constructor will not be automatically regenerated by the
* visual editor.
*/
public VariableDefinitionEditorWindow(VariableDefinitionType variable) {
buildMainLayout();
//setCompositionRoot(mainLayout);
setContent(mainLayout);
//
// Save
//
this.variable = variable;
//
// Set our shortcuts
//
this.setCloseShortcut(KeyCode.ESCAPE);
//
// Initialize
//
this.initializeText();
this.initializeButton();
//
// Initial focus
//
this.textFieldID.focus();
}
示例11: VariableReferenceEditorWindow
import com.vaadin.event.ShortcutAction.KeyCode; //导入依赖的package包/类
/**
* The constructor should first build the main layout, set the
* composition root and then do any custom initialization.
*
* The constructor will not be automatically regenerated by the
* visual editor.
*/
public VariableReferenceEditorWindow(VariableReferenceType variable, Map<VariableDefinitionType, PolicyType> variables) {
buildMainLayout();
//setCompositionRoot(mainLayout);
setContent(mainLayout);
//
// Save parameters
//
this.variable = variable;
//
// Set our shortcuts
//
this.setCloseShortcut(KeyCode.ESCAPE);
//
// Initialize
//
this.initializeTextField();
this.initializeSelect(variables);
this.initializeButtons();
//
// Focus
//
this.textFieldVariable.focus();
}
示例12: RuleEditorWindow
import com.vaadin.event.ShortcutAction.KeyCode; //导入依赖的package包/类
/**
* The constructor should first build the main layout, set the
* composition root and then do any custom initialization.
*
* The constructor will not be automatically regenerated by the
* visual editor.
*/
public RuleEditorWindow(RuleType rule) {
buildMainLayout();
//setCompositionRoot(mainLayout);
setContent(mainLayout);
//
// Save
//
this.rule = rule;
//
// Close shortcut
//
this.setCloseShortcut(KeyCode.ESCAPE);
//
// Initialize
//
this.initializeLabel();
this.initializeOption();
this.initializeText();
this.initializeButton();
}
示例13: PolicyEditorWindow
import com.vaadin.event.ShortcutAction.KeyCode; //导入依赖的package包/类
/**
* The constructor should first build the main layout, set the
* composition root and then do any custom initialization.
*
* The constructor will not be automatically regenerated by the
* visual editor.
*/
public PolicyEditorWindow(PolicyType policy) {
buildMainLayout();
//setCompositionRoot(mainLayout);
setContent(mainLayout);
//
// Save
//
this.policy = policy;
//
// Close shortcut
//
this.setCloseShortcut(KeyCode.ESCAPE);
//
// Initialize GUI
//
this.initializeLabel();
this.initializeText();
this.initializeSelect();
this.initializeButton();
//
// Focus
//
this.textAreaDescription.focus();
}
示例14: SelectWorkspacePoliciesWindow
import com.vaadin.event.ShortcutAction.KeyCode; //导入依赖的package包/类
/**
* The constructor should first build the main layout, set the
* composition root and then do any custom initialization.
*
* The constructor will not be automatically regenerated by the
* visual editor.
*/
public SelectWorkspacePoliciesWindow() {
buildMainLayout();
//setCompositionRoot(mainLayout);
setContent(mainLayout);
//
// Shortcuts
//
this.setCloseShortcut(KeyCode.ESCAPE);
this.buttonSave.setClickShortcut(KeyCode.ENTER);
//
//
//
this.initializeTree();
this.initializeButton();
//
//
//
this.treeWorkspace.focus();
}
示例15: FunctionSelectionWindow
import com.vaadin.event.ShortcutAction.KeyCode; //导入依赖的package包/类
/**
* The constructor should first build the main layout, set the
* composition root and then do any custom initialization.
*
* The constructor will not be automatically regenerated by the
* visual editor.
*/
public FunctionSelectionWindow(String defaultFunction) {
buildMainLayout();
//setCompositionRoot(mainLayout);
setContent(mainLayout);
//
// Save
//
this.defaultFunctionID = defaultFunction;
//
// Close shortcut
//
this.setCloseShortcut(KeyCode.ESCAPE);
//
// Initialize GUI
//
this.initializeTextField();
this.initializeFunctions();
this.initializeButtons();
//
// Set our focus
//
this.tableFunctions.focus();
}