Skip to content

Commit

Permalink
Automatic Hit Selection (#6123)
Browse files Browse the repository at this point in the history
  • Loading branch information
labkey-nicka authored Dec 20, 2024
1 parent e13625d commit f7eb779
Show file tree
Hide file tree
Showing 42 changed files with 1,542 additions and 1,005 deletions.
116 changes: 12 additions & 104 deletions api/gwtsrc/org/labkey/api/gwt/client/model/GWTConditionalFormat.java
Original file line number Diff line number Diff line change
Expand Up @@ -16,27 +16,27 @@
package org.labkey.api.gwt.client.model;

import com.google.gwt.user.client.rpc.IsSerializable;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.Setter;

import java.io.Serializable;

/**
* User: jeckels
* Date: Aug 23, 2010
*/
@Getter
@Setter
@EqualsAndHashCode
public class GWTConditionalFormat implements Serializable, IsSerializable
{
public static final String COLOR_REGEX = "[0-9A-Fa-f][0-9A-Fa-f][0-9A-Fa-f][0-9A-Fa-f][0-9A-Fa-f][0-9A-Fa-f]";

public static final String DATA_REGION_NAME = "format";
public static final String COLUMN_NAME = "column";

private boolean _bold = false;
private boolean _italic = false;
private boolean _strikethrough = false;
private String _textColor = null;
private String _backgroundColor = null;

private String _filter;
private boolean bold = false;
private boolean italic = false;
private boolean strikethrough = false;
private String textColor = null;
private String backgroundColor = null;
private String filter;

public GWTConditionalFormat() {}

Expand All @@ -47,98 +47,6 @@ public GWTConditionalFormat(GWTConditionalFormat f)
setStrikethrough(f.isStrikethrough());
setTextColor(f.getTextColor());
setBackgroundColor(f.getBackgroundColor());

setFilter(f.getFilter());
}

public boolean isBold()
{
return _bold;
}

public void setBold(boolean bold)
{
_bold = bold;
}

public boolean isItalic()
{
return _italic;
}

public void setItalic(boolean italic)
{
_italic = italic;
}

public boolean isStrikethrough()
{
return _strikethrough;
}

public void setStrikethrough(boolean strikethrough)
{
_strikethrough = strikethrough;
}

public String getTextColor()
{
return _textColor;
}

public void setTextColor(String textColor)
{
_textColor = textColor;
}

public String getBackgroundColor()
{
return _backgroundColor;
}

public void setBackgroundColor(String backgroundColor)
{
_backgroundColor = backgroundColor;
}

public String getFilter()
{
return _filter;
}

public void setFilter(String filter)
{
_filter = filter;
}

@Override
public boolean equals(Object o)
{
if (this == o) return true;
if (!(o instanceof GWTConditionalFormat)) return false;

GWTConditionalFormat that = (GWTConditionalFormat) o;

if (_bold != that._bold) return false;
if (_italic != that._italic) return false;
if (_strikethrough != that._strikethrough) return false;
if (_backgroundColor != null ? !_backgroundColor.equals(that._backgroundColor) : that._backgroundColor != null)
return false;
if (_filter != null ? !_filter.equals(that._filter) : that._filter != null) return false;
if (_textColor != null ? !_textColor.equals(that._textColor) : that._textColor != null) return false;

return true;
}

@Override
public int hashCode()
{
int result = (_bold ? 1 : 0);
result = 31 * result + (_italic ? 1 : 0);
result = 31 * result + (_strikethrough ? 1 : 0);
result = 31 * result + (_textColor != null ? _textColor.hashCode() : 0);
result = 31 * result + (_backgroundColor != null ? _backgroundColor.hashCode() : 0);
result = 31 * result + (_filter != null ? _filter.hashCode() : 0);
return result;
}
}
Loading

0 comments on commit f7eb779

Please sign in to comment.