Skip to content

Commit

Permalink
Fixing checkstyle issues
Browse files Browse the repository at this point in the history
  • Loading branch information
bobbylight committed Sep 24, 2022
1 parent c4cf27d commit 05bed39
Show file tree
Hide file tree
Showing 3 changed files with 43 additions and 16 deletions.
Expand Up @@ -10,6 +10,10 @@

/**
* A fold icon represented by a chevron.
*
* @author Robert Futrell
* @version 1.0
* @see PlusMinusFoldIcon
*/
class ChevronFoldIcon extends FoldIndicatorIcon {

Expand Down
51 changes: 35 additions & 16 deletions RSyntaxTextArea/src/main/java/org/fife/ui/rtextarea/Gutter.java
Expand Up @@ -129,6 +129,12 @@ public class Gutter extends JPanel {
*/
private FoldIndicator foldIndicator;

/**
* Whether this gutter, or any child components, are armed. Used
* internally for e.g. the fold indicator's appearance.
*/
private boolean armed;

/**
* Listens for events in our text area.
*/
Expand Down Expand Up @@ -171,22 +177,6 @@ public Gutter(RTextArea textArea) {
}


private boolean armed;
public boolean isArmed() {
return armed;
}

public void setArmed(boolean armed) {
if (armed != this.armed) {
this.armed = armed;
if (foldIndicator != null) {
foldIndicator.repaint();
}
}
}



/**
* Adds an icon that tracks an offset in the document, and is displayed
* adjacent to the line numbers. This is useful for marking things such
Expand Down Expand Up @@ -493,6 +483,18 @@ public GutterIconInfo[] getTrackingIcons(Point p)
}


/**
* Returns whether this gutter is "armed", that is, any child components
* are armed. This is used by the internal API and should not be called.
*
* @return Whether the gutter is armed.
* @see #setArmed(boolean)
*/
public boolean isArmed() {
return armed;
}


/**
* Returns whether the fold indicator is enabled.
*
Expand Down Expand Up @@ -587,6 +589,23 @@ private void setActiveLineRange(int startLine, int endLine) {
}


/**
* Toggles whether this gutter is "armed", that is, any child components
* are armed. This is used by the internal API and should not be called.
*
* @param armed Whether the gutter is armed.
* @see #isArmed()
*/
void setArmed(boolean armed) {
if (armed != this.armed) {
this.armed = armed;
if (foldIndicator != null) {
foldIndicator.repaint();
}
}
}


/**
* Sets the background color used by the (default) fold icons when they
* are armed.
Expand Down
Expand Up @@ -8,6 +8,10 @@

/**
* The default +/- icon for expanding and collapsing folds.
*
* @author Robert Futrell
* @version 1.0
* @see ChevronFoldIcon
*/
class PlusMinusFoldIcon extends FoldIndicatorIcon {

Expand Down

0 comments on commit 05bed39

Please sign in to comment.