Browse Source

无JIRA任务,代码规范

master
plough 7 years ago
parent
commit
0ae57bbbec
  1. 24
      designer_form/src/com/fr/design/mainframe/WidgetPropertyPane.java

24
designer_form/src/com/fr/design/mainframe/WidgetPropertyPane.java

@ -245,7 +245,7 @@ public class WidgetPropertyPane extends FormDockView implements BaseWidgetPrope
*/
private Component getExtraBodyTable(AbstractPropertyTable abstractPropertyTable) {
Widget selection = designer.getSelectionModel().getSelection().getSelectedCreator().toData();
if (selection.getWidgetName().equals("body")) {
if ("body".equals(selection.getWidgetName())) {
JPanel jPanel = FRGUIPaneFactory.createY_AXISBoxInnerContainer_S_Pane();
jPanel.add(abstractPropertyTable);
MobileWidgetTable mobileWidgetTable = new MobileWidgetTable(designer);
@ -294,7 +294,7 @@ public class WidgetPropertyPane extends FormDockView implements BaseWidgetPrope
XLayoutContainer container = XCreatorUtils.getHotspotContainer(xCreator);
boolean xCreatorAccept = xCreator.acceptType(XWParameterLayout.class);
boolean containerAccept = container!=null && container.acceptType(XWParameterLayout.class);
boolean containerAccept = container != null && container.acceptType(XWParameterLayout.class);
return xCreatorAccept || containerAccept;
}
@ -332,7 +332,7 @@ public class WidgetPropertyPane extends FormDockView implements BaseWidgetPrope
|| evt.getCreatorEventID() == DesignerEvent.CREATOR_DELETED
|| evt.getCreatorEventID() == DesignerEvent.CREATOR_RESIZED) {
formWidgetCardPane.populate();
}else if(evt.getCreatorEventID() == DesignerEvent.CREATOR_SELECTED){
} else if (evt.getCreatorEventID() == DesignerEvent.CREATOR_SELECTED){
// 防止多次触发
if (lastAffectedCreator != null && lastAffectedCreator == evt.getAffectedCreator()) {
return;
@ -393,10 +393,18 @@ public class WidgetPropertyPane extends FormDockView implements BaseWidgetPrope
* @param evt 事件
*/
public void fireCreatorModified(DesignerEvent evt) {
if (evt.getCreatorEventID() == DesignerEvent.CREATOR_RESIZED
|| evt.getCreatorEventID() == DesignerEvent.CREATOR_EDITED
|| evt.getCreatorEventID() == DesignerEvent.CREATOR_SELECTED
|| evt.getCreatorEventID() == DesignerEvent.CREATOR_ADDED) {
int[] validEventIds = {DesignerEvent.CREATOR_RESIZED, DesignerEvent.CREATOR_EDITED,
DesignerEvent.CREATOR_SELECTED, DesignerEvent.CREATOR_ADDED};
boolean isValid = false;
for (int validEventId : validEventIds) {
if (evt.getCreatorEventID() == validEventId) {
isValid = true;
break;
}
}
if (!isValid) {
return;
}
//fanglei:下面的注释不要删,只是暂时屏蔽
// int value = downPanel.getVerticalScrollBar().getValue();
// if (hasSelectParaPane(getEditingFormDesigner())) {
@ -416,7 +424,7 @@ public class WidgetPropertyPane extends FormDockView implements BaseWidgetPrope
extraPane.populate(designer);
}
}
}
}
@Override

Loading…
Cancel
Save