/**隐藏面板和按钮***/
private void hidePlanButtons(KDTable table){
Component c = table.getParent().getParent();
if(c instanceof DetailPanel){
DetailPanel panel = (DetailPanel)c;
Component [] components = panel.getComponents();
int t = 0;
for (int i = 0; i < components.length; i++) {
Component component = components [i];
if(component instanceof KDPanel){
KDPanel kdpanel = (KDPanel)component;
if("controlPanel".equals(kdpanel.getName())){
panel.remove(kdpanel);
t = kdpanel.getHeight();
System.out.println("hight="+t);
System.out.println("[DEBUG]:(public) remove the '"+component.getName() + "' panel");
}else{
kdpanel.setLocation(kdpanel.getLocation().x,kdpanel.getLocation().y-t);
kdpanel.getParent().add(kdpanel,new KDLayout.Constraints(kdpanel.getX()
,kdpanel.getY(),kdpanel.getWidth(),kdpanel.getHeight(),15));
}
}
}
}
}
隐藏BIM发布出来的面板和按钮
最新推荐文章于 2022-07-05 16:03:25 发布