forked from chatty/chatty
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
39 changed files
with
1,119 additions
and
201 deletions.
There are no files selected for viewing
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
|
||
package chatty.gui.components; | ||
|
||
import java.awt.Dimension; | ||
import java.awt.LayoutManager; | ||
import java.awt.Rectangle; | ||
import javax.swing.JPanel; | ||
import javax.swing.Scrollable; | ||
|
||
/** | ||
* | ||
* @author tduva | ||
*/ | ||
public class ScrollPanel extends JPanel implements Scrollable { | ||
|
||
public ScrollPanel() { | ||
|
||
} | ||
|
||
public ScrollPanel(LayoutManager layoutManager) { | ||
super(layoutManager); | ||
} | ||
|
||
@Override | ||
public Dimension getPreferredScrollableViewportSize() { | ||
return getPreferredSize(); | ||
} | ||
|
||
@Override | ||
public int getScrollableUnitIncrement(Rectangle visibleRect, int orientation, int direction) { | ||
return 20; | ||
} | ||
|
||
@Override | ||
public int getScrollableBlockIncrement(Rectangle visibleRect, int orientation, int direction) { | ||
return 20; | ||
} | ||
|
||
/** | ||
* Still resize horizontally despite this panel being in a scrollpane. | ||
*/ | ||
@Override | ||
public boolean getScrollableTracksViewportWidth() { | ||
return true; | ||
} | ||
|
||
@Override | ||
public boolean getScrollableTracksViewportHeight() { | ||
return false; | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.