forked from fanruan/design
mengao
7 years ago
30 changed files with 317 additions and 108 deletions
@ -0,0 +1,25 @@
|
||||
package com.fr.design.widget; |
||||
|
||||
import com.fr.design.mainframe.ElementCasePane; |
||||
|
||||
import java.awt.*; |
||||
|
||||
/** |
||||
* 没有悬浮弹窗的控件事件编辑面板 |
||||
* Created by plough on 2017/8/28. |
||||
*/ |
||||
public class WidgetEventPaneNoPop extends WidgetEventPane { |
||||
public WidgetEventPaneNoPop(ElementCasePane ePane) { |
||||
super(ePane); |
||||
} |
||||
|
||||
@Override |
||||
protected boolean isNewStyle() { |
||||
return false; |
||||
} |
||||
|
||||
@Override |
||||
protected void popupEditDialog(Point mousePos) { |
||||
// no pop, do nothing
|
||||
} |
||||
} |
@ -0,0 +1,17 @@
|
||||
package com.fr.design.widget; |
||||
|
||||
import com.fr.design.mainframe.ElementCasePane; |
||||
|
||||
/** |
||||
* Created by kerry on 2017/8/29. |
||||
*/ |
||||
public class WidgetManageCardPane extends CellWidgetCardPane{ |
||||
|
||||
public WidgetManageCardPane(ElementCasePane pane) { |
||||
super(pane); |
||||
} |
||||
|
||||
protected WidgetEventPane initWidgetEventPane(ElementCasePane pane){ |
||||
return new WidgetEventPaneNoPop(pane); |
||||
} |
||||
} |
@ -0,0 +1,30 @@
|
||||
package com.fr.design.widget.ui.designer; |
||||
|
||||
import com.fr.design.designer.creator.XCreator; |
||||
import com.fr.design.layout.FRGUIPaneFactory; |
||||
import com.fr.form.ui.Widget; |
||||
|
||||
/** |
||||
* Created by kerry on 2017/8/30. |
||||
*/ |
||||
public class DefaultWidgetDefinePane extends AbstractDataModify<Widget> { |
||||
|
||||
public DefaultWidgetDefinePane(XCreator xCreator){ |
||||
super(xCreator); |
||||
this.setLayout(FRGUIPaneFactory.createBorderLayout()); |
||||
} |
||||
|
||||
@Override |
||||
public String title4PopupWindow() { |
||||
return "default"; |
||||
} |
||||
|
||||
@Override |
||||
public void populateBean(Widget w) { |
||||
} |
||||
|
||||
@Override |
||||
public Widget updateBean() { |
||||
return creator.toData(); |
||||
} |
||||
} |
@ -0,0 +1,69 @@
|
||||
package com.fr.design.widget.ui.designer.layout; |
||||
|
||||
import com.fr.design.data.DataCreatorUI; |
||||
import com.fr.design.designer.creator.XCreator; |
||||
import com.fr.design.foldablepane.UIExpandablePane; |
||||
import com.fr.design.gui.ilable.UILabel; |
||||
import com.fr.design.layout.FRGUIPaneFactory; |
||||
import com.fr.design.layout.TableLayoutHelper; |
||||
import com.fr.design.mainframe.widget.accessibles.AccessibleWLayoutBorderStyleEditor; |
||||
import com.fr.design.widget.ui.designer.AbstractDataModify; |
||||
import com.fr.form.ui.AbstractBorderStyleWidget; |
||||
import com.fr.form.ui.LayoutBorderStyle; |
||||
import com.fr.general.Inter; |
||||
|
||||
import javax.swing.*; |
||||
import java.awt.*; |
||||
|
||||
/** |
||||
* Created by kerry on 2017/8/29. |
||||
*/ |
||||
public class BorderStyleWidgetDefinePane extends AbstractDataModify<AbstractBorderStyleWidget> { |
||||
private AccessibleWLayoutBorderStyleEditor borderStyleEditor; |
||||
|
||||
public BorderStyleWidgetDefinePane(XCreator xCreator) { |
||||
super(xCreator); |
||||
initComponent(); |
||||
} |
||||
|
||||
|
||||
public void initComponent() { |
||||
borderStyleEditor = new AccessibleWLayoutBorderStyleEditor(); |
||||
this.setLayout(FRGUIPaneFactory.createBorderLayout()); |
||||
JPanel advancePane = FRGUIPaneFactory.createBorderLayout_S_Pane(); |
||||
JPanel jPanel = TableLayoutHelper.createGapTableLayoutPane(new Component[][]{new Component[]{new UILabel(Inter.getLocText("FR-Designer-Widget_Style")), borderStyleEditor}}, TableLayoutHelper.FILL_LASTCOLUMN, 18, 7); |
||||
jPanel.setBorder(BorderFactory.createEmptyBorder(10, 0, 10, 0)); |
||||
advancePane.add(jPanel, BorderLayout.CENTER); |
||||
|
||||
UIExpandablePane layoutExpandablePane = new UIExpandablePane(Inter.getLocText("FR-Designer_Advanced"), 280, 20, advancePane ); |
||||
|
||||
this.add(layoutExpandablePane, BorderLayout.CENTER); |
||||
} |
||||
|
||||
|
||||
@Override |
||||
public String title4PopupWindow() { |
||||
return "borderStyleWidget"; |
||||
} |
||||
|
||||
@Override |
||||
public void populateBean(AbstractBorderStyleWidget ob) { |
||||
borderStyleEditor.setValue(ob.getBorderStyle()); |
||||
} |
||||
|
||||
|
||||
@Override |
||||
public AbstractBorderStyleWidget updateBean() { |
||||
AbstractBorderStyleWidget abstractBorderStyleWidget = (AbstractBorderStyleWidget)creator.toData(); |
||||
abstractBorderStyleWidget.setBorderStyle((LayoutBorderStyle) borderStyleEditor.getValue()); |
||||
return abstractBorderStyleWidget; |
||||
|
||||
} |
||||
|
||||
|
||||
@Override |
||||
public DataCreatorUI dataUI() { |
||||
return null; |
||||
} |
||||
|
||||
} |
Loading…
Reference in new issue