use of pcgen.facade.core.TempBonusFacade in project pcgen by PCGen.
the class TempBonusInfoTab method initComponents.
private void initComponents() {
FlippingSplitPane topPane = new FlippingSplitPane("TempBonusTop");
setTopComponent(topPane);
setOrientation(VERTICAL_SPLIT);
JPanel availPanel = new JPanel(new BorderLayout());
FilterBar<CharacterFacade, TempBonusFacade> bar = new FilterBar<>();
bar.addDisplayableFilter(new SearchFilterPanel());
availPanel.add(bar, BorderLayout.NORTH);
availableTable.setDisplayableFilter(bar);
availableTable.setTreeCellRenderer(tempBonusRenderer);
availPanel.add(new JScrollPane(availableTable), BorderLayout.CENTER);
Box box = Box.createHorizontalBox();
box.add(Box.createHorizontalGlue());
addButton.setHorizontalTextPosition(SwingConstants.LEADING);
box.add(addButton);
box.add(Box.createHorizontalStrut(5));
box.setBorder(new EmptyBorder(0, 0, 5, 0));
availPanel.add(box, BorderLayout.SOUTH);
topPane.setLeftComponent(availPanel);
JPanel selPanel = new JPanel(new BorderLayout());
FilterBar<CharacterFacade, TempBonusFacade> filterBar = new FilterBar<>();
filterBar.addDisplayableFilter(new SearchFilterPanel());
selectedTable.setDisplayableFilter(filterBar);
selectedTable.setTreeCellRenderer(tempBonusRenderer);
selPanel.add(new JScrollPane(selectedTable), BorderLayout.CENTER);
box = Box.createHorizontalBox();
box.add(Box.createHorizontalStrut(5));
box.add(removeButton);
box.add(Box.createHorizontalGlue());
box.setBorder(new EmptyBorder(0, 0, 5, 0));
selPanel.add(box, BorderLayout.SOUTH);
topPane.setRightComponent(selPanel);
setBottomComponent(infoPane);
setResizeWeight(0.75);
}
use of pcgen.facade.core.TempBonusFacade 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();
}
Aggregations