de.scheisseichfindemalkeinen.settings.options
Class Subdir

java.lang.Object
  extended by de.scheisseichfindemalkeinen.settings.options.Subdir

public class Subdir
extends java.lang.Object

The user can define subdirectory were the files are moved to after download is completed. The files are moved, when the filesize are in the defined range.


Field Summary
static int RESOLUTION_BOTH
          Both
static int RESOLUTION_ONLY_HEIGHT
          Only height is checked
static int RESOLUTION_ONLY_HIGHER
          Only the higher component of the resolution is checked
static int RESOLUTION_ONLY_LOWER
          Only the lower component of the resolution is checked
static int RESOLUTION_ONLY_WIDTH
          Only width is checked
 
Constructor Summary
Subdir(java.lang.String subdirName, long minSize, long maxSize)
          Constructor
Subdir(java.lang.String subdirName, long minSize, long maxSize, int minWidth, int minHeight, int maxWidth, int maxHeight)
          Constructor
 
Method Summary
 int getMaxHeight()
          Returns the maxHeight
 long getMaxSize()
          Returns the maxSize
 int getMaxWidth()
          Returns the maxWidth
 int getMinHeight()
          Returns the minHeight
 long getMinSize()
          Returns the minSize
 int getMinWidth()
          Returns the minWidth
 java.lang.String getSubdirName()
          Returns the subdirName
 boolean isInFilesizeRange(long filesize)
          Checks if Filesize is in range
 boolean isInHeightRange(int height)
          Checks if Height is in range
 boolean isInRange(long filesize, int width, int height, boolean isImage)
           
 boolean isInWidthRange(int width)
          Checks if Width is in range
 void setMaxHeight(int maxHeight)
          Sets the maxHeight
 void setMaxSize(long maxSize)
          Sets the maxSize
 void setMaxWidth(int maxWidth)
          Sets the maxWidth
 void setMinHeight(int minHeight)
          Sets the minHeight
 void setMinSize(long minSize)
          Sets the minSize
 void setMinWidth(int minWidth)
          Sets the minWidth
 void setSubdirName(java.lang.String subdirName)
          Sets the subdirName
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

RESOLUTION_ONLY_LOWER

public static final int RESOLUTION_ONLY_LOWER
Only the lower component of the resolution is checked

See Also:
Constant Field Values

RESOLUTION_ONLY_HIGHER

public static final int RESOLUTION_ONLY_HIGHER
Only the higher component of the resolution is checked

See Also:
Constant Field Values

RESOLUTION_ONLY_WIDTH

public static final int RESOLUTION_ONLY_WIDTH
Only width is checked

See Also:
Constant Field Values

RESOLUTION_ONLY_HEIGHT

public static final int RESOLUTION_ONLY_HEIGHT
Only height is checked

See Also:
Constant Field Values

RESOLUTION_BOTH

public static final int RESOLUTION_BOTH
Both

See Also:
Constant Field Values
Constructor Detail

Subdir

public Subdir(java.lang.String subdirName,
              long minSize,
              long maxSize)
Constructor

Parameters:
subdirName - Name of the subdirectory
minSize - Min Filesize
maxSize - Max Filesize

Subdir

public Subdir(java.lang.String subdirName,
              long minSize,
              long maxSize,
              int minWidth,
              int minHeight,
              int maxWidth,
              int maxHeight)
Constructor

Parameters:
subdirName - Name of the subdirectory
minSize - Min Filesize
maxSize - Max Filesize
minWidth - Min Width
maxWidth - Max Width
minHeight - Min Height
maxHeight - Max Height
Method Detail

getSubdirName

public java.lang.String getSubdirName()
Returns the subdirName

Returns:
subdirName

setSubdirName

public void setSubdirName(java.lang.String subdirName)
Sets the subdirName

Parameters:
subdirName - subdirName

getMinSize

public long getMinSize()
Returns the minSize

Returns:
minSize

setMinSize

public void setMinSize(long minSize)
Sets the minSize

Parameters:
minSize - minSize

getMaxSize

public long getMaxSize()
Returns the maxSize

Returns:
maxSize

setMaxSize

public void setMaxSize(long maxSize)
Sets the maxSize

Parameters:
maxSize - maxSize

getMinWidth

public int getMinWidth()
Returns the minWidth

Returns:
minWidth

setMinWidth

public void setMinWidth(int minWidth)
Sets the minWidth

Parameters:
minWidth - minWidth

getMaxWidth

public int getMaxWidth()
Returns the maxWidth

Returns:
maxWidth

setMaxWidth

public void setMaxWidth(int maxWidth)
Sets the maxWidth

Parameters:
maxWidth - maxWidth

getMinHeight

public int getMinHeight()
Returns the minHeight

Returns:
minHeight

setMinHeight

public void setMinHeight(int minHeight)
Sets the minHeight

Parameters:
minHeight - minHeight

getMaxHeight

public int getMaxHeight()
Returns the maxHeight

Returns:
maxHeight

setMaxHeight

public void setMaxHeight(int maxHeight)
Sets the maxHeight

Parameters:
maxHeight - maxHeight

isInFilesizeRange

public boolean isInFilesizeRange(long filesize)
Checks if Filesize is in range

Parameters:
filesize - Filesize
Returns:
True if Filesize is in range

isInWidthRange

public boolean isInWidthRange(int width)
Checks if Width is in range

Parameters:
width - Width
Returns:
True if Width is in range

isInHeightRange

public boolean isInHeightRange(int height)
Checks if Height is in range

Parameters:
height - Height
Returns:
True if Height is in range

isInRange

public boolean isInRange(long filesize,
                         int width,
                         int height,
                         boolean isImage)
Parameters:
filesize -
width -
height -
isImage -
Returns:
TRUE if the file matches all required ranges