Autopsy
4.19.1
Graphical digital forensics platform for The Sleuth Kit and other tools.
|
Inherits LayoutManager, and Serializable.
Classes | |
class | ParentDimensions |
class | WrapLayoutRow |
Public Member Functions | |
WrapLayout () | |
WrapLayout (int verticalGap, int horizontalGap) | |
void | addLayoutComponent (String name, Component comp) |
int | getHorizontalGap () |
Collection< Component > | getOppositeAlignedItems () |
int | getVerticalGap () |
boolean | isAlignOnBaseline () |
void | layoutContainer (Container target) |
Dimension | minimumLayoutSize (Container target) |
Dimension | preferredLayoutSize (Container target) |
void | removeLayoutComponent (Component comp) |
void | setAlignOnBaseline (boolean alignOnBaseline) |
void | setHorizontalGap (int horizontalGap) |
void | setOppositeAligned (Collection< Component > oppAlignedComponents) |
void | setVerticalGap (int verticalGap) |
Private Member Functions | |
List< WrapLayoutRow > | getAllRows (List< Component > components, boolean preferred, int maxWidth) |
int | getComponentX (int leftX, int rightX, boolean ltr, int xPos, int componentWidth) |
int | getComponentY (int rowY, boolean alignBaseline, int rowHeight, int itemHeight) |
List< WrapLayoutRow > | getRowSet (List< Component > components, boolean preferred, int maxWidth) |
ParentDimensions | getTargetDimensions (Container target) |
Dimension | layoutSize (Container target, boolean preferred) |
int | setComponentDims (Component comp, boolean alignBaseline, boolean ltr, int rowY, int rowHeight, int leftX, int rightX, int xPos) |
Private Attributes | |
boolean | alignOnBaseline = false |
int | horizontalGap = 0 |
final Set< Component > | oppositeAlignedItems = new HashSet<>() |
int | verticalGap = 0 |
Static Private Attributes | |
static final long | serialVersionUID = 1L |
A wrap layout, similar to flow layout, orders subcomponents in a horizontal row similar to words in a paragraph. When subcomponents are moved to a new row, the height of the target component is expanded to accomodate. This layout also accomodates simultaneously left-aligned and right-aligned components.
Inspired by Rob Camick's WrapLayout https://tips4java.wordpress.com/2008/11/06/wrap-layout/ and FlowLayout https://raw.githubusercontent.com/mynawang/Java8-Source-Code/master/src/main/jdk8/java/awt/FlowLayout.java.
Definition at line 48 of file WrapLayout.java.
org.sleuthkit.autopsy.guiutils.WrapLayout.WrapLayout | ( | ) |
Constructs a new WrapLayout
with a default 5-unit horizontal and vertical gap.
Definition at line 88 of file WrapLayout.java.
org.sleuthkit.autopsy.guiutils.WrapLayout.WrapLayout | ( | int | verticalGap, |
int | horizontalGap | ||
) |
Constructs a new WrapLayout
.
verticalGap | The vertical gap spacing between rows of subcomponents as well as the spacing between the target component and rows. |
horizontalGap | The horizontal gap spacing between neighboring subcomponents as well as the spacing between the subcomponents and the target component's border. |
Definition at line 102 of file WrapLayout.java.
References org.sleuthkit.autopsy.guiutils.WrapLayout.horizontalGap, and org.sleuthkit.autopsy.guiutils.WrapLayout.verticalGap.
void org.sleuthkit.autopsy.guiutils.WrapLayout.addLayoutComponent | ( | String | name, |
Component | comp | ||
) |
Adds the specified component to the layout. Not used by this class. NOTE: This method is not used by this layout.
name | The name of the component. |
comp | The component to be added. |
Definition at line 210 of file WrapLayout.java.
|
private |
Retrieves the rows of wrap layout components.
components | The components to be laid out. |
preferred | Whether or not to use preferred dimensions of subcomponents for determining rows. |
maxWidth | The maximum width that a row can consume. |
Definition at line 541 of file WrapLayout.java.
References org.sleuthkit.autopsy.guiutils.WrapLayout.getHorizontalGap(), and org.sleuthkit.autopsy.guiutils.WrapLayout.getRowSet().
Referenced by org.sleuthkit.autopsy.guiutils.WrapLayout.layoutContainer(), and org.sleuthkit.autopsy.guiutils.WrapLayout.layoutSize().
|
private |
leftX | The leftmost position a component can be placed. |
rightX | The rightmost position a component can be placed. |
ltr | If the components should be laid out left to right. |
xPos | The x position of the component (if left to right, how far from leftX; otherwise how far from rightX). |
componentWidth | The component's width. |
Definition at line 255 of file WrapLayout.java.
Referenced by org.sleuthkit.autopsy.guiutils.WrapLayout.setComponentDims().
|
private |
Determines the subcomponent's y position.
rowY | The top y position of the row. |
alignBaseline | Whether this component should be aligned on the baseline. |
rowHeight | The height of the row. |
itemHeight | The height of the item. |
Definition at line 236 of file WrapLayout.java.
Referenced by org.sleuthkit.autopsy.guiutils.WrapLayout.setComponentDims().
int org.sleuthkit.autopsy.guiutils.WrapLayout.getHorizontalGap | ( | ) |
Retrieves the horizontal gap between neighboring subcomponents as well as the spacing between subcomponents and the borders of the target component.
Container
. Definition at line 139 of file WrapLayout.java.
References org.sleuthkit.autopsy.guiutils.WrapLayout.horizontalGap.
Referenced by org.sleuthkit.autopsy.guiutils.WrapLayout.getAllRows(), org.sleuthkit.autopsy.guiutils.WrapLayout.getRowSet(), org.sleuthkit.autopsy.guiutils.WrapLayout.getTargetDimensions(), org.sleuthkit.autopsy.guiutils.WrapLayout.layoutContainer(), org.sleuthkit.autopsy.guiutils.WrapLayout.layoutSize(), and org.sleuthkit.autopsy.guiutils.WrapLayout.minimumLayoutSize().
Collection<Component> org.sleuthkit.autopsy.guiutils.WrapLayout.getOppositeAlignedItems | ( | ) |
Retrieves the set of components that will be aligned on the opposite side. If the target component's orientation is left to right, this set of components will be right aligned.
Definition at line 127 of file WrapLayout.java.
|
private |
Handles determining rows for a single set of similarly aligned components. Used once for normal alignment and once for opposite aligned components.
components | The components in the set of similarly aligned items. |
preferred | Whether or not to use preferred dimensions for components. |
maxWidth | The maximum width components can consume. |
Definition at line 605 of file WrapLayout.java.
References org.sleuthkit.autopsy.guiutils.WrapLayout.getHorizontalGap().
Referenced by org.sleuthkit.autopsy.guiutils.WrapLayout.getAllRows().
|
private |
Derives metrics on the space allowed within the parent container for rows of components.
target | The target container. |
Definition at line 398 of file WrapLayout.java.
References org.sleuthkit.autopsy.guiutils.WrapLayout.getHorizontalGap().
Referenced by org.sleuthkit.autopsy.guiutils.WrapLayout.layoutContainer(), and org.sleuthkit.autopsy.guiutils.WrapLayout.layoutSize().
int org.sleuthkit.autopsy.guiutils.WrapLayout.getVerticalGap | ( | ) |
Retrieves the vertical gap between neighboring rows as well as the spacing between rows and the borders of the target component.
Container
. Definition at line 162 of file WrapLayout.java.
References org.sleuthkit.autopsy.guiutils.WrapLayout.verticalGap.
Referenced by org.sleuthkit.autopsy.guiutils.WrapLayout.layoutContainer(), and org.sleuthkit.autopsy.guiutils.WrapLayout.layoutSize().
boolean org.sleuthkit.autopsy.guiutils.WrapLayout.isAlignOnBaseline | ( | ) |
Returns true if components are to be vertically aligned along their bottom edge. Otherwise, subcomponents are aligned on their top edge. The default is false.
Definition at line 198 of file WrapLayout.java.
References org.sleuthkit.autopsy.guiutils.WrapLayout.alignOnBaseline.
Referenced by org.sleuthkit.autopsy.guiutils.WrapLayout.layoutContainer().
void org.sleuthkit.autopsy.guiutils.WrapLayout.layoutContainer | ( | Container | target | ) |
Definition at line 292 of file WrapLayout.java.
References org.sleuthkit.autopsy.guiutils.WrapLayout.getAllRows(), org.sleuthkit.autopsy.guiutils.WrapLayout.getHorizontalGap(), org.sleuthkit.autopsy.guiutils.WrapLayout.getTargetDimensions(), org.sleuthkit.autopsy.guiutils.WrapLayout.getVerticalGap(), org.sleuthkit.autopsy.guiutils.WrapLayout.isAlignOnBaseline(), and org.sleuthkit.autopsy.guiutils.WrapLayout.setComponentDims().
|
private |
Returns the minimum or preferred dimension needed to layout the target container.
target | Target to get layout size for. |
preferred | Should preferred size be calculated. |
Definition at line 427 of file WrapLayout.java.
References org.sleuthkit.autopsy.guiutils.WrapLayout.getAllRows(), org.sleuthkit.autopsy.guiutils.WrapLayout.getHorizontalGap(), org.sleuthkit.autopsy.guiutils.WrapLayout.getTargetDimensions(), and org.sleuthkit.autopsy.guiutils.WrapLayout.getVerticalGap().
Referenced by org.sleuthkit.autopsy.guiutils.WrapLayout.minimumLayoutSize(), and org.sleuthkit.autopsy.guiutils.WrapLayout.preferredLayoutSize().
Dimension org.sleuthkit.autopsy.guiutils.WrapLayout.minimumLayoutSize | ( | Container | target | ) |
Definition at line 333 of file WrapLayout.java.
References org.sleuthkit.autopsy.guiutils.WrapLayout.getHorizontalGap(), and org.sleuthkit.autopsy.guiutils.WrapLayout.layoutSize().
Dimension org.sleuthkit.autopsy.guiutils.WrapLayout.preferredLayoutSize | ( | Container | target | ) |
Definition at line 328 of file WrapLayout.java.
References org.sleuthkit.autopsy.guiutils.WrapLayout.layoutSize().
void org.sleuthkit.autopsy.guiutils.WrapLayout.removeLayoutComponent | ( | Component | comp | ) |
Removes the specified component from the layout. Not used by this class. NOTE: This method is not used by this layout.
comp | The component to remove. |
Definition at line 221 of file WrapLayout.java.
void org.sleuthkit.autopsy.guiutils.WrapLayout.setAlignOnBaseline | ( | boolean | alignOnBaseline | ) |
Sets whether or not subcomponents should be vertically aligned along their bottom edge. Otherwise, subcomponents are aligned on their top edge. The default is false.
alignOnBaseline | Whether or not components should be vertically aligned on their bottom edge. |
Definition at line 186 of file WrapLayout.java.
References org.sleuthkit.autopsy.guiutils.WrapLayout.alignOnBaseline.
|
private |
Sets a subcomponent's size to preferred size and sets the (x,y) position for the component.
comp | The component. |
alignBaseline | Whether this component should be aligned on the baseline. |
ltr | If the components should be laid out left to right. |
rowY | The top y position of the row. |
rowHeight | The height of the row. |
leftX | The leftmost position a component can be placed. |
rightX | The rightmost position a component can be placed. |
xPos | The x position of the component (if left to right, how far from leftX; otherwise how far from rightX). |
Definition at line 277 of file WrapLayout.java.
References org.sleuthkit.autopsy.guiutils.WrapLayout.getComponentX(), and org.sleuthkit.autopsy.guiutils.WrapLayout.getComponentY().
Referenced by org.sleuthkit.autopsy.guiutils.WrapLayout.layoutContainer().
void org.sleuthkit.autopsy.guiutils.WrapLayout.setHorizontalGap | ( | int | horizontalGap | ) |
Sets the horizontal gap between neighboring subcomponents as well as the spacing between subcomponents and the borders of the target component.
horizontalGap | The horizontal gap between components and between the components and the borders of the Container . |
Definition at line 151 of file WrapLayout.java.
References org.sleuthkit.autopsy.guiutils.WrapLayout.horizontalGap.
void org.sleuthkit.autopsy.guiutils.WrapLayout.setOppositeAligned | ( | Collection< Component > | oppAlignedComponents | ) |
Sets the set of components that will be aligned on the opposite side. If the target component's orientation is left to right, this set of components will be right aligned.
oppAlignedComponents | The components that will be aligned on the opposite side. |
Definition at line 115 of file WrapLayout.java.
Referenced by org.sleuthkit.autopsy.texttranslation.ui.TranslationContentPanel.additionalInitComponents(), and org.sleuthkit.autopsy.contentviewers.textcontentviewer.StringsContentPanel.customizeComponents().
void org.sleuthkit.autopsy.guiutils.WrapLayout.setVerticalGap | ( | int | verticalGap | ) |
Sets the vertical gap between neighboring rows as well as the spacing between rows and the borders of the target component.
verticalGap | The vertical gap between components and between the components and the borders of the Container . |
Definition at line 174 of file WrapLayout.java.
References org.sleuthkit.autopsy.guiutils.WrapLayout.verticalGap.
|
private |
If true, subcomponents will be aligned on their bottom edge. Otherwise, subcomponents are aligned on their top edge.
Definition at line 75 of file WrapLayout.java.
Referenced by org.sleuthkit.autopsy.guiutils.WrapLayout.isAlignOnBaseline(), and org.sleuthkit.autopsy.guiutils.WrapLayout.setAlignOnBaseline().
|
private |
The horizontal gap will specify the spacing between neighboring subcomponents as well as the spacing between subcomponents and the borders of the target component.
Definition at line 60 of file WrapLayout.java.
Referenced by org.sleuthkit.autopsy.guiutils.WrapLayout.getHorizontalGap(), org.sleuthkit.autopsy.guiutils.WrapLayout.setHorizontalGap(), and org.sleuthkit.autopsy.guiutils.WrapLayout.WrapLayout().
|
private |
The set of components that will be aligned on the opposite side. If the target component's orientation is left to right, this set of components will be right aligned.
Definition at line 82 of file WrapLayout.java.
|
staticprivate |
Definition at line 50 of file WrapLayout.java.
|
private |
The vertical gap between neighboring rows as well as the spacing between rows and the borders of the target component.
Definition at line 69 of file WrapLayout.java.
Referenced by org.sleuthkit.autopsy.guiutils.WrapLayout.getVerticalGap(), org.sleuthkit.autopsy.guiutils.WrapLayout.setVerticalGap(), and org.sleuthkit.autopsy.guiutils.WrapLayout.WrapLayout().
Copyright © 2012-2021 Basis Technology. Generated on: Thu Sep 30 2021
This work is licensed under a
Creative Commons Attribution-Share Alike 3.0 United States License.