⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 reordertest.java

📁 adf-faces 甲骨文的jsf组件,功能很强.开源免费.
💻 JAVA
字号:
package oracle.adfdemo.view.faces;

import java.util.List;
import javax.faces.component.UIComponent;
import javax.faces.event.ActionEvent;
import oracle.adf.view.faces.component.core.output.CoreOutputText;

public class ReorderTest
{
  public void setPanel(UIComponent panel)
  {
    _panel = panel;
  }

  public UIComponent getPanel()
  {
    return _panel;
  }

  public void add(ActionEvent event)
  {
    List children = _panel.getChildren();
    CoreOutputText output = new CoreOutputText();
    output.setValue("Item " + (children.size() + 1));
    children.add(0, output);
  }

  public void remove(ActionEvent event)
  {
    List children = _panel.getChildren();
    children.remove(children.size() - 1);
  }

  public void removeFirst(ActionEvent event)
  {
    List children = _panel.getChildren();
    children.remove(0);
  }

  public void rotate(ActionEvent event)
  {
    List children = _panel.getChildren();
    Object o = children.get(0);
    children.remove(0);
    children.add(o);
  }

  public void removeSeparator(ActionEvent event)
  {
    _panel.getFacets().remove("separator");
  }

  public void setSeparator(ActionEvent event)
  {
    CoreOutputText output = new CoreOutputText();
    output.setValue("New Separator");
    _panel.getFacets().put("separator", output);
  }
  
  private UIComponent _panel;
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -