use of pcgen.facade.core.DeityFacade in project pcgen by PCGen.
the class Gui2InfoFactory method getHTMLInfo.
@Override
public String getHTMLInfo(InfoFacade facade) {
if (facade == null) {
return EMPTY_STRING;
}
// Use a more detailed info if we can
if (facade instanceof AbilityFacade) {
return getHTMLInfo((AbilityFacade) facade);
}
if (facade instanceof ClassFacade) {
return getHTMLInfo((ClassFacade) facade, null);
}
if (facade instanceof DeityFacade) {
return getHTMLInfo((DeityFacade) facade);
}
if (facade instanceof DomainFacade) {
return getHTMLInfo((DomainFacade) facade);
}
if (facade instanceof EquipmentFacade) {
return getHTMLInfo((EquipmentFacade) facade);
}
if (facade instanceof KitFacade) {
return getHTMLInfo((KitFacade) facade);
}
if (facade instanceof RaceFacade) {
return getHTMLInfo((RaceFacade) facade);
}
if (facade instanceof SkillFacade) {
return getHTMLInfo((SkillFacade) facade);
}
if (facade instanceof SpellFacade) {
return getHTMLInfo((SpellFacade) facade);
}
if (facade instanceof TempBonusFacade) {
return getHTMLInfo((TempBonusFacade) facade);
}
if (facade instanceof TemplateFacade) {
return getHTMLInfo((TemplateFacade) facade);
}
final HtmlInfoBuilder infoText = new HtmlInfoBuilder();
infoText.appendTitleElement(facade.toString());
infoText.appendLineBreak();
if (!facade.getType().isEmpty()) {
//$NON-NLS-1$
infoText.appendI18nElement("in_irInfoType", facade.getType());
infoText.appendLineBreak();
}
infoText.appendI18nElement(//$NON-NLS-1$
"in_itmInfoLabelTextSource", facade.getSource());
return infoText.toString();
}
use of pcgen.facade.core.DeityFacade in project pcgen by PCGen.
the class DomainInfoTab method initComponents.
private void initComponents() {
setOrientation(VERTICAL_SPLIT);
deityTable.setTreeCellRenderer(qualifiedRenderer);
JPanel panel = new JPanel(new BorderLayout());
FilterBar<Object, DeityFacade> bar = new FilterBar<>();
bar.addDisplayableFilter(new SearchFilterPanel());
//$NON-NLS-1$
qDeityButton.setText(LanguageBundle.getString("in_igQualFilter"));
bar.addDisplayableFilter(qDeityButton);
deityTable.setDisplayableFilter(bar);
panel.add(bar, BorderLayout.NORTH);
ListSelectionModel selectionModel = deityTable.getSelectionModel();
selectionModel.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
panel.add(new JScrollPane(deityTable), BorderLayout.CENTER);
Box box = Box.createHorizontalBox();
box.add(Box.createHorizontalGlue());
//$NON-NLS-1$
box.add(new JLabel(LanguageBundle.getString("in_domDeityLabel")));
box.add(Box.createHorizontalStrut(5));
box.add(selectedDeity);
box.add(Box.createHorizontalStrut(5));
box.add(selectDeity);
box.add(Box.createHorizontalGlue());
panel.add(box, BorderLayout.SOUTH);
FlippingSplitPane splitPane = new FlippingSplitPane("DomainTop");
splitPane.setLeftComponent(panel);
panel = new JPanel(new BorderLayout());
FilterBar<CharacterFacade, DomainFacade> dbar = new FilterBar<>();
dbar.addDisplayableFilter(new SearchFilterPanel());
//$NON-NLS-1$
qDomainButton.setText(LanguageBundle.getString("in_igQualFilter"));
dbar.addDisplayableFilter(qDomainButton);
domainFilter = dbar;
panel.add(dbar, BorderLayout.NORTH);
selectionModel = domainTable.getSelectionModel();
selectionModel.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
domainTable.setAutoCreateColumnsFromModel(false);
domainTable.setColumnModel(createDomainColumnModel());
JScrollPane scrollPane = TableUtils.createCheckBoxSelectionPane(domainTable, domainRowHeaderTable);
panel.add(scrollPane, BorderLayout.CENTER);
box = Box.createHorizontalBox();
box.add(Box.createHorizontalGlue());
//$NON-NLS-1$
box.add(new JLabel(LanguageBundle.getString("in_domRemainDomLabel")));
box.add(Box.createHorizontalStrut(5));
box.add(selectedDomain);
box.add(Box.createHorizontalGlue());
panel.add(box, BorderLayout.SOUTH);
splitPane.setRightComponent(panel);
setTopComponent(splitPane);
splitPane = new FlippingSplitPane("DomainBottom");
splitPane.setLeftComponent(deityInfo);
splitPane.setRightComponent(domainInfo);
setBottomComponent(splitPane);
setResizeWeight(0.65);
}
Aggregations