コード例 #1
0
 @Override
 protected StringBuilder buildSpeedString(ISimpleSpecialsModel model) {
   StringBuilder builder = new StringBuilder();
   builder.append(model.getSpeed());
   if (model.getTurnType() == TurnType.LongTick) {
     builder.append(TooltipBuilder.Space);
     builder.append(getResources().getString("CharmTreeView.ToolTip.Type.LongTick.Short"));
   }
   return builder;
 }
コード例 #2
0
 @Override
 protected StringBuilder buildDefenseString(
     ISimpleSpecialsModel model, boolean defaultSpeed, boolean longAction) {
   StringBuilder builder = new StringBuilder();
   builder.append(TooltipBuilder.CommaSpace);
   int defenseModifier = model.getDefenseModifier();
   if (defenseModifier == 0) {
     builder.append("-");
   }
   builder.append(defenseModifier);
   return builder;
 }
コード例 #3
0
 @Override
 protected StringBuilder buildDefenseString(
     ISimpleSpecialsModel model, final boolean defaultSpeed, final boolean longAction) {
   StringBuilder builder = new StringBuilder();
   if (!defaultSpeed || longAction) {
     builder.append(IMagicTooltipStringBuilder.CommaSpace);
   }
   builder.append(getResources().getString("CharmTreeView.ToolTip.Type.Defense")); // $NON-NLS-1$
   builder.append(IMagicTooltipStringBuilder.Space);
   final int defenseModifier = model.getDefenseModifier();
   if (defenseModifier == 0) {
     builder.append("-"); // $NON-NLS-1$
   }
   builder.append(defenseModifier);
   return builder;
 }