/** * Returns the relative weight of the portlet with respect to the other * portlets in the same category of the Control Panel. * * @return the relative weight of the portlet with respect to the other portlets in the same category of the Control Panel */ @Override public double getControlPanelEntryWeight() { return _portlet.getControlPanelEntryWeight(); }
@Override public int compare(Portlet portlet1, Portlet portlet2) { double portletWeight1 = portlet1.getControlPanelEntryWeight(); double portletWeight2 = portlet2.getControlPanelEntryWeight(); int value = Double.compare(portletWeight1, portletWeight2); if (value != 0) { return value; } String portletId1 = portlet1.getPortletId(); String portletId2 = portlet2.getPortletId(); return portletId1.compareTo(portletId2); }