public Image getImage(Object element) { if (element instanceof StartHome) { return Images.CONFIG_USER; } else if (element instanceof XLogData) { XLogData d = (XLogData) element; AgentObject ao = agentProxy.getAgentObject(DateUtil.yyyymmdd(d.p.endTime), d.serverId, d.p.objHash); if (ao != null) { return Images.getObjectIcon(ao.getObjType(), true, ao.getServerId()); } } return null; }
private void duplicateView() { Server server = ServerManager.getInstance().getServer(serverId); String counterDisplay = ""; if (server != null) { counterDisplay = server.getCounterEngine().getCounterDisplayName(objType, counter); } Action duplicateAction = new OpenPastLongDateTotalAction( window, counterDisplay, objType, counter, Images.getCounterImage(objType, counter, serverId), sDate, eDate, serverId); duplicateAction.run(); }