Skip to content

Commit

Permalink
Merge pull request #91 from mikemaaaa/master
Browse files Browse the repository at this point in the history
Minor improvements
  • Loading branch information
thirdy committed Mar 4, 2016
2 parents 32bbd73 + a11d72b commit 41f8445
Show file tree
Hide file tree
Showing 6 changed files with 29 additions and 4 deletions.
2 changes: 2 additions & 0 deletions durian/.gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
/target/
/.idea/
/*.iml
2 changes: 2 additions & 0 deletions durian/config.properties
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ automated.search.notify.newonly.color.highlight=#ccff99
guild.discount.string=50%
guild.color.highlight=#b0e0e6

corrupted.color.highlight=#ff0000

# leave empty to apply default color
result.table.bg.color=#f2f2f2

Expand Down
5 changes: 3 additions & 2 deletions durian/src/main/java/qic/ui/SearchResultTable.java
Original file line number Diff line number Diff line change
Expand Up @@ -88,10 +88,11 @@ public void mousePressed(MouseEvent me) {
});
Color bgColor = Color.decode(Config.getPropety(Config.RESULT_TABLE_BG_COLOR, null));
Color guildColor = Color.decode(Config.getPropety(Config.GUILD_COLOR_HIGHLIGHT, "#f6b67f"));
Color corruptedColor = Color.decode(Config.getPropety(Config.CORRUPTED_COLOR_HIGHLIGHT, "#000000"));
Color autoHighlightColor = Color.decode(
Config.getPropety(Config.AUTOMATED_SEARCH_NOTIFY_NEWONLY_COLOR_HIGHLIGHT, "#ccff99"));
this.setDefaultRenderer(List.class, new MultiLineTableCellRenderer(model, bgColor, guildColor, autoHighlightColor));
this.setDefaultRenderer(String.class, new MultiLineTableCellRenderer(model, bgColor, guildColor, autoHighlightColor));
this.setDefaultRenderer(List.class, new MultiLineTableCellRenderer(model, bgColor, guildColor, corruptedColor, autoHighlightColor));
this.setDefaultRenderer(String.class, new MultiLineTableCellRenderer(model, bgColor, guildColor, corruptedColor, autoHighlightColor));
this.setDefaultRenderer(ImageIcon.class, new ArtColumnRenderer(model, bgColor, guildColor, autoHighlightColor));

model.addTableModelListener(e -> {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,17 +29,19 @@ public class MultiLineTableCellRenderer extends JTextArea implements TableCellRe

private Color bgColor;
private Color guildColor;
private Color corruptedColor;
private Color autoHighlightColor;

private BeanPropertyTableModel<SearchResultItem> model;


public MultiLineTableCellRenderer(BeanPropertyTableModel<SearchResultItem> model, Color bgColor, Color guildColor, Color autoHighlightColor) {
public MultiLineTableCellRenderer(BeanPropertyTableModel<SearchResultItem> model, Color bgColor, Color guildColor, Color corruptedColor, Color autoHighlightColor) {
setLineWrap(true);
setWrapStyleWord(true);
setOpaque(true);
this.bgColor = bgColor;
this.guildColor = guildColor;
this.corruptedColor=corruptedColor;
this.autoHighlightColor = autoHighlightColor;
this.model = model;
}
Expand All @@ -59,6 +61,9 @@ public Component getTableCellRendererComponent(JTable table, Object value,
} else if (item.guildItem()) {
setBackground(guildColor);
}
if(item.corrupted) {
this.setForeground(corruptedColor);
}
}
}
setFont(table.getFont());
Expand Down
2 changes: 2 additions & 0 deletions durian/src/main/java/qic/util/Config.java
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,8 @@ public class Config {
public static final String GUILD_DISCOUNT_STRING = "guild.discount.string";
public static final String GUILD_COLOR_HIGHLIGHT = "guild.color.highlight";
public static final String GUILD_DISCOUNT_STRING_DEFAULT = "1ch";

public static final String CORRUPTED_COLOR_HIGHLIGHT = "corrupted.color.highlight";

public static final String AUTOMATED_SEARCH_BLACKLIST = "automated.search.blacklist";
public static final String MANUAL_SEARCH_BLACKLIST = "manual.search.blacklist";
Expand Down
15 changes: 14 additions & 1 deletion durian/terms/mod-ofs.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,23 @@
; Offensive Mods
;

spelldmg|sdmg = mod_name=(pseudo) (total) #% increased Spell Damage&mod_min=&mod_max=&$MG
rspelldmg|rsdmg = mod_name=#% reduced Spell Damage&mod_min=&mod_max=&$MG
(\d+)(rspelldmg|rsdmg) = mod_name=#% reduced Spell Damage&mod_min=$GROUP1&mod_max=&$MG
(\d+)-(\d+)(rspelldmg|rsdmg) = mod_name=#% reduced Spell Damage&mod_min=$GROUP1&mod_max=$GROUP2&$MG

spelldmg|sdmg = mod_name=(pseudo) (total) #% increased Spell Damage&mod_min=&mod_max=&$MG
(\d+)(spelldmg|sdmg) = mod_name=(pseudo) (total) #% increased Spell Damage&mod_min=$GROUP1&mod_max=&$MG
(\d+)-(\d+)(spelldmg|sdmg) = mod_name=(pseudo) (total) #% increased Spell Damage&mod_min=$GROUP1&mod_max=$GROUP2&$MG

totemdmg|tdmg = mod_name=#% increased Totem Damage&mod_min=&mod_max=&$MG
(\d+)(totemdmg|tdmg) = mod_name=#% increased Totem Damage&mod_min=$GROUP1&mod_max=&$MG
(\d+)-(\d+)(totemdmg|tdmg) = mod_name=#% increased Totem Damage&mod_min=$GROUP1&mod_max=$GROUP2&$MG

areadmg|admg = mod_name=#% increased Area Damage&mod_min=&mod_max=&$MG
(\d+)(areadmg|admg) = mod_name=#% increased Area Damage&mod_min=$GROUP1&mod_max=&$MG
(\d+)-(\d+)(areadmg|admg) = mod_name=#% increased Area Damage&mod_min=$GROUP1&mod_max=$GROUP2&$MG


colddmg|cdmg = mod_name=#% increased Cold Damage&mod_min=&mod_max=&$MG
(\d+)(colddmg|cdmg) = mod_name=#% increased Cold Damage&mod_min=$GROUP1&mod_max=&$MG
(\d+)-(\d+)(colddmg|cdmg) = mod_name=#% increased Cold Damage&mod_min=$GROUP1&mod_max=$GROUP2&$MG
Expand Down

0 comments on commit 41f8445

Please sign in to comment.