private MenuItem keyWindowItem; /* key window menu */
public KeyWindow keyWindow;
public int recentlyDocked;
- public ColorTag pairTagCanvas;
+ public ColorTag pairTag;
public CustomProgressBar bootingProgress;
public ScreenShotDialog screenShotDialog;
if (recreate == false) {
/* show the key window */
keyWindowItem.setSelection(isKeyWindow = true);
- pairTagCanvas.setVisible(true);
+ pairTag.setVisible(true);
keyWindow.getShell().setVisible(true);
SkinUtil.setTopMost(keyWindow.getShell(), isOnTop);
keyWindowItem.setSelection(isKeyWindow = true);
SkinUtil.setTopMost(keyWindow.getShell(), isOnTop);
- pairTagCanvas.setVisible(true);
+ pairTag.setVisible(true);
keyWindow.open(dockValue);
}
public void hideKeyWindow() {
keyWindowItem.setSelection(isKeyWindow = false);
- pairTagCanvas.setVisible(false);
+ pairTag.setVisible(false);
if (keyWindow != null) {
keyWindow.getShell().setVisible(false);
public void closeKeyWindow() {
keyWindowItem.setSelection(isKeyWindow = false);
- pairTagCanvas.setVisible(false);
+ pairTag.setVisible(false);
if (keyWindow != null) {
keyWindow.getShell().close();
});
/* make a pair tag circle */
- skin.pairTagCanvas =
+ skin.pairTag =
new ColorTag(shell, SWT.NO_FOCUS, skin.getColorVM());
- skin.pairTagCanvas.setVisible(false);
+ skin.pairTag.setVisible(false);
/* create a progress bar for booting status */
skin.bootingProgress = new CustomProgressBar(shell, SWT.NONE);
displayBounds.y + displayBounds.height + 1, displayBounds.width, 2);
}
- /* arrange the pair tag */
- skin.pairTagCanvas.setBounds(
- PAIR_TAG_POSITION_X, PAIR_TAG_POSITION_Y,
- skin.pairTagCanvas.getWidth(), skin.pairTagCanvas.getHeight());
-
/* set window size */
if (currentState.getCurrentImage() != null) {
ImageData imageData = currentState.getCurrentImage().getImageData();
shell.setSize(imageData.width, imageData.height);
}
+ /* arrange the pair tag */
+ int rotationType = currentState.getCurrentRotationId();
+ if (rotationType == RotationInfo.PORTRAIT.id()) {
+ skin.pairTag.setBounds(
+ PAIR_TAG_POSITION_X, PAIR_TAG_POSITION_Y,
+ skin.pairTag.getWidth(), skin.pairTag.getHeight());
+ } else if (rotationType == RotationInfo.LANDSCAPE.id()) {
+ skin.pairTag.setBounds(
+ PAIR_TAG_POSITION_Y,
+ shell.getSize().y - PAIR_TAG_POSITION_X - skin.pairTag.getHeight(),
+ skin.pairTag.getWidth(), skin.pairTag.getHeight());
+ } else if (rotationType == RotationInfo.REVERSE_PORTRAIT.id()) {
+ skin.pairTag.setBounds(
+ shell.getSize().x - PAIR_TAG_POSITION_X - skin.pairTag.getWidth(),
+ shell.getSize().y - PAIR_TAG_POSITION_Y - skin.pairTag.getHeight(),
+ skin.pairTag.getWidth(), skin.pairTag.getHeight());
+ } else if (rotationType == RotationInfo.REVERSE_LANDSCAPE.id()) {
+ skin.pairTag.setBounds(
+ shell.getSize().x - PAIR_TAG_POSITION_Y - skin.pairTag.getWidth(),
+ PAIR_TAG_POSITION_X,
+ skin.pairTag.getWidth(), skin.pairTag.getHeight());
+ }
+
/* custom window shape */
trimPatchedShell(shell, currentState.getCurrentImage());
toggleButton.dispose();
}
- if (skin.pairTagCanvas != null) {
- skin.pairTagCanvas.dispose();
+ if (skin.pairTag != null) {
+ skin.pairTag.dispose();
}
if (backgroundColor != null) {