Skip to content

Commit

Permalink
'#39: code formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
lfcnassif committed Apr 29, 2024
1 parent 7bf5574 commit 93418ad
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ public void setSelected(boolean isSelected) {
public boolean isSelected() {
return isSelected;
}

public void toggle() {
setSelected(!isSelected);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ public Component getTreeCellRendererComponent(JTree tree, Object value, boolean
if (visiblePredicate == null || visiblePredicate.test(value)) {
JCheckBox checkbox = new JCheckBox();
checkbox.setSelected(checkedPredicate.test(value));
for(ActionListener al: listenerList.getListeners(ActionListener.class)) {
for (ActionListener al : listenerList.getListeners(ActionListener.class)) {
checkbox.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
Expand Down
9 changes: 4 additions & 5 deletions iped-app/src/main/java/iped/app/ui/controls/HoverButton.java
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,10 @@
import iped.utils.UiUtil;

/**
* A flat button with no background or border.
* Border and background are only painted when the mouse is over it,
* and with a brighter color when it is pressed.
* It is "theme aware", so colors will change if a new theme is activated.
* Currently it only displays icons, but it could handle text.
* A flat button with no background or border. Border and background are only
* painted when the mouse is over it, and with a brighter color when it is
* pressed. It is "theme aware", so colors will change if a new theme is
* activated. Currently it only displays icons, but it could handle text.
*/
public class HoverButton extends JButton {
private static final long serialVersionUID = 7827182813873015956L;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ public void addOperand(Operand op) {

public void addFilter(FilterNode filterNode) {
Set<DecisionNode> nodes = model.getFiltersToNodeMap().get(filterNode.getFilter());
if(nodes == null) {
if (nodes == null) {
nodes = new HashSet<DecisionNode>();
model.getFiltersToNodeMap().put(filterNode.getFilter(), nodes);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -96,10 +96,9 @@ public void actionPerformed(ActionEvent e) {
}
}
if (e.getSource() == removeMenuitem) {
((DecisionNode) op).getParent().remove(op);
((DecisionNode) op).getParent().remove(op);
if (op instanceof FilterNode) {
if (!((CombinedFilterTreeModel) filtersTree.getModel())
.hasFilter((IFilter) ((FilterNode) op).getFilter())) {
if (!((CombinedFilterTreeModel) filtersTree.getModel()).hasFilter((IFilter) ((FilterNode) op).getFilter())) {
logicFilterer.removePreCachedFilter((IFilter) ((FilterNode) op).getFilter());
}
}
Expand Down

0 comments on commit 93418ad

Please sign in to comment.