<?xml version="1.0" encoding="UTF-8"?>
<form xmlns="http://www.intellij.com/uidesigner/form/" version="1" bind-to-class="com.intellij.uiDesigner.GuiDesignerConfigurable.MyGeneralUI">
- <grid id="4a770" binding="myPanel" layout-manager="GridLayoutManager" row-count="6" column-count="3" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
+ <grid id="4a770" binding="myPanel" layout-manager="GridLayoutManager" row-count="7" column-count="3" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
<margin top="0" left="0" bottom="0" right="0"/>
<constraints>
- <xy x="62" y="47" width="473" height="224"/>
+ <xy x="62" y="47" width="493" height="278"/>
</constraints>
<properties/>
<border type="none"/>
<children>
<vspacer id="d5f77">
<constraints>
- <grid row="5" column="0" row-span="1" col-span="2" vsize-policy="6" hsize-policy="1" anchor="0" fill="2" indent="0" use-parent-layout="false"/>
+ <grid row="6" column="0" row-span="1" col-span="2" vsize-policy="6" hsize-policy="1" anchor="0" fill="2" indent="0" use-parent-layout="false"/>
</constraints>
</vspacer>
<component id="2eed8" class="javax.swing.JLabel">
</model>
</properties>
</component>
+ <component id="b9ad7" class="javax.swing.JCheckBox" binding="myResizeHeaders">
+ <constraints>
+ <grid row="5" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="3" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
+ </constraints>
+ <properties>
+ <margin top="10" left="0" bottom="2" right="2"/>
+ <text value="Resize column and row headers over mouse"/>
+ </properties>
+ </component>
</children>
</grid>
<buttonGroups>
return true;
}
+ if (configuration.RESIZE_HEADERS != myGeneralUI.myResizeHeaders.isSelected()) {
+ return true;
+ }
+
return false;
}
configuration.DEFAULT_LAYOUT_MANAGER = (String)myGeneralUI.myLayoutManagerCombo.getSelectedItem();
configuration.INSTRUMENT_CLASSES = myGeneralUI.myRbInstrumentClasses.isSelected();
configuration.DEFAULT_FIELD_ACCESSIBILITY = (String)myGeneralUI .myDefaultFieldAccessibilityCombo.getSelectedItem();
+ configuration.RESIZE_HEADERS = myGeneralUI.myResizeHeaders.isSelected();
if (configuration.INSTRUMENT_CLASSES && !myProject.isDefault()) {
final DispatchThreadProgressWindow progressWindow = new DispatchThreadProgressWindow(false, myProject);
myGeneralUI.myLayoutManagerCombo.setSelectedItem(configuration.DEFAULT_LAYOUT_MANAGER);
myGeneralUI.myDefaultFieldAccessibilityCombo.setSelectedItem(configuration.DEFAULT_FIELD_ACCESSIBILITY);
+
+ myGeneralUI.myResizeHeaders.setSelected(configuration.RESIZE_HEADERS);
}
public void disposeUIResources() {
public JCheckBox myChkCopyFormsRuntime;
private JComboBox myLayoutManagerCombo;
private JComboBox myDefaultFieldAccessibilityCombo;
+ private JCheckBox myResizeHeaders;
}
private final class MyApplyRunnable implements Runnable {
import com.intellij.uiDesigner.CaptionSelection;
import com.intellij.uiDesigner.FormEditingUtil;
import com.intellij.uiDesigner.GridChangeUtil;
+import com.intellij.uiDesigner.GuiDesignerConfiguration;
import com.intellij.uiDesigner.componentTree.ComponentSelectionListener;
import com.intellij.uiDesigner.radComponents.RadAbstractGridLayoutManager;
import com.intellij.uiDesigner.radComponents.RadComponent;
});
}
+ private boolean canResizeCells() {
+ return GuiDesignerConfiguration.getInstance(myEditor.getProject()).RESIZE_HEADERS &&
+ mySelectedContainer != null &&
+ mySelectedContainer.getGridLayoutManager().canResizeCells();
+ }
+
private int getCellAt(Point pnt) {
if (mySelectedContainer == null) return -1;
pnt = SwingUtilities.convertPoint(this, pnt, mySelectedContainer.getDelegee());
requestFocus();
Point pnt = SwingUtilities.convertPoint(GridCaptionPanel.this, e.getPoint(),
mySelectedContainer.getDelegee());
- RadAbstractGridLayoutManager layout = mySelectedContainer.getGridLayoutManager();
- if (layout.canResizeCells()) {
- myResizeLine = layout.getGridLineNear(mySelectedContainer, myIsRow, pnt, 4);
+ if (canResizeCells()) {
+ myResizeLine = mySelectedContainer.getGridLayoutManager().getGridLineNear(mySelectedContainer, myIsRow, pnt, 4);
}
if (!checkShowPopupMenu(e)) {
int cell = getCellAt(e.getPoint());
}
public void mouseMoved(MouseEvent e) {
- if (mySelectedContainer == null || !mySelectedContainer.getGridLayoutManager().canResizeCells()) return;
+ if (!canResizeCells()) {
+ return;
+ }
+
Point pnt = SwingUtilities.convertPoint(GridCaptionPanel.this, e.getPoint(),
mySelectedContainer.getDelegee());
int gridLine = mySelectedContainer.getGridLayoutManager().getGridLineNear(mySelectedContainer, myIsRow, pnt, 4);