|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcontrib.com.blogofbug.swing.layout.CaroselLayout
contrib.com.blogofbug.swing.layout.OffsetCaroselLayout
public class OffsetCaroselLayout
Offsets a normal carousel layout be a fixed amount allowing it be "moved" around the screen.
Field Summary |
---|
Fields inherited from class contrib.com.blogofbug.swing.layout.CaroselLayout |
---|
additionalData, components, numberOfItems, rotationalOffset, targetOffset |
Constructor Summary | |
---|---|
OffsetCaroselLayout(java.awt.Container forContainer)
Creates a new instance of OffsetCaroselLayout |
Method Summary | |
---|---|
protected java.awt.Point |
calculateCenter(java.awt.Insets insets,
int width,
int height,
int widest)
Determines the center of the carousel based on the dimensions of the container |
protected java.awt.Dimension |
getCarouselRadius(java.awt.Container target,
java.awt.Insets insets,
int width,
int height,
int widestComponent)
Determines how "wide" the carousel should be drawn based on the side of the container the layout is laying out |
void |
setFrontMostComponent(java.awt.Component component)
Over-rides the normal setFrontMostComponent to move the selected component to 3 o'clock instead of 6 o'clock |
protected boolean |
shouldHide(java.awt.Component comp,
double angle,
double scale)
Overrides the normal layout method to determine if the object is offscreen and can therefore be ignored (giving a performance gain). |
Methods inherited from class contrib.com.blogofbug.swing.layout.CaroselLayout |
---|
actionPerformed, addLayoutComponent, finalizeLayoutImmediately, getAngle, getComponentCount, getComponentIndex, getNeutralContentWidth, getNextComponent, getPosition, getPreviousComponent, getScale, isAnimating, layoutContainer, minimumLayoutSize, moveComponentTo, preferredLayoutSize, recalculateCarosel, recalculateVisibleItems, removeLayoutComponent, setAngle, setDepthBasedAlpha, setNeutralContentWidth, setTarget |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public OffsetCaroselLayout(java.awt.Container forContainer)
forContainer
- The container to associate the layout with.Method Detail |
---|
protected boolean shouldHide(java.awt.Component comp, double angle, double scale)
shouldHide
in class CaroselLayout
comp
- The component to considerangle
- Its position on the carousel.scale
- The scale (applied to size) of the image, that is, how far from the observer is it
protected java.awt.Dimension getCarouselRadius(java.awt.Container target, java.awt.Insets insets, int width, int height, int widestComponent)
getCarouselRadius
in class CaroselLayout
target
- The container the radius should be calculated forinsets
- Any insets of the containerwidth
- The width of the containerheight
- The height of the containerwidestComponent
- The widest component
protected java.awt.Point calculateCenter(java.awt.Insets insets, int width, int height, int widest)
calculateCenter
in class CaroselLayout
insets
- The container insetswidth
- Width of the containerheight
- The height of the containerwidest
- width of the container
public void setFrontMostComponent(java.awt.Component component)
setFrontMostComponent
in class CaroselLayout
component
- The component to move to the 'front'
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |