Skip to content

Commit

Permalink
Rename JCaret to Caret, because J prefix is reserved for standa…
Browse files Browse the repository at this point in the history
…rd Swing classes
  • Loading branch information
Mingun committed Feb 16, 2020
1 parent 3f58193 commit 61d251c
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
*
* @author Sebastian Porst ([email protected])
*/
public class JCaret
public class Caret
{
//<editor-fold defaultstate="collapsed" desc="Fields">
/**
Expand Down Expand Up @@ -69,7 +69,7 @@ public class JCaret
* Creates a new caret with a default blink period of 500ms and the default
* caret color red.
*/
public JCaret()
public Caret()
{
this(DEFAULT_BLINK_TIME, DEFAULT_CARET_COLOR);
}
Expand All @@ -83,7 +83,7 @@ public JCaret()
* @throws NullPointerException
* Thrown if the color is null.
*/
public JCaret(final Color caretColor)
public Caret(final Color caretColor)
{
this(DEFAULT_BLINK_TIME, caretColor);
}
Expand All @@ -98,7 +98,7 @@ public JCaret(final Color caretColor)
* @throws IllegalArgumentException
* Thrown if the blink period is negative.
*/
public JCaret(final int blinkPeriod)
public Caret(final int blinkPeriod)
{
this(blinkPeriod, DEFAULT_CARET_COLOR);
}
Expand All @@ -116,7 +116,7 @@ public JCaret(final int blinkPeriod)
* @throws NullPointerException
* Thrown if the color is null.
*/
public JCaret(final int blinkPeriod, final Color caretColor)
public Caret(final int blinkPeriod, final Color caretColor)
{
if (blinkPeriod < 0) {
throw new IllegalArgumentException("Error: Blink period can't be negative");
Expand Down Expand Up @@ -161,7 +161,7 @@ public void setPosition(long position) {
private void notifyListeners()
{
for (final ICaretListener listener : m_listeners) {
listener.caretStatusChanged(JCaret.this);
listener.caretStatusChanged(Caret.this);
}
}

Expand Down
2 changes: 1 addition & 1 deletion src/main/java/tv/porst/jhexview/ICaretListener.java
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,5 @@ public interface ICaretListener
* @param caret
* The caret whose status changed.
*/
public void caretStatusChanged(JCaret caret);
public void caretStatusChanged(Caret caret);
}
4 changes: 2 additions & 2 deletions src/main/java/tv/porst/jhexview/JHexView.java
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,7 @@ public final class JHexView extends JComponent
/**
* Blinking caret of the component.
*/
private final JCaret m_caret = new JCaret();
private final Caret m_caret = new Caret();

/**
* Left-padding of the hex view in pixels.
Expand Down Expand Up @@ -3857,7 +3857,7 @@ public void adjustmentValueChanged(final AdjustmentEvent event)
}

@Override
public void caretStatusChanged(final JCaret source)
public void caretStatusChanged(final Caret source)
{
repaint();
}
Expand Down

0 comments on commit 61d251c

Please sign in to comment.