small java code indent "fix"

This commit is contained in:
Honfika
2013-12-27 20:04:25 +01:00
parent c753258a28
commit ca1ffae600

View File

@@ -158,73 +158,73 @@ public final class MainFrameRibbon extends AppRibbonFrame implements MainFrame {
public void setVisible(boolean b) {
super.setVisible(b);
final MainFrameRibbon t = this;
final MainFrameRibbon t = this;
SwingUtilities.invokeLater(new Runnable() {
@Override
public void run() {
List<JRibbonApplicationMenuButton> mbuttons = new ArrayList<>();
getApplicationMenuButtons(t, mbuttons);
SwingUtilities.invokeLater(new Runnable() {
@Override
public void run() {
List<JRibbonApplicationMenuButton> mbuttons = new ArrayList<>();
getApplicationMenuButtons(t, mbuttons);
for (final JRibbonApplicationMenuButton mbutton : mbuttons) {
mbutton.setIcon(View.getResizableIcon("buttonicon_256"));
mbutton.setDisplayState(new CommandButtonDisplayState(
"My Ribbon Application Menu Button", mbutton.getSize().width) {
@Override
public CommandButtonLayoutManager createLayoutManager(
AbstractCommandButton commandButton) {
return new CommandButtonLayoutManager() {
@Override
public int getPreferredIconSize() {
return mbutton.getSize().width;
}
for (final JRibbonApplicationMenuButton mbutton : mbuttons) {
mbutton.setIcon(View.getResizableIcon("buttonicon_256"));
mbutton.setDisplayState(new CommandButtonDisplayState(
"My Ribbon Application Menu Button", mbutton.getSize().width) {
@Override
public CommandButtonLayoutManager createLayoutManager(
AbstractCommandButton commandButton) {
return new CommandButtonLayoutManager() {
@Override
public int getPreferredIconSize() {
return mbutton.getSize().width;
}
@Override
public CommandButtonLayoutManager.CommandButtonLayoutInfo getLayoutInfo(
AbstractCommandButton commandButton, Graphics g) {
CommandButtonLayoutManager.CommandButtonLayoutInfo result = new CommandButtonLayoutManager.CommandButtonLayoutInfo();
result.actionClickArea = new Rectangle(0, 0, 0, 0);
result.popupClickArea = new Rectangle(0, 0, commandButton
.getWidth(), commandButton.getHeight());
result.popupActionRect = new Rectangle(0, 0, 0, 0);
ResizableIcon icon = commandButton.getIcon();
icon.setDimension(new Dimension(commandButton.getWidth(), commandButton.getHeight()));
result.iconRect = new Rectangle(
0,
0,
commandButton.getWidth(), commandButton.getHeight());
result.isTextInActionArea = false;
return result;
}
@Override
public CommandButtonLayoutManager.CommandButtonLayoutInfo getLayoutInfo(
AbstractCommandButton commandButton, Graphics g) {
CommandButtonLayoutManager.CommandButtonLayoutInfo result = new CommandButtonLayoutManager.CommandButtonLayoutInfo();
result.actionClickArea = new Rectangle(0, 0, 0, 0);
result.popupClickArea = new Rectangle(0, 0, commandButton
.getWidth(), commandButton.getHeight());
result.popupActionRect = new Rectangle(0, 0, 0, 0);
ResizableIcon icon = commandButton.getIcon();
icon.setDimension(new Dimension(commandButton.getWidth(), commandButton.getHeight()));
result.iconRect = new Rectangle(
0,
0,
commandButton.getWidth(), commandButton.getHeight());
result.isTextInActionArea = false;
return result;
}
@Override
public Dimension getPreferredSize(
AbstractCommandButton commandButton) {
return new Dimension(40, 40);
}
@Override
public Dimension getPreferredSize(
AbstractCommandButton commandButton) {
return new Dimension(40, 40);
}
@Override
public void propertyChange(PropertyChangeEvent evt) {
}
@Override
public void propertyChange(PropertyChangeEvent evt) {
}
@Override
public Point getKeyTipAnchorCenterPoint(
AbstractCommandButton commandButton) {
// dead center
return new Point(commandButton.getWidth() / 2,
commandButton.getHeight() / 2);
}
};
}
});
@Override
public Point getKeyTipAnchorCenterPoint(
AbstractCommandButton commandButton) {
// dead center
return new Point(commandButton.getWidth() / 2,
commandButton.getHeight() / 2);
}
};
}
});
MyRibbonApplicationMenuButtonUI mui = (MyRibbonApplicationMenuButtonUI) mbutton.getUI();
mui.setHoverIcon(View.getResizableIcon("buttonicon_hover_256"));
mui.setNormalIcon(View.getResizableIcon("buttonicon_256"));
mui.setClickIcon(View.getResizableIcon("buttonicon_down_256"));
}
MyRibbonApplicationMenuButtonUI mui = (MyRibbonApplicationMenuButtonUI) mbutton.getUI();
mui.setHoverIcon(View.getResizableIcon("buttonicon_hover_256"));
mui.setNormalIcon(View.getResizableIcon("buttonicon_256"));
mui.setClickIcon(View.getResizableIcon("buttonicon_down_256"));
}
});
}
});
panel.setVisible(b);
}