mirror of
https://github.com/igniterealtime/Spark.git
synced 2025-12-01 12:27:58 +00:00
Update ChatRoomUI following Mockups.
git-svn-id: http://svn.igniterealtime.org/svn/repos/spark/trunk@6701 b35dd754-fafc-0310-a699-88a17e54d16e
This commit is contained in:
@ -44,7 +44,7 @@ public class ChatAreaSendField extends JPanel {
|
||||
|
||||
textField = new ChatInputEditor();
|
||||
textField.setBorder(null);
|
||||
setBorder(BorderFactory.createMatteBorder(1, 0, 1, 0, Color.lightGray));
|
||||
setBorder(BorderFactory.createMatteBorder(1, 1, 1, 1, Color.lightGray));
|
||||
button = new JButton();
|
||||
|
||||
if (Spark.isMac()) {
|
||||
|
||||
@ -33,7 +33,7 @@ public class BackgroundPanel extends JPanel {
|
||||
|
||||
|
||||
public void paintComponent(Graphics g) {
|
||||
final Image backgroundImage = Default.getImageIcon(Default.SECONDARY_BACKGROUND_IMAGE).getImage();
|
||||
final Image backgroundImage = Default.getImageIcon(Default.TOP_BOTTOM_BACKGROUND_IMAGE).getImage();
|
||||
double scaleX = getWidth() / (double)backgroundImage.getWidth(null);
|
||||
double scaleY = getHeight() / (double)backgroundImage.getHeight(null);
|
||||
AffineTransform xform = AffineTransform.getScaleInstance(scaleX, scaleY);
|
||||
|
||||
@ -205,7 +205,7 @@ public abstract class ChatRoom extends BackgroundPanel implements ActionListener
|
||||
getTranscriptWindow().setTransferHandler(transferHandler);
|
||||
getChatInputEditor().setTransferHandler(transferHandler);
|
||||
|
||||
add(toolbar, new GridBagConstraints(0, 0, 1, 1, 1.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL, new Insets(0, 0, 0, 0), 0, 0));
|
||||
add(toolbar, new GridBagConstraints(0, 0, 1, 1, 1.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL, new Insets(0, 5, 0, 5), 0, 0));
|
||||
|
||||
// Add Connection Listener
|
||||
SparkManager.getConnection().addConnectionListener(this);
|
||||
@ -215,13 +215,12 @@ public abstract class ChatRoom extends BackgroundPanel implements ActionListener
|
||||
private void init() {
|
||||
setLayout(new GridBagLayout());
|
||||
|
||||
|
||||
add(splitPane, new GridBagConstraints(0, 1, 1, 1, 1.0, 1.0, GridBagConstraints.CENTER, GridBagConstraints.BOTH, new Insets(0, 0, 0, 0), 0, 0));
|
||||
// add(notificationLabel, new GridBagConstraints(0, 2, 1, 1, 0.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(5, 2, 5, 0), 0, 0));
|
||||
|
||||
// Remove Default Beveled Borders
|
||||
splitPane.setBorder(null);
|
||||
verticalSplit.setBorder(null);
|
||||
verticalSplit.setOneTouchExpandable(false);
|
||||
splitPane.setLeftComponent(verticalSplit);
|
||||
|
||||
textScroller.setAutoscrolls(true);
|
||||
@ -236,7 +235,7 @@ public abstract class ChatRoom extends BackgroundPanel implements ActionListener
|
||||
chatWindowPanel.setOpaque(false);
|
||||
|
||||
// Layout Components
|
||||
chatPanel.add(chatWindowPanel, new GridBagConstraints(0, 1, 1, 1, 1.0, 1.0, GridBagConstraints.CENTER, GridBagConstraints.BOTH, new Insets(0, 2, 0, 2), 0, 0));
|
||||
chatPanel.add(chatWindowPanel, new GridBagConstraints(0, 1, 1, 1, 1.0, 1.0, GridBagConstraints.CENTER, GridBagConstraints.BOTH, new Insets(0, 5, 0, 5), 0, 0));
|
||||
|
||||
// Add edit buttons to Chat Room
|
||||
editorBar.setOpaque(false);
|
||||
@ -248,8 +247,8 @@ public abstract class ChatRoom extends BackgroundPanel implements ActionListener
|
||||
bottomPanel.setOpaque(false);
|
||||
splitPane.setOpaque(false);
|
||||
bottomPanel.setLayout(new GridBagLayout());
|
||||
bottomPanel.add(chatAreaButton, new GridBagConstraints(0, 1, 5, 1, 1.0, 1.0, GridBagConstraints.WEST, GridBagConstraints.BOTH, new Insets(0, 0, 0, 0), 0, 15));
|
||||
bottomPanel.add(editorBar, new GridBagConstraints(0, 0, 5, 1, 0.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL, new Insets(0, 0, 0, 0), 0, 0));
|
||||
bottomPanel.add(chatAreaButton, new GridBagConstraints(0, 1, 5, 1, 1.0, 1.0, GridBagConstraints.WEST, GridBagConstraints.BOTH, new Insets(0, 5, 5, 5), 0, 15));
|
||||
bottomPanel.add(editorBar, new GridBagConstraints(0, 0, 5, 1, 0.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL, new Insets(0, 5, 0, 5), 0, 0));
|
||||
verticalSplit.setOpaque(false);
|
||||
|
||||
verticalSplit.setTopComponent(chatPanel);
|
||||
|
||||
Reference in New Issue
Block a user