-
Notifications
You must be signed in to change notification settings - Fork 168
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #326 from Etuldan/master
IG Help Picture
- Loading branch information
Showing
11 changed files
with
87 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
46 changes: 46 additions & 0 deletions
46
app-ui/src/main/java/com/mercury/platform/ui/frame/other/HelpIGFrame.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
package com.mercury.platform.ui.frame.other; | ||
|
||
import com.mercury.platform.ui.frame.AbstractOverlaidFrame; | ||
|
||
import javax.swing.*; | ||
import java.awt.*; | ||
|
||
public class HelpIGFrame extends AbstractOverlaidFrame { | ||
private int MARGIN = 400; | ||
public HelpIGFrame() { | ||
super(); | ||
} | ||
|
||
@Override | ||
protected void initialize() { | ||
this.componentsFactory.setScale(1.1f); | ||
} | ||
|
||
@Override | ||
public void subscribe() { | ||
} | ||
|
||
@Override | ||
protected LayoutManager getFrameLayout() { | ||
return new BorderLayout(); | ||
} | ||
|
||
@Override | ||
public void onViewInit() { | ||
this.setOpacity(this.applicationConfig.get().getMaxOpacity() / 100f); | ||
Dimension dim = Toolkit.getDefaultToolkit().getScreenSize(); | ||
|
||
ImageIcon icon = this.componentsFactory.getImage("app/helpIGImg.png"); | ||
Image image = icon.getImage(); // transform it | ||
Image newimg = image.getScaledInstance(dim.width - MARGIN, -1, java.awt.Image.SCALE_SMOOTH); | ||
if(dim.height-MARGIN < newimg.getHeight(null)) { | ||
newimg = image.getScaledInstance(-1, dim.height - MARGIN, java.awt.Image.SCALE_SMOOTH); | ||
} | ||
icon = new ImageIcon(newimg); | ||
|
||
JLabel img = new JLabel(icon); | ||
this.add(img); | ||
this.pack(); | ||
this.setLocation(dim.width/2-this.getSize().width/2, 0); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.