Added Javadoc requested by @delvh
This commit is contained in:
parent
69153005cd
commit
500555c8db
@ -31,7 +31,7 @@ public class PrimaryButton extends JButton {
|
|||||||
* Creates a primary button
|
* Creates a primary button
|
||||||
*
|
*
|
||||||
* @param title the title of the button
|
* @param title the title of the button
|
||||||
* @param the size of the arc used to draw the round button edges
|
* @param arcSize the size of the arc used to draw the round button edges
|
||||||
* @since Envoy 0.2-alpha
|
* @since Envoy 0.2-alpha
|
||||||
*/
|
*/
|
||||||
public PrimaryButton(String title, int arcSize) {
|
public PrimaryButton(String title, int arcSize) {
|
||||||
|
@ -31,6 +31,17 @@ public class PrimaryScrollBar extends BasicScrollBarUI {
|
|||||||
private final Color draggingColor;
|
private final Color draggingColor;
|
||||||
private final boolean isVertical;
|
private final boolean isVertical;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Initializes a {@link PrimaryScrollBar} with a color scheme.
|
||||||
|
*
|
||||||
|
* @param arcSize the size of the arc used to draw the round scroll bar
|
||||||
|
* edges
|
||||||
|
* @param scrollBarColor the default color
|
||||||
|
* @param hoverColor the color while hovering
|
||||||
|
* @param draggingColor the color while dragging
|
||||||
|
* @param isVertical indicates whether this is a vertical
|
||||||
|
* {@link PrimaryScrollBar}
|
||||||
|
*/
|
||||||
public PrimaryScrollBar(int arcSize, Color scrollBarColor, Color hoverColor, Color draggingColor, boolean isVertical) {
|
public PrimaryScrollBar(int arcSize, Color scrollBarColor, Color hoverColor, Color draggingColor, boolean isVertical) {
|
||||||
this.arcSize = arcSize;
|
this.arcSize = arcSize;
|
||||||
this.scrollBarColor = scrollBarColor;
|
this.scrollBarColor = scrollBarColor;
|
||||||
@ -39,6 +50,15 @@ public class PrimaryScrollBar extends BasicScrollBarUI {
|
|||||||
this.isVertical = isVertical;
|
this.isVertical = isVertical;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Initializes a {@link PrimaryScrollBar} using a color scheme specified in a
|
||||||
|
* {@link Theme}
|
||||||
|
*
|
||||||
|
* @param theme the {@link Theme} to be applied to this
|
||||||
|
* {@link PrimaryScrollBar}
|
||||||
|
* @param isVertical indicates whether this is a vertical
|
||||||
|
* {@link PrimaryScrollBar}
|
||||||
|
*/
|
||||||
public PrimaryScrollBar(Theme theme, boolean isVertical) {
|
public PrimaryScrollBar(Theme theme, boolean isVertical) {
|
||||||
this(5, theme.getInteractableBackgroundColor(), new Color(theme.getInteractableBackgroundColor().getRGB() - 50),
|
this(5, theme.getInteractableBackgroundColor(), new Color(theme.getInteractableBackgroundColor().getRGB() - 50),
|
||||||
new Color(theme.getInteractableBackgroundColor().getRGB() + 170), isVertical);
|
new Color(theme.getInteractableBackgroundColor().getRGB() + 170), isVertical);
|
||||||
|
@ -17,6 +17,11 @@ public class PrimaryScrollPane extends JScrollPane {
|
|||||||
private int verticalScrollBarMaximum = getVerticalScrollBar().getMaximum();
|
private int verticalScrollBarMaximum = getVerticalScrollBar().getMaximum();
|
||||||
private boolean chatOpened = false;
|
private boolean chatOpened = false;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Initializes a {@link JScrollPane} with the primary Envoy design scheme
|
||||||
|
*
|
||||||
|
* @since Envoy v0.2-alpha
|
||||||
|
*/
|
||||||
public PrimaryScrollPane() { setBorder(null); }
|
public PrimaryScrollPane() { setBorder(null); }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -67,5 +72,12 @@ public class PrimaryScrollPane extends JScrollPane {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Indicates a chat being opened by the user to this {@link PrimaryScrollPane}
|
||||||
|
* triggering it to automatically scroll down.
|
||||||
|
*
|
||||||
|
* @param chatOpened indicates the chat opening status
|
||||||
|
* @since Envoy v0.2-alpha
|
||||||
|
*/
|
||||||
public void setChatOpened(boolean chatOpened) { this.chatOpened = chatOpened; }
|
public void setChatOpened(boolean chatOpened) { this.chatOpened = chatOpened; }
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user