-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into lois/add-weather-icons
- Loading branch information
Showing
6 changed files
with
138 additions
and
20 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
package edu.project.components; | ||
|
||
import java.awt.Color; | ||
import java.awt.Font; | ||
import java.awt.GridLayout; | ||
|
||
import javax.swing.JButton; | ||
import javax.swing.JPanel; | ||
|
||
import edu.project.Context; | ||
|
||
public class ZoomButtonGroup extends JPanel { | ||
public ZoomButtonGroup(Context context) { | ||
setOpaque(false); | ||
setLayout(new GridLayout(2, 1)); | ||
|
||
JButton zoomInButton = new JButton("+"); | ||
zoomInButton.setFont(new Font("Arial", Font.PLAIN, 32)); | ||
zoomInButton.setForeground(Color.GRAY); | ||
add(zoomInButton); | ||
zoomInButton.addActionListener(e -> { | ||
context.store.zoomIn(); | ||
}); | ||
|
||
JButton zoomOutButton = new JButton("-"); | ||
zoomOutButton.setForeground(Color.GRAY); | ||
zoomOutButton.setFont(new Font("Arial", Font.PLAIN, 32)); | ||
add(zoomOutButton); | ||
zoomOutButton.addActionListener(e -> { | ||
context.store.zoomOut(); | ||
}); | ||
} | ||
} |