public StyleRulesListModel(final StyleRulesManager manager, final boolean includeEmptyItem) { super(); this.styleRules = manager.getStyleRules(); manager.addListener(this); addMeToListeningToRules(); this.includeEmptyItem = includeEmptyItem; }
@Override public void run() { listener.patternChanged(StyleRule.this); } });
private synchronized void removeMeFromListeningToRules() { for (StyleRules rules : styleRules) { rules.removeListener(this); } }
@Override public void actionPerformed(ActionEvent e) { StyleRule newRule = new StyleRule(); newRule.setPattern(".*"); styleRules.add(newRule); setActiveRule(newRule); } }
@Override public synchronized void styleRulesChanged(StyleRulesManager manager) { styleRules = manager.getStyleRules(); fireIntervalRemoved(this, 0, styleRules.size()); // Make sure we are registered as listener, remove first if we // happen to already be registered. removeMeFromListeningToRules(); addMeToListeningToRules(); fireIntervalAdded(this, 0, styleRules.size()); }
public ConfigTableModel(Resources messages, StyleRules styleRules) { super(); this.messages = messages; this.styleRules = styleRules; styleRules.addListener(this); styleRules.addStyleRuleListener(this); }
public void importManager(StyleRulesManager importFrom) { for (StyleRules importRules : importFrom.styleRules) { boolean shouldImport = true; for (StyleRules myRules : this.styleRules) { if (myRules.getGuid().equals(importRules.getGuid())) { shouldImport = false; break; } } if (shouldImport) { add(importRules); } } }
private synchronized void addMeToListeningToRules() { for (StyleRules rules : styleRules) { rules.addListener(this); } }
public synchronized void setBackground(Color background) { this.background = background; firePatternChanged(); }
@Override public void fontValuesChanged( final FontChooser source, final Font font) { if (styleRule != null) { styleRule.setFont(font); } } });
@Override public void run() { listener.listChangedName(StyleRules.this); } });
@Override public void run() { listener.styleRulesChanged(StyleRulesManager.this); } }));
@Override public void run() { listener.listDataChanged(StyleRules.this); } });
@Override public void run() { listener.listStructureChanged(StyleRules.this); } });
/** * @param logBlockPatternBeginsBlock * the logBlockPatternBeginsBlock to set */ public synchronized void setLogBlockPatternBeginsBlock(boolean logBlockPatternBeginsBlock) { if (this.logBlockPatternBeginsBlock != logBlockPatternBeginsBlock) { this.logBlockPatternBeginsBlock = logBlockPatternBeginsBlock; fireDataChanged(); } }
public synchronized void setFont(Font font) { this.font = font; firePatternChanged(); }
public void setFold(boolean fold) { this.fold = fold; firePatternChanged(); }
public synchronized void setForeground(Color foreground) { this.foreground = foreground; firePatternChanged(); }
public synchronized void setDisabled(boolean disabled) { this.disabled = disabled; firePatternChanged(); }
public synchronized void setSupress(boolean supress) { this.supress = supress; firePatternChanged(); }