label.setText("Version:");
deckVersion = new Text(bannerGroup, SWT.BORDER);
deckVersion.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false));
deckVersion.addModifyListener(new ModifyListener() {
public void modifyText(ModifyEvent e) {
Deck deck = (Deck) getEditorInput().getAdapter(Deck.class);
if (deck != null) {
setDirty(true);
deck.set(DeckConstants.FEATURE_VERSION, deckVersion.getText());
}
}
});
label = new Label(bannerGroup, SWT.NONE);
label.setFont(largeFont);
label.setBackground(darkGray);
label.setLayoutData(new GridData(SWT.END, SWT.CENTER, false, false));
label.setText("Player:");
deckPlayer = new Text(bannerGroup, SWT.BORDER);
deckPlayer.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false));
deckPlayer.addModifyListener(new ModifyListener() {
public void modifyText(ModifyEvent e) {
Deck deck = (Deck) getEditorInput().getAdapter(Deck.class);
if (deck != null) {
setDirty(true);
deck.set(DeckConstants.FEATURE_PLAYER, deckPlayer.getText());
}
}
});
label = new Label(bannerGroup, SWT.NONE);
label.setFont(largeFont);
label.setBackground(darkGray);
label.setLayoutData(new GridData(SWT.END, SWT.CENTER, false, false));
label.setText("DCI:");
deckDCI = new Text(bannerGroup, SWT.BORDER);
deckDCI.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false));
deckDCI.addModifyListener(new ModifyListener() {
public void modifyText(ModifyEvent e) {
Deck deck = (Deck) getEditorInput().getAdapter(Deck.class);
if (deck != null) {
setDirty(true);
deck.set(DeckConstants.FEATURE_DCI, deckDCI.getText());
}
}
});
label = new Label(bannerGroup, SWT.NONE);
label.setFont(largeFont);
label.setBackground(darkGray);
label.setLayoutData(new GridData(SWT.END, SWT.CENTER, false, false));
label.setText("Tournament Title:");
deckTournamentTitle = new Text(bannerGroup, SWT.BORDER);
deckTournamentTitle.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false));
deckTournamentTitle.addModifyListener(new ModifyListener() {
public void modifyText(ModifyEvent e) {
Deck deck = (Deck) getEditorInput().getAdapter(Deck.class);
if (deck != null) {
setDirty(true);
deck.set(DeckConstants.FEATURE_TOURNAMENT_TITLE, deckTournamentTitle.getText());
}
}
});
label = new Label(bannerGroup, SWT.NONE);
label.setFont(largeFont);
label.setBackground(darkGray);
label.setLayoutData(new GridData(SWT.END, SWT.CENTER, false, false));
label.setText("Tournament Type:");
deckTournamentType = new Text(bannerGroup, SWT.BORDER);
deckTournamentType.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false));
deckTournamentType.addModifyListener(new ModifyListener() {
public void modifyText(ModifyEvent e) {
Deck deck = (Deck) getEditorInput().getAdapter(Deck.class);
if (deck != null) {
setDirty(true);
deck.set(DeckConstants.FEATURE_TOURNAMENT_TYPE, deckTournamentType.getText());
}
}
});
label = new Label(bannerGroup, SWT.NONE);
label.setFont(largeFont);
label.setBackground(darkGray);
label.setLayoutData(new GridData(SWT.END, SWT.CENTER, false, false));
label.setText("Tournament City:");
deckTournamentCity = new Text(bannerGroup, SWT.BORDER);
deckTournamentCity.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false));
deckTournamentCity.addModifyListener(new ModifyListener() {
public void modifyText(ModifyEvent e) {
Deck deck = (Deck) getEditorInput().getAdapter(Deck.class);
if (deck != null) {
setDirty(true);
deck.set(DeckConstants.FEATURE_TOURNAMENT_CITY, deckTournamentCity.getText());
}
}
});
label = new Label(bannerGroup, SWT.NONE);
label.setFont(largeFont);
label.setBackground(darkGray);
label.setLayoutData(new GridData(SWT.END, SWT.CENTER, false, false));
label.setText("Tournament Date:");
deckTournamentDate = new Text(bannerGroup, SWT.BORDER);
deckTournamentDate.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false));
deckTournamentDate.addModifyListener(new ModifyListener() {
public void modifyText(ModifyEvent e) {
Deck deck = (Deck) getEditorInput().getAdapter(Deck.class);
if (deck != null) {
setDirty(true);
deck.set(DeckConstants.FEATURE_TOURNAMENT_DATE, deckTournamentDate.getText());
}
}
});
// don't show