Package com.biglybt.ui.swt.minibar
Class MiniBar
- java.lang.Object
-
- com.biglybt.ui.swt.minibar.MiniBar
-
- All Implemented Interfaces:
MenuBuildUtils.MenuBuilder
- Direct Known Subclasses:
AllTransfersBar
,DownloadBar
public abstract class MiniBar extends java.lang.Object implements MenuBuildUtils.MenuBuilder
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected static interface
MiniBar.ProgressBarText
-
Field Summary
Fields Modifier and Type Field Description protected org.eclipse.swt.graphics.Color
bg_colour
private org.eclipse.swt.graphics.Font
bold_font
private boolean
constructed
private boolean
constructing
protected org.eclipse.swt.graphics.Color
fg_colour
protected org.eclipse.swt.graphics.Color
fg_text_colour
protected int
hSize
protected org.eclipse.swt.widgets.Label
lDrag
protected MiniBarManager
manager
private org.eclipse.swt.widgets.Menu
menu
private org.eclipse.swt.events.MouseListener
mListener
private org.eclipse.swt.events.MouseMoveListener
mMoveListener
protected boolean
moving
protected org.eclipse.swt.widgets.Monitor[]
screens
private boolean
separateDataProt
protected org.eclipse.swt.widgets.Shell
splash
protected MiniBar
stucked
private float
width_multiplier
protected int
xPressed
private int
xSize
protected int
yPressed
-
Constructor Summary
Constructors Modifier Constructor Description protected
MiniBar(MiniBarManager manager)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description private void
assertConstructing()
protected abstract void
beginConstruction()
private void
build()
void
buildMenu(org.eclipse.swt.widgets.Menu menu)
void
close()
void
construct(org.eclipse.swt.widgets.Shell main)
private org.eclipse.swt.graphics.Font
createBoldFont(org.eclipse.swt.graphics.Font original)
protected DoubleBufferedLabel
createDataLabel(int width)
protected DoubleBufferedLabel
createDataLabel(int width, boolean centered)
protected org.eclipse.swt.widgets.Label
createFixedLabel(int width)
protected org.eclipse.swt.widgets.Label
createFixedTextLabel(java.lang.String msg_key, boolean add_colon, boolean bold)
protected void
createGap(int width)
protected org.eclipse.swt.widgets.ProgressBar
createPercentProgressBar(int width)
protected org.eclipse.swt.widgets.ProgressBar
createProgressBar(int min, int max, int width, MiniBar.ProgressBarText pbt)
protected DoubleBufferedLabel
createSpeedLabel()
void
dispose()
protected void
doubleClick()
void
forceSaveLocation()
protected abstract java.lang.Object
getContextObject()
protected org.eclipse.swt.graphics.Point
getInitialLocation()
java.lang.Object[]
getPluginMenuContextObjects()
java.lang.String[]
getPluginMenuIdentifiers(java.lang.Object[] context)
org.eclipse.swt.widgets.Shell
getShell()
MiniBar
getStucked()
boolean
hasContext(java.lang.Object context)
boolean
hasSameContext(MiniBar m)
void
refresh()
protected abstract void
refresh0()
private void
setPrebuildValues()
protected void
setSnapLocation(org.eclipse.swt.graphics.Point currentLoc)
void
setStucked(MiniBar mw)
void
setVisible(boolean visible)
protected void
storeLastLocation(org.eclipse.swt.graphics.Point point)
protected void
updateSpeedLabel(DoubleBufferedLabel label, long data_rate, long protocol_rate)
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.biglybt.ui.swt.MenuBuildUtils.MenuBuilder
buildMenu
-
-
-
-
Field Detail
-
bg_colour
protected final org.eclipse.swt.graphics.Color bg_colour
-
fg_colour
protected final org.eclipse.swt.graphics.Color fg_colour
-
fg_text_colour
protected final org.eclipse.swt.graphics.Color fg_text_colour
-
lDrag
protected org.eclipse.swt.widgets.Label lDrag
-
stucked
protected MiniBar stucked
-
screens
protected org.eclipse.swt.widgets.Monitor[] screens
-
xPressed
protected int xPressed
-
yPressed
protected int yPressed
-
moving
protected boolean moving
-
hSize
protected int hSize
-
splash
protected org.eclipse.swt.widgets.Shell splash
-
manager
protected MiniBarManager manager
-
bold_font
private org.eclipse.swt.graphics.Font bold_font
-
constructing
private boolean constructing
-
constructed
private boolean constructed
-
menu
private org.eclipse.swt.widgets.Menu menu
-
mMoveListener
private org.eclipse.swt.events.MouseMoveListener mMoveListener
-
mListener
private org.eclipse.swt.events.MouseListener mListener
-
xSize
private int xSize
-
separateDataProt
private boolean separateDataProt
-
width_multiplier
private float width_multiplier
-
-
Constructor Detail
-
MiniBar
protected MiniBar(MiniBarManager manager)
-
-
Method Detail
-
setPrebuildValues
private void setPrebuildValues()
-
assertConstructing
private void assertConstructing()
-
createBoldFont
private org.eclipse.swt.graphics.Font createBoldFont(org.eclipse.swt.graphics.Font original)
-
createGap
protected final void createGap(int width)
-
createFixedTextLabel
protected final org.eclipse.swt.widgets.Label createFixedTextLabel(java.lang.String msg_key, boolean add_colon, boolean bold)
-
createFixedLabel
protected final org.eclipse.swt.widgets.Label createFixedLabel(int width)
-
createDataLabel
protected final DoubleBufferedLabel createDataLabel(int width, boolean centered)
-
createDataLabel
protected final DoubleBufferedLabel createDataLabel(int width)
-
createSpeedLabel
protected final DoubleBufferedLabel createSpeedLabel()
-
updateSpeedLabel
protected void updateSpeedLabel(DoubleBufferedLabel label, long data_rate, long protocol_rate)
-
createProgressBar
protected final org.eclipse.swt.widgets.ProgressBar createProgressBar(int min, int max, int width, MiniBar.ProgressBarText pbt)
-
createPercentProgressBar
protected final org.eclipse.swt.widgets.ProgressBar createPercentProgressBar(int width)
-
construct
public final void construct(org.eclipse.swt.widgets.Shell main)
-
build
private void build()
-
buildMenu
public void buildMenu(org.eclipse.swt.widgets.Menu menu)
-
setSnapLocation
protected final void setSnapLocation(org.eclipse.swt.graphics.Point currentLoc)
-
getShell
public org.eclipse.swt.widgets.Shell getShell()
-
setVisible
public void setVisible(boolean visible)
-
hasSameContext
public final boolean hasSameContext(MiniBar m)
-
hasContext
public final boolean hasContext(java.lang.Object context)
-
getStucked
public MiniBar getStucked()
-
setStucked
public void setStucked(MiniBar mw)
-
forceSaveLocation
public final void forceSaveLocation()
-
close
public final void close()
-
dispose
public void dispose()
-
refresh
public final void refresh()
-
refresh0
protected abstract void refresh0()
-
beginConstruction
protected abstract void beginConstruction()
-
getContextObject
protected abstract java.lang.Object getContextObject()
-
getPluginMenuIdentifiers
public java.lang.String[] getPluginMenuIdentifiers(java.lang.Object[] context)
-
getPluginMenuContextObjects
public java.lang.Object[] getPluginMenuContextObjects()
-
getInitialLocation
protected org.eclipse.swt.graphics.Point getInitialLocation()
-
doubleClick
protected void doubleClick()
-
storeLastLocation
protected void storeLastLocation(org.eclipse.swt.graphics.Point point)
-
-